@sciexpr/presets 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -25,23 +25,32 @@ __export(index_exports, {
25
25
  ALL_GREEK: () => ALL_GREEK,
26
26
  ALL_MATH_TEMPLATES: () => ALL_MATH_TEMPLATES,
27
27
  CALCULUS_TEMPLATES: () => CALCULUS_TEMPLATES,
28
+ CHEM_PALETTE_CATEGORIES: () => CHEM_PALETTE_CATEGORIES,
28
29
  COMPOUND_TEMPLATES: () => COMPOUND_TEMPLATES,
29
30
  ELECTROCHEM_TEMPLATES: () => ELECTROCHEM_TEMPLATES,
31
+ ELEMENT_TEMPLATES: () => ELEMENT_TEMPLATES,
30
32
  GREEK_GROUPS: () => GREEK_GROUPS,
31
33
  GREEK_LOWERCASE_GROUP: () => GREEK_LOWERCASE_GROUP,
32
34
  GREEK_UPPERCASE_GROUP: () => GREEK_UPPERCASE_GROUP,
35
+ ION_TEMPLATES: () => ION_TEMPLATES,
33
36
  LINEAR_ALGEBRA_TEMPLATES: () => LINEAR_ALGEBRA_TEMPLATES,
34
37
  PHYSICS_TEMPLATES: () => PHYSICS_TEMPLATES,
35
38
  REACTION_TEMPLATES: () => REACTION_TEMPLATES,
36
39
  STATS_TEMPLATES: () => STATS_TEMPLATES,
37
40
  TRIG_TEMPLATES: () => TRIG_TEMPLATES,
38
41
  getAcids: () => getAcids,
42
+ getAnions: () => getAnions,
39
43
  getBases: () => getBases,
44
+ getCations: () => getCations,
45
+ getElementsByGroup: () => getElementsByGroup,
46
+ getElementsByPeriod: () => getElementsByPeriod,
40
47
  getTemplateById: () => getTemplateById,
41
48
  getTemplatesByCategory: () => getTemplatesByCategory,
42
49
  searchCompounds: () => searchCompounds,
50
+ searchElements: () => searchElements,
43
51
  searchGreek: () => searchGreek,
44
52
  searchGreekWithVariants: () => searchGreekWithVariants,
53
+ searchIons: () => searchIons,
45
54
  searchTemplates: () => searchTemplates
46
55
  });
47
56
  module.exports = __toCommonJS(index_exports);
@@ -322,13 +331,48 @@ var STATS_TEMPLATES = [
322
331
  }
323
332
  ];
