digi-mathchem-editor 1.0.0 → 1.0.1
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 +133 -133
- package/dist/style.css +1 -1
- package/package.json +33 -33
package/README.md
CHANGED
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
A standalone custom Math and Chemistry editor package. It provides an intuitive UI for rendering Math and Chemistry formulas using MathLive.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
import React, { useState } from 'react';
|
|
19
|
-
import { CustomMathEditor } from '
|
|
20
|
-
import '
|
|
21
|
-
|
|
22
|
-
function App() {
|
|
23
|
-
const [isEditorOpen, setIsEditorOpen] = useState(false);
|
|
24
|
-
const [mode, setMode] = useState('math'); // 'math' or 'chem'
|
|
25
|
-
|
|
26
|
-
const handleInsert = (latex) => {
|
|
27
|
-
console.log("Inserted LaTeX:", latex);
|
|
28
|
-
// Handle the inserted latex formula...
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<div>
|
|
33
|
-
<button onClick={() => { setMode('math'); setIsEditorOpen(true); }}>
|
|
34
|
-
Open Math Editor
|
|
35
|
-
</button>
|
|
36
|
-
<button onClick={() => { setMode('chem'); setIsEditorOpen(true); }}>
|
|
37
|
-
Open Chemistry Editor
|
|
38
|
-
</button>
|
|
39
|
-
|
|
40
|
-
<CustomMathEditor
|
|
41
|
-
isOpen={isEditorOpen}
|
|
42
|
-
mode={mode}
|
|
43
|
-
initialValue=""
|
|
44
|
-
onInsert={handleInsert}
|
|
45
|
-
onClose={() => setIsEditorOpen(false)}
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default App;
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Props
|
|
55
|
-
|
|
56
|
-
- `isOpen` (boolean): Controls the visibility of the editor popup.
|
|
57
|
-
- `mode` (string): Either `'math'` or `'chem'`.
|
|
58
|
-
- `initialValue` (string): Optional initial LaTeX value for the editor.
|
|
59
|
-
- `onInsert` (function): Callback function triggered when the user clicks the insert button. Receives the `latex` string as an argument.
|
|
60
|
-
- `onClose` (function): Callback function triggered when the user closes the editor.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Using in Angular
|
|
69
|
-
|
|
70
|
-
Since `
|
|
71
|
-
|
|
72
|
-
**1. Install React dependencies:**
|
|
73
|
-
```bash
|
|
74
|
-
npm install react react-dom
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
npm install
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**2. Create an Angular wrapper component:**
|
|
83
|
-
|
|
84
|
-
```typescript
|
|
85
|
-
import { Component, ElementRef, OnInit, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
86
|
-
import * as React from 'react';
|
|
87
|
-
import { createRoot } from 'react-dom/client';
|
|
88
|
-
import { CustomMathEditor } from '
|
|
89
|
-
// Import the styles in your styles.scss or component
|
|
90
|
-
import '
|
|
91
|
-
|
|
92
|
-
@Component({
|
|
93
|
-
selector: 'app-math-editor-wrapper',
|
|
94
|
-
template: \`<div #editorContainer></div>\`,
|
|
95
|
-
encapsulation: ViewEncapsulation.None
|
|
96
|
-
})
|
|
97
|
-
export class MathEditorWrapperComponent implements OnInit, OnDestroy {
|
|
98
|
-
@ViewChild('editorContainer', { static: true }) editorContainer!: ElementRef;
|
|
99
|
-
private root: any;
|
|
100
|
-
|
|
101
|
-
ngOnInit() {
|
|
102
|
-
// Create a React root
|
|
103
|
-
this.root = createRoot(this.editorContainer.nativeElement);
|
|
104
|
-
this.renderReactComponent();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
ngOnDestroy() {
|
|
108
|
-
// Clean up React tree when Angular component is destroyed
|
|
109
|
-
if (this.root) {
|
|
110
|
-
this.root.unmount();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
renderReactComponent() {
|
|
115
|
-
this.root.render(
|
|
116
|
-
React.createElement(CustomMathEditor, {
|
|
117
|
-
isOpen: true,
|
|
118
|
-
mode: 'math',
|
|
119
|
-
initialValue: '',
|
|
120
|
-
onInsert: (latex: string) => {
|
|
121
|
-
console.log("Formula inserted:", latex);
|
|
122
|
-
// Handle logic...
|
|
123
|
-
},
|
|
124
|
-
onClose: () => {
|
|
125
|
-
console.log("Editor closed");
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
This method mounts the React component securely inside your Angular view, allowing them to coexist and pass data smoothly.
|
|
1
|
+
# anees-mathchem-editor
|
|
2
|
+
|
|
3
|
+
A standalone custom Math and Chemistry editor package. It provides an intuitive UI for rendering Math and Chemistry formulas using MathLive.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install anees-mathchem-editor
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install anees-mathchem-editor mathlive @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/react-fontawesome
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```jsx
|
|
18
|
+
import React, { useState } from 'react';
|
|
19
|
+
import { CustomMathEditor } from 'anees-mathchem-editor';
|
|
20
|
+
import 'anees-mathchem-editor/dist/style.css'; // Don't forget to import the styles!
|
|
21
|
+
|
|
22
|
+
function App() {
|
|
23
|
+
const [isEditorOpen, setIsEditorOpen] = useState(false);
|
|
24
|
+
const [mode, setMode] = useState('math'); // 'math' or 'chem'
|
|
25
|
+
|
|
26
|
+
const handleInsert = (latex) => {
|
|
27
|
+
console.log("Inserted LaTeX:", latex);
|
|
28
|
+
// Handle the inserted latex formula...
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div>
|
|
33
|
+
<button onClick={() => { setMode('math'); setIsEditorOpen(true); }}>
|
|
34
|
+
Open Math Editor
|
|
35
|
+
</button>
|
|
36
|
+
<button onClick={() => { setMode('chem'); setIsEditorOpen(true); }}>
|
|
37
|
+
Open Chemistry Editor
|
|
38
|
+
</button>
|
|
39
|
+
|
|
40
|
+
<CustomMathEditor
|
|
41
|
+
isOpen={isEditorOpen}
|
|
42
|
+
mode={mode}
|
|
43
|
+
initialValue=""
|
|
44
|
+
onInsert={handleInsert}
|
|
45
|
+
onClose={() => setIsEditorOpen(false)}
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default App;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Props
|
|
55
|
+
|
|
56
|
+
- `isOpen` (boolean): Controls the visibility of the editor popup.
|
|
57
|
+
- `mode` (string): Either `'math'` or `'chem'`.
|
|
58
|
+
- `initialValue` (string): Optional initial LaTeX value for the editor.
|
|
59
|
+
- `onInsert` (function): Callback function triggered when the user clicks the insert button. Receives the `latex` string as an argument.
|
|
60
|
+
- `onClose` (function): Callback function triggered when the user closes the editor.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## Using in Angular
|
|
69
|
+
|
|
70
|
+
Since `anees-mathchem-editor` is a React component, you can use it in Angular by rendering it dynamically into an Angular element using `react` and `react-dom`.
|
|
71
|
+
|
|
72
|
+
**1. Install React dependencies:**
|
|
73
|
+
```bash
|
|
74
|
+
npm install react react-dom
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install anees-mathchem-editor react react-dom mathlive @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/react-fontawesome
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**2. Create an Angular wrapper component:**
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
import { Component, ElementRef, OnInit, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
86
|
+
import * as React from 'react';
|
|
87
|
+
import { createRoot } from 'react-dom/client';
|
|
88
|
+
import { CustomMathEditor } from 'anees-mathchem-editor';
|
|
89
|
+
// Import the styles in your styles.scss or component
|
|
90
|
+
import 'anees-mathchem-editor/dist/style.css';
|
|
91
|
+
|
|
92
|
+
@Component({
|
|
93
|
+
selector: 'app-math-editor-wrapper',
|
|
94
|
+
template: \`<div #editorContainer></div>\`,
|
|
95
|
+
encapsulation: ViewEncapsulation.None
|
|
96
|
+
})
|
|
97
|
+
export class MathEditorWrapperComponent implements OnInit, OnDestroy {
|
|
98
|
+
@ViewChild('editorContainer', { static: true }) editorContainer!: ElementRef;
|
|
99
|
+
private root: any;
|
|
100
|
+
|
|
101
|
+
ngOnInit() {
|
|
102
|
+
// Create a React root
|
|
103
|
+
this.root = createRoot(this.editorContainer.nativeElement);
|
|
104
|
+
this.renderReactComponent();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
ngOnDestroy() {
|
|
108
|
+
// Clean up React tree when Angular component is destroyed
|
|
109
|
+
if (this.root) {
|
|
110
|
+
this.root.unmount();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
renderReactComponent() {
|
|
115
|
+
this.root.render(
|
|
116
|
+
React.createElement(CustomMathEditor, {
|
|
117
|
+
isOpen: true,
|
|
118
|
+
mode: 'math',
|
|
119
|
+
initialValue: '',
|
|
120
|
+
onInsert: (latex: string) => {
|
|
121
|
+
console.log("Formula inserted:", latex);
|
|
122
|
+
// Handle logic...
|
|
123
|
+
},
|
|
124
|
+
onClose: () => {
|
|
125
|
+
console.log("Editor closed");
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
This method mounts the React component securely inside your Angular view, allowing them to coexist and pass data smoothly.
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";.cme-flip-v{display:inline-block;transform:scaleY(-1)}.cme-wrapper{display:flex;flex-direction:column;border:none;border-radius:4px;overflow:visible;background:transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.cme-tabs{display:flex;background:#f4f7f9;padding:4px 12px 0;gap:2px;border-bottom:1px solid #cccccc}.cme-tab{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #40596b;border-bottom:none;background:#517085;color:#fff;font-size:11px;font-weight:600;cursor:pointer;transition:background .12s,color .12s;border-top-left-radius:4px;border-top-right-radius:4px}.cme-tab:hover{background:#5b7e95}.cme-tab.active{background:#fff;color:#333;border-color:#ccc;border-bottom-color:#fff;margin-bottom:-1px;z-index:2}.cme-tab svg{width:14px;height:14px;opacity:.9}.cme-toolbar{background:#f4f7f9;padding:0;display:flex;flex-direction:column;overflow:visible;position:relative}.cme-toolbar-groups{display:flex;flex-wrap:wrap;align-items:flex-end;background:#f4f7f9;padding:8px 8px 0 13px;gap:3px;border:none}.cme-group-tab{background:linear-gradient(to bottom,#64b5f6,#42a5f5,#1e88e5);border:none;border-bottom:none;border-top-left-radius:5px;border-top-right-radius:5px;padding:0;width:44px;margin:0;font-size:11px;font-weight:700;color:#fff;cursor:pointer;white-space:nowrap;position:relative;z-index:1;height:22px;display:inline-flex;align-items:center;justify-content:center}.cme-group-tab:not(.active):hover{background:linear-gradient(to bottom,#64b5f6,#1e88e5)!important;color:#fff;box-shadow:0 -2px 6px #42a5f559}.cme-group-tab.active{background:linear-gradient(to bottom,#d8dbe0,#f4f7f9);color:#1565c0;border:1px solid #778E9A;border-bottom:none;border-top-left-radius:5px;border-top-right-radius:5px;padding:0;width:44px;margin:0 0 -2px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap;position:relative;z-index:2;height:28px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;box-shadow:0 -2px 8px #42a5f533}.cme-toolbar-items{background:linear-gradient(to bottom,#f4f7f9,#d8dbe0);border:1px solid #778E9A;margin:0 8px;padding:0;display:flex;flex-direction:row;align-items:stretch;gap:0;position:relative;left:5px;overflow-x:auto;overflow-y:hidden;width:calc(100% - 27px);box-sizing:border-box;height:85px;box-shadow:inset 0 1px 3px #fff9}.cme-toolbar-items::-webkit-scrollbar{height:5px}.cme-toolbar-items::-webkit-scrollbar-track{background:transparent}.cme-toolbar-items::-webkit-scrollbar-thumb{background:#b2c4d0;border-radius:3px}.cme-toolbar-items::-webkit-scrollbar-thumb:hover{background:#517085}.cme-symbol-subgroup{display:grid;grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);gap:1px;padding:0 4px;border-right:1px solid #b2c4d0;flex-shrink:0;align-content:center;justify-content:center;align-items:center;margin:4px 0}.cme-symbol-subgroup:last-child{border-right:none}.cme-btn{min-width:26px;height:28px;padding:0 2px;border:1px solid transparent;border-radius:2px;background:transparent;color:#000;font-size:13px;font-weight:700;font-family:"Latin Modern Math","STIX Two Math",Times New Roman,serif;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .1s,border-color .1s;white-space:nowrap;line-height:1;-webkit-user-select:none;user-select:none;box-sizing:border-box}.cme-btn:hover{background:#e8f4ff;border-color:#42a5f5;box-shadow:0 1px 3px #42a5f533}.cme-btn:active{background:#bbdefb;border-color:#1e88e5}.cme-btn.template{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:11px;font-weight:500;color:#000}.cme-symbol-subgroup--small .cme-btn{min-width:22px;height:24px;font-size:14px;padding:0 1px}.cme-btn.cme-small-btn{min-width:22px!important;width:22px!important;height:22px!important;font-size:12px!important;padding:0 1px!important}.cme-dark-large .cme-btn{min-width:26px;height:28px;font-size:16px;font-weight:900;color:#fff}.cme-dark-large .cme-btn:hover{color:#fff}.cme-matrix-subgroup .cme-btn{max-width:42px;height:40px;font-weight:700;font-size:12px!important}.cme-matrix-subgroup .cme-btn:hover{background:#e8f4ff;border-color:#42a5f5;box-shadow:0 1px 3px #42a5f533}.cme-more-popup-btn.cme-matrix-subgroup{min-width:12px;height:40px;font-weight:700;font-size:12px!important}.cme-more-popup-btn.cme-matrix-subgroup math-field{font-size:10px!important}.cme-trig-subgroup .cme-btn{font-size:15px;font-weight:800;min-width:32px;height:28px}.cme-matrix-subgroup math-field{font-size:10px!important}.cme-btn.chem-element{font-weight:700;font-size:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#000;background:transparent}.cme-btn.chem-element:hover{background:#e8f4ff;border-color:#42a5f5}.pt-alkali{background-color:#ff9800!important;color:#000!important}.pt-alkaline{background-color:#ffeb3b!important;color:#000!important}.pt-transition{background-color:#fa709a!important;color:#000!important}.pt-lanthanide{background-color:#ffa07a!important;color:#000!important}.pt-actinide{background-color:#fa709a!important;color:#000!important}.pt-metalloid{background-color:#00e5ff!important;color:#000!important}.pt-nonmetal{background-color:#0f0!important;color:#000!important}.pt-noble{background-color:#84ffff!important;color:#000!important}.pt-unknown{background-color:#fff!important;color:#000!important}.pt-empty{visibility:hidden!important;pointer-events:none!important;border:none!important;background:transparent!important}.cme-more-popup-btn[class*=pt-]{font-size:11px;min-width:24px;height:20px;line-height:1;font-family:Arial,sans-serif;font-weight:700;border-radius:1px;border:1px solid rgba(0,0,0,.1);margin:0;padding:0}.cme-btn.chem-arrow,.cme-btn.chem-state{font-size:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:transparent;color:#000}.cme-btn.chem-arrow:hover,.cme-btn.chem-state:hover{background:#e8f4ff;border-color:#42a5f5}.cme-sep{width:1px;height:20px;background:#b2c4d0;margin:0 4px;flex-shrink:0}.cme-mathfield-container{background:#fff;border:1px solid #b2c4d0;border-radius:4px;margin:1px 12px;flex:1;min-height:140px;overflow:auto;display:block;box-sizing:border-box;position:relative}.cme-mathfield-container::-webkit-scrollbar,math-field.cme-mathfield::-webkit-scrollbar{width:8px;height:8px}.cme-mathfield-container::-webkit-scrollbar-track,math-field.cme-mathfield::-webkit-scrollbar-track{background:#fff}.cme-mathfield-container::-webkit-scrollbar-thumb,math-field.cme-mathfield::-webkit-scrollbar-thumb{background:#7c7474;border-radius:4px}.cme-mathfield-container::-webkit-scrollbar-thumb:hover,math-field.cme-mathfield::-webkit-scrollbar-thumb:hover{background:#999}math-field.cme-mathfield{display:block;width:max-content;min-width:100%;height:max-content;min-height:100%;padding:0;font-size:20px;outline:none;border:none;background:transparent;box-sizing:border-box;cursor:text;overflow:visible!important;--hue: 207;--primary-color: #1E88E5;--caret-color: #42A5F5;--selection-background-color: rgba(66, 165, 245, .18);--selection-color: #1565C0;--contains-highlight-background-color: transparent;--smart-fence-color: #1E88E5;--text-font-family: "Times New Roman", Times, serif;--highlight-inactive-color: transparent;--text-highlight-background-color: transparent}math-field.cme-mathfield:focus-within{background:#fff}math-field.cme-mathfield::part(container){min-height:40px;align-items:flex-start;padding-top:0;padding-bottom:14px;overflow:visible}math-field.cme-mathfield::part(virtual-keyboard-toggle){display:none}.cme-footer{display:flex;align-items:center;justify-content:space-between;padding:6px 12px;background:#f4f7f9;border-top:1px solid #cccccc;font-size:11px;color:#64748b;gap:8px}.cme-mode-badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:3px;font-weight:700;font-size:10px;text-transform:uppercase;flex-shrink:0}.cme-mode-badge.math{background:#e1f0fc;color:#005a9e}.cme-mode-badge.chem{background:#e2f6e9;color:#107c41}.cme-hint{font-size:10px;color:#888}.Input-question-box{padding:0;background:transparent;width:100%}math-field.cme-main-mathfield{display:block;width:100%;min-height:48px;padding:12px;border:1px solid #cbd5e1;border-radius:8px;font-size:16px;font-family:Inter,sans-serif;box-sizing:border-box;outline:none;background:#fff;transition:border-color .2s,box-shadow .2s;cursor:text;overflow:visible!important}math-field.cme-main-mathfield:focus-within{border-color:#778e9a;box-shadow:0 0 0 2px #5b7b9033}math-field.cme-main-mathfield::part(container){align-items:flex-start;padding-top:14px;padding-bottom:14px;overflow:visible}math-field.cme-main-mathfield::part(virtual-keyboard-toggle),math-field.cme-main-mathfield::part(menu-toggle){display:none}.cme-editor-popup{position:fixed;bottom:55px;right:24px;width:620px;height:300px;background:#f4f7f9;border:1px solid #99b1c1;border-radius:6px;box-shadow:0 4px 20px #0003;z-index:10000;display:flex;flex-direction:column;overflow:visible;box-sizing:border-box;animation:slideUp .2s ease-out}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.cme-popup-topbar{display:flex;align-items:center;justify-content:space-between;padding:6px 12px;background:linear-gradient(135deg,#42a5f5,#1976d2);color:#fff;border-top-left-radius:5px;border-top-right-radius:5px;height:32px;box-sizing:border-box}.cme-popup-header{flex:1;display:flex;align-items:center;height:100%;font-weight:500;font-size:13px}.cme-popup-controls{display:flex;align-items:center;gap:15px;margin-left:auto}.cme-popup-btn{background:transparent;border:none;color:#fff;font-size:14px;line-height:1;cursor:pointer;opacity:.85;transition:opacity .15s;font-family:monospace;padding:0;display:flex;align-items:center;justify-content:center}.cme-popup-btn:hover{opacity:1}.cme-editor-popup.maximized{top:50px!important;left:240px!important;right:10px!important;bottom:10px!important;width:1000px!important;height:600px!important;transform:none!important}.cme-editor-popup.minimized{top:auto!important;left:auto!important;bottom:24px!important;right:24px!important;transform:none!important;width:300px!important;height:32px!important;min-height:0!important;overflow:hidden!important}.cme-popup-footer{padding:10px 12px;background:#f4f7f9;width:620px;position:relative;right:1px;display:flex;justify-content:flex-start;gap:8px;border-left:1px solid #99b1c1;border-right:1px solid #99b1c1;border-bottom:1px solid #99b1c1;border-bottom-left-radius:5px;border-bottom-right-radius:5px;box-sizing:border-box}.cme-insert-btn{background:linear-gradient(135deg,#42a5f5,#1976d2);color:#fff;border:none;padding:6px 20px;border-radius:4px;font-weight:500;font-size:12px;cursor:pointer;transition:background .18s,box-shadow .18s,transform .1s;box-shadow:0 2px 10px #42a5f566}.cme-insert-btn:hover{background:linear-gradient(135deg,#1e88e5,#1565c0);box-shadow:0 4px 14px #42a5f580;transform:translateY(-1px)}.cme-cancel-btn{background:#e0e0e0;color:#333;border:1px solid #b8b8b8;padding:6px 20px;border-radius:4px;font-weight:500;font-size:12px;cursor:pointer;transition:background .15s,border-color .15s}.cme-cancel-btn:hover{background:#d4d4d4;border-color:#a6a6a6}@media (max-width: 640px){.cme-editor-popup{width:auto;left:12px;right:12px;bottom:12px}.cme-group-tab{padding:4px 6px;font-size:10px}}.cme-matrix-selector{padding:12px;display:flex;flex-direction:column;align-items:center;background:#fff;border-bottom:1px solid #cccccc}.cme-matrix-label{font-size:13px;font-weight:600;color:#1565c0;margin-bottom:8px;-webkit-user-select:none;user-select:none}.cme-matrix-grid{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px);gap:2px;justify-content:center}.cme-matrix-cell{width:20px;height:20px;border:1px solid #DDEEFF;border-radius:3px;background:#fff;cursor:pointer;transition:background .1s,border-color .1s}.cme-matrix-cell.selected{background:linear-gradient(135deg,#64b5f6,#1976d2);border-color:#1976d2}.cme-matrix-btn-wrapper{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.cme-matrix-hover-popover{position:fixed;transform:translate(-50%);margin-top:6px;background:#fff;border:1px solid #acacac;border-radius:4px;box-shadow:0 4px 12px #00000026;padding:8px;z-index:10005;display:flex;flex-direction:column;align-items:center;gap:6px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.cme-matrix-hover-title{font-size:10px;font-weight:700;color:#333;text-align:center;white-space:nowrap;letter-spacing:.05em;text-transform:uppercase}.cme-matrix-hover-grid{display:flex;flex-direction:column;gap:0;background:#f7f7f7;padding:0;border-radius:2px;border:1px solid #d3d3d3;flex:1}.cme-matrix-hover-row{display:flex;gap:0}.cme-matrix-hover-cell{width:14px;height:14px;border:1px solid #d3d3d3;border-radius:0;background:#fff;cursor:pointer;transition:background-color .1s,border-color .1s}.cme-matrix-hover-cell:hover{background-color:#f9e6cb;border-color:#4a90e2}.cme-matrix-hover-cell.selected{background-color:#778e9a;border-color:#4a687c}.cme-matrix-hover-footer{display:flex;align-items:center;gap:6px;flex:1;width:100%;border-top:1px solid #e2e8f0;padding-top:0;margin-top:0}.cme-matrix-counter{display:flex;align-items:center;gap:4px;font-size:20px;font-weight:900;color:#333}.cme-counter-val{width:32px;text-align:center;background:#fff;border-radius:2px;padding:1px 2px;font-family:monospace;font-size:20px;font-weight:600;color:#000;border:1px solid #d3d3d3;box-sizing:border-box}input.cme-counter-val{outline:none}input.cme-counter-val:focus{border-color:#778e9a;box-shadow:0 0 0 1px #5b7b9033}input.cme-counter-val::-webkit-outer-spin-button,input.cme-counter-val::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input.cme-counter-val[type=number]{-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}.cme-counter-btns{display:flex;flex-direction:column;gap:1px}.cme-counter-btns button{background:#e2e8f0;border:none;border-radius:1px;color:#334155;font-size:10px;width:16px;height:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;padding:0;transition:background .1s}.cme-counter-btns button:hover{background:#cbd5e1;color:#778e9a}.cme-matrix-insert-btn{background:#778e9a;color:#fff;border:none;padding:2px 6px;border-radius:2px;font-weight:700;font-size:9px;cursor:pointer;transition:background .15s;text-transform:uppercase;margin-left:auto}.cme-matrix-insert-btn:hover{background:#47667a}.cme-matrix-hover-popover.ck-only{min-width:101px;min-height:120px;width:auto;height:auto;box-sizing:border-box;padding:6px;gap:4px;display:flex;flex-direction:column;align-items:stretch}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-grid{display:flex;flex-direction:column;padding:0;gap:0;border:1px solid #acacac;border-radius:2px;overflow:hidden}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-row{display:flex;gap:0}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-cell{width:12px;height:12px;flex-shrink:0;border:.5px solid #d3d3d3;border-radius:0;box-sizing:border-box}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-footer{border-top:1px solid #e2e8f0;padding-top:4px;margin-top:auto;justify-content:space-around;gap:4px}.cme-matrix-hover-popover.ck-only .cme-matrix-counter{gap:2px;font-size:12px}.cme-matrix-hover-popover.ck-only input.cme-counter-val{min-width:10px;width:22px;font-size:12px;padding:0 2px;height:16px;background:#fff;border:1px solid #d3d3d3}.cme-matrix-hover-popover.ck-only .cme-counter-btns button{width:10px;height:7px;font-size:5px}.cme-btn.active,.cme-select.active{background-color:#fcf4b6!important;border-color:#e6c229!important;color:#000!important}.cme-btn,.cme-btn *,.cme-btn math-field,.cme-matrix-btn-wrapper,.cme-matrix-btn-wrapper button,.cme-matrix-btn-wrapper button *{cursor:pointer!important}.cme-group-tab,.cme-group-tab *{cursor:pointer!important}.cme-group-tab math-field{pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important}.cme-subgroup-has-more{padding-right:10px}.cme-more-trigger-btn{position:absolute;top:0;right:2px;width:7px;height:100%;background:transparent;border:none;color:#1976d2;font-size:9px;cursor:pointer;display:flex;align-items:center;justify-content:flex-end;padding-bottom:3px;z-index:10;writing-mode:vertical-rl;letter-spacing:2px;transition:background .15s,color .15s;-webkit-user-select:none;user-select:none;line-height:1}.cme-more-trigger-btn:hover{background:#5fb2f7;color:#fff;border-color:#1976d2}.cme-more-popup{position:fixed;z-index:99999;background:linear-gradient(to bottom,#f5faff,#e8f4ff);border:1px solid #90CAF9;border-radius:5px;box-shadow:0 4px 14px #0000002e;padding:9px 0;display:grid;gap:1px;min-width:25px;animation:cmeMoreFadeIn .12s ease-out}@keyframes cmeMoreFadeIn{0%{opacity:0;transform:translate(-4px)}to{opacity:1;transform:translate(0)}}.cme-more-popup--shift-left{transform:translate(calc(-100% + 14px))!important}.cme-more-popup-btn{min-width:30px;height:32px;padding:0 2px;border:1px solid transparent;border-radius:3px;background:transparent;color:#000;font-size:14px;font-weight:700;font-family:"Latin Modern Math","STIX Two Math",Times New Roman,serif;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .1s,border-color .1s;-webkit-user-select:none;user-select:none;box-sizing:border-box;white-space:nowrap}.cme-more-popup-btn:hover{background:#e8f4ff;border-color:#42a5f5;box-shadow:0 1px 3px #42a5f533}.cme-more-popup-btn:active{background:#bbdefb;border-color:#1e88e5}.cme-enclose-circle{display:inline-block;border:1px solid currentColor;border-radius:50%;padding:.1em .3em;text-align:center}.ML__bold{font-weight:700!important}.cme-bold{font-weight:700!important;font-family:inherit!important}.scm-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100000}.scm-modal{position:absolute;background:#fff;border-radius:4px;box-shadow:0 4px 12px #00000026;width:225px;height:188.2px;display:flex;flex-direction:column;overflow:hidden;font-family:system-ui,-apple-system,sans-serif;border:1px solid #e5e7eb}.scm-toolbar{display:flex;align-items:center;gap:4px;height:20px;padding:2px 4px;background-color:#fff;border-bottom:1px solid #e5e7eb;box-sizing:border-box}.scm-code-input{width:65px;height:15px;border:1px solid #dbd6d1;border-radius:3px;font-size:11px;outline:none;box-sizing:border-box}.scm-code-input:focus{border-color:#1b75bb}.scm-category-select{flex:1;height:15px;padding:0 2px;border:1px solid #d1d5db;border-radius:3px;font-size:11px;outline:none;box-sizing:border-box}.scm-category-select:focus{border-color:#1b75bb}.scm-body{flex:1;background-color:#f9fafb;overflow:hidden}.scm-grid-container{height:100%;overflow-y:auto;padding:4px}.scm-grid-container::-webkit-scrollbar{width:6px}.scm-grid-container::-webkit-scrollbar-track{background:#f1f1f1}.scm-grid-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.scm-char-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(24px,1fr));gap:2px}.scm-char-btn{background:#fff;border:1px solid #e5e7eb;border-radius:2px;height:24px;display:flex;align-items:center;justify-content:center;font-size:14px;cursor:pointer;color:#111827;padding:0}.scm-char-btn:hover{background-color:#f3f4f6;border-color:#d1d5db}.scm-no-results{text-align:center;padding:16px 0;color:#6b7280;font-size:11px}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";.cme-flip-v{display:inline-block;transform:scaleY(-1)}.cme-wrapper{display:flex;flex-direction:column;border:none;border-radius:4px;overflow:visible;background:transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.cme-tabs{display:flex;background:#f4f7f9;padding:4px 12px 0;gap:2px;border-bottom:1px solid #cccccc}.cme-tab{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #40596b;border-bottom:none;background:#517085;color:#fff;font-size:11px;font-weight:600;cursor:pointer;transition:background .12s,color .12s;border-top-left-radius:4px;border-top-right-radius:4px}.cme-tab:hover{background:#5b7e95}.cme-tab.active{background:#fff;color:#333;border-color:#ccc;border-bottom-color:#fff;margin-bottom:-1px;z-index:2}.cme-tab svg{width:14px;height:14px;opacity:.9}.cme-toolbar{background:#f4f7f9;padding:0;display:flex;flex-direction:column;overflow:visible;position:relative}.cme-toolbar-groups{display:flex;flex-wrap:wrap;align-items:flex-end;background:#f4f7f9;padding:8px 8px 0 13px;gap:3px;border:none}.cme-group-tab{background:linear-gradient(to bottom,#64b5f6,#42a5f5,#1e88e5);border:none;border-bottom:none;border-top-left-radius:5px;border-top-right-radius:5px;padding:0;width:44px;margin:0;font-size:11px;font-weight:700;color:#fff;cursor:pointer;white-space:nowrap;position:relative;z-index:1;height:22px;display:inline-flex;align-items:center;justify-content:center}.cme-group-tab:not(.active):hover{background:linear-gradient(to bottom,#64b5f6,#1e88e5)!important;color:#fff;box-shadow:0 -2px 6px #42a5f559}.cme-group-tab.active{background:linear-gradient(to bottom,#d8dbe0,#f4f7f9);color:#1565c0;border:1px solid #778E9A;border-bottom:none;border-top-left-radius:5px;border-top-right-radius:5px;padding:0;width:44px;margin:0 0 -2px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap;position:relative;z-index:2;height:28px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;box-shadow:0 -2px 8px #42a5f533}.cme-toolbar-items{background:linear-gradient(to bottom,#f4f7f9,#d8dbe0);border:1px solid #778E9A;margin:0 8px;padding:0;display:flex;flex-direction:row;align-items:stretch;gap:0;position:relative;left:5px;overflow-x:auto;overflow-y:hidden;width:calc(100% - 27px);box-sizing:border-box;height:85px;box-shadow:inset 0 1px 3px #fff9}.cme-toolbar-items::-webkit-scrollbar{height:5px}.cme-toolbar-items::-webkit-scrollbar-track{background:transparent}.cme-toolbar-items::-webkit-scrollbar-thumb{background:#b2c4d0;border-radius:3px}.cme-toolbar-items::-webkit-scrollbar-thumb:hover{background:#517085}.cme-symbol-subgroup{display:grid;grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);gap:1px;padding:0 4px;border-right:1px solid #b2c4d0;flex-shrink:0;align-content:center;justify-content:center;align-items:center;margin:4px 0}.cme-symbol-subgroup:last-child{border-right:none}.cme-btn{min-width:26px;height:28px;padding:0 2px;border:1px solid transparent;border-radius:2px;background:transparent;color:#000;font-size:13px;font-weight:700;font-family:"Latin Modern Math","STIX Two Math",Times New Roman,serif;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .1s,border-color .1s;white-space:nowrap;line-height:1;-webkit-user-select:none;user-select:none;box-sizing:border-box}.cme-btn:hover{background:#e8f4ff;border-color:#42a5f5;box-shadow:0 1px 3px #42a5f533}.cme-btn:active{background:#bbdefb;border-color:#1e88e5}.cme-btn.template{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:11px;font-weight:500;color:#000}.cme-symbol-subgroup--small .cme-btn{min-width:22px;height:24px;font-size:14px;padding:0 1px}.cme-btn.cme-small-btn{min-width:22px!important;width:22px!important;height:22px!important;font-size:12px!important;padding:0 1px!important}.cme-dark-large .cme-btn{min-width:26px;height:28px;font-size:16px;font-weight:900;color:#fff}.cme-dark-large .cme-btn:hover{color:#fff}.cme-matrix-subgroup .cme-btn{max-width:42px;height:40px;font-weight:700;font-size:12px!important}.cme-matrix-subgroup .cme-btn:hover{background:#e8f4ff;border-color:#42a5f5;box-shadow:0 1px 3px #42a5f533}.cme-more-popup-btn.cme-matrix-subgroup{min-width:12px;height:40px;font-weight:700;font-size:12px!important}.cme-more-popup-btn.cme-matrix-subgroup math-field{font-size:10px!important}.cme-trig-subgroup .cme-btn{font-size:15px;font-weight:800;min-width:32px;height:28px}.cme-matrix-subgroup math-field{font-size:10px!important}.cme-btn.chem-element{font-weight:700;font-size:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#000;background:transparent}.cme-btn.chem-element:hover{background:#e8f4ff;border-color:#42a5f5}.pt-alkali{background-color:#ff9800!important;color:#000!important}.pt-alkaline{background-color:#ffeb3b!important;color:#000!important}.pt-transition{background-color:#fa709a!important;color:#000!important}.pt-lanthanide{background-color:#ffa07a!important;color:#000!important}.pt-actinide{background-color:#fa709a!important;color:#000!important}.pt-metalloid{background-color:#00e5ff!important;color:#000!important}.pt-nonmetal{background-color:#0f0!important;color:#000!important}.pt-noble{background-color:#84ffff!important;color:#000!important}.pt-unknown{background-color:#fff!important;color:#000!important}.pt-empty{visibility:hidden!important;pointer-events:none!important;border:none!important;background:transparent!important}.cme-more-popup-btn[class*=pt-]{font-size:11px;min-width:24px;height:20px;line-height:1;font-family:Arial,sans-serif;font-weight:700;border-radius:1px;border:1px solid rgba(0,0,0,.1);margin:0;padding:0}.cme-btn.chem-arrow,.cme-btn.chem-state{font-size:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:transparent;color:#000}.cme-btn.chem-arrow:hover,.cme-btn.chem-state:hover{background:#e8f4ff;border-color:#42a5f5}.cme-sep{width:1px;height:20px;background:#b2c4d0;margin:0 4px;flex-shrink:0}.cme-mathfield-container{background:#fff;border:1px solid #b2c4d0;border-radius:4px;margin:1px 12px;flex:1;min-height:140px;overflow:auto;display:block;box-sizing:border-box;position:relative}.cme-mathfield-container::-webkit-scrollbar,math-field.cme-mathfield::-webkit-scrollbar{width:8px;height:8px}.cme-mathfield-container::-webkit-scrollbar-track,math-field.cme-mathfield::-webkit-scrollbar-track{background:#fff}.cme-mathfield-container::-webkit-scrollbar-thumb,math-field.cme-mathfield::-webkit-scrollbar-thumb{background:#7c7474;border-radius:4px}.cme-mathfield-container::-webkit-scrollbar-thumb:hover,math-field.cme-mathfield::-webkit-scrollbar-thumb:hover{background:#999}math-field.cme-mathfield{display:block;width:max-content;min-width:100%;height:max-content;min-height:100%;padding:0;font-size:20px;outline:none;border:none;background:transparent;box-sizing:border-box;cursor:text;overflow:visible!important;--hue: 207;--primary-color: #1E88E5;--caret-color: #42A5F5;--selection-background-color: rgba(66, 165, 245, .18);--selection-color: #1565C0;--contains-highlight-background-color: transparent;--smart-fence-color: #1E88E5;--text-font-family: "Times New Roman", Times, serif;--highlight-inactive-color: transparent;--text-highlight-background-color: transparent}math-field.cme-mathfield:focus-within{background:#fff}math-field.cme-mathfield::part(container){min-height:40px;align-items:flex-start;padding-top:0;padding-bottom:14px;overflow:visible}math-field.cme-mathfield::part(virtual-keyboard-toggle){display:none}.cme-footer{display:flex;align-items:center;justify-content:space-between;padding:6px 12px;background:#f4f7f9;border-top:1px solid #cccccc;font-size:11px;color:#64748b;gap:8px}.cme-mode-badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:3px;font-weight:700;font-size:10px;text-transform:uppercase;flex-shrink:0}.cme-mode-badge.math{background:#e1f0fc;color:#005a9e}.cme-mode-badge.chem{background:#e2f6e9;color:#107c41}.cme-hint{font-size:10px;color:#888}.Input-question-box{padding:0;background:transparent;width:100%}math-field.cme-main-mathfield{display:block;width:100%;min-height:48px;padding:12px;border:1px solid #cbd5e1;border-radius:8px;font-size:16px;font-family:Inter,sans-serif;box-sizing:border-box;outline:none;background:#fff;transition:border-color .2s,box-shadow .2s;cursor:text;overflow:visible!important}math-field.cme-main-mathfield:focus-within{border-color:#778e9a;box-shadow:0 0 0 2px #5b7b9033}math-field.cme-main-mathfield::part(container){align-items:flex-start;padding-top:14px;padding-bottom:14px;overflow:visible}math-field.cme-main-mathfield::part(virtual-keyboard-toggle),math-field.cme-main-mathfield::part(menu-toggle){display:none}.cme-editor-popup{position:fixed;bottom:55px;right:24px;width:620px;height:300px;background:#f4f7f9;border:1px solid #99b1c1;border-radius:6px;box-shadow:0 4px 20px #0003;z-index:10000;display:flex;flex-direction:column;overflow:visible;box-sizing:border-box;animation:slideUp .2s ease-out}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.cme-popup-topbar{display:flex;align-items:center;justify-content:space-between;padding:6px 12px;background:linear-gradient(135deg,#42a5f5,#1976d2);color:#fff;border-top-left-radius:5px;border-top-right-radius:5px;height:32px;box-sizing:border-box}.cme-popup-header{flex:1;display:flex;align-items:center;height:100%;font-weight:500;font-size:13px}.cme-popup-controls{display:flex;align-items:center;gap:15px;margin-left:auto}.cme-popup-btn{background:transparent;border:none;color:#fff;font-size:14px;line-height:1;cursor:pointer;opacity:.85;transition:opacity .15s;font-family:monospace;padding:0;display:flex;align-items:center;justify-content:center}.cme-popup-btn:hover{opacity:1}.cme-editor-popup.maximized{top:50px!important;left:240px!important;right:10px!important;bottom:10px!important;width:1000px!important;height:600px!important;transform:none!important}.cme-editor-popup.minimized{top:auto!important;left:auto!important;bottom:24px!important;right:24px!important;transform:none!important;width:300px!important;height:32px!important;min-height:0!important;overflow:hidden!important}.cme-popup-footer{padding:10px 12px;background:#f4f7f9;width:620px;position:relative;right:1px;display:flex;justify-content:flex-start;gap:8px;border-left:1px solid #99b1c1;border-right:1px solid #99b1c1;border-bottom:1px solid #99b1c1;border-bottom-left-radius:5px;border-bottom-right-radius:5px;box-sizing:border-box}.cme-insert-btn{background:linear-gradient(135deg,#42a5f5,#1976d2);color:#fff;border:none;padding:6px 20px;border-radius:4px;font-weight:500;font-size:12px;cursor:pointer;transition:background .18s,box-shadow .18s,transform .1s;box-shadow:0 2px 10px #42a5f566}.cme-insert-btn:hover{background:linear-gradient(135deg,#1e88e5,#1565c0);box-shadow:0 4px 14px #42a5f580;transform:translateY(-1px)}.cme-cancel-btn{background:#e0e0e0;color:#333;border:1px solid #b8b8b8;padding:6px 20px;border-radius:4px;font-weight:500;font-size:12px;cursor:pointer;transition:background .15s,border-color .15s}.cme-cancel-btn:hover{background:#d4d4d4;border-color:#a6a6a6}@media (max-width: 640px){.cme-editor-popup{width:auto;left:12px;right:12px;bottom:12px}.cme-group-tab{padding:4px 6px;font-size:10px}}.cme-matrix-selector{padding:12px;display:flex;flex-direction:column;align-items:center;background:#fff;border-bottom:1px solid #cccccc}.cme-matrix-label{font-size:13px;font-weight:600;color:#1565c0;margin-bottom:8px;-webkit-user-select:none;user-select:none}.cme-matrix-grid{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px);gap:2px;justify-content:center}.cme-matrix-cell{width:20px;height:20px;border:1px solid #DDEEFF;border-radius:3px;background:#fff;cursor:pointer;transition:background .1s,border-color .1s}.cme-matrix-cell.selected{background:linear-gradient(135deg,#64b5f6,#1976d2);border-color:#1976d2}.cme-matrix-btn-wrapper{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.cme-matrix-hover-popover{position:fixed;transform:translate(-50%);margin-top:6px;background:#fff;border:1px solid #acacac;border-radius:4px;box-shadow:0 4px 12px #00000026;padding:8px;z-index:10005;display:flex;flex-direction:column;align-items:center;gap:6px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.cme-matrix-hover-title{font-size:10px;font-weight:700;color:#333;text-align:center;white-space:nowrap;letter-spacing:.05em;text-transform:uppercase}.cme-matrix-hover-grid{display:flex;flex-direction:column;gap:0;background:#f7f7f7;padding:0;border-radius:2px;border:1px solid #d3d3d3;flex:1}.cme-matrix-hover-row{display:flex;gap:0}.cme-matrix-hover-cell{width:14px;height:14px;border:1px solid #d3d3d3;border-radius:0;background:#fff;cursor:pointer;transition:background-color .1s,border-color .1s}.cme-matrix-hover-cell:hover{background-color:#f9e6cb;border-color:#4a90e2}.cme-matrix-hover-cell.selected{background-color:#778e9a;border-color:#4a687c}.cme-matrix-hover-footer{display:flex;align-items:center;gap:6px;flex:1;width:100%;border-top:1px solid #e2e8f0;padding-top:0;margin-top:0}.cme-matrix-counter{display:flex;align-items:center;gap:4px;font-size:20px;font-weight:900;color:#333}.cme-counter-val{width:32px;text-align:center;background:#fff;border-radius:2px;padding:1px 2px;font-family:monospace;font-size:20px;font-weight:600;color:#000;border:1px solid #d3d3d3;box-sizing:border-box}input.cme-counter-val{outline:none}input.cme-counter-val:focus{border-color:#778e9a;box-shadow:0 0 0 1px #5b7b9033}input.cme-counter-val::-webkit-outer-spin-button,input.cme-counter-val::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input.cme-counter-val[type=number]{-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}.cme-counter-btns{display:flex;flex-direction:column;gap:1px}.cme-counter-btns button{background:#e2e8f0;border:none;border-radius:1px;color:#334155;font-size:10px;width:16px;height:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;padding:0;transition:background .1s}.cme-counter-btns button:hover{background:#cbd5e1;color:#778e9a}.cme-matrix-insert-btn{background:#778e9a;color:#fff;border:none;padding:2px 6px;border-radius:2px;font-weight:700;font-size:9px;cursor:pointer;transition:background .15s;text-transform:uppercase;margin-left:auto}.cme-matrix-insert-btn:hover{background:#47667a}.cme-matrix-hover-popover.ck-only{min-width:101px;min-height:120px;width:auto;height:auto;box-sizing:border-box;padding:6px;gap:4px;display:flex;flex-direction:column;align-items:stretch}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-grid{display:flex;flex-direction:column;padding:0;gap:0;border:1px solid #acacac;border-radius:2px;overflow:hidden}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-row{display:flex;gap:0}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-cell{width:12px;height:12px;flex-shrink:0;border:.5px solid #d3d3d3;border-radius:0;box-sizing:border-box}.cme-matrix-hover-popover.ck-only .cme-matrix-hover-footer{border-top:1px solid #e2e8f0;padding-top:4px;margin-top:auto;justify-content:space-around;gap:4px}.cme-matrix-hover-popover.ck-only .cme-matrix-counter{gap:2px;font-size:12px}.cme-matrix-hover-popover.ck-only input.cme-counter-val{min-width:10px;width:22px;font-size:12px;padding:0 2px;height:16px;background:#fff;border:1px solid #d3d3d3}.cme-matrix-hover-popover.ck-only .cme-counter-btns button{width:10px;height:7px;font-size:5px}.cme-btn.active,.cme-select.active{background-color:#fcf4b6!important;border-color:#e6c229!important;color:#000!important}.cme-btn,.cme-btn *,.cme-btn math-field,.cme-matrix-btn-wrapper,.cme-matrix-btn-wrapper button,.cme-matrix-btn-wrapper button *{cursor:pointer!important}.cme-group-tab,.cme-group-tab *{cursor:pointer!important}.cme-group-tab math-field{pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important}.cme-subgroup-has-more{padding-right:10px}.cme-more-trigger-btn{position:absolute;top:0;right:2px;width:7px;height:100%;background:transparent;border:none;color:#1976d2;font-size:9px;cursor:pointer;display:flex;align-items:center;justify-content:flex-end;padding-bottom:3px;z-index:10;writing-mode:vertical-rl;letter-spacing:2px;transition:background .15s,color .15s;-webkit-user-select:none;user-select:none;line-height:1}.cme-more-trigger-btn:hover{background:#5fb2f7;color:#fff;border-color:#1976d2}.cme-more-popup{position:fixed;z-index:99999;background:linear-gradient(to bottom,#f5faff,#e8f4ff);border:1px solid #90CAF9;border-radius:5px;box-shadow:0 4px 14px #0000002e;padding:9px 0;display:grid;gap:1px;min-width:25px;animation:cmeMoreFadeIn .12s ease-out}@keyframes cmeMoreFadeIn{0%{opacity:0;transform:translate(-4px)}to{opacity:1;transform:translate(0)}}.cme-more-popup--shift-left{transform:translate(calc(-100% + 14px))!important}.cme-more-popup-btn{min-width:30px;height:32px;padding:0 2px;border:1px solid transparent;border-radius:3px;background:transparent;color:#000;font-size:14px;font-weight:700;font-family:"Latin Modern Math","STIX Two Math",Times New Roman,serif;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .1s,border-color .1s;-webkit-user-select:none;user-select:none;box-sizing:border-box;white-space:nowrap}.cme-more-popup-btn:hover{background:#e8f4ff;border-color:#42a5f5;box-shadow:0 1px 3px #42a5f533}.cme-more-popup-btn:active{background:#bbdefb;border-color:#1e88e5}.cme-enclose-circle{display:inline-block;border:1px solid currentColor;border-radius:50%;padding:.1em .3em;text-align:center}.ML__bold{font-weight:700!important}.cme-bold{font-weight:700!important;font-family:inherit!important}.scm-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100000}.scm-modal{position:absolute;background:#fff;border-radius:6px;box-shadow:0 4px 12px #00000026;width:225px;height:188.2px;display:flex;flex-direction:column;overflow:hidden;font-family:system-ui,-apple-system,sans-serif;border:1px solid #e5e7eb}.scm-toolbar{display:flex;align-items:center;gap:4px;height:20px;padding:2px 4px;background-color:#fff;border-bottom:1px solid #e5e7eb;box-sizing:border-box}.scm-code-input{width:65px;height:15px;border:1px solid #dbd6d1;border-radius:3px;font-size:11px;outline:none;box-sizing:border-box}.scm-code-input:focus{border-color:#1b75bb}.scm-category-select{flex:1;height:15px;padding:0 2px;border:1px solid #d1d5db;border-radius:3px;font-size:11px;outline:none;box-sizing:border-box}.scm-category-select:focus{border-color:#1b75bb}.scm-body{flex:1;background-color:#f9fafb;overflow:hidden}.scm-grid-container{height:100%;overflow-y:auto;padding:4px}.scm-grid-container::-webkit-scrollbar{width:6px}.scm-grid-container::-webkit-scrollbar-track{background:#f1f1f1}.scm-grid-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.scm-char-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(24px,1fr));gap:2px}.scm-char-btn{background:#fff;border:1px solid #e5e7eb;border-radius:2px;height:24px;display:flex;align-items:center;justify-content:center;font-size:14px;cursor:pointer;color:#111827;padding:0}.scm-char-btn:hover{background-color:#f3f4f6;border-color:#d1d5db}.scm-no-results{text-align:center;padding:16px 0;color:#6b7280;font-size:11px}
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "digi-mathchem-editor",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Standalone custom math and chemistry editor using MathLive",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/digi-mathchem-editor.umd.js",
|
|
7
|
-
"module": "./dist/digi-mathchem-editor.es.js",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/digi-mathchem-editor.es.js",
|
|
11
|
-
"require": "./dist/digi-mathchem-editor.umd.js"
|
|
12
|
-
},
|
|
13
|
-
"./style.css": "./dist/style.css"
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "vite build"
|
|
20
|
-
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
23
|
-
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
24
|
-
"@fortawesome/react-fontawesome": "^3.3.1",
|
|
25
|
-
"mathlive": ">=0.109.2",
|
|
26
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
27
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@vitejs/plugin-react": "^4.2.1",
|
|
31
|
-
"vite": "^5.2.0"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "digi-mathchem-editor",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Standalone custom math and chemistry editor using MathLive",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/digi-mathchem-editor.umd.js",
|
|
7
|
+
"module": "./dist/digi-mathchem-editor.es.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/digi-mathchem-editor.es.js",
|
|
11
|
+
"require": "./dist/digi-mathchem-editor.umd.js"
|
|
12
|
+
},
|
|
13
|
+
"./style.css": "./dist/style.css"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "vite build"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
23
|
+
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
24
|
+
"@fortawesome/react-fontawesome": "^3.3.1",
|
|
25
|
+
"mathlive": ">=0.109.2",
|
|
26
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
27
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
31
|
+
"vite": "^5.2.0"
|
|
32
|
+
}
|
|
33
|
+
}
|