react-mathtype-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 CHANGED
@@ -23,7 +23,7 @@ npm install react-mathtype-editor
23
23
 
24
24
  ```
25
25
  import React, { useState } from 'react';
26
- import { MathEditor } from 'react-mathtype-editor';
26
+ import MathTypeEditor from 'react-mathtype-editor';
27
27
  import 'react-mathtype-editor/dist/style.css';
28
28
 
29
29
  function App() {
@@ -31,7 +31,7 @@ function App() {
31
31
 
32
32
  return (
33
33
  <div>
34
- <MathEditor
34
+ <MathTypeEditor
35
35
  defaultValue={formula}
36
36
  onChange={(value) => setFormula(value)}
37
37
  style={{ width: '100%' }}
@@ -11,7 +11,7 @@ const const_1 = require("./const");
11
11
  require("mathlive");
12
12
  require("katex/dist/katex.css");
13
13
  require("../styles/mathType.less");
14
- const MathEditor = ({ defaultValue, onChange, style }) => {
14
+ const MathTypeEditor = ({ defaultValue, onChange, style }) => {
15
15
  const [activeKey, setActiveKey] = (0, react_1.useState)(const_1.KATEXLIST[0]?.name || '1');
16
16
  const [editMode, setEditMode] = (0, react_1.useState)('mathlive');
17
17
  const [latexVal, setLatexVal] = (0, react_1.useState)(defaultValue || '');
@@ -477,4 +477,4 @@ const MathEditor = ({ defaultValue, onChange, style }) => {
477
477
  } }, `${i.name}-${idx}`))) })),
478
478
  })) })] }));
479
479
  };
480
- exports.default = MathEditor;
480
+ exports.default = MathTypeEditor;
package/dist/cjs/index.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  return (mod && mod.__esModule) ? mod : { "default": mod };
6
6
  };
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.MathEditor = void 0;
8
+ exports.MathTypeEditor = void 0;
9
9
  const MathTypeEditor_1 = __importDefault(require("./MathTypeEditor"));
10
- exports.MathEditor = MathTypeEditor_1.default;
10
+ exports.MathTypeEditor = MathTypeEditor_1.default;
11
11
  exports.default = MathTypeEditor_1.default;
@@ -6,7 +6,7 @@ import { KATEXLIST } from './const';
6
6
  import 'mathlive';
7
7
  import 'katex/dist/katex.css';
8
8
  import '../styles/mathType.less';
9
- const MathEditor = ({ defaultValue, onChange, style }) => {
9
+ const MathTypeEditor = ({ defaultValue, onChange, style }) => {
10
10
  const [activeKey, setActiveKey] = useState(KATEXLIST[0]?.name || '1');
11
11
  const [editMode, setEditMode] = useState('mathlive');
12
12
  const [latexVal, setLatexVal] = useState(defaultValue || '');
@@ -472,4 +472,4 @@ const MathEditor = ({ defaultValue, onChange, style }) => {
472
472
  } }, `${i.name}-${idx}`))) })),
473
473
  })) })] }));
474
474
  };
475
- export default MathEditor;
475
+ export default MathTypeEditor;
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // MathType Editor Component
2
2
  // 入口文件
3
- import MathEditor from './MathTypeEditor';
4
- export { MathEditor };
5
- export default MathEditor;
3
+ import MathTypeEditor from './MathTypeEditor';
4
+ export { MathTypeEditor };
5
+ export default MathTypeEditor;
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import 'mathlive';
3
3
  import 'katex/dist/katex.css';
4
4
  import '../styles/mathType.less';
5
- export interface MathEditorProps {
5
+ export interface MathTypeEditorProps {
6
6
  defaultValue?: string;
7
7
  onChange?: (value: string) => void;
8
8
  style?: React.CSSProperties;
9
9
  }
10
- declare const MathEditor: React.FC<MathEditorProps>;
11
- export default MathEditor;
10
+ declare const MathTypeEditor: React.FC<MathTypeEditorProps>;
11
+ export default MathTypeEditor;
12
12
  //# sourceMappingURL=MathTypeEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MathTypeEditor.d.ts","sourceRoot":"","sources":["../../../src/MathTypeEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,UAAU,CAAA;AACjB,OAAO,sBAAsB,CAAA;AAC7B,OAAO,yBAAyB,CAAA;AAEhC,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkkBzC,CAAA;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"MathTypeEditor.d.ts","sourceRoot":"","sources":["../../../src/MathTypeEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,UAAU,CAAA;AACjB,OAAO,sBAAsB,CAAA;AAC7B,OAAO,yBAAyB,CAAA;AAEhC,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkkBjD,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,5 +1,5 @@
1
- import MathEditor from './MathTypeEditor';
2
- export { MathEditor };
3
- export default MathEditor;
4
- export type { MathEditorProps } from './MathTypeEditor';
1
+ import MathTypeEditor from './MathTypeEditor';
2
+ export { MathTypeEditor };
3
+ export default MathTypeEditor;
4
+ export type { MathTypeEditorProps } from './MathTypeEditor';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,UAAU,CAAC;AAG1B,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,eAAe,cAAc,CAAC;AAG9B,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-mathtype-editor",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A standalone MathType formula editor component based on React, Ant Design, MathLive, and KaTeX",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",