324
333
  var PHYSICS_TEMPLATES = [
334
+ // --------------------------------------------------------------------------
335
+ // 力学 (Mechanics)
336
+ // --------------------------------------------------------------------------
325
337
  {
326
- id: "einstein-emc2",
327
- name: "\u8D28\u80FD\u65B9\u7A0B",
328
- latex: "E = mc^{2}",
338
+ id: "velocity-avg",
339
+ name: "\u5E73\u5747\u901F\u5EA6",
340
+ latex: "\\bar{v} = \\frac{\\Delta x}{\\Delta t}",
329
341
  category: "physics",
330
- description: "\u7231\u56E0\u65AF\u5766\u8D28\u80FD\u65B9\u7A0B",
331
- tags: ["einstein", "energy", "mass"]
342
+ description: "\u5E73\u5747\u901F\u5EA6\u5B9A\u4E49",
343
+ tags: ["kinematics", "velocity", "mechanics"]
344
+ },
345
+ {
346
+ id: "acceleration-def",
347
+ name: "\u52A0\u901F\u5EA6\u5B9A\u4E49",
348
+ latex: "\\vec{a} = \\frac{\\Delta \\vec{v}}{\\Delta t}",
349
+ category: "physics",
350
+ description: "\u52A0\u901F\u5EA6\u5B9A\u4E49",
351
+ tags: ["kinematics", "acceleration", "mechanics"]
352
+ },
353
+ {
354
+ id: "kinematic-vt",
355
+ name: "\u5300\u53D8\u901F\u901F\u5EA6\u516C\u5F0F",
356
+ latex: "v = v_0 + at",
357
+ category: "physics",
358
+ description: "\u5300\u53D8\u901F\u76F4\u7EBF\u8FD0\u52A8\u901F\u5EA6\u516C\u5F0F",
359
+ tags: ["kinematics", "mechanics"]
360
+ },
361
+ {
362
+ id: "kinematic-s",
363
+ name: "\u5300\u53D8\u901F\u4F4D\u79FB\u516C\u5F0F",
364
+ latex: "s = v_0 t + \\frac{1}{2} a t^{2}",
365
+ category: "physics",
366
+ description: "\u5300\u53D8\u901F\u76F4\u7EBF\u8FD0\u52A8\u4F4D\u79FB\u516C\u5F0F",
367
+ tags: ["kinematics", "mechanics"]
368
+ },
369
+ {
370
+ id: "kinematic-v2",
371
+ name: "\u901F\u5EA6-\u4F4D\u79FB\u5173\u7CFB",
372
+ latex: "v^{2} - v_0^{2} = 2 a s",
373
+ category: "physics",
374
+ description: "\u5300\u53D8\u901F\u76F4\u7EBF\u8FD0\u52A8\u901F\u5EA6-\u4F4D\u79FB\u5173\u7CFB",
375
+ tags: ["kinematics", "mechanics"]
332
376
  },
333
377
  {
334
378
  id: "newton-2nd",
@@ -336,8 +380,316 @@ var PHYSICS_TEMPLATES = [
336
380
  latex: "\\vec{F} = m\\vec{a}",
337
381
  category: "physics",
338
382
  description: "\u725B\u987F\u7B2C\u4E8C\u5B9A\u5F8B",
339
- tags: ["newton", "force", "acceleration"]
383
+ tags: ["newton", "force", "acceleration", "mechanics"]
384
+ },
385
+ {
386
+ id: "newton-3rd",
387
+ name: "\u725B\u987F\u7B2C\u4E09\u5B9A\u5F8B",
388
+ latex: "\\vec{F}_{AB} = -\\vec{F}_{BA}",
389
+ category: "physics",
390
+ description: "\u725B\u987F\u7B2C\u4E09\u5B9A\u5F8B\uFF08\u4F5C\u7528\u529B\u4E0E\u53CD\u4F5C\u7528\u529B\uFF09",
391
+ tags: ["newton", "mechanics"]
392
+ },
393
+ {
394
+ id: "momentum-def",
395
+ name: "\u52A8\u91CF\u5B9A\u4E49",
396
+ latex: "\\vec{p} = m\\vec{v}",
397
+ category: "physics",
398
+ description: "\u52A8\u91CF\u5B9A\u4E49",
399
+ tags: ["momentum", "mechanics"]
400
+ },
401
+ {
402
+ id: "momentum-conservation",
403
+ name: "\u52A8\u91CF\u5B88\u6052",
404
+ latex: "\\vec{p}_1 + \\vec{p}_2 = \\vec{p}_1' + \\vec{p}_2'",
405
+ category: "physics",
406
+ description: "\u52A8\u91CF\u5B88\u6052\u5B9A\u5F8B",
407
+ tags: ["momentum", "conservation", "mechanics"]
408
+ },
409
+ {
410
+ id: "impulse",
411
+ name: "\u51B2\u91CF\u5B9A\u7406",
412
+ latex: "\\vec{F}\\Delta t = \\Delta \\vec{p}",
413
+ category: "physics",
414
+ description: "\u51B2\u91CF\u5B9A\u7406\uFF08\u52A8\u91CF\u5B9A\u7406\uFF09",
415
+ tags: ["impulse", "momentum", "mechanics"]
416
+ },
417
+ {
418
+ id: "kinetic-energy",
419
+ name: "\u52A8\u80FD\u5B9A\u7406",
420
+ latex: "W = \\Delta E_k = \\frac{1}{2} m v^{2} - \\frac{1}{2} m v_0^{2}",
421
+ category: "physics",
422
+ description: "\u52A8\u80FD\u5B9A\u7406",
423
+ tags: ["energy", "kinetic", "mechanics"]
424
+ },
425
+ {
426
+ id: "potential-spring",
427
+ name: "\u5F39\u6027\u52BF\u80FD",
428
+ latex: "E_p = \\frac{1}{2} k x^{2}",
429
+ category: "physics",
430
+ description: "\u5F39\u6027\u52BF\u80FD\uFF08\u80E1\u514B\u5B9A\u5F8B\u52BF\u80FD\uFF09",
431
+ tags: ["energy", "spring", "mechanics"]
432
+ },
433
+ {
434
+ id: "potential-gravity",
435
+ name: "\u91CD\u529B\u52BF\u80FD",
436
+ latex: "E_p = mgh",
437
+ category: "physics",
438
+ description: "\u91CD\u529B\u52BF\u80FD",
439
+ tags: ["energy", "gravity", "mechanics"]
440
+ },
441
+ {
442
+ id: "mechanical-energy",
443
+ name: "\u673A\u68B0\u80FD\u5B88\u6052",
444
+ latex: "E_k + E_p = \\text{const}",
445
+ category: "physics",
446
+ description: "\u673A\u68B0\u80FD\u5B88\u6052\u5B9A\u5F8B",
447
+ tags: ["energy", "conservation", "mechanics"]
448
+ },
449
+ {
450
+ id: "work-def",
451
+ name: "\u529F\u7684\u5B9A\u4E49",
452
+ latex: "W = \\vec{F} \\cdot \\vec{s} = F s \\cos\\theta",
453
+ category: "physics",
454
+ description: "\u6052\u529B\u505A\u529F",
455
+ tags: ["work", "energy", "mechanics"]
456
+ },
457
+ {
458
+ id: "power-def",
459
+ name: "\u529F\u7387\u5B9A\u4E49",
460
+ latex: "P = \\frac{W}{t} = \\vec{F} \\cdot \\vec{v}",
461
+ category: "physics",
462
+ description: "\u5E73\u5747\u529F\u7387\u4E0E\u77AC\u65F6\u529F\u7387",
463
+ tags: ["power", "mechanics"]
464
+ },
465
+ {
466
+ id: "projectile-motion",
467
+ name: "\u629B\u4F53\u8FD0\u52A8\u65B9\u7A0B",
468
+ latex: "\\begin{cases} x = v_0 t \\cos\\theta \\\\ y = v_0 t \\sin\\theta - \\frac{1}{2} g t^{2} \\end{cases}",
469
+ category: "physics",
470
+ description: "\u629B\u4F53\u8FD0\u52A8\u53C2\u6570\u65B9\u7A0B",
471
+ tags: ["projectile", "kinematics", "mechanics"]
472
+ },
473
+ {
474
+ id: "shm",
475
+ name: "\u7B80\u8C10\u632F\u52A8",
476
+ latex: "x(t) = A \\cos(\\omega t + \\phi_0)",
477
+ category: "physics",
478
+ description: "\u7B80\u8C10\u632F\u52A8\u4F4D\u79FB\u65B9\u7A0B",
479
+ tags: ["shm", "oscillation", "mechanics"]
480
+ },
481
+ {
482
+ id: "shm-energy",
483
+ name: "\u7B80\u8C10\u632F\u52A8\u80FD\u91CF",
484
+ latex: "E = \\frac{1}{2} k A^{2}",
485
+ category: "physics",
486
+ description: "\u7B80\u8C10\u632F\u52A8\u603B\u80FD\u91CF",
487
+ tags: ["shm", "energy", "mechanics"]
488
+ },
489
+ // --------------------------------------------------------------------------
490
+ // 旋转运动 (Rotational Motion)
491
+ // --------------------------------------------------------------------------
492
+ {
493
+ id: "centripetal-force",
494
+ name: "\u5411\u5FC3\u529B",
495
+ latex: "F_c = m \\frac{v^{2}}{r} = m \\omega^{2} r",
496
+ category: "physics",
497
+ description: "\u5411\u5FC3\u529B\u516C\u5F0F",
498
+ tags: ["rotation", "centripetal", "mechanics"]
499
+ },
500
+ {
501
+ id: "angular-momentum",
502
+ name: "\u89D2\u52A8\u91CF",
503
+ latex: "\\vec{L} = \\vec{r} \\times \\vec{p} = I \\vec{\\omega}",
504
+ category: "physics",
505
+ description: "\u89D2\u52A8\u91CF\u5B9A\u4E49",
506
+ tags: ["rotation", "angular-momentum", "mechanics"]
507
+ },
508
+ {
509
+ id: "torque-def",
510
+ name: "\u529B\u77E9\u5B9A\u4E49",
511
+ latex: "\\vec{\\tau} = \\vec{r} \\times \\vec{F}",
512
+ category: "physics",
513
+ description: "\u529B\u77E9\u5B9A\u4E49",
514
+ tags: ["rotation", "torque", "mechanics"]
515
+ },
516
+ {
517
+ id: "torque-angular",
518
+ name: "\u8F6C\u52A8\u5B9A\u5F8B",
519
+ latex: "\\vec{\\tau} = I \\vec{\\alpha}",
520
+ category: "physics",
521
+ description: "\u521A\u4F53\u8F6C\u52A8\u5B9A\u5F8B",
522
+ tags: ["rotation", "torque", "mechanics"]
523
+ },
524
+ {
525
+ id: "rotational-ke",
526
+ name: "\u8F6C\u52A8\u52A8\u80FD",
527
+ latex: "E_k = \\frac{1}{2} I \\omega^{2}",
528
+ category: "physics",
529
+ description: "\u521A\u4F53\u8F6C\u52A8\u52A8\u80FD",
530
+ tags: ["rotation", "energy", "mechanics"]
531
+ },
532
+ // --------------------------------------------------------------------------
533
+ // 电磁学 (Electromagnetism)
534
+ // --------------------------------------------------------------------------
535
+ {
536
+ id: "coulomb-law",
537
+ name: "\u5E93\u4ED1\u5B9A\u5F8B",
538
+ latex: "F = k_e \\frac{q_1 q_2}{r^{2}}",
539
+ category: "physics",
540
+ description: "\u5E93\u4ED1\u5B9A\u5F8B\uFF08\u9759\u7535\u529B\uFF09",
541
+ tags: ["electrostatics", "electromagnetism"]
542
+ },
543
+ {
544
+ id: "electric-field",
545
+ name: "\u7535\u573A\u5F3A\u5EA6",
546
+ latex: "\\vec{E} = \\frac{\\vec{F}}{q}",
547
+ category: "physics",
548
+ description: "\u7535\u573A\u5F3A\u5EA6\u5B9A\u4E49",
549
+ tags: ["electrostatics", "electromagnetism"]
550
+ },
551
+ {
552
+ id: "gauss-law",
553
+ name: "\u9AD8\u65AF\u5B9A\u5F8B",
554
+ latex: "\\oint \\vec{E} \\cdot d\\vec{A} = \\frac{Q_{\\text{enc}}}{\\varepsilon_0}",
555
+ category: "physics",
556
+ description: "\u9AD8\u65AF\u5B9A\u5F8B\uFF08\u7535\u573A\uFF09",
557
+ tags: ["maxwell", "electrostatics", "electromagnetism"]
558
+ },
559
+ {
560
+ id: "magnetic-flux",
561
+ name: "\u78C1\u901A\u91CF",
562
+ latex: "\\Phi_B = \\int \\vec{B} \\cdot d\\vec{A}",
563
+ category: "physics",
564
+ description: "\u78C1\u901A\u91CF\u5B9A\u4E49",
565
+ tags: ["magnetism", "electromagnetism"]
566
+ },
567
+ {
568
+ id: "maxwell-faraday",
569
+ name: "\u6CD5\u62C9\u7B2C\u7535\u78C1\u611F\u5E94",
570
+ latex: "\\mathcal{E} = -\\frac{d\\Phi_B}{dt}",
571
+ category: "physics",
572
+ description: "\u6CD5\u62C9\u7B2C\u7535\u78C1\u611F\u5E94\u5B9A\u5F8B",
573
+ tags: ["maxwell", "electromagnetism", "induction"]
340
574
  },
575
+ {
576
+ id: "ampere-law",
577
+ name: "\u5B89\u57F9\u73AF\u8DEF\u5B9A\u7406",
578
+ latex: "\\oint \\vec{B} \\cdot d\\vec{l} = \\mu_0 I_{\\text{enc}}",
579
+ category: "physics",
580
+ description: "\u5B89\u57F9\u73AF\u8DEF\u5B9A\u7406",
581
+ tags: ["maxwell", "magnetism", "electromagnetism"]
582
+ },
583
+ {
584
+ id: "lorentz-force",
585
+ name: "\u6D1B\u4F26\u5179\u529B",
586
+ latex: "\\vec{F} = q(\\vec{E} + \\vec{v} \\times \\vec{B})",
587
+ category: "physics",
588
+ description: "\u6D1B\u4F26\u5179\u529B\u516C\u5F0F",
589
+ tags: ["electromagnetism", "lorentz"]
590
+ },
591
+ {
592
+ id: "ohm-law",
593
+ name: "\u6B27\u59C6\u5B9A\u5F8B",
594
+ latex: "V = I R",
595
+ category: "physics",
596
+ description: "\u6B27\u59C6\u5B9A\u5F8B",
597
+ tags: ["circuit", "electromagnetism"]
598
+ },
599
+ {
600
+ id: "joule-heating",
601
+ name: "\u7126\u8033\u5B9A\u5F8B",
602
+ latex: "P = I^{2} R",
603
+ category: "physics",
604
+ description: "\u7126\u8033\u5B9A\u5F8B\uFF08\u7535\u963B\u53D1\u70ED\u529F\u7387\uFF09",
605
+ tags: ["circuit", "electromagnetism"]
606
+ },
607
+ {
608
+ id: "capacitor-energy",
609
+ name: "\u7535\u5BB9\u5668\u80FD\u91CF",
610
+ latex: "E = \\frac{1}{2} C V^{2} = \\frac{Q^{2}}{2C}",
611
+ category: "physics",
612
+ description: "\u7535\u5BB9\u5668\u50A8\u5B58\u7684\u7535\u80FD",
613
+ tags: ["circuit", "electromagnetism"]
614
+ },
615
+ {
616
+ id: "inductor-energy",
617
+ name: "\u7535\u611F\u80FD\u91CF",
618
+ latex: "E = \\frac{1}{2} L I^{2}",
619
+ category: "physics",
620
+ description: "\u7535\u611F\u50A8\u5B58\u7684\u78C1\u80FD",
621
+ tags: ["circuit", "electromagnetism"]
622
+ },
623
+ {
624
+ id: "capacitance",
625
+ name: "\u7535\u5BB9\u5B9A\u4E49",
626
+ latex: "C = \\frac{Q}{V}",
627
+ category: "physics",
628
+ description: "\u7535\u5BB9\u5B9A\u4E49",
629
+ tags: ["circuit", "electromagnetism"]
630
+ },
631
+ // --------------------------------------------------------------------------
632
+ // 热力学 (Thermodynamics)
633
+ // --------------------------------------------------------------------------
634
+ {
635
+ id: "ideal-gas-law",
636
+ name: "\u7406\u60F3\u6C14\u4F53\u72B6\u6001\u65B9\u7A0B",
637
+ latex: "PV = nRT",
638
+ category: "physics",
639
+ description: "\u7406\u60F3\u6C14\u4F53\u72B6\u6001\u65B9\u7A0B",
640
+ tags: ["thermodynamics", "gas"]
641
+ },
642
+ {
643
+ id: "first-law-thermo",
644
+ name: "\u70ED\u529B\u5B66\u7B2C\u4E00\u5B9A\u5F8B",
645
+ latex: "\\Delta U = Q - W",
646
+ category: "physics",
647
+ description: "\u70ED\u529B\u5B66\u7B2C\u4E00\u5B9A\u5F8B\uFF08\u5185\u80FD\u53D8\u5316 = \u5438\u70ED - \u5BF9\u5916\u505A\u529F\uFF09",
648
+ tags: ["thermodynamics", "energy"]
649
+ },
650
+ {
651
+ id: "entropy-def",
652
+ name: "\u71B5\u53D8\u5B9A\u4E49",
653
+ latex: "\\Delta S = \\int \\frac{dQ_{\\text{rev}}}{T}",
654
+ category: "physics",
655
+ description: "\u71B5\u53D8\u5B9A\u4E49\uFF08\u53EF\u9006\u8FC7\u7A0B\uFF09",
656
+ tags: ["thermodynamics", "entropy"]
657
+ },
658
+ {
659
+ id: "carnot-efficiency",
660
+ name: "\u5361\u8BFA\u6548\u7387",
661
+ latex: "\\eta = 1 - \\frac{T_C}{T_H}",
662
+ category: "physics",
663
+ description: "\u5361\u8BFA\u70ED\u673A\u6548\u7387",
664
+ tags: ["thermodynamics", "carnot"]
665
+ },
666
+ {
667
+ id: "thermal-expansion",
668
+ name: "\u70ED\u81A8\u80C0",
669
+ latex: "\\Delta L = \\alpha L_0 \\Delta T",
670
+ category: "physics",
671
+ description: "\u7EBF\u81A8\u80C0\u516C\u5F0F",
672
+ tags: ["thermodynamics", "expansion"]
673
+ },
674
+ {
675
+ id: "heat-capacity",
676
+ name: "\u70ED\u5BB9\u91CF",
677
+ latex: "Q = mc\\Delta T",
678
+ category: "physics",
679
+ description: "\u70ED\u5BB9\u91CF\u4E0E\u6BD4\u70ED\u5BB9",
680
+ tags: ["thermodynamics", "heat"]
681
+ },
682
+ {
683
+ id: "stefan-boltzmann",
684
+ name: "\u65AF\u7279\u85E9-\u73BB\u5C14\u5179\u66FC\u5B9A\u5F8B",
685
+ latex: "P = \\sigma A T^{4}",
686
+ category: "physics",
687
+ description: "\u9ED1\u4F53\u8F90\u5C04\u603B\u529F\u7387",
688
+ tags: ["thermodynamics", "radiation"]
689
+ },
690
+ // --------------------------------------------------------------------------
691
+ // 量子力学 (Quantum Mechanics)
692
+ // --------------------------------------------------------------------------
341
693
  {
342
694
  id: "schrodinger",
343
695
  name: "\u859B\u5B9A\u8C14\u65B9\u7A0B",
@@ -347,20 +699,299 @@ var PHYSICS_TEMPLATES = [
347
699
  tags: ["quantum", "schrodinger"]
348
700
  },
349
701
  {
350
- id: "maxwell-faraday",
351
- name: "\u6CD5\u62C9\u7B2C\u5B9A\u5F8B",
352
- latex: "\\nabla \\times \\vec{E} = -\\frac{\\partial\\vec{B}}{\\partial t}",
702
+ id: "schrodinger-tise",
703
+ name: "\u5B9A\u6001\u859B\u5B9A\u8C14\u65B9\u7A0B",
704
+ latex: "\\hat{H} \\psi = E \\psi",
353
705
  category: "physics",
354
- description: "\u9EA6\u514B\u65AF\u97E6-\u6CD5\u62C9\u7B2C\u65B9\u7A0B",
355
- tags: ["maxwell", "electromagnetism"]
706
+ description: "\u5B9A\u6001\uFF08\u4E0D\u542B\u65F6\uFF09\u859B\u5B9A\u8C14\u65B9\u7A0B",
707
+ tags: ["quantum", "schrodinger"]
708
+ },
709
+ {
710
+ id: "uncertainty-principle",
711
+ name: "\u4E0D\u786E\u5B9A\u6027\u539F\u7406",
712
+ latex: "\\Delta x \\cdot \\Delta p \\geq \\frac{\\hbar}{2}",
713
+ category: "physics",
714
+ description: "\u6D77\u68EE\u5821\u4E0D\u786E\u5B9A\u6027\u539F\u7406",
715
+ tags: ["quantum", "heisenberg"]
716
+ },
717
+ {
718
+ id: "debroglie",
719
+ name: "\u5FB7\u5E03\u7F57\u610F\u6CE2\u957F",
720
+ latex: "\\lambda = \\frac{h}{p} = \\frac{h}{mv}",
721
+ category: "physics",
722
+ description: "\u5FB7\u5E03\u7F57\u610F\u7269\u8D28\u6CE2",
723
+ tags: ["quantum", "wave-particle"]
356
724
  },
725
+ {
726
+ id: "photoelectric",
727
+ name: "\u5149\u7535\u6548\u5E94",
728
+ latex: "E_k = h\\nu - W_0",
729
+ category: "physics",
730
+ description: "\u5149\u7535\u6548\u5E94\u65B9\u7A0B\uFF08\u7231\u56E0\u65AF\u5766\uFF09",
731
+ tags: ["quantum", "photon", "photoelectric"]
732
+ },
733
+ {
734
+ id: "commutator-xp",
735
+ name: "\u4F4D\u7F6E-\u52A8\u91CF\u5BF9\u6613\u5173\u7CFB",
736
+ latex: "[\\hat{x}, \\hat{p}] = i\\hbar",
737
+ category: "physics",
738
+ description: "\u6B63\u5219\u5BF9\u6613\u5173\u7CFB",
739
+ tags: ["quantum", "commutator"]
740
+ },
741
+ {
742
+ id: "bohr-model",
743
+ name: "\u73BB\u5C14\u6C22\u539F\u5B50\u6A21\u578B",
744
+ latex: "E_n = -\\frac{13.6 \\ \\text{eV}}{n^{2}}",
745
+ category: "physics",
746
+ description: "\u73BB\u5C14\u6C22\u539F\u5B50\u80FD\u7EA7",
747
+ tags: ["quantum", "atom", "bohr"]
748
+ },
749
+ {
750
+ id: "pauli-exclusion",
751
+ name: "\u6CE1\u5229\u4E0D\u76F8\u5BB9\u539F\u7406",
752
+ latex: "\\Psi(1,2) = -\\Psi(2,1)",
753
+ category: "physics",
754
+ description: "\u6CE1\u5229\u4E0D\u76F8\u5BB9\u539F\u7406\uFF08\u8D39\u7C73\u5B50\u53CD\u5BF9\u79F0\u6CE2\u51FD\u6570\uFF09",
755
+ tags: ["quantum", "pauli"]
756
+ },
757
+ {
758
+ id: "harmonic-oscillator",
759
+ name: "\u91CF\u5B50\u8C10\u632F\u5B50",
760
+ latex: "E_n = \\hbar \\omega \\left(n + \\frac{1}{2}\\right)",
761
+ category: "physics",
762
+ description: "\u4E00\u7EF4\u91CF\u5B50\u8C10\u632F\u5B50\u80FD\u7EA7",
763
+ tags: ["quantum", "oscillator"]
764
+ },
765
+ {
766
+ id: "potential-well",
767
+ name: "\u65E0\u9650\u6DF1\u52BF\u9631",
768
+ latex: "E_n = \\frac{n^{2} \\pi^{2} \\hbar^{2}}{2 m L^{2}}",
769
+ category: "physics",
770
+ description: "\u4E00\u7EF4\u65E0\u9650\u6DF1\u65B9\u52BF\u9631\u80FD\u7EA7",
771
+ tags: ["quantum", "potential-well"]
772
+ },
773
+ // --------------------------------------------------------------------------
774
+ // 相对论 (Relativity)
775
+ // --------------------------------------------------------------------------
776
+ {
777
+ id: "einstein-emc2",
778
+ name: "\u8D28\u80FD\u65B9\u7A0B",
779
+ latex: "E = mc^{2}",
780
+ category: "physics",
781
+ description: "\u7231\u56E0\u65AF\u5766\u8D28\u80FD\u65B9\u7A0B",
782
+ tags: ["relativity", "einstein", "energy", "mass"]
783
+ },
784
+ {
785
+ id: "lorentz-transform",
786
+ name: "\u6D1B\u4F26\u5179\u53D8\u6362",
787
+ latex: "x' = \\gamma(x - vt), \\; t' = \\gamma\\left(t - \\frac{vx}{c^{2}}\\right)",
788
+ category: "physics",
789
+ description: "\u6D1B\u4F26\u5179\u5750\u6807\u53D8\u6362",
790
+ tags: ["relativity", "lorentz"]
791
+ },
792
+ {
793
+ id: "time-dilation",
794
+ name: "\u65F6\u95F4\u81A8\u80C0",
795
+ latex: "\\Delta t = \\frac{\\Delta t_0}{\\sqrt{1 - v^{2}/c^{2}}}",
796
+ category: "physics",
797
+ description: "\u76F8\u5BF9\u8BBA\u65F6\u95F4\u81A8\u80C0",
798
+ tags: ["relativity", "time"]
799
+ },
800
+ {
801
+ id: "length-contraction",
802
+ name: "\u957F\u5EA6\u6536\u7F29",
803
+ latex: "L = L_0 \\sqrt{1 - \\frac{v^{2}}{c^{2}}}",
804
+ category: "physics",
805
+ description: "\u76F8\u5BF9\u8BBA\u957F\u5EA6\u6536\u7F29",
806
+ tags: ["relativity", "length"]
807
+ },
808
+ {
809
+ id: "energy-momentum",
810
+ name: "\u80FD\u91CF-\u52A8\u91CF\u5173\u7CFB",
811
+ latex: "E^{2} = (pc)^{2} + (mc^{2})^{2}",
812
+ category: "physics",
813
+ description: "\u76F8\u5BF9\u8BBA\u80FD\u91CF-\u52A8\u91CF\u5173\u7CFB",
814
+ tags: ["relativity", "energy", "momentum"]
815
+ },
816
+ {
817
+ id: "velocity-addition",
818
+ name: "\u76F8\u5BF9\u8BBA\u901F\u5EA6\u53E0\u52A0",
819
+ latex: "u = \\frac{u' + v}{1 + \\frac{u' v}{c^{2}}}",
820
+ category: "physics",
821
+ description: "\u76F8\u5BF9\u8BBA\u901F\u5EA6\u53E0\u52A0\u516C\u5F0F",
822
+ tags: ["relativity", "velocity"]
823
+ },
824
+ {
825
+ id: "lorentz-factor",
826
+ name: "\u6D1B\u4F26\u5179\u56E0\u5B50",
827
+ latex: "\\gamma = \\frac{1}{\\sqrt{1 - v^{2}/c^{2}}}",
828
+ category: "physics",
829
+ description: "\u6D1B\u4F26\u5179\u56E0\u5B50 \u03B3",
830
+ tags: ["relativity", "lorentz"]
831
+ },
832
+ // --------------------------------------------------------------------------
833
+ // 万有引力与天体物理 (Gravitation & Astrophysics)
834
+ // --------------------------------------------------------------------------
357
835
  {
358
836
  id: "gravitation",
359
- name: "\u4E07\u6709\u5F15\u529B",
837
+ name: "\u4E07\u6709\u5F15\u529B\u5B9A\u5F8B",
360
838
  latex: "F = G \\frac{m_1 m_2}{r^{2}}",
361
839
  category: "physics",
362
840
  description: "\u725B\u987F\u4E07\u6709\u5F15\u529B\u5B9A\u5F8B",
363
- tags: ["newton", "gravitation"]
841
+ tags: ["gravitation", "newton", "mechanics"]
842
+ },
843
+ {
844
+ id: "kepler-3rd",
845
+ name: "\u5F00\u666E\u52D2\u7B2C\u4E09\u5B9A\u5F8B",
846
+ latex: "\\frac{T^{2}}{a^{3}} = \\frac{4\\pi^{2}}{GM}",
847
+ category: "physics",
848
+ description: "\u5F00\u666E\u52D2\u7B2C\u4E09\u5B9A\u5F8B",
849
+ tags: ["gravitation", "kepler", "orbit"]
850
+ },
851
+ {
852
+ id: "escape-velocity",
853
+ name: "\u9003\u9038\u901F\u5EA6",
854
+ latex: "v_{\\text{esc}} = \\sqrt{\\frac{2GM}{R}}",
855
+ category: "physics",
856
+ description: "\u5929\u4F53\u9003\u9038\u901F\u5EA6",
857
+ tags: ["gravitation", "escape"]
858
+ },
859
+ {
860
+ id: "orbital-velocity",
861
+ name: "\u8F68\u9053\u901F\u5EA6",
862
+ latex: "v = \\sqrt{\\frac{GM}{r}}",
863
+ category: "physics",
864
+ description: "\u5706\u8F68\u9053\u73AF\u7ED5\u901F\u5EA6",
865
+ tags: ["gravitation", "orbit"]
866
+ },
867
+ // --------------------------------------------------------------------------
868
+ // 光学 (Optics)
869
+ // --------------------------------------------------------------------------
870
+ {
871
+ id: "snell-law",
872
+ name: "\u65AF\u6D85\u5C14\u6298\u5C04\u5B9A\u5F8B",
873
+ latex: "n_1 \\sin\\theta_1 = n_2 \\sin\\theta_2",
874
+ category: "physics",
875
+ description: "\u65AF\u6D85\u5C14\u6298\u5C04\u5B9A\u5F8B",
876
+ tags: ["optics", "refraction"]
877
+ },
878
+ {
879
+ id: "lens-equation",
880
+ name: "\u900F\u955C\u516C\u5F0F",
881
+ latex: "\\frac{1}{f} = \\frac{1}{d_o} + \\frac{1}{d_i}",
882
+ category: "physics",
883
+ description: "\u8584\u900F\u955C\u65B9\u7A0B",
884
+ tags: ["optics", "lens"]
885
+ },
886
+ {
887
+ id: "young-double-slit",
888
+ name: "\u6768\u6C0F\u53CC\u7F1D\u5E72\u6D89",
889
+ latex: "d \\sin\\theta = m \\lambda",
890
+ category: "physics",
891
+ description: "\u6768\u6C0F\u53CC\u7F1D\u5E72\u6D89\uFF08\u660E\u7EB9\u6761\u4EF6\uFF09",
892
+ tags: ["optics", "interference"]
893
+ },
894
+ {
895
+ id: "diffraction-grating",
896
+ name: "\u5149\u6805\u65B9\u7A0B",
897
+ latex: "d \\sin\\theta = k \\lambda",
898
+ category: "physics",
899
+ description: "\u884D\u5C04\u5149\u6805\u65B9\u7A0B",
900
+ tags: ["optics", "diffraction"]
901
+ },
902
+ {
903
+ id: "brewster-angle",
904
+ name: "\u5E03\u5112\u65AF\u7279\u89D2",
905
+ latex: "\\tan\\theta_B = \\frac{n_2}{n_1}",
906
+ category: "physics",
907
+ description: "\u5E03\u5112\u65AF\u7279\u89D2\uFF08\u504F\u632F\uFF09",
908
+ tags: ["optics", "polarization"]
909
+ },
910
+ {
911
+ id: "malus-law",
912
+ name: "\u9A6C\u5415\u65AF\u5B9A\u5F8B",
913
+ latex: "I = I_0 \\cos^{2}\\theta",
914
+ category: "physics",
915
+ description: "\u9A6C\u5415\u65AF\u5B9A\u5F8B\uFF08\u504F\u632F\u5149\u5F3A\u5EA6\uFF09",
916
+ tags: ["optics", "polarization"]
917
+ },
918
+ // --------------------------------------------------------------------------
919
+ // 核物理 (Nuclear Physics)
920
+ // --------------------------------------------------------------------------
921
+ {
922
+ id: "radioactive-decay",
923
+ name: "\u653E\u5C04\u6027\u8870\u53D8\u5B9A\u5F8B",
924
+ latex: "N(t) = N_0 e^{-\\lambda t}",
925
+ category: "physics",
926
+ description: "\u653E\u5C04\u6027\u8870\u53D8\u5B9A\u5F8B\uFF08\u6307\u6570\u8870\u53D8\uFF09",
927
+ tags: ["nuclear", "decay"]
928
+ },
929
+ {
930
+ id: "half-life",
931
+ name: "\u534A\u8870\u671F",
932
+ latex: "t_{1/2} = \\frac{\\ln 2}{\\lambda}",
933
+ category: "physics",
934
+ description: "\u653E\u5C04\u6027\u534A\u8870\u671F",
935
+ tags: ["nuclear", "decay"]
936
+ },
937
+ {
938
+ id: "binding-energy",
939
+ name: "\u7ED3\u5408\u80FD",
940
+ latex: "E_B = [Zm_p + (A-Z)m_n - M]c^{2}",
941
+ category: "physics",
942
+ description: "\u539F\u5B50\u6838\u7ED3\u5408\u80FD",
943
+ tags: ["nuclear", "binding"]
944
+ },
945
+ {
946
+ id: "nuclear-reaction",
947
+ name: "\u6838\u53CD\u5E94 Q \u503C",
948
+ latex: "Q = (M_i - M_f)c^{2}",
949
+ category: "physics",
950
+ description: "\u6838\u53CD\u5E94\u91CA\u653E/\u5438\u6536\u7684\u80FD\u91CF",
951
+ tags: ["nuclear", "reaction"]
952
+ },
953
+ // --------------------------------------------------------------------------
954
+ // 流体力学 (Fluid Mechanics)
955
+ // --------------------------------------------------------------------------
956
+ {
957
+ id: "bernoulli",
958
+ name: "\u4F2F\u52AA\u5229\u65B9\u7A0B",
959
+ latex: "P + \\frac{1}{2}\\rho v^{2} + \\rho g h = \\text{const}",
960
+ category: "physics",
961
+ description: "\u4F2F\u52AA\u5229\u65B9\u7A0B\uFF08\u7406\u60F3\u6D41\u4F53\uFF09",
962
+ tags: ["fluid", "bernoulli"]
963
+ },
964
+ {
965
+ id: "continuity",
966
+ name: "\u8FDE\u7EED\u6027\u65B9\u7A0B",
967
+ latex: "A_1 v_1 = A_2 v_2",
968
+ category: "physics",
969
+ description: "\u6D41\u4F53\u8FDE\u7EED\u6027\u65B9\u7A0B",
970
+ tags: ["fluid", "continuity"]
971
+ },
972
+ {
973
+ id: "archimedes",
974
+ name: "\u963F\u57FA\u7C73\u5FB7\u539F\u7406",
975
+ latex: "F_B = \\rho_f g V_{\\text{disp}}",
976
+ category: "physics",
977
+ description: "\u963F\u57FA\u7C73\u5FB7\u6D6E\u529B\u539F\u7406",
978
+ tags: ["fluid", "buoyancy"]
979
+ },
980
+ {
981
+ id: "stokes-law",
982
+ name: "Stokes \u963B\u529B\u5B9A\u5F8B",
983
+ latex: "F_d = 6\\pi \\eta r v",
984
+ category: "physics",
985
+ description: "Stokes \u963B\u529B\u516C\u5F0F\uFF08\u4F4E\u901F\u5C0F\u7403\uFF09",
986
+ tags: ["fluid", "drag"]
987
+ },
988
+ {
989
+ id: "reynolds-number",
990
+ name: "\u96F7\u8BFA\u6570",
991
+ latex: "Re = \\frac{\\rho v L}{\\eta}",
992
+ category: "physics",
993
+ description: "\u96F7\u8BFA\u6570\uFF08\u5224\u65AD\u5C42\u6D41/\u6E4D\u6D41\uFF09",
994
+ tags: ["fluid", "reynolds"]
364
995
  }
365
996
  ];
366
997
  var ALL_MATH_TEMPLATES = [
@@ -386,26 +1017,65 @@ function getTemplateById(id) {
386
1017
 
387
1018
  // src/chem-templates.ts
388
1019
  var COMPOUND_TEMPLATES = [
389
- // 无机酸
1020
+ // --- 单质 & 常见气体 ---
1021
+ { id: "o2", name: "\u6C27\u6C14", latex: "\\ce{O2}", category: "compound", description: "\u6C27\u6C14", tags: ["gas", "diatomic", "oxidizing"] },
1022
+ { id: "n2", name: "\u6C2E\u6C14", latex: "\\ce{N2}", category: "compound", description: "\u6C2E\u6C14", tags: ["gas", "diatomic", "inert"] },
1023
+ { id: "cl2", name: "\u6C2F\u6C14", latex: "\\ce{Cl2}", category: "compound", description: "\u6C2F\u6C14", tags: ["gas", "halogen", "toxic", "oxidizing"] },
1024
+ // --- 氧化物 ---
390
1025
  { id: "h2o", name: "\u6C34", latex: "\\ce{H2O}", category: "compound", description: "\u6C34", tags: ["water", "inorganic"] },
1026
+ { id: "co2", name: "\u4E8C\u6C27\u5316\u78B3", latex: "\\ce{CO2}", category: "compound", description: "\u4E8C\u6C27\u5316\u78B3", tags: ["oxide", "gas"] },
1027
+ { id: "co", name: "\u4E00\u6C27\u5316\u78B3", latex: "\\ce{CO}", category: "compound", description: "\u4E00\u6C27\u5316\u78B3", tags: ["oxide", "gas", "toxic", "reducing"] },
1028
+ { id: "so2", name: "\u4E8C\u6C27\u5316\u786B", latex: "\\ce{SO2}", category: "compound", description: "\u4E8C\u6C27\u5316\u786B", tags: ["oxide", "gas", "acid-rain"] },
1029
+ { id: "cuo", name: "\u6C27\u5316\u94DC", latex: "\\ce{CuO}", category: "compound", description: "\u6C27\u5316\u94DC\uFF08\u9ED1\u8272\u56FA\u4F53\uFF09", tags: ["oxide", "copper", "solid"] },
1030
+ { id: "mno2", name: "\u4E8C\u6C27\u5316\u9530", latex: "\\ce{MnO2}", category: "compound", description: "\u4E8C\u6C27\u5316\u9530\uFF08\u50AC\u5316\u5242\uFF09", tags: ["oxide", "catalyst", "solid"] },
1031
+ { id: "cao", name: "\u6C27\u5316\u9499", latex: "\\ce{CaO}", category: "compound", description: "\u751F\u77F3\u7070 / \u6C27\u5316\u9499", tags: ["oxide", "industrial", "solid"] },
1032
+ { id: "fe2o3", name: "\u6C27\u5316\u94C1", latex: "\\ce{Fe2O3}", category: "compound", description: "\u94C1\u9508 / \u8D64\u94C1\u77FF", tags: ["oxide", "rust"] },
1033
+ { id: "al2o3", name: "\u6C27\u5316\u94DD", latex: "\\ce{Al2O3}", category: "compound", description: "\u6C27\u5316\u94DD", tags: ["oxide"] },
1034
+ { id: "sio2", name: "\u4E8C\u6C27\u5316\u7845", latex: "\\ce{SiO2}", category: "compound", description: "\u77F3\u82F1 / \u4E8C\u6C27\u5316\u7845", tags: ["oxide", "quartz"] },
1035
+ // --- 无机酸 ---
391
1036
  { id: "h2so4", name: "\u786B\u9178", latex: "\\ce{H2SO4}", category: "compound", description: "\u786B\u9178", tags: ["acid", "strong"] },
392
1037
  { id: "hcl", name: "\u76D0\u9178", latex: "\\ce{HCl}", category: "compound", description: "\u76D0\u9178 / \u6C2F\u5316\u6C22", tags: ["acid", "strong"] },
393
1038
  { id: "hno3", name: "\u785D\u9178", latex: "\\ce{HNO3}", category: "compound", description: "\u785D\u9178", tags: ["acid", "strong"] },
394
1039
  { id: "h3po4", name: "\u78F7\u9178", latex: "\\ce{H3PO4}", category: "compound", description: "\u78F7\u9178", tags: ["acid"] },
1040
+ { id: "h2co3", name: "\u78B3\u9178", latex: "\\ce{H2CO3}", category: "compound", description: "\u78B3\u9178\uFF08\u4E0D\u7A33\u5B9A\uFF09", tags: ["acid", "weak", "unstable"] },
1041
+ { id: "h2s", name: "\u786B\u5316\u6C22", latex: "\\ce{H2S}", category: "compound", description: "\u786B\u5316\u6C22\uFF08\u81ED\u9E21\u86CB\u5473\uFF09", tags: ["acid", "weak", "gas", "toxic"] },
1042
+ // --- 碱 ---
395
1043
  { id: "naoh", name: "\u6C22\u6C27\u5316\u94A0", latex: "\\ce{NaOH}", category: "compound", description: "\u6C22\u6C27\u5316\u94A0 / \u70E7\u78B1", tags: ["base", "strong"] },
396
1044
  { id: "caoh2", name: "\u6C22\u6C27\u5316\u9499", latex: "\\ce{Ca(OH)2}", category: "compound", description: "\u6C22\u6C27\u5316\u9499 / \u719F\u77F3\u7070", tags: ["base"] },
397
- //
1045
+ { id: "cuoh2", name: "\u6C22\u6C27\u5316\u94DC", latex: "\\ce{Cu(OH)2}", category: "compound", description: "\u6C22\u6C27\u5316\u94DC\uFF08\u84DD\u8272\u6C89\u6DC0\uFF09", tags: ["base", "precipitate", "copper"] },
1046
+ { id: "feoh3", name: "\u6C22\u6C27\u5316\u94C1", latex: "\\ce{Fe(OH)3}", category: "compound", description: "\u6C22\u6C27\u5316\u94C1\uFF08\u7EA2\u8910\u8272\u6C89\u6DC0\uFF09", tags: ["base", "precipitate", "iron"] },
1047
+ { id: "feoh2", name: "\u6C22\u6C27\u5316\u4E9A\u94C1", latex: "\\ce{Fe(OH)2}", category: "compound", description: "\u6C22\u6C27\u5316\u4E9A\u94C1\uFF08\u767D\u8272\u6C89\u6DC0\uFF09", tags: ["base", "precipitate", "iron", "unstable"] },
1048
+ // --- 盐 — 氯化物 ---
398
1049
  { id: "nacl", name: "\u6C2F\u5316\u94A0", latex: "\\ce{NaCl}", category: "compound", description: "\u98DF\u76D0 / \u6C2F\u5316\u94A0", tags: ["salt", "table"] },
1050
+ { id: "nh4cl", name: "\u6C2F\u5316\u94F5", latex: "\\ce{NH4Cl}", category: "compound", description: "\u6C2F\u5316\u94F5", tags: ["salt", "ammonium"] },
1051
+ { id: "cacl2", name: "\u6C2F\u5316\u9499", latex: "\\ce{CaCl2}", category: "compound", description: "\u6C2F\u5316\u9499\uFF08\u5E72\u71E5\u5242\uFF09", tags: ["salt", "calcium", "desiccant"] },
1052
+ { id: "zncl2", name: "\u6C2F\u5316\u950C", latex: "\\ce{ZnCl2}", category: "compound", description: "\u6C2F\u5316\u950C", tags: ["salt", "zinc"] },
1053
+ { id: "fecl2", name: "\u6C2F\u5316\u4E9A\u94C1", latex: "\\ce{FeCl2}", category: "compound", description: "\u6C2F\u5316\u4E9A\u94C1", tags: ["salt", "iron", "low-valence"] },
1054
+ { id: "mgcl2", name: "\u6C2F\u5316\u9541", latex: "\\ce{MgCl2}", category: "compound", description: "\u6C2F\u5316\u9541", tags: ["salt", "magnesium"] },
1055
+ { id: "alcl3", name: "\u6C2F\u5316\u94DD", latex: "\\ce{AlCl3}", category: "compound", description: "\u6C2F\u5316\u94DD", tags: ["salt", "aluminum"] },
1056
+ { id: "bacl2", name: "\u6C2F\u5316\u94A1", latex: "\\ce{BaCl2}", category: "compound", description: "\u6C2F\u5316\u94A1\uFF08\u6709\u6BD2\uFF09", tags: ["salt", "barium", "toxic"] },
1057
+ // --- 盐 — 硫酸盐 ---
1058
+ { id: "caso4", name: "\u786B\u9178\u9499", latex: "\\ce{CaSO4}", category: "compound", description: "\u77F3\u818F", tags: ["salt", "gypsum"] },
1059
+ { id: "cuso4", name: "\u786B\u9178\u94DC", latex: "\\ce{CuSO4}", category: "compound", description: "\u786B\u9178\u94DC / \u84DD\u77FE", tags: ["salt", "copper", "blue"] },
1060
+ { id: "feso4", name: "\u786B\u9178\u4E9A\u94C1", latex: "\\ce{FeSO4}", category: "compound", description: "\u786B\u9178\u4E9A\u94C1\uFF08\u6D45\u7EFF\u8272\uFF09", tags: ["salt", "iron", "low-valence"] },
1061
+ { id: "znso4", name: "\u786B\u9178\u950C", latex: "\\ce{ZnSO4}", category: "compound", description: "\u786B\u9178\u950C", tags: ["salt", "zinc"] },
1062
+ { id: "mgso4", name: "\u786B\u9178\u9541", latex: "\\ce{MgSO4}", category: "compound", description: "\u786B\u9178\u9541", tags: ["salt", "magnesium"] },
1063
+ { id: "al2so43", name: "\u786B\u9178\u94DD", latex: "\\ce{Al2(SO4)3}", category: "compound", description: "\u786B\u9178\u94DD", tags: ["salt", "aluminum"] },
1064
+ { id: "na2so4", name: "\u786B\u9178\u94A0", latex: "\\ce{Na2SO4}", category: "compound", description: "\u786B\u9178\u94A0", tags: ["salt", "sodium"] },
1065
+ // --- 盐 — 硝酸盐 ---
1066
+ { id: "agno3", name: "\u785D\u9178\u94F6", latex: "\\ce{AgNO3}", category: "compound", description: "\u785D\u9178\u94F6", tags: ["salt", "silver", "nitrate"] },
1067
+ { id: "cuno32", name: "\u785D\u9178\u94DC", latex: "\\ce{Cu(NO3)2}", category: "compound", description: "\u785D\u9178\u94DC", tags: ["salt", "copper", "nitrate"] },
1068
+ // --- 盐 — 碳酸盐/其他 ---
399
1069
  { id: "na2co3", name: "\u78B3\u9178\u94A0", latex: "\\ce{Na2CO3}", category: "compound", description: "\u7EAF\u78B1 / \u78B3\u9178\u94A0", tags: ["salt", "soda"] },
400
1070
  { id: "nahco3", name: "\u78B3\u9178\u6C22\u94A0", latex: "\\ce{NaHCO3}", category: "compound", description: "\u5C0F\u82CF\u6253", tags: ["salt", "baking"] },
401
1071
  { id: "caco3", name: "\u78B3\u9178\u9499", latex: "\\ce{CaCO3}", category: "compound", description: "\u77F3\u7070\u77F3 / \u5927\u7406\u77F3", tags: ["salt", "limestone"] },
402
- { id: "caso4", name: "\u786B\u9178\u9499", latex: "\\ce{CaSO4}", category: "compound", description: "\u77F3\u818F", tags: ["salt", "gypsum"] },
403
- // 氧化物
404
- { id: "co2", name: "\u4E8C\u6C27\u5316\u78B3", latex: "\\ce{CO2}", category: "compound", description: "\u4E8C\u6C27\u5316\u78B3", tags: ["oxide", "gas"] },
405
- { id: "fe2o3", name: "\u6C27\u5316\u94C1", latex: "\\ce{Fe2O3}", category: "compound", description: "\u94C1\u9508 / \u8D64\u94C1\u77FF", tags: ["oxide", "rust"] },
406
- { id: "al2o3", name: "\u6C27\u5316\u94DD", latex: "\\ce{Al2O3}", category: "compound", description: "\u6C27\u5316\u94DD", tags: ["oxide"] },
407
- { id: "sio2", name: "\u4E8C\u6C27\u5316\u7845", latex: "\\ce{SiO2}", category: "compound", description: "\u77F3\u82F1 / \u4E8C\u6C27\u5316\u7845", tags: ["oxide", "quartz"] },
408
- // 有机物
1072
+ { id: "cahco32", name: "\u78B3\u9178\u6C22\u9499", latex: "\\ce{Ca(HCO3)2}", category: "compound", description: "\u78B3\u9178\u6C22\u9499", tags: ["salt", "bicarbonate", "calcium"] },
1073
+ { id: "kmno4", name: "\u9AD8\u9530\u9178\u94BE", latex: "\\ce{KMnO4}", category: "compound", description: "\u9AD8\u9530\u9178\u94BE\uFF08\u7D2B\u8272\uFF09", tags: ["salt", "oxidizing", "purple"] },
1074
+ { id: "kclo3", name: "\u6C2F\u9178\u94BE", latex: "\\ce{KClO3}", category: "compound", description: "\u6C2F\u9178\u94BE\uFF08\u5236\u6C27\u6C14\uFF09", tags: ["salt", "oxidizing", "chlorate"] },
1075
+ // --- 其他无机物 ---
1076
+ { id: "nh3", name: "\u6C28\u6C14", latex: "\\ce{NH3}", category: "compound", description: "\u6C28\u6C14\uFF08\u523A\u6FC0\u6027\u6C14\u5473\uFF09", tags: ["gas", "ammonia", "base"] },
1077
+ { id: "h2o2", name: "\u8FC7\u6C27\u5316\u6C22", latex: "\\ce{H2O2}", category: "compound", description: "\u53CC\u6C27\u6C34 / \u8FC7\u6C27\u5316\u6C22", tags: ["peroxide", "oxidizing", "liquid"] },
1078
+ // --- 有机物 ---
409
1079
  { id: "ch4", name: "\u7532\u70F7", latex: "\\ce{CH4}", category: "compound", description: "\u7532\u70F7 / \u5929\u7136\u6C14", tags: ["organic", "alkane"] },
410
1080
  { id: "c2h5oh", name: "\u4E59\u9187", latex: "\\ce{C2H5OH}", category: "compound", description: "\u9152\u7CBE / \u4E59\u9187", tags: ["organic", "alcohol"] },
411
1081
  { id: "c6h12o6", name: "\u8461\u8404\u7CD6", latex: "\\ce{C6H12O6}", category: "compound", description: "\u8461\u8404\u7CD6", tags: ["organic", "sugar"] },
@@ -475,6 +1145,482 @@ var REACTION_TEMPLATES = [
475
1145
  category: "reaction",
476
1146
  description: "\u53EF\u9006\u53CD\u5E94\u901A\u7528\u5F0F",
477
1147
  tags: ["equilibrium", "reversible"]
1148
+ },
1149
+ // =========================================================================
1150
+ // 中学化学常见反应 (Middle School Common Reactions)
1151
+ // =========================================================================
1152
+ // --- 气体制备 & 分解 ---
1153
+ {
1154
+ id: "nh4cl-caoh2",
1155
+ name: "\u6C2F\u5316\u94F5\u4E0E\u6C22\u6C27\u5316\u9499\u53CD\u5E94",
1156
+ latex: "\\ce{2NH4Cl + Ca(OH)2 ->[\u52A0\u70ED] CaCl2 + 2NH3 ^ + 2H2O}",
1157
+ category: "reaction",
1158
+ description: "\u5B9E\u9A8C\u5BA4\u5236\u6C28\u6C14",
1159
+ tags: ["ammonia", "gas-preparation", "heating"]
1160
+ },
1161
+ {
1162
+ id: "electrolysis-water-2",
1163
+ name: "\u6C34\u5728\u901A\u7535\u6761\u4EF6\u4E0B\u5206\u89E3",
1164
+ latex: "\\ce{2H2O ->[\u901A\u7535] 2H2 ^ + O2 ^}",
1165
+ category: "reaction",
1166
+ description: "\u7535\u89E3\u6C34\u751F\u6210\u6C22\u6C14\u548C\u6C27\u6C14",
1167
+ tags: ["electrolysis", "water", "decomposition"]
1168
+ },
1169
+ {
1170
+ id: "h2co3-decomposition",
1171
+ name: "\u78B3\u9178\u4E0D\u7A33\u5B9A\u5206\u89E3",
1172
+ latex: "\\ce{H2CO3 -> H2O + CO2 ^}",
1173
+ category: "reaction",
1174
+ description: "\u78B3\u9178\u5E38\u6E29\u5206\u89E3",
1175
+ tags: ["decomposition", "acid"]
1176
+ },
1177
+ {
1178
+ id: "caco3-decomposition",
1179
+ name: "\u78B3\u9178\u9499\u9AD8\u6E29\u5206\u89E3",
1180
+ latex: "\\ce{CaCO3 ->[\u9AD8\u6E29] CaO + CO2 ^}",
1181
+ category: "reaction",
1182
+ description: "\u77F3\u7070\u77F3\u9AD8\u6E29\u7145\u70E7",
1183
+ tags: ["decomposition", "heating", "industrial"]
1184
+ },
1185
+ {
1186
+ id: "kmno4-heating",
1187
+ name: "\u52A0\u70ED\u9AD8\u9530\u9178\u94BE",
1188
+ latex: "\\ce{2KMnO4 ->[\u52A0\u70ED] K2MnO4 + MnO2 + O2 ^}",
1189
+ category: "reaction",
1190
+ description: "\u5B9E\u9A8C\u5BA4\u5236\u6C27\u6C14",
1191
+ tags: ["oxygen", "gas-preparation", "heating"]
1192
+ },
1193
+ {
1194
+ id: "kclo3-heating",
1195
+ name: "\u52A0\u70ED\u6C2F\u9178\u94BE\u548C\u4E8C\u6C27\u5316\u9530\u7684\u6DF7\u5408\u7269",
1196
+ latex: "\\ce{2KClO3 ->[MnO2][\u52A0\u70ED] 2KCl + 3O2 ^}",
1197
+ category: "reaction",
1198
+ description: "\u4E8C\u6C27\u5316\u9530\u50AC\u5316\u5206\u89E3\u6C2F\u9178\u94BE\u5236\u6C27\u6C14",
1199
+ tags: ["oxygen", "gas-preparation", "catalyst", "heating"]
1200
+ },
1201
+ {
1202
+ id: "h2o2-decomposition",
1203
+ name: "\u8FC7\u6C27\u5316\u6C22\u5728\u4E8C\u6C27\u5316\u9530\u50AC\u5316\u4E0B\u5206\u89E3",
1204
+ latex: "\\ce{2H2O2 ->[MnO2] 2H2O + O2 ^}",
1205
+ category: "reaction",
1206
+ description: "\u53CC\u6C27\u6C34\u50AC\u5316\u5206\u89E3\u5236\u6C27\u6C14",
1207
+ tags: ["oxygen", "gas-preparation", "catalyst"]
1208
+ },
1209
+ {
1210
+ id: "nahco3-heating",
1211
+ name: "\u78B3\u9178\u6C22\u94A0\u53D7\u70ED\u5206\u89E3",
1212
+ latex: "\\ce{2NaHCO3 ->[\u52A0\u70ED] Na2CO3 + H2O + CO2 ^}",
1213
+ category: "reaction",
1214
+ description: "\u5C0F\u82CF\u6253\u53D7\u70ED\u5206\u89E3",
1215
+ tags: ["decomposition", "heating", "baking"]
1216
+ },
1217
+ // --- 化合反应 ---
1218
+ {
1219
+ id: "co2-water",
1220
+ name: "\u4E8C\u6C27\u5316\u78B3\u4E0E\u6C34\u53CD\u5E94",
1221
+ latex: "\\ce{CO2 + H2O -> H2CO3}",
1222
+ category: "reaction",
1223
+ description: "\u78B3\u9178\u7684\u751F\u6210",
1224
+ tags: ["combination", "acid"]
1225
+ },
1226
+ {
1227
+ id: "co2-caoh2",
1228
+ name: "\u4E8C\u6C27\u5316\u78B3\u4E0E\u6F84\u6E05\u77F3\u7070\u6C34\u53CD\u5E94",
1229
+ latex: "\\ce{CO2 + Ca(OH)2 -> CaCO3 v + H2O}",
1230
+ category: "reaction",
1231
+ description: "\u77F3\u7070\u6C34\u53D8\u6D51\u6D4A",
1232
+ tags: ["precipitation", "co2-test"]
1233
+ },
1234
+ {
1235
+ id: "co2-caoh2-2",
1236
+ name: "\u4E8C\u6C27\u5316\u78B3\u901A\u5165\u6F84\u6E05\u77F3\u7070\u6C34",
1237
+ latex: "\\ce{CO2 + Ca(OH)2 -> CaCO3 v + H2O}",
1238
+ category: "reaction",
1239
+ description: "CO\u2082 \u68C0\u9A8C\u65B9\u6CD5",
1240
+ tags: ["precipitation", "co2-test"]
1241
+ },
1242
+ // --- 金属与盐溶液反应 ---
1243
+ {
1244
+ id: "fe-cuso4",
1245
+ name: "\u94C1\u4E0E\u786B\u9178\u94DC\u6EB6\u6DB2\u53CD\u5E94",
1246
+ latex: "\\ce{Fe + CuSO4 -> FeSO4 + Cu}",
1247
+ category: "reaction",
1248
+ description: "\u6E7F\u6CD5\u70BC\u94DC / \u94C1\u7F6E\u6362\u94DC",
1249
+ tags: ["displacement", "metal", "redox"]
1250
+ },
1251
+ {
1252
+ id: "cu-agno3",
1253
+ name: "\u94DC\u548C\u785D\u9178\u94F6\u6EB6\u6DB2\u53CD\u5E94",
1254
+ latex: "\\ce{Cu + 2AgNO3 -> Cu(NO3)2 + 2Ag}",
1255
+ category: "reaction",
1256
+ description: "\u94DC\u7F6E\u6362\u94F6",
1257
+ tags: ["displacement", "metal", "redox"]
1258
+ },
1259
+ // --- 金属与氧气反应 ---
1260
+ {
1261
+ id: "al-o2",
1262
+ name: "\u94DD\u4E0E\u6C27\u6C14\u53CD\u5E94",
1263
+ latex: "\\ce{4Al + 3O2 ->[\u70B9\u71C3] 2Al2O3}",
1264
+ category: "reaction",
1265
+ description: "\u94DD\u5728\u6C27\u6C14\u4E2D\u71C3\u70E7",
1266
+ tags: ["combustion", "metal", "oxidation"]
1267
+ },
1268
+ {
1269
+ id: "mg-o2",
1270
+ name: "\u9541\u5728\u7A7A\u6C14\u4E2D\u71C3\u70E7",
1271
+ latex: "\\ce{2Mg + O2 ->[\u70B9\u71C3] 2MgO}",
1272
+ category: "reaction",
1273
+ description: "\u9541\u5E26\u71C3\u70E7\u53D1\u51FA\u8000\u773C\u767D\u5149",
1274
+ tags: ["combustion", "metal", "oxidation"]
1275
+ },
1276
+ {
1277
+ id: "fe-o2",
1278
+ name: "\u94C1\u5728\u6C27\u6C14\u4E2D\u71C3\u70E7",
1279
+ latex: "\\ce{3Fe + 2O2 ->[\u70B9\u71C3] Fe3O4}",
1280
+ category: "reaction",
1281
+ description: "\u94C1\u4E1D\u5728\u6C27\u6C14\u4E2D\u5267\u70C8\u71C3\u70E7",
1282
+ tags: ["combustion", "metal", "oxidation"]
1283
+ },
1284
+ {
1285
+ id: "cu-o2",
1286
+ name: "\u94DC\u5728\u7A7A\u6C14\u4E2D\u53D7\u70ED",
1287
+ latex: "\\ce{2Cu + O2 ->[\u52A0\u70ED] 2CuO}",
1288
+ category: "reaction",
1289
+ description: "\u94DC\u8868\u9762\u53D8\u9ED1",
1290
+ tags: ["oxidation", "metal", "heating"]
1291
+ },
1292
+ // --- 非金属燃烧 ---
1293
+ {
1294
+ id: "p-o2",
1295
+ name: "\u7EA2\u78F7\u5728\u7A7A\u6C14\u4E2D\u71C3\u70E7",
1296
+ latex: "\\ce{4P + 5O2 ->[\u70B9\u71C3] 2P2O5}",
1297
+ category: "reaction",
1298
+ description: "\u4EA7\u751F\u5927\u91CF\u767D\u70DF",
1299
+ tags: ["combustion", "nonmetal", "oxidation"]
1300
+ },
1301
+ {
1302
+ id: "s-o2",
1303
+ name: "\u786B\u7C89\u5728\u7A7A\u6C14\u4E2D\u71C3\u70E7",
1304
+ latex: "\\ce{S + O2 ->[\u70B9\u71C3] SO2}",
1305
+ category: "reaction",
1306
+ description: "\u4EA7\u751F\u523A\u6FC0\u6027\u6C14\u5473\u6C14\u4F53",
1307
+ tags: ["combustion", "nonmetal", "oxidation"]
1308
+ },
1309
+ {
1310
+ id: "c-o2-full",
1311
+ name: "\u78B3\u5728\u6C27\u6C14\u4E2D\u5145\u5206\u71C3\u70E7",
1312
+ latex: "\\ce{C + O2 ->[\u70B9\u71C3] CO2}",
1313
+ category: "reaction",
1314
+ description: "\u78B3\u5B8C\u5168\u71C3\u70E7",
1315
+ tags: ["combustion", "nonmetal", "oxidation"]
1316
+ },
1317
+ {
1318
+ id: "c-o2-partial",
1319
+ name: "\u78B3\u5728\u6C27\u6C14\u4E2D\u4E0D\u5145\u5206\u71C3\u70E7",
1320
+ latex: "\\ce{2C + O2 ->[\u70B9\u71C3] 2CO}",
1321
+ category: "reaction",
1322
+ description: "\u78B3\u4E0D\u5B8C\u5168\u71C3\u70E7\u751F\u6210\u4E00\u6C27\u5316\u78B3",
1323
+ tags: ["combustion", "nonmetal", "incomplete"]
1324
+ },
1325
+ {
1326
+ id: "h2-o2",
1327
+ name: "\u6C22\u6C14\u5728\u6C27\u6C14\u4E2D\u71C3\u70E7",
1328
+ latex: "\\ce{2H2 + O2 ->[\u70B9\u71C3] 2H2O}",
1329
+ category: "reaction",
1330
+ description: "\u6C22\u6C14\u71C3\u70E7\u751F\u6210\u6C34",
1331
+ tags: ["combustion", "hydrogen", "clean-energy"]
1332
+ },
1333
+ {
1334
+ id: "co-o2",
1335
+ name: "\u4E00\u6C27\u5316\u78B3\u71C3\u70E7",
1336
+ latex: "\\ce{2CO + O2 ->[\u70B9\u71C3] 2CO2}",
1337
+ category: "reaction",
1338
+ description: "CO \u71C3\u70E7\u4EA7\u751F\u84DD\u8272\u706B\u7130",
1339
+ tags: ["combustion", "carbon-monoxide"]
1340
+ },
1341
+ {
1342
+ id: "ch4-combustion",
1343
+ name: "\u7532\u70F7\u71C3\u70E7",
1344
+ latex: "\\ce{CH4 + 2O2 ->[\u70B9\u71C3] CO2 + 2H2O}",
1345
+ category: "reaction",
1346
+ description: "\u5929\u7136\u6C14\u4E3B\u8981\u6210\u5206\u71C3\u70E7",
1347
+ tags: ["combustion", "organic", "alkane"]
1348
+ },
1349
+ // --- 金属与酸反应 ---
1350
+ {
1351
+ id: "zn-h2so4",
1352
+ name: "\u950C\u548C\u7A00\u786B\u9178\u53CD\u5E94",
1353
+ latex: "\\ce{Zn + H2SO4 -> ZnSO4 + H2 ^}",
1354
+ category: "reaction",
1355
+ description: "\u5B9E\u9A8C\u5BA4\u5236\u6C22\u6C14",
1356
+ tags: ["displacement", "metal-acid", "hydrogen"]
1357
+ },
1358
+ {
1359
+ id: "fe-h2so4",
1360
+ name: "\u94C1\u548C\u7A00\u786B\u9178\u53CD\u5E94",
1361
+ latex: "\\ce{Fe + H2SO4 -> FeSO4 + H2 ^}",
1362
+ category: "reaction",
1363
+ description: "\u94C1\u4E0E\u7A00\u786B\u9178\u7F6E\u6362\u53CD\u5E94",
1364
+ tags: ["displacement", "metal-acid", "hydrogen"]
1365
+ },
1366
+ {
1367
+ id: "mg-h2so4",
1368
+ name: "\u9541\u548C\u7A00\u786B\u9178\u53CD\u5E94",
1369
+ latex: "\\ce{Mg + H2SO4 -> MgSO4 + H2 ^}",
1370
+ category: "reaction",
1371
+ description: "\u9541\u4E0E\u7A00\u786B\u9178\u5267\u70C8\u53CD\u5E94",
1372
+ tags: ["displacement", "metal-acid", "hydrogen"]
1373
+ },
1374
+ {
1375
+ id: "al-h2so4",
1376
+ name: "\u94DD\u548C\u7A00\u786B\u9178\u53CD\u5E94",
1377
+ latex: "\\ce{2Al + 3H2SO4 -> Al2(SO4)3 + 3H2 ^}",
1378
+ category: "reaction",
1379
+ description: "\u94DD\u4E0E\u7A00\u786B\u9178\u7F6E\u6362\u53CD\u5E94",
1380
+ tags: ["displacement", "metal-acid", "hydrogen"]
1381
+ },
1382
+ {
1383
+ id: "zn-hcl",
1384
+ name: "\u950C\u548C\u7A00\u76D0\u9178\u53CD\u5E94",
1385
+ latex: "\\ce{Zn + 2HCl -> ZnCl2 + H2 ^}",
1386
+ category: "reaction",
1387
+ description: "\u950C\u4E0E\u76D0\u9178\u53CD\u5E94\u5236\u6C22\u6C14",
1388
+ tags: ["displacement", "metal-acid", "hydrogen"]
1389
+ },
1390
+ {
1391
+ id: "fe-hcl",
1392
+ name: "\u94C1\u548C\u7A00\u76D0\u9178\u53CD\u5E94",
1393
+ latex: "\\ce{Fe + 2HCl -> FeCl2 + H2 ^}",
1394
+ category: "reaction",
1395
+ description: "\u94C1\u4E0E\u7A00\u76D0\u9178\u7F6E\u6362\u53CD\u5E94",
1396
+ tags: ["displacement", "metal-acid", "hydrogen"]
1397
+ },
1398
+ {
1399
+ id: "mg-hcl",
1400
+ name: "\u9541\u548C\u7A00\u76D0\u9178\u53CD\u5E94",
1401
+ latex: "\\ce{Mg + 2HCl -> MgCl2 + H2 ^}",
1402
+ category: "reaction",
1403
+ description: "\u9541\u4E0E\u7A00\u76D0\u9178\u5267\u70C8\u53CD\u5E94",
1404
+ tags: ["displacement", "metal-acid", "hydrogen"]
1405
+ },
1406
+ {
1407
+ id: "al-hcl",
1408
+ name: "\u94DD\u548C\u7A00\u76D0\u9178\u53CD\u5E94",
1409
+ latex: "\\ce{2Al + 6HCl -> 2AlCl3 + 3H2 ^}",
1410
+ category: "reaction",
1411
+ description: "\u94DD\u4E0E\u7A00\u76D0\u9178\u7F6E\u6362\u53CD\u5E94",
1412
+ tags: ["displacement", "metal-acid", "hydrogen"]
1413
+ },
1414
+ // --- 还原反应 ---
1415
+ {
1416
+ id: "h2-cuo",
1417
+ name: "\u6C22\u6C14\u8FD8\u539F\u6C27\u5316\u94DC",
1418
+ latex: "\\ce{H2 + CuO ->[\u52A0\u70ED] Cu + H2O}",
1419
+ category: "reaction",
1420
+ description: "\u6C22\u6C14\u8FD8\u539F\u9ED1\u8272\u6C27\u5316\u94DC",
1421
+ tags: ["reduction", "hydrogen", "heating"]
1422
+ },
1423
+ {
1424
+ id: "c-cuo",
1425
+ name: "\u78B3\u8FD8\u539F\u6C27\u5316\u94DC",
1426
+ latex: "\\ce{C + 2CuO ->[\u9AD8\u6E29] 2Cu + CO2 ^}",
1427
+ category: "reaction",
1428
+ description: "\u78B3\u8FD8\u539F\u6C27\u5316\u94DC",
1429
+ tags: ["reduction", "carbon", "heating"]
1430
+ },
1431
+ {
1432
+ id: "c-fe2o3",
1433
+ name: "\u78B3\u8FD8\u539F\u6C27\u5316\u94C1",
1434
+ latex: "\\ce{3C + 2Fe2O3 ->[\u9AD8\u6E29] 4Fe + 3CO2 ^}",
1435
+ category: "reaction",
1436
+ description: "\u78B3\u8FD8\u539F\u6C27\u5316\u94C1\uFF08\u70BC\u94C1\uFF09",
1437
+ tags: ["reduction", "carbon", "iron", "heating", "industrial"]
1438
+ },
1439
+ {
1440
+ id: "co-cuo",
1441
+ name: "\u4E00\u6C27\u5316\u78B3\u8FD8\u539F\u6C27\u5316\u94DC",
1442
+ latex: "\\ce{CO + CuO ->[\u52A0\u70ED] Cu + CO2}",
1443
+ category: "reaction",
1444
+ description: "CO \u8FD8\u539F\u6C27\u5316\u94DC",
1445
+ tags: ["reduction", "carbon-monoxide", "heating"]
1446
+ },
1447
+ {
1448
+ id: "co-fe2o3",
1449
+ name: "\u4E00\u6C27\u5316\u78B3\u8FD8\u539F\u6C27\u5316\u94C1",
1450
+ latex: "\\ce{3CO + Fe2O3 ->[\u9AD8\u6E29] 2Fe + 3CO2}",
1451
+ category: "reaction",
1452
+ description: "\u9AD8\u7089\u70BC\u94C1\u4E3B\u8981\u53CD\u5E94",
1453
+ tags: ["reduction", "carbon-monoxide", "iron", "heating", "industrial"]
1454
+ },
1455
+ // --- 酸碱中和 ---
1456
+ {
1457
+ id: "hcl-naoh",
1458
+ name: "\u76D0\u9178\u4E0E\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1459
+ latex: "\\ce{HCl + NaOH -> NaCl + H2O}",
1460
+ category: "reaction",
1461
+ description: "\u9178\u78B1\u4E2D\u548C\u53CD\u5E94",
1462
+ tags: ["neutralization", "acid-base"]
1463
+ },
1464
+ {
1465
+ id: "naoh-hcl",
1466
+ name: "\u6C22\u6C27\u5316\u94A0\u4E0E\u76D0\u9178\u53CD\u5E94",
1467
+ latex: "\\ce{NaOH + HCl -> NaCl + H2O}",
1468
+ category: "reaction",
1469
+ description: "\u9178\u78B1\u4E2D\u548C\u53CD\u5E94",
1470
+ tags: ["neutralization", "acid-base"]
1471
+ },
1472
+ {
1473
+ id: "h2so4-naoh",
1474
+ name: "\u786B\u9178\u4E0E\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1475
+ latex: "\\ce{H2SO4 + 2NaOH -> Na2SO4 + 2H2O}",
1476
+ category: "reaction",
1477
+ description: "\u786B\u9178\u4E0E\u70E7\u78B1\u4E2D\u548C",
1478
+ tags: ["neutralization", "acid-base"]
1479
+ },
1480
+ {
1481
+ id: "caoh2-h2so4",
1482
+ name: "\u6C22\u6C27\u5316\u9499\u4E0E\u786B\u9178\u53CD\u5E94",
1483
+ latex: "\\ce{Ca(OH)2 + H2SO4 -> CaSO4 + 2H2O}",
1484
+ category: "reaction",
1485
+ description: "\u719F\u77F3\u7070\u4E0E\u786B\u9178\u4E2D\u548C",
1486
+ tags: ["neutralization", "acid-base"]
1487
+ },
1488
+ // --- 盐与酸反应 ---
1489
+ {
1490
+ id: "caco3-hcl",
1491
+ name: "\u78B3\u9178\u9499\u4E0E\u76D0\u9178\u53CD\u5E94",
1492
+ latex: "\\ce{CaCO3 + 2HCl -> CaCl2 + H2O + CO2 ^}",
1493
+ category: "reaction",
1494
+ description: "\u5B9E\u9A8C\u5BA4\u5236\u4E8C\u6C27\u5316\u78B3",
1495
+ tags: ["gas-preparation", "carbonate", "acid"]
1496
+ },
1497
+ {
1498
+ id: "na2co3-hcl",
1499
+ name: "\u78B3\u9178\u94A0\u4E0E\u76D0\u9178\u53CD\u5E94",
1500
+ latex: "\\ce{Na2CO3 + 2HCl -> 2NaCl + H2O + CO2 ^}",
1501
+ category: "reaction",
1502
+ description: "\u7EAF\u78B1\u4E0E\u76D0\u9178\u53CD\u5E94",
1503
+ tags: ["carbonate", "acid", "gas"]
1504
+ },
1505
+ // --- 盐与碱反应 ---
1506
+ {
1507
+ id: "cuso4-naoh",
1508
+ name: "\u786B\u9178\u94DC\u4E0E\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1509
+ latex: "\\ce{CuSO4 + 2NaOH -> Cu(OH)2 v + Na2SO4}",
1510
+ category: "reaction",
1511
+ description: "\u4EA7\u751F\u84DD\u8272\u6C89\u6DC0",
1512
+ tags: ["precipitation", "copper", "base"]
1513
+ },
1514
+ // --- 金属氧化物与酸 ---
1515
+ {
1516
+ id: "cuo-h2so4",
1517
+ name: "\u6C27\u5316\u94DC\u4E0E\u7A00\u786B\u9178\u53CD\u5E94",
1518
+ latex: "\\ce{CuO + H2SO4 -> CuSO4 + H2O}",
1519
+ category: "reaction",
1520
+ description: "\u9ED1\u8272\u6C27\u5316\u94DC\u6EB6\u89E3",
1521
+ tags: ["metal-oxide", "acid", "dissolution"]
1522
+ },
1523
+ // --- 两性反应 ---
1524
+ {
1525
+ id: "al-naoh",
1526
+ name: "\u94DD\u4E0E\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1527
+ latex: "\\ce{2Al + 2NaOH + 2H2O -> 2NaAlO2 + 3H2 ^}",
1528
+ category: "reaction",
1529
+ description: "\u94DD\u7684\u4E24\u6027\u4F53\u73B0",
1530
+ tags: ["amphoteric", "aluminum", "hydrogen"]
1531
+ },
1532
+ {
1533
+ id: "si-naoh",
1534
+ name: "\u7845\u4E0E\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1535
+ latex: "\\ce{Si + 2NaOH + H2O -> Na2SiO3 + 2H2 ^}",
1536
+ category: "reaction",
1537
+ description: "\u7845\u4E0E\u5F3A\u78B1\u53CD\u5E94",
1538
+ tags: ["silicon", "base", "hydrogen"]
1539
+ },
1540
+ // --- CO₂ 与碱 ---
1541
+ {
1542
+ id: "co2-naoh",
1543
+ name: "\u4E8C\u6C27\u5316\u78B3\u4E0E\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1544
+ latex: "\\ce{CO2 + 2NaOH -> Na2CO3 + H2O}",
1545
+ category: "reaction",
1546
+ description: "CO\u2082 \u4E0E\u70E7\u78B1\u53CD\u5E94",
1547
+ tags: ["carbon-dioxide", "base", "absorption"]
1548
+ },
1549
+ // --- 沉淀反应 ---
1550
+ {
1551
+ id: "bacl2-na2so4",
1552
+ name: "\u6C2F\u5316\u94A1\u4E0E\u786B\u9178\u94A0\u53CD\u5E94",
1553
+ latex: "\\ce{BaCl2 + Na2SO4 -> BaSO4 v + 2NaCl}",
1554
+ category: "reaction",
1555
+ description: "\u751F\u6210\u4E0D\u6EB6\u4E8E\u9178\u7684\u767D\u8272\u6C89\u6DC0",
1556
+ tags: ["precipitation", "barium", "sulfate-test"]
1557
+ },
1558
+ // --- 卤素 & 氧化还原 ---
1559
+ {
1560
+ id: "cl2-naoh",
1561
+ name: "\u6C2F\u6C14\u4E0E\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1562
+ latex: "\\ce{Cl2 + 2NaOH -> NaCl + NaClO + H2O}",
1563
+ category: "reaction",
1564
+ description: "\u6C2F\u6C14\u5C3E\u6C14\u5904\u7406 / \u5236\u6F02\u767D\u6DB2",
1565
+ tags: ["halogen", "disproportionation", "redox"]
1566
+ },
1567
+ {
1568
+ id: "so2-cl2",
1569
+ name: "\u4E8C\u6C27\u5316\u786B\u4E0E\u6C2F\u6C34\u53CD\u5E94",
1570
+ latex: "\\ce{SO2 + Cl2 + 2H2O -> H2SO4 + 2HCl}",
1571
+ category: "reaction",
1572
+ description: "SO\u2082 \u4F7F\u6C2F\u6C34\u892A\u8272",
1573
+ tags: ["redox", "bleaching", "sulfur"]
1574
+ },
1575
+ {
1576
+ id: "feoh2-oxidation",
1577
+ name: "\u6C22\u6C27\u5316\u4E9A\u94C1\u88AB\u6C27\u5316",
1578
+ latex: "\\ce{4Fe(OH)2 + O2 + 2H2O -> 4Fe(OH)3}",
1579
+ category: "reaction",
1580
+ description: "\u767D\u8272\u6C89\u6DC0\u8FC5\u901F\u53D8\u7070\u7EFF\u8272\u6700\u7EC8\u53D8\u7EA2\u8910\u8272",
1581
+ tags: ["oxidation", "iron", "color-change"]
1582
+ },
1583
+ {
1584
+ id: "feso4-oxidation",
1585
+ name: "\u786B\u9178\u4E9A\u94C1\u88AB\u6C27\u5316",
1586
+ latex: "\\ce{4FeSO4 + O2 + 2H2SO4 -> 2Fe2(SO4)3 + 2H2O}",
1587
+ category: "reaction",
1588
+ description: "Fe\xB2\u207A \u5728\u9178\u6027\u6761\u4EF6\u4E0B\u88AB\u6C27\u5316\u4E3A Fe\xB3\u207A",
1589
+ tags: ["oxidation", "iron", "redox"]
1590
+ },
1591
+ // --- 浓酸反应 ---
1592
+ {
1593
+ id: "cu-h2so4-conc",
1594
+ name: "\u6D53\u786B\u9178\u4E0E\u94DC\u53CD\u5E94",
1595
+ latex: "\\ce{Cu + 2H2SO4 ->[\u52A0\u70ED] CuSO4 + SO2 ^ + 2H2O}",
1596
+ category: "reaction",
1597
+ description: "\u6D53\u786B\u9178\u7684\u5F3A\u6C27\u5316\u6027",
1598
+ tags: ["concentrated-acid", "redox", "copper", "heating"]
1599
+ },
1600
+ {
1601
+ id: "cu-hno3-conc",
1602
+ name: "\u6D53\u785D\u9178\u4E0E\u94DC\u53CD\u5E94",
1603
+ latex: "\\ce{Cu + 4HNO3 -> Cu(NO3)2 + 2NO2 ^ + 2H2O}",
1604
+ category: "reaction",
1605
+ description: "\u6D53\u785D\u9178\u4E0E\u94DC\u53CD\u5E94\u751F\u6210\u7EA2\u68D5\u8272\u6C14\u4F53",
1606
+ tags: ["concentrated-acid", "redox", "copper", "nitrogen-dioxide"]
1607
+ },
1608
+ // --- 碳酸氢盐反应 ---
1609
+ {
1610
+ id: "cahco32-naoh-few",
1611
+ name: "\u78B3\u9178\u6C22\u9499\u4E0E\u5C11\u91CF\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1612
+ latex: "\\ce{Ca(HCO3)2 + NaOH -> CaCO3 v + NaHCO3 + H2O}",
1613
+ category: "reaction",
1614
+ description: "\u5C11\u91CF\u78B1\u65F6\u7684\u5206\u6B65\u6C89\u6DC0",
1615
+ tags: ["bicarbonate", "precipitation", "stoichiometry"]
1616
+ },
1617
+ {
1618
+ id: "cahco32-naoh-excess",
1619
+ name: "\u78B3\u9178\u6C22\u9499\u4E0E\u8FC7\u91CF\u6C22\u6C27\u5316\u94A0\u53CD\u5E94",
1620
+ latex: "\\ce{Ca(HCO3)2 + 2NaOH -> CaCO3 v + Na2CO3 + 2H2O}",
1621
+ category: "reaction",
1622
+ description: "\u8FC7\u91CF\u78B1\u5B8C\u5168\u53CD\u5E94",
1623
+ tags: ["bicarbonate", "precipitation", "stoichiometry"]
478
1624
  }
479
1625
  ];
480
1626
  var ELECTROCHEM_TEMPLATES = [
@@ -495,10 +1641,183 @@ var ELECTROCHEM_TEMPLATES = [
495
1641
  tags: ["faraday", "electrolysis"]
496
1642
  }
497
1643
  ];
1644
+ var ION_TEMPLATES = [
1645
+ // --- 阳离子 (Cations) ---
1646
+ { id: "ion-li+", name: "\u9502\u79BB\u5B50", latex: "\\ce{Li+}", category: "ion", description: "Li\u207A", tags: ["cation", "alkali-metal"] },
1647
+ { id: "ion-na+", name: "\u94A0\u79BB\u5B50", latex: "\\ce{Na+}", category: "ion", description: "Na\u207A", tags: ["cation", "alkali-metal"] },
1648
+ { id: "ion-k+", name: "\u94BE\u79BB\u5B50", latex: "\\ce{K+}", category: "ion", description: "K\u207A", tags: ["cation", "alkali-metal"] },
1649
+ { id: "ion-nh4+", name: "\u94F5\u6839\u79BB\u5B50", latex: "\\ce{NH4+}", category: "ion", description: "NH\u2084\u207A", tags: ["cation", "polyatomic"] },
1650
+ { id: "ion-ca2+", name: "\u9499\u79BB\u5B50", latex: "\\ce{Ca^{2+}}", category: "ion", description: "Ca\xB2\u207A", tags: ["cation", "alkaline-earth"] },
1651
+ { id: "ion-mg2+", name: "\u9541\u79BB\u5B50", latex: "\\ce{Mg^{2+}}", category: "ion", description: "Mg\xB2\u207A", tags: ["cation", "alkaline-earth"] },
1652
+ { id: "ion-fe2+", name: "\u4E9A\u94C1\u79BB\u5B50", latex: "\\ce{Fe^{2+}}", category: "ion", description: "Fe\xB2\u207A", tags: ["cation", "transition-metal", "low-valence"] },
1653
+ { id: "ion-fe3+", name: "\u94C1\u79BB\u5B50", latex: "\\ce{Fe^{3+}}", category: "ion", description: "Fe\xB3\u207A", tags: ["cation", "transition-metal", "high-valence"] },
1654
+ { id: "ion-cu2+", name: "\u94DC\u79BB\u5B50", latex: "\\ce{Cu^{2+}}", category: "ion", description: "Cu\xB2\u207A", tags: ["cation", "transition-metal"] },
1655
+ { id: "ion-zn2+", name: "\u950C\u79BB\u5B50", latex: "\\ce{Zn^{2+}}", category: "ion", description: "Zn\xB2\u207A", tags: ["cation", "transition-metal"] },
1656
+ { id: "ion-ag+", name: "\u94F6\u79BB\u5B50", latex: "\\ce{Ag+}", category: "ion", description: "Ag\u207A", tags: ["cation", "transition-metal"] },
1657
+ { id: "ion-al3+", name: "\u94DD\u79BB\u5B50", latex: "\\ce{Al^{3+}}", category: "ion", description: "Al\xB3\u207A", tags: ["cation", "post-transition"] },
1658
+ { id: "ion-h+", name: "\u6C22\u79BB\u5B50", latex: "\\ce{H+}", category: "ion", description: "H\u207A", tags: ["cation", "acid"] },
1659
+ // --- 阴离子 (Anions) ---
1660
+ { id: "ion-f-", name: "\u6C1F\u79BB\u5B50", latex: "\\ce{F-}", category: "ion", description: "F\u207B", tags: ["anion", "halogen"] },
1661
+ { id: "ion-cl-", name: "\u6C2F\u79BB\u5B50", latex: "\\ce{Cl-}", category: "ion", description: "Cl\u207B", tags: ["anion", "halogen"] },
1662
+ { id: "ion-br-", name: "\u6EB4\u79BB\u5B50", latex: "\\ce{Br-}", category: "ion", description: "Br\u207B", tags: ["anion", "halogen"] },
1663
+ { id: "ion-i-", name: "\u7898\u79BB\u5B50", latex: "\\ce{I-}", category: "ion", description: "I\u207B", tags: ["anion", "halogen"] },
1664
+ { id: "ion-o2-", name: "\u6C27\u79BB\u5B50", latex: "\\ce{O^{2-}}", category: "ion", description: "O\xB2\u207B", tags: ["anion", "oxide"] },
1665
+ { id: "ion-s2-", name: "\u786B\u79BB\u5B50", latex: "\\ce{S^{2-}}", category: "ion", description: "S\xB2\u207B", tags: ["anion", "sulfide"] },
1666
+ { id: "ion-oh-", name: "\u6C22\u6C27\u6839\u79BB\u5B50", latex: "\\ce{OH-}", category: "ion", description: "OH\u207B", tags: ["anion", "base", "polyatomic"] },
1667
+ { id: "ion-no3-", name: "\u785D\u9178\u6839\u79BB\u5B50", latex: "\\ce{NO3-}", category: "ion", description: "NO\u2083\u207B", tags: ["anion", "oxyanion", "polyatomic"] },
1668
+ { id: "ion-mno4-", name: "\u9AD8\u9530\u9178\u6839\u79BB\u5B50", latex: "\\ce{MnO4-}", category: "ion", description: "MnO\u2084\u207B", tags: ["anion", "oxyanion", "polyatomic", "oxidizing"] },
1669
+ { id: "ion-clo-", name: "\u6B21\u6C2F\u9178\u6839\u79BB\u5B50", latex: "\\ce{ClO-}", category: "ion", description: "ClO\u207B", tags: ["anion", "oxyanion", "polyatomic", "bleaching"] },
1670
+ { id: "ion-so4-2-", name: "\u786B\u9178\u6839\u79BB\u5B50", latex: "\\ce{SO4^{2-}}", category: "ion", description: "SO\u2084\xB2\u207B", tags: ["anion", "oxyanion", "polyatomic"] },
1671
+ { id: "ion-co3-2-", name: "\u78B3\u9178\u6839\u79BB\u5B50", latex: "\\ce{CO3^{2-}}", category: "ion", description: "CO\u2083\xB2\u207B", tags: ["anion", "oxyanion", "polyatomic"] },
1672
+ { id: "ion-so3-2-", name: "\u4E9A\u786B\u9178\u6839\u79BB\u5B50", latex: "\\ce{SO3^{2-}}", category: "ion", description: "SO\u2083\xB2\u207B", tags: ["anion", "oxyanion", "polyatomic"] },
1673
+ { id: "ion-cro4-2-", name: "\u94EC\u9178\u6839\u79BB\u5B50", latex: "\\ce{CrO4^{2-}}", category: "ion", description: "CrO\u2084\xB2\u207B", tags: ["anion", "oxyanion", "polyatomic", "chromate"] },
1674
+ { id: "ion-sio3-2-", name: "\u7845\u9178\u6839\u79BB\u5B50", latex: "\\ce{SiO3^{2-}}", category: "ion", description: "SiO\u2083\xB2\u207B", tags: ["anion", "oxyanion", "polyatomic", "silicate"] },
1675
+ { id: "ion-hco3-", name: "\u78B3\u9178\u6C22\u6839\u79BB\u5B50", latex: "\\ce{HCO3-}", category: "ion", description: "HCO\u2083\u207B", tags: ["anion", "bicarbonate", "polyatomic"] },
1676
+ { id: "ion-hso3-", name: "\u4E9A\u786B\u9178\u6C22\u6839\u79BB\u5B50", latex: "\\ce{HSO3-}", category: "ion", description: "HSO\u2083\u207B", tags: ["anion", "bisulfite", "polyatomic"] },
1677
+ { id: "ion-hso4-", name: "\u786B\u9178\u6C22\u6839\u79BB\u5B50", latex: "\\ce{HSO4-}", category: "ion", description: "HSO\u2084\u207B", tags: ["anion", "bisulfate", "polyatomic"] },
1678
+ { id: "ion-ch3coo-", name: "\u918B\u9178\u6839\u79BB\u5B50", latex: "\\ce{CH3COO-}", category: "ion", description: "CH\u2083COO\u207B", tags: ["anion", "acetate", "organic", "polyatomic"] },
1679
+ { id: "ion-cn-", name: "\u6C30\u6839\u79BB\u5B50", latex: "\\ce{CN-}", category: "ion", description: "CN\u207B", tags: ["anion", "cyanide", "polyatomic", "toxic"] },
1680
+ { id: "ion-scn-", name: "\u786B\u6C30\u9178\u6839\u79BB\u5B50", latex: "\\ce{SCN-}", category: "ion", description: "SCN\u207B", tags: ["anion", "thiocyanate", "polyatomic"] },
1681
+ // --- 配离子 (Complex Ions) ---
1682
+ { id: "ion-ag-nh3-2+", name: "\u4E8C\u6C28\u5408\u94F6\u79BB\u5B50", latex: "\\ce{[Ag(NH3)2]+}", category: "ion", description: "[Ag(NH\u2083)\u2082]\u207A", tags: ["complex-ion", "silver", "coordination"] }
1683
+ ];
1684
+ var ELEMENT_TEMPLATES = [
1685
+ // ---- 第1周期 ----
1686
+ { id: "elem-H", name: "\u6C22", latex: "\\ce{H}", category: "element", description: "Hydrogen", tags: ["nonmetal", "period-1", "group-1"] },
1687
+ { id: "elem-He", name: "\u6C26", latex: "\\ce{He}", category: "element", description: "Helium", tags: ["noble-gas", "period-1", "group-18"] },
1688
+ // ---- 第2周期 ----
1689
+ { id: "elem-Li", name: "\u9502", latex: "\\ce{Li}", category: "element", description: "Lithium", tags: ["alkali-metal", "period-2", "group-1"] },
1690
+ { id: "elem-Be", name: "\u94CD", latex: "\\ce{Be}", category: "element", description: "Beryllium", tags: ["alkaline-earth", "period-2", "group-2"] },
1691
+ { id: "elem-B", name: "\u787C", latex: "\\ce{B}", category: "element", description: "Boron", tags: ["metalloid", "period-2", "group-13"] },
1692
+ { id: "elem-C", name: "\u78B3", latex: "\\ce{C}", category: "element", description: "Carbon", tags: ["nonmetal", "period-2", "group-14"] },
1693
+ { id: "elem-N", name: "\u6C2E", latex: "\\ce{N}", category: "element", description: "Nitrogen", tags: ["nonmetal", "period-2", "group-15"] },
1694
+ { id: "elem-O", name: "\u6C27", latex: "\\ce{O}", category: "element", description: "Oxygen", tags: ["nonmetal", "period-2", "group-16"] },
1695
+ { id: "elem-F", name: "\u6C1F", latex: "\\ce{F}", category: "element", description: "Fluorine", tags: ["halogen", "period-2", "group-17"] },
1696
+ { id: "elem-Ne", name: "\u6C16", latex: "\\ce{Ne}", category: "element", description: "Neon", tags: ["noble-gas", "period-2", "group-18"] },
1697
+ // ---- 第3周期 ----
1698
+ { id: "elem-Na", name: "\u94A0", latex: "\\ce{Na}", category: "element", description: "Sodium", tags: ["alkali-metal", "period-3", "group-1"] },
1699
+ { id: "elem-Mg", name: "\u9541", latex: "\\ce{Mg}", category: "element", description: "Magnesium", tags: ["alkaline-earth", "period-3", "group-2"] },
1700
+ { id: "elem-Al", name: "\u94DD", latex: "\\ce{Al}", category: "element", description: "Aluminium", tags: ["metal", "period-3", "group-13"] },
1701
+ { id: "elem-Si", name: "\u7845", latex: "\\ce{Si}", category: "element", description: "Silicon", tags: ["metalloid", "period-3", "group-14"] },
1702
+ { id: "elem-P", name: "\u78F7", latex: "\\ce{P}", category: "element", description: "Phosphorus", tags: ["nonmetal", "period-3", "group-15"] },
1703
+ { id: "elem-S", name: "\u786B", latex: "\\ce{S}", category: "element", description: "Sulfur", tags: ["nonmetal", "period-3", "group-16"] },
1704
+ { id: "elem-Cl", name: "\u6C2F", latex: "\\ce{Cl}", category: "element", description: "Chlorine", tags: ["halogen", "period-3", "group-17"] },
1705
+ { id: "elem-Ar", name: "\u6C29", latex: "\\ce{Ar}", category: "element", description: "Argon", tags: ["noble-gas", "period-3", "group-18"] },
1706
+ // ---- 第4周期 ----
1707
+ { id: "elem-K", name: "\u94BE", latex: "\\ce{K}", category: "element", description: "Potassium", tags: ["alkali-metal", "period-4", "group-1"] },
1708
+ { id: "elem-Ca", name: "\u9499", latex: "\\ce{Ca}", category: "element", description: "Calcium", tags: ["alkaline-earth", "period-4", "group-2"] },
1709
+ { id: "elem-Sc", name: "\u94AA", latex: "\\ce{Sc}", category: "element", description: "Scandium", tags: ["transition-metal", "period-4", "group-3"] },
1710
+ { id: "elem-Ti", name: "\u949B", latex: "\\ce{Ti}", category: "element", description: "Titanium", tags: ["transition-metal", "period-4", "group-4"] },
1711
+ { id: "elem-V", name: "\u9492", latex: "\\ce{V}", category: "element", description: "Vanadium", tags: ["transition-metal", "period-4", "group-5"] },
1712
+ { id: "elem-Cr", name: "\u94EC", latex: "\\ce{Cr}", category: "element", description: "Chromium", tags: ["transition-metal", "period-4", "group-6"] },
1713
+ { id: "elem-Mn", name: "\u9530", latex: "\\ce{Mn}", category: "element", description: "Manganese", tags: ["transition-metal", "period-4", "group-7"] },
1714
+ { id: "elem-Fe", name: "\u94C1", latex: "\\ce{Fe}", category: "element", description: "Iron", tags: ["transition-metal", "period-4", "group-8"] },
1715
+ { id: "elem-Co", name: "\u94B4", latex: "\\ce{Co}", category: "element", description: "Cobalt", tags: ["transition-metal", "period-4", "group-9"] },
1716
+ { id: "elem-Ni", name: "\u954D", latex: "\\ce{Ni}", category: "element", description: "Nickel", tags: ["transition-metal", "period-4", "group-10"] },
1717
+ { id: "elem-Cu", name: "\u94DC", latex: "\\ce{Cu}", category: "element", description: "Copper", tags: ["transition-metal", "period-4", "group-11"] },
1718
+ { id: "elem-Zn", name: "\u950C", latex: "\\ce{Zn}", category: "element", description: "Zinc", tags: ["transition-metal", "period-4", "group-12"] },
1719
+ { id: "elem-Ga", name: "\u9553", latex: "\\ce{Ga}", category: "element", description: "Gallium", tags: ["metal", "period-4", "group-13"] },
1720
+ { id: "elem-Ge", name: "\u9517", latex: "\\ce{Ge}", category: "element", description: "Germanium", tags: ["metalloid", "period-4", "group-14"] },
1721
+ { id: "elem-As", name: "\u7837", latex: "\\ce{As}", category: "element", description: "Arsenic", tags: ["metalloid", "period-4", "group-15"] },
1722
+ { id: "elem-Se", name: "\u7852", latex: "\\ce{Se}", category: "element", description: "Selenium", tags: ["nonmetal", "period-4", "group-16"] },
1723
+ { id: "elem-Br", name: "\u6EB4", latex: "\\ce{Br}", category: "element", description: "Bromine", tags: ["halogen", "period-4", "group-17"] },
1724
+ { id: "elem-Kr", name: "\u6C2A", latex: "\\ce{Kr}", category: "element", description: "Krypton", tags: ["noble-gas", "period-4", "group-18"] },
1725
+ // ---- 第5周期 ----
1726
+ { id: "elem-Rb", name: "\u94F7", latex: "\\ce{Rb}", category: "element", description: "Rubidium", tags: ["alkali-metal", "period-5", "group-1"] },
1727
+ { id: "elem-Sr", name: "\u9536", latex: "\\ce{Sr}", category: "element", description: "Strontium", tags: ["alkaline-earth", "period-5", "group-2"] },
1728
+ { id: "elem-Y", name: "\u9487", latex: "\\ce{Y}", category: "element", description: "Yttrium", tags: ["transition-metal", "period-5", "group-3"] },
1729
+ { id: "elem-Zr", name: "\u9506", latex: "\\ce{Zr}", category: "element", description: "Zirconium", tags: ["transition-metal", "period-5", "group-4"] },
1730
+ { id: "elem-Nb", name: "\u94CC", latex: "\\ce{Nb}", category: "element", description: "Niobium", tags: ["transition-metal", "period-5", "group-5"] },
1731
+ { id: "elem-Mo", name: "\u94BC", latex: "\\ce{Mo}", category: "element", description: "Molybdenum", tags: ["transition-metal", "period-5", "group-6"] },
1732
+ { id: "elem-Tc", name: "\u951D", latex: "\\ce{Tc}", category: "element", description: "Technetium", tags: ["transition-metal", "period-5", "group-7"] },
1733
+ { id: "elem-Ru", name: "\u948C", latex: "\\ce{Ru}", category: "element", description: "Ruthenium", tags: ["transition-metal", "period-5", "group-8"] },
1734
+ { id: "elem-Rh", name: "\u94D1", latex: "\\ce{Rh}", category: "element", description: "Rhodium", tags: ["transition-metal", "period-5", "group-9"] },
1735
+ { id: "elem-Pd", name: "\u94AF", latex: "\\ce{Pd}", category: "element", description: "Palladium", tags: ["transition-metal", "period-5", "group-10"] },
1736
+ { id: "elem-Ag", name: "\u94F6", latex: "\\ce{Ag}", category: "element", description: "Silver", tags: ["transition-metal", "period-5", "group-11"] },
1737
+ { id: "elem-Cd", name: "\u9549", latex: "\\ce{Cd}", category: "element", description: "Cadmium", tags: ["transition-metal", "period-5", "group-12"] },
1738
+ { id: "elem-In", name: "\u94DF", latex: "\\ce{In}", category: "element", description: "Indium", tags: ["metal", "period-5", "group-13"] },
1739
+ { id: "elem-Sn", name: "\u9521", latex: "\\ce{Sn}", category: "element", description: "Tin", tags: ["metal", "period-5", "group-14"] },
1740
+ { id: "elem-Sb", name: "\u9511", latex: "\\ce{Sb}", category: "element", description: "Antimony", tags: ["metalloid", "period-5", "group-15"] },
1741
+ { id: "elem-Te", name: "\u78B2", latex: "\\ce{Te}", category: "element", description: "Tellurium", tags: ["metalloid", "period-5", "group-16"] },
1742
+ { id: "elem-I", name: "\u7898", latex: "\\ce{I}", category: "element", description: "Iodine", tags: ["halogen", "period-5", "group-17"] },
1743
+ { id: "elem-Xe", name: "\u6C19", latex: "\\ce{Xe}", category: "element", description: "Xenon", tags: ["noble-gas", "period-5", "group-18"] },
1744
+ // ---- 第6周期 ----
1745
+ { id: "elem-Cs", name: "\u94EF", latex: "\\ce{Cs}", category: "element", description: "Cesium", tags: ["alkali-metal", "period-6", "group-1"] },
1746
+ { id: "elem-Ba", name: "\u94A1", latex: "\\ce{Ba}", category: "element", description: "Barium", tags: ["alkaline-earth", "period-6", "group-2"] },
1747
+ // La-Lu: 镧系 (Lanthanides)
1748
+ { id: "elem-La", name: "\u9567", latex: "\\ce{La}", category: "element", description: "Lanthanum", tags: ["lanthanide", "period-6", "f-block"] },
1749
+ { id: "elem-Ce", name: "\u94C8", latex: "\\ce{Ce}", category: "element", description: "Cerium", tags: ["lanthanide", "period-6", "f-block"] },
1750
+ { id: "elem-Pr", name: "\u9568", latex: "\\ce{Pr}", category: "element", description: "Praseodymium", tags: ["lanthanide", "period-6", "f-block"] },
1751
+ { id: "elem-Nd", name: "\u9495", latex: "\\ce{Nd}", category: "element", description: "Neodymium", tags: ["lanthanide", "period-6", "f-block"] },
1752
+ { id: "elem-Pm", name: "\u94B7", latex: "\\ce{Pm}", category: "element", description: "Promethium", tags: ["lanthanide", "period-6", "f-block"] },
1753
+ { id: "elem-Sm", name: "\u9490", latex: "\\ce{Sm}", category: "element", description: "Samarium", tags: ["lanthanide", "period-6", "f-block"] },
1754
+ { id: "elem-Eu", name: "\u94D5", latex: "\\ce{Eu}", category: "element", description: "Europium", tags: ["lanthanide", "period-6", "f-block"] },
1755
+ { id: "elem-Gd", name: "\u9486", latex: "\\ce{Gd}", category: "element", description: "Gadolinium", tags: ["lanthanide", "period-6", "f-block"] },
1756
+ { id: "elem-Tb", name: "\u94FD", latex: "\\ce{Tb}", category: "element", description: "Terbium", tags: ["lanthanide", "period-6", "f-block"] },
1757
+ { id: "elem-Dy", name: "\u955D", latex: "\\ce{Dy}", category: "element", description: "Dysprosium", tags: ["lanthanide", "period-6", "f-block"] },
1758
+ { id: "elem-Ho", name: "\u94AC", latex: "\\ce{Ho}", category: "element", description: "Holmium", tags: ["lanthanide", "period-6", "f-block"] },
1759
+ { id: "elem-Er", name: "\u94D2", latex: "\\ce{Er}", category: "element", description: "Erbium", tags: ["lanthanide", "period-6", "f-block"] },
1760
+ { id: "elem-Tm", name: "\u94E5", latex: "\\ce{Tm}", category: "element", description: "Thulium", tags: ["lanthanide", "period-6", "f-block"] },
1761
+ { id: "elem-Yb", name: "\u9571", latex: "\\ce{Yb}", category: "element", description: "Ytterbium", tags: ["lanthanide", "period-6", "f-block"] },
1762
+ { id: "elem-Lu", name: "\u9565", latex: "\\ce{Lu}", category: "element", description: "Lutetium", tags: ["lanthanide", "period-6", "f-block"] },
1763
+ // 5d 过渡金属
1764
+ { id: "elem-Hf", name: "\u94EA", latex: "\\ce{Hf}", category: "element", description: "Hafnium", tags: ["transition-metal", "period-6", "group-4"] },
1765
+ { id: "elem-Ta", name: "\u94BD", latex: "\\ce{Ta}", category: "element", description: "Tantalum", tags: ["transition-metal", "period-6", "group-5"] },
1766
+ { id: "elem-W", name: "\u94A8", latex: "\\ce{W}", category: "element", description: "Tungsten", tags: ["transition-metal", "period-6", "group-6"] },
1767
+ { id: "elem-Re", name: "\u94FC", latex: "\\ce{Re}", category: "element", description: "Rhenium", tags: ["transition-metal", "period-6", "group-7"] },
1768
+ { id: "elem-Os", name: "\u9507", latex: "\\ce{Os}", category: "element", description: "Osmium", tags: ["transition-metal", "period-6", "group-8"] },
1769
+ { id: "elem-Ir", name: "\u94F1", latex: "\\ce{Ir}", category: "element", description: "Iridium", tags: ["transition-metal", "period-6", "group-9"] },
1770
+ { id: "elem-Pt", name: "\u94C2", latex: "\\ce{Pt}", category: "element", description: "Platinum", tags: ["transition-metal", "period-6", "group-10"] },
1771
+ { id: "elem-Au", name: "\u91D1", latex: "\\ce{Au}", category: "element", description: "Gold", tags: ["transition-metal", "period-6", "group-11"] },
1772
+ { id: "elem-Hg", name: "\u6C5E", latex: "\\ce{Hg}", category: "element", description: "Mercury", tags: ["transition-metal", "period-6", "group-12", "liquid"] },
1773
+ { id: "elem-Tl", name: "\u94CA", latex: "\\ce{Tl}", category: "element", description: "Thallium", tags: ["metal", "period-6", "group-13"] },
1774
+ { id: "elem-Pb", name: "\u94C5", latex: "\\ce{Pb}", category: "element", description: "Lead", tags: ["metal", "period-6", "group-14"] },
1775
+ { id: "elem-Bi", name: "\u94CB", latex: "\\ce{Bi}", category: "element", description: "Bismuth", tags: ["metal", "period-6", "group-15"] },
1776
+ { id: "elem-Po", name: "\u948B", latex: "\\ce{Po}", category: "element", description: "Polonium", tags: ["metalloid", "period-6", "group-16"] },
1777
+ { id: "elem-At", name: "\u7839", latex: "\\ce{At}", category: "element", description: "Astatine", tags: ["halogen", "period-6", "group-17"] },
1778
+ { id: "elem-Rn", name: "\u6C21", latex: "\\ce{Rn}", category: "element", description: "Radon", tags: ["noble-gas", "period-6", "group-18"] },
1779
+ // ---- 第7周期 ----
1780
+ { id: "elem-Fr", name: "\u94AB", latex: "\\ce{Fr}", category: "element", description: "Francium", tags: ["alkali-metal", "period-7", "group-1"] },
1781
+ { id: "elem-Ra", name: "\u956D", latex: "\\ce{Ra}", category: "element", description: "Radium", tags: ["alkaline-earth", "period-7", "group-2"] },
1782
+ // Ac-Lr: 锕系 (Actinides)
1783
+ { id: "elem-Ac", name: "\u9515", latex: "\\ce{Ac}", category: "element", description: "Actinium", tags: ["actinide", "period-7", "f-block"] },
1784
+ { id: "elem-Th", name: "\u948D", latex: "\\ce{Th}", category: "element", description: "Thorium", tags: ["actinide", "period-7", "f-block"] },
1785
+ { id: "elem-Pa", name: "\u9564", latex: "\\ce{Pa}", category: "element", description: "Protactinium", tags: ["actinide", "period-7", "f-block"] },
1786
+ { id: "elem-U", name: "\u94C0", latex: "\\ce{U}", category: "element", description: "Uranium", tags: ["actinide", "period-7", "f-block"] },
1787
+ { id: "elem-Np", name: "\u954E", latex: "\\ce{Np}", category: "element", description: "Neptunium", tags: ["actinide", "period-7", "f-block"] },
1788
+ { id: "elem-Pu", name: "\u949A", latex: "\\ce{Pu}", category: "element", description: "Plutonium", tags: ["actinide", "period-7", "f-block"] },
1789
+ { id: "elem-Am", name: "\u9545", latex: "\\ce{Am}", category: "element", description: "Americium", tags: ["actinide", "period-7", "f-block"] },
1790
+ { id: "elem-Cm", name: "\u9514", latex: "\\ce{Cm}", category: "element", description: "Curium", tags: ["actinide", "period-7", "f-block"] },
1791
+ { id: "elem-Bk", name: "\u952B", latex: "\\ce{Bk}", category: "element", description: "Berkelium", tags: ["actinide", "period-7", "f-block"] },
1792
+ { id: "elem-Cf", name: "\u950E", latex: "\\ce{Cf}", category: "element", description: "Californium", tags: ["actinide", "period-7", "f-block"] },
1793
+ { id: "elem-Es", name: "\u953F", latex: "\\ce{Es}", category: "element", description: "Einsteinium", tags: ["actinide", "period-7", "f-block"] },
1794
+ { id: "elem-Fm", name: "\u9544", latex: "\\ce{Fm}", category: "element", description: "Fermium", tags: ["actinide", "period-7", "f-block"] },
1795
+ { id: "elem-Md", name: "\u9494", latex: "\\ce{Md}", category: "element", description: "Mendelevium", tags: ["actinide", "period-7", "f-block"] },
1796
+ { id: "elem-No", name: "\u9518", latex: "\\ce{No}", category: "element", description: "Nobelium", tags: ["actinide", "period-7", "f-block"] },
1797
+ { id: "elem-Lr", name: "\u94F9", latex: "\\ce{Lr}", category: "element", description: "Lawrencium", tags: ["actinide", "period-7", "f-block"] },
1798
+ // 6d 超重元素
1799
+ { id: "elem-Rf", name: "\u{2CB3B}", latex: "\\ce{Rf}", category: "element", description: "Rutherfordium", tags: ["transition-metal", "period-7", "group-4", "synthetic"] },
1800
+ { id: "elem-Db", name: "\u{2CB4A}", latex: "\\ce{Db}", category: "element", description: "Dubnium", tags: ["transition-metal", "period-7", "group-5", "synthetic"] },
1801
+ { id: "elem-Sg", name: "\u{2CB73}", latex: "\\ce{Sg}", category: "element", description: "Seaborgium", tags: ["transition-metal", "period-7", "group-6", "synthetic"] },
1802
+ { id: "elem-Bh", name: "\u{2CB5B}", latex: "\\ce{Bh}", category: "element", description: "Bohrium", tags: ["transition-metal", "period-7", "group-7", "synthetic"] },
1803
+ { id: "elem-Hs", name: "\u{2CB76}", latex: "\\ce{Hs}", category: "element", description: "Hassium", tags: ["transition-metal", "period-7", "group-8", "synthetic"] },
1804
+ { id: "elem-Mt", name: "\u9FCF", latex: "\\ce{Mt}", category: "element", description: "Meitnerium", tags: ["transition-metal", "period-7", "group-9", "synthetic"] },
1805
+ { id: "elem-Ds", name: "\u{2B7FC}", latex: "\\ce{Ds}", category: "element", description: "Darmstadtium", tags: ["transition-metal", "period-7", "group-10", "synthetic"] },
1806
+ { id: "elem-Rg", name: "\u{2CB2D}", latex: "\\ce{Rg}", category: "element", description: "Roentgenium", tags: ["transition-metal", "period-7", "group-11", "synthetic"] },
1807
+ { id: "elem-Cn", name: "\u93B6", latex: "\\ce{Cn}", category: "element", description: "Copernicium", tags: ["transition-metal", "period-7", "group-12", "synthetic"] },
1808
+ { id: "elem-Nh", name: "\u9268", latex: "\\ce{Nh}", category: "element", description: "Nihonium", tags: ["metal", "period-7", "group-13", "synthetic"] },
1809
+ { id: "elem-Fl", name: "\u{2B4E7}", latex: "\\ce{Fl}", category: "element", description: "Flerovium", tags: ["metal", "period-7", "group-14", "synthetic"] },
1810
+ { id: "elem-Mc", name: "\u9546", latex: "\\ce{Mc}", category: "element", description: "Moscovium", tags: ["metal", "period-7", "group-15", "synthetic"] },
1811
+ { id: "elem-Lv", name: "\u925D", latex: "\\ce{Lv}", category: "element", description: "Livermorium", tags: ["metal", "period-7", "group-16", "synthetic"] },
1812
+ { id: "elem-Ts", name: "\u77F3\u7530", latex: "\\ce{Ts}", category: "element", description: "Tennessine", tags: ["halogen", "period-7", "group-17", "synthetic"] },
1813
+ { id: "elem-Og", name: "\u6C14\u5967", latex: "\\ce{Og}", category: "element", description: "Oganesson", tags: ["noble-gas", "period-7", "group-18", "synthetic"] }
1814
+ ];
498
1815
  var ALL_CHEM_TEMPLATES = [
499
1816
  ...COMPOUND_TEMPLATES,
500
1817
  ...REACTION_TEMPLATES,
501
- ...ELECTROCHEM_TEMPLATES
1818
+ ...ELECTROCHEM_TEMPLATES,
1819
+ ...ION_TEMPLATES,
1820
+ ...ELEMENT_TEMPLATES
502
1821
  ];
503
1822
  function searchCompounds(query) {
504
1823
  const q = query.toLowerCase();
@@ -512,66 +1831,64 @@ function getAcids() {
512
1831
  function getBases() {
513
1832
  return COMPOUND_TEMPLATES.filter((t) => t.tags.includes("base"));
514
1833
  }
1834
+ function searchIons(query) {
1835
+ const q = query.toLowerCase();
1836
+ return ION_TEMPLATES.filter(
1837
+ (t) => t.name.toLowerCase().includes(q) || t.latex.toLowerCase().includes(q) || t.description.toLowerCase().includes(q) || t.tags.some((tag) => tag.toLowerCase().includes(q))
1838
+ );
1839
+ }
1840
+ function getCations() {
1841
+ return ION_TEMPLATES.filter((t) => t.tags.includes("cation"));
1842
+ }
1843
+ function getAnions() {
1844
+ return ION_TEMPLATES.filter((t) => t.tags.includes("anion"));
1845
+ }
1846
+ function searchElements(query) {
1847
+ const q = query.toLowerCase();
1848
+ return ELEMENT_TEMPLATES.filter(
1849
+ (t) => t.name.toLowerCase().includes(q) || t.description.toLowerCase().includes(q) || t.tags.some((tag) => tag.toLowerCase().includes(q))
1850
+ );
1851
+ }
1852
+ function getElementsByPeriod(period) {
1853
+ const tag = `period-${period}`;
1854
+ return ELEMENT_TEMPLATES.filter((t) => t.tags.includes(tag));
1855
+ }
1856
+ function getElementsByGroup(group) {
1857
+ const tag = `group-${group}`;
1858
+ return ELEMENT_TEMPLATES.filter((t) => t.tags.includes(tag));
1859
+ }
515
1860
 
516
1861
  // src/greek-presets.ts
1862
+ var import_math = require("@sciexpr/math");
1863
+ var VARIANT_MAP = {
1864
+ "\\epsilon": [{ latex: "\\varepsilon", unicode: "\u03B5", name: "Epsilon (var)" }],
1865
+ "\\theta": [{ latex: "\\vartheta", unicode: "\u03D1", name: "Theta (var)" }],
1866
+ "\\pi": [{ latex: "\\varpi", unicode: "\u03D6", name: "Pi (var)" }],
1867
+ "\\rho": [{ latex: "\\varrho", unicode: "\u03F1", name: "Rho (var)" }],
1868
+ "\\sigma": [{ latex: "\\varsigma", unicode: "\u03C2", name: "Sigma (final)" }],
1869
+ "\\phi": [{ latex: "\\varphi", unicode: "\u03D5", name: "Phi (var)" }]
1870
+ };
1871
+ function capitalize(s) {
1872
+ return s.charAt(0).toUpperCase() + s.slice(1);
1873
+ }
1874
+ function toGreekLetter(entry) {
1875
+ return {
1876
+ latex: entry.latex,
1877
+ unicode: entry.unicode,
1878
+ name: entry.description ?? capitalize(entry.name),
1879
+ englishName: entry.name,
1880
+ variants: VARIANT_MAP[entry.latex]
1881
+ };
1882
+ }
517
1883
  var GREEK_LOWERCASE_GROUP = {
518
1884
  id: "greek-lowercase",
519
1885
  label: "Greek Lowercase (\u5C0F\u5199)",
520
- letters: [
521
- { latex: "\\alpha", unicode: "\u03B1", name: "Alpha", englishName: "alpha" },
522
- { latex: "\\beta", unicode: "\u03B2", name: "Beta", englishName: "beta" },
523
- { latex: "\\gamma", unicode: "\u03B3", name: "Gamma", englishName: "gamma" },
524
- { latex: "\\delta", unicode: "\u03B4", name: "Delta", englishName: "delta" },
525
- { latex: "\\epsilon", unicode: "\u03B5", name: "Epsilon", englishName: "epsilon", variants: [
526
- { latex: "\\varepsilon", unicode: "\u03B5", name: "Epsilon (var)" }
527
- ] },
528
- { latex: "\\zeta", unicode: "\u03B6", name: "Zeta", englishName: "zeta" },
529
- { latex: "\\eta", unicode: "\u03B7", name: "Eta", englishName: "eta" },
530
- { latex: "\\theta", unicode: "\u03B8", name: "Theta", englishName: "theta", variants: [
531
- { latex: "\\vartheta", unicode: "\u03D1", name: "Theta (var)" }
532
- ] },
533
- { latex: "\\iota", unicode: "\u03B9", name: "Iota", englishName: "iota" },
534
- { latex: "\\kappa", unicode: "\u03BA", name: "Kappa", englishName: "kappa" },
535
- { latex: "\\lambda", unicode: "\u03BB", name: "Lambda", englishName: "lambda" },
536
- { latex: "\\mu", unicode: "\u03BC", name: "Mu", englishName: "mu" },
537
- { latex: "\\nu", unicode: "\u03BD", name: "Nu", englishName: "nu" },
538
- { latex: "\\xi", unicode: "\u03BE", name: "Xi", englishName: "xi" },
539
- { latex: "\\omicron", unicode: "\u03BF", name: "Omicron", englishName: "omicron" },
540
- { latex: "\\pi", unicode: "\u03C0", name: "Pi", englishName: "pi", variants: [
541
- { latex: "\\varpi", unicode: "\u03D6", name: "Pi (var)" }
542
- ] },
543
- { latex: "\\rho", unicode: "\u03C1", name: "Rho", englishName: "rho", variants: [
544
- { latex: "\\varrho", unicode: "\u03F1", name: "Rho (var)" }
545
- ] },
546
- { latex: "\\sigma", unicode: "\u03C3", name: "Sigma", englishName: "sigma", variants: [
547
- { latex: "\\varsigma", unicode: "\u03C2", name: "Sigma (final)" }
548
- ] },
549
- { latex: "\\tau", unicode: "\u03C4", name: "Tau", englishName: "tau" },
550
- { latex: "\\upsilon", unicode: "\u03C5", name: "Upsilon", englishName: "upsilon" },
551
- { latex: "\\phi", unicode: "\u03C6", name: "Phi", englishName: "phi", variants: [
552
- { latex: "\\varphi", unicode: "\u03D5", name: "Phi (var)" }
553
- ] },
554
- { latex: "\\chi", unicode: "\u03C7", name: "Chi", englishName: "chi" },
555
- { latex: "\\psi", unicode: "\u03C8", name: "Psi", englishName: "psi" },
556
- { latex: "\\omega", unicode: "\u03C9", name: "Omega", englishName: "omega" }
557
- ]
1886
+ letters: import_math.GREEK_LOWERCASE.map(toGreekLetter)
558
1887
  };
559
1888
  var GREEK_UPPERCASE_GROUP = {
560
1889
  id: "greek-uppercase",
561
1890
  label: "Greek Uppercase (\u5927\u5199)",
562
- letters: [
563
- { latex: "\\Gamma", unicode: "\u0393", name: "Gamma", englishName: "Gamma" },
564
- { latex: "\\Delta", unicode: "\u0394", name: "Delta", englishName: "Delta" },
565
- { latex: "\\Theta", unicode: "\u0398", name: "Theta", englishName: "Theta" },
566
- { latex: "\\Lambda", unicode: "\u039B", name: "Lambda", englishName: "Lambda" },
567
- { latex: "\\Xi", unicode: "\u039E", name: "Xi", englishName: "Xi" },
568
- { latex: "\\Pi", unicode: "\u03A0", name: "Pi", englishName: "Pi" },
569
- { latex: "\\Sigma", unicode: "\u03A3", name: "Sigma", englishName: "Sigma" },
570
- { latex: "\\Upsilon", unicode: "\u03A5", name: "Upsilon", englishName: "Upsilon" },
571
- { latex: "\\Phi", unicode: "\u03A6", name: "Phi", englishName: "Phi" },
572
- { latex: "\\Psi", unicode: "\u03A8", name: "Psi", englishName: "Psi" },
573
- { latex: "\\Omega", unicode: "\u03A9", name: "Omega", englishName: "Omega" }
574
- ]
1891
+ letters: import_math.GREEK_UPPERCASE.map(toGreekLetter)
575
1892
  };
576
1893
  var GREEK_GROUPS = [
577
1894
  GREEK_LOWERCASE_GROUP,
@@ -603,6 +1920,116 @@ function searchGreekWithVariants(query) {
603
1920
  }
604
1921
  return results;
605
1922
  }
1923
+
1924
+ // src/palette-chem.ts
1925
+ var import_math2 = require("@sciexpr/math");
1926
+ function templateToEntry(t, isCommon) {
1927
+ return {
1928
+ latex: t.latex,
1929
+ unicode: "",
1930
+ name: t.name,
1931
+ description: t.description,
1932
+ isCommon
1933
+ };
1934
+ }
1935
+ function takeCommon(list, count) {
1936
+ return list.slice(0, count).map((t) => templateToEntry(t, true));
1937
+ }
1938
+ function takeRest(list, fromIndex) {
1939
+ return list.slice(fromIndex).map((t) => templateToEntry(t, false));
1940
+ }
1941
+ function fromGreekSymbol(s, desc, isCommon = false) {
1942
+ return { latex: s.latex, unicode: s.unicode, name: s.name, description: desc, isCommon };
1943
+ }
1944
+ var CHEM_GREEK_COMMON = /* @__PURE__ */ new Set([
1945
+ "\\alpha",
1946
+ "\\beta",
1947
+ "\\gamma",
1948
+ "\\delta",
1949
+ "\\epsilon",
1950
+ "\\mu",
1951
+ "\\nu",
1952
+ "\\pi",
1953
+ "\\rho",
1954
+ "\\sigma",
1955
+ "\\theta",
1956
+ "\\omega"
1957
+ ]);
1958
+ var CHEM_GREEK_DESCRIPTIONS = {
1959
+ "\\alpha": "\u5E38\u7528\u4E8E\u5316\u5B66\u8868\u793A",
1960
+ "\\delta": "\u5316\u5B66\u4F4D\u79FB",
1961
+ "\\Delta": "\u5927\u5199 Delta / \u52A0\u70ED\u7B26\u53F7",
1962
+ "\\epsilon": "\u6469\u5C14\u5438\u5149\u7CFB\u6570",
1963
+ "\\lambda": "\u6CE2\u957F",
1964
+ "\\mu": "\u5FAE (10\u207B\u2076) / \u5076\u6781\u77E9",
1965
+ "\\nu": "\u9891\u7387 / \u5316\u5B66\u8BA1\u91CF\u7CFB\u6570",
1966
+ "\\pi": "\u6E17\u900F\u538B",
1967
+ "\\rho": "\u5BC6\u5EA6",
1968
+ "\\sigma": "Sigma \u952E / \u8868\u9762\u5F20\u529B",
1969
+ "\\Sigma": "\u6C42\u548C",
1970
+ "\\theta": "\u8986\u76D6\u7387"
1971
+ };
1972
+ var CHEM_PALETTE_CATEGORIES = [
1973
+ {
1974
+ id: "compounds",
1975
+ label: "\u5316\u5B66\u7269\u8D28",
1976
+ symbols: [
1977
+ ...takeCommon(COMPOUND_TEMPLATES, 12),
1978
+ ...takeRest(COMPOUND_TEMPLATES, 12)
1979
+ ]
1980
+ },
1981
+ {
1982
+ id: "ions",
1983
+ label: "\u5316\u5B66\u79BB\u5B50",
1984
+ symbols: [
1985
+ ...takeCommon(ION_TEMPLATES, 10),
1986
+ ...takeRest(ION_TEMPLATES, 10)
1987
+ ]
1988
+ },
1989
+ {
1990
+ id: "chem-symbols",
1991
+ label: "\u5E38\u7528\u7B26\u53F7",
1992
+ symbols: [
1993
+ { latex: "\\ce{->}", unicode: "\u2192", name: "\u53CD\u5E94\u7BAD\u5934", description: "\u5316\u5B66\u53CD\u5E94\u751F\u6210", isCommon: true },
1994
+ { latex: "\\ce{<-}", unicode: "\u2190", name: "\u53CD\u5411\u7BAD\u5934", description: "\u9006\u53CD\u5E94", isCommon: false },
1995
+ { latex: "\\ce{<=>}", unicode: "\u21CC", name: "\u53EF\u9006\u53CD\u5E94", description: "\u5316\u5B66\u5E73\u8861", isCommon: true },
1996
+ { latex: "\\ce{<->}", unicode: "\u21C4", name: "\u53CC\u5411\u7BAD\u5934", isCommon: false },
1997
+ { latex: "\\ce{->[\\Delta]}", unicode: "\u2192[\u0394]", name: "\u52A0\u70ED\u53CD\u5E94", description: "\u52A0\u70ED\u6761\u4EF6\u4E0B", isCommon: true },
1998
+ { latex: "\\ce{->[H+]}", unicode: "\u2192[H\u207A]", name: "\u9178\u50AC\u5316", description: "\u9178\u6027\u6761\u4EF6", isCommon: false },
1999
+ { latex: "\\ce{->[\u4E0A\u9762][\u4E0B\u9762]}", unicode: "\u2192[...][...]", name: "\u6761\u4EF6\u53CD\u5E94", description: "\u663E\u793A\u53CD\u5E94\u6761\u4EF6", isCommon: true },
2000
+ { latex: "\\ce{^{2+}}", unicode: "\xB2\u207A", name: "\u7535\u8377+2", description: "\u4E8C\u4EF7\u9633\u79BB\u5B50", isCommon: true },
2001
+ { latex: "\\ce{^{3+}}", unicode: "\xB3\u207A", name: "\u7535\u8377+3", description: "\u4E09\u4EF7\u9633\u79BB\u5B50", isCommon: true },
2002
+ { latex: "\\ce{^{-}}", unicode: "\u207B", name: "\u7535\u8377-1", description: "\u4E00\u4EF7\u9634\u79BB\u5B50", isCommon: true },
2003
+ { latex: "\\ce{^{2-}}", unicode: "\xB2\u207B", name: "\u7535\u8377-2", description: "\u4E8C\u4EF7\u9634\u79BB\u5B50", isCommon: true },
2004
+ { latex: "\\uparrow", unicode: "\u2191", name: "\u6C14\u4F53\u9038\u51FA", description: "\u2191 \u4EA7\u751F\u6C14\u4F53", isCommon: true },
2005
+ { latex: "\\downarrow", unicode: "\u2193", name: "\u6C89\u6DC0", description: "\u2193 \u4EA7\u751F\u6C89\u6DC0", isCommon: true },
2006
+ { latex: "\\Delta", unicode: "\u0394", name: "\u52A0\u70ED\u7B26\u53F7", isCommon: true },
2007
+ { latex: "\\ce{H2O}", unicode: "H\u2082O", name: "\u6C34", isCommon: true },
2008
+ { latex: "pH", unicode: "pH", name: "pH\u503C", isCommon: true },
2009
+ { latex: "K_{sp}", unicode: "K_sp", name: "\u6EB6\u5EA6\u79EF\u5E38\u6570", isCommon: false },
2010
+ { latex: "K_a", unicode: "K_a", name: "\u9178\u89E3\u79BB\u5E38\u6570", isCommon: false },
2011
+ { latex: "K_b", unicode: "K_b", name: "\u78B1\u89E3\u79BB\u5E38\u6570", isCommon: false }
2012
+ ]
2013
+ },
2014
+ {
2015
+ id: "chem-greek",
2016
+ label: "\u5E0C\u814A\u5B57\u6BCD",
2017
+ symbols: [
2018
+ // Common Greek: lowercase (chemical subset, with domain-specific descriptions)
2019
+ ...import_math2.GREEK_LOWERCASE.filter((s) => CHEM_GREEK_COMMON.has(s.latex)).map((s) => fromGreekSymbol(s, CHEM_GREEK_DESCRIPTIONS[s.latex], true)),
2020
+ // Common Greek: uppercase (Delta, Sigma for chemistry)
2021
+ ...import_math2.GREEK_UPPERCASE.filter((s) => s.latex === "\\Delta" || s.latex === "\\Sigma").map((s) => fromGreekSymbol(s, CHEM_GREEK_DESCRIPTIONS[s.latex], s.latex === "\\Delta"))
2022
+ ]
2023
+ },
2024
+ {
2025
+ id: "chem-elements",
2026
+ label: "\u5316\u5B66\u5143\u7D20",
2027
+ symbols: [
2028
+ ...takeCommon(ELEMENT_TEMPLATES, 15),
2029
+ ...takeRest(ELEMENT_TEMPLATES, 15)
2030
+ ]
2031
+ }
2032
+ ];
606
2033
  // Annotate the CommonJS export names for ESM import in node:
607
2034
  0 && (module.exports = {
608
2035
  ALGEBRA_TEMPLATES,
@@ -610,22 +2037,31 @@ function searchGreekWithVariants(query) {
610
2037
  ALL_GREEK,
611
2038
  ALL_MATH_TEMPLATES,
612
2039
  CALCULUS_TEMPLATES,
2040
+ CHEM_PALETTE_CATEGORIES,
613
2041
  COMPOUND_TEMPLATES,
614
2042
  ELECTROCHEM_TEMPLATES,
2043
+ ELEMENT_TEMPLATES,
615
2044
  GREEK_GROUPS,
616
2045
  GREEK_LOWERCASE_GROUP,
617
2046
  GREEK_UPPERCASE_GROUP,
2047
+ ION_TEMPLATES,
618
2048
  LINEAR_ALGEBRA_TEMPLATES,
619
2049
  PHYSICS_TEMPLATES,
620
2050
  REACTION_TEMPLATES,
621
2051
  STATS_TEMPLATES,
622
2052
  TRIG_TEMPLATES,
623
2053
  getAcids,
2054
+ getAnions,
624
2055
  getBases,
2056
+ getCations,
2057
+ getElementsByGroup,
2058
+ getElementsByPeriod,
625
2059
  getTemplateById,
626
2060
  getTemplatesByCategory,
627
2061
  searchCompounds,
2062
+ searchElements,
628
2063
  searchGreek,
629
2064
  searchGreekWithVariants,
2065
+ searchIons,
630
2066
  searchTemplates
631
2067
  });