@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/README.md +16 -0
- package/dist/index.cjs +1510 -74
- package/dist/index.d.cts +40 -9
- package/dist/index.d.ts +40 -9
- package/dist/index.js +1507 -74
- package/package.json +10 -9
package/dist/index.d.cts
CHANGED
|
@@ -31,6 +31,8 @@ declare function getTemplateById(id: string): FormulaTemplate | undefined;
|
|
|
31
31
|
declare const COMPOUND_TEMPLATES: FormulaTemplate[];
|
|
32
32
|
declare const REACTION_TEMPLATES: FormulaTemplate[];
|
|
33
33
|
declare const ELECTROCHEM_TEMPLATES: FormulaTemplate[];
|
|
34
|
+
declare const ION_TEMPLATES: FormulaTemplate[];
|
|
35
|
+
declare const ELEMENT_TEMPLATES: FormulaTemplate[];
|
|
34
36
|
/** 所有化学模板 */
|
|
35
37
|
declare const ALL_CHEM_TEMPLATES: FormulaTemplate[];
|
|
36
38
|
/** 按标签搜索化合物 */
|
|
@@ -39,14 +41,20 @@ declare function searchCompounds(query: string): FormulaTemplate[];
|
|
|
39
41
|
declare function getAcids(): FormulaTemplate[];
|
|
40
42
|
/** 获取常见碱 */
|
|
41
43
|
declare function getBases(): FormulaTemplate[];
|
|
44
|
+
/** 按名称/化学式搜索离子 */
|
|
45
|
+
declare function searchIons(query: string): FormulaTemplate[];
|
|
46
|
+
/** 获取所有阳离子 */
|
|
47
|
+
declare function getCations(): FormulaTemplate[];
|
|
48
|
+
/** 获取所有阴离子 */
|
|
49
|
+
declare function getAnions(): FormulaTemplate[];
|
|
50
|
+
/** 按名称/符号搜索元素 */
|
|
51
|
+
declare function searchElements(query: string): FormulaTemplate[];
|
|
52
|
+
/** 按周期获取元素 (1-7) */
|
|
53
|
+
declare function getElementsByPeriod(period: number): FormulaTemplate[];
|
|
54
|
+
/** 按族获取元素 (1-18) */
|
|
55
|
+
declare function getElementsByGroup(group: number): FormulaTemplate[];
|
|
42
56
|
|
|
43
|
-
/**
|
|
44
|
-
interface GreekGroup {
|
|
45
|
-
id: string;
|
|
46
|
-
label: string;
|
|
47
|
-
letters: GreekLetter[];
|
|
48
|
-
}
|
|
49
|
-
/** 希腊字母 */
|
|
57
|
+
/** 希腊字母(UI 展示用) */
|
|
50
58
|
interface GreekLetter {
|
|
51
59
|
latex: string;
|
|
52
60
|
unicode: string;
|
|
@@ -58,6 +66,12 @@ interface GreekLetter {
|
|
|
58
66
|
name: string;
|
|
59
67
|
}[];
|
|
60
68
|
}
|
|
69
|
+
/** 希腊字母分组 */
|
|
70
|
+
interface GreekGroup {
|
|
71
|
+
id: string;
|
|
72
|
+
label: string;
|
|
73
|
+
letters: GreekLetter[];
|
|
74
|
+
}
|
|
61
75
|
declare const GREEK_LOWERCASE_GROUP: GreekGroup;
|
|
62
76
|
declare const GREEK_UPPERCASE_GROUP: GreekGroup;
|
|
63
77
|
/** 所有希腊字母分组 */
|
|
@@ -66,7 +80,24 @@ declare const GREEK_GROUPS: GreekGroup[];
|
|
|
66
80
|
declare const ALL_GREEK: GreekLetter[];
|
|
67
81
|
/** 按名称搜索希腊字母 */
|
|
68
82
|
declare function searchGreek(query: string): GreekLetter[];
|
|
69
|
-
/**
|
|
83
|
+
/** 扩展搜索(含变体) */
|
|
70
84
|
declare function searchGreekWithVariants(query: string): GreekLetter[];
|
|
71
85
|
|
|
72
|
-
|
|
86
|
+
/** Palette 符号条目(用于 Chemistry palette) */
|
|
87
|
+
interface ChemPaletteEntry {
|
|
88
|
+
latex: string;
|
|
89
|
+
unicode: string;
|
|
90
|
+
name: string;
|
|
91
|
+
description?: string;
|
|
92
|
+
isCommon?: boolean;
|
|
93
|
+
}
|
|
94
|
+
/** 子分类 palette */
|
|
95
|
+
interface ChemSubCategoryPalette {
|
|
96
|
+
id: string;
|
|
97
|
+
label: string;
|
|
98
|
+
symbols: ChemPaletteEntry[];
|
|
99
|
+
}
|
|
100
|
+
/** 化学分类的 palette 子分类数据 */
|
|
101
|
+
declare const CHEM_PALETTE_CATEGORIES: ChemSubCategoryPalette[];
|
|
102
|
+
|
|
103
|
+
export { ALGEBRA_TEMPLATES, ALL_CHEM_TEMPLATES, ALL_GREEK, ALL_MATH_TEMPLATES, CALCULUS_TEMPLATES, CHEM_PALETTE_CATEGORIES, COMPOUND_TEMPLATES, type ChemPaletteEntry, type ChemSubCategoryPalette, ELECTROCHEM_TEMPLATES, ELEMENT_TEMPLATES, type FormulaTemplate, GREEK_GROUPS, GREEK_LOWERCASE_GROUP, GREEK_UPPERCASE_GROUP, type GreekGroup, type GreekLetter, ION_TEMPLATES, LINEAR_ALGEBRA_TEMPLATES, PHYSICS_TEMPLATES, REACTION_TEMPLATES, STATS_TEMPLATES, TRIG_TEMPLATES, getAcids, getAnions, getBases, getCations, getElementsByGroup, getElementsByPeriod, getTemplateById, getTemplatesByCategory, searchCompounds, searchElements, searchGreek, searchGreekWithVariants, searchIons, searchTemplates };
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ declare function getTemplateById(id: string): FormulaTemplate | undefined;
|
|
|
31
31
|
declare const COMPOUND_TEMPLATES: FormulaTemplate[];
|
|
32
32
|
declare const REACTION_TEMPLATES: FormulaTemplate[];
|
|
33
33
|
declare const ELECTROCHEM_TEMPLATES: FormulaTemplate[];
|
|
34
|
+
declare const ION_TEMPLATES: FormulaTemplate[];
|
|
35
|
+
declare const ELEMENT_TEMPLATES: FormulaTemplate[];
|
|
34
36
|
/** 所有化学模板 */
|
|
35
37
|
declare const ALL_CHEM_TEMPLATES: FormulaTemplate[];
|
|
36
38
|
/** 按标签搜索化合物 */
|
|
@@ -39,14 +41,20 @@ declare function searchCompounds(query: string): FormulaTemplate[];
|
|
|
39
41
|
declare function getAcids(): FormulaTemplate[];
|
|
40
42
|
/** 获取常见碱 */
|
|
41
43
|
declare function getBases(): FormulaTemplate[];
|
|
44
|
+
/** 按名称/化学式搜索离子 */
|
|
45
|
+
declare function searchIons(query: string): FormulaTemplate[];
|
|
46
|
+
/** 获取所有阳离子 */
|
|
47
|
+
declare function getCations(): FormulaTemplate[];
|
|
48
|
+
/** 获取所有阴离子 */
|
|
49
|
+
declare function getAnions(): FormulaTemplate[];
|
|
50
|
+
/** 按名称/符号搜索元素 */
|
|
51
|
+
declare function searchElements(query: string): FormulaTemplate[];
|
|
52
|
+
/** 按周期获取元素 (1-7) */
|
|
53
|
+
declare function getElementsByPeriod(period: number): FormulaTemplate[];
|
|
54
|
+
/** 按族获取元素 (1-18) */
|
|
55
|
+
declare function getElementsByGroup(group: number): FormulaTemplate[];
|
|
42
56
|
|
|
43
|
-
/**
|
|
44
|
-
interface GreekGroup {
|
|
45
|
-
id: string;
|
|
46
|
-
label: string;
|
|
47
|
-
letters: GreekLetter[];
|
|
48
|
-
}
|
|
49
|
-
/** 希腊字母 */
|
|
57
|
+
/** 希腊字母(UI 展示用) */
|
|
50
58
|
interface GreekLetter {
|
|
51
59
|
latex: string;
|
|
52
60
|
unicode: string;
|
|
@@ -58,6 +66,12 @@ interface GreekLetter {
|
|
|
58
66
|
name: string;
|
|
59
67
|
}[];
|
|
60
68
|
}
|
|
69
|
+
/** 希腊字母分组 */
|
|
70
|
+
interface GreekGroup {
|
|
71
|
+
id: string;
|
|
72
|
+
label: string;
|
|
73
|
+
letters: GreekLetter[];
|
|
74
|
+
}
|
|
61
75
|
declare const GREEK_LOWERCASE_GROUP: GreekGroup;
|
|
62
76
|
declare const GREEK_UPPERCASE_GROUP: GreekGroup;
|
|
63
77
|
/** 所有希腊字母分组 */
|
|
@@ -66,7 +80,24 @@ declare const GREEK_GROUPS: GreekGroup[];
|
|
|
66
80
|
declare const ALL_GREEK: GreekLetter[];
|
|
67
81
|
/** 按名称搜索希腊字母 */
|
|
68
82
|
declare function searchGreek(query: string): GreekLetter[];
|
|
69
|
-
/**
|
|
83
|
+
/** 扩展搜索(含变体) */
|
|
70
84
|
declare function searchGreekWithVariants(query: string): GreekLetter[];
|
|
71
85
|
|
|
72
|
-
|
|
86
|
+
/** Palette 符号条目(用于 Chemistry palette) */
|
|
87
|
+
interface ChemPaletteEntry {
|
|
88
|
+
latex: string;
|
|
89
|
+
unicode: string;
|
|
90
|
+
name: string;
|
|
91
|
+
description?: string;
|
|
92
|
+
isCommon?: boolean;
|
|
93
|
+
}
|
|
94
|
+
/** 子分类 palette */
|
|
95
|
+
interface ChemSubCategoryPalette {
|
|
96
|
+
id: string;
|
|
97
|
+
label: string;
|
|
98
|
+
symbols: ChemPaletteEntry[];
|
|
99
|
+
}
|
|
100
|
+
/** 化学分类的 palette 子分类数据 */
|
|
101
|
+
declare const CHEM_PALETTE_CATEGORIES: ChemSubCategoryPalette[];
|
|
102
|
+
|
|
103
|
+
export { ALGEBRA_TEMPLATES, ALL_CHEM_TEMPLATES, ALL_GREEK, ALL_MATH_TEMPLATES, CALCULUS_TEMPLATES, CHEM_PALETTE_CATEGORIES, COMPOUND_TEMPLATES, type ChemPaletteEntry, type ChemSubCategoryPalette, ELECTROCHEM_TEMPLATES, ELEMENT_TEMPLATES, type FormulaTemplate, GREEK_GROUPS, GREEK_LOWERCASE_GROUP, GREEK_UPPERCASE_GROUP, type GreekGroup, type GreekLetter, ION_TEMPLATES, LINEAR_ALGEBRA_TEMPLATES, PHYSICS_TEMPLATES, REACTION_TEMPLATES, STATS_TEMPLATES, TRIG_TEMPLATES, getAcids, getAnions, getBases, getCations, getElementsByGroup, getElementsByPeriod, getTemplateById, getTemplatesByCategory, searchCompounds, searchElements, searchGreek, searchGreekWithVariants, searchIons, searchTemplates };
|