x-star-editor 0.0.4 → 0.0.5
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/XStarEditor/index.d.ts +0 -1
- package/dist/XStarEditor/index.js +0 -1
- package/dist/XStarMdEditor/index.d.ts +0 -2
- package/dist/XStarMdEditor/index.js +0 -2
- package/dist/XStarMdViewer/index.d.ts +0 -3
- package/dist/XStarMdViewer/index.js +0 -3
- package/dist/components/FileInput.d.ts +0 -1
- package/dist/components/FileInput.js +0 -1
- package/dist/components/Toolbar.d.ts +0 -1
- package/dist/components/Toolbar.js +0 -1
- package/dist/index.less +8 -0
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { XStarMdEditorHandle, XStarMdEditorProps } from '../XStarMdEditor';
|
|
3
3
|
import type { XStarMdViewerHandle, XStarMdViewerProps } from '../XStarMdViewer';
|
|
4
|
-
import './index.less';
|
|
5
4
|
export interface XStarEditorHandle {
|
|
6
5
|
getEditor: () => XStarMdEditorHandle | null;
|
|
7
6
|
getViewer: () => XStarMdViewerHandle | null;
|
|
@@ -16,7 +16,6 @@ import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
|
16
16
|
import XStarMdEditor, { useMdEditorRef } from "../XStarMdEditor";
|
|
17
17
|
import XStarMdViewer, { useMdViewerRef } from "../XStarMdViewer";
|
|
18
18
|
import { prefix } from "../utils/global";
|
|
19
|
-
import "./index.less";
|
|
20
19
|
var XStarEditor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
21
20
|
var height = _ref.height,
|
|
22
21
|
initialValue = _ref.initialValue,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ToolbarItem } from '../components/Toolbar';
|
|
3
|
-
import '../styles/markdown.less';
|
|
4
3
|
import type { Executor, KeyboardEventHandler } from '../utils/handler';
|
|
5
|
-
import './index.less';
|
|
6
4
|
interface EditorOptions {
|
|
7
5
|
/**
|
|
8
6
|
* 工具栏项映射
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import React, { useEffect, useImperativeHandle, useRef } from 'react';
|
|
3
3
|
import Toolbar, { getDefaultToolbarItemMap, getDefaultToolbarItems } from "../components/Toolbar";
|
|
4
|
-
import "../styles/markdown.less";
|
|
5
4
|
import { createSelection, getRange, useContainer } from "../utils/container";
|
|
6
5
|
import { prefix } from "../utils/global";
|
|
7
6
|
import { composeHandlers, getDefaultKeyboardEventHandlers } from "../utils/handler";
|
|
8
7
|
import { useHistory } from "../utils/history";
|
|
9
|
-
import "./index.less";
|
|
10
8
|
var XStarMdEditor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11
9
|
var className = _ref.className,
|
|
12
10
|
style = _ref.style,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import React, { useImperativeHandle, useRef } from 'react';
|
|
3
|
-
import "../styles/katex.css";
|
|
4
|
-
import "../styles/prism.less";
|
|
5
3
|
import { prefix } from "../utils/global";
|
|
6
4
|
import { composeHandlers } from "../utils/handler";
|
|
7
5
|
import { getDefaultSchema, viewerRender } from "../utils/markdown";
|
|
8
|
-
import "./index.less";
|
|
9
6
|
var XStarMdViewer = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10
7
|
var className = _ref.className,
|
|
11
8
|
style = _ref.style,
|
|
@@ -11,7 +11,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import React, { useState } from 'react';
|
|
13
13
|
import { prefix } from "../utils/global";
|
|
14
|
-
import "./FileInput.less";
|
|
15
14
|
var FileInput = function FileInput(_ref) {
|
|
16
15
|
var _file$name;
|
|
17
16
|
var onCancel = _ref.onCancel,
|
|
@@ -13,7 +13,6 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
13
13
|
import { prefix } from "../utils/global";
|
|
14
14
|
import { toggleHandler } from "../utils/handler";
|
|
15
15
|
import FileInput from "./FileInput";
|
|
16
|
-
import "./Toolbar.less";
|
|
17
16
|
var Button = function Button(_ref) {
|
|
18
17
|
var toolbarRef = _ref.toolbarRef,
|
|
19
18
|
children = _ref.children,
|
package/dist/index.less
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@import './components/FileInput.less';
|
|
2
|
+
@import './components/Toolbar.less';
|
|
3
|
+
@import './styles/katex.css';
|
|
4
|
+
@import './styles/markdown.less';
|
|
5
|
+
@import './styles/prism.less';
|
|
6
|
+
@import './XStarEditor/index.less';
|
|
7
|
+
@import './XStarMdEditor/index.less';
|
|
8
|
+
@import './XStarMdViewer/index.less';
|