x-star-editor 0.6.5 → 0.6.7
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/styles/index.css +2 -3
- package/dist/utils/slide.d.ts +2 -2
- package/dist/utils/slide.js +2 -0
- package/dist/utils/viewer.d.ts +10 -0
- package/dist/utils/viewer.js +73 -0
- package/dist/x-star-md-viewer/index.js +4 -62
- package/dist/x-star-slide-viewer/index.d.ts +4 -0
- package/dist/x-star-slide-viewer/index.js +8 -65
- package/package.json +1 -1
package/dist/styles/index.css
CHANGED
|
@@ -1341,7 +1341,6 @@ body {
|
|
|
1341
1341
|
font-style: italic;
|
|
1342
1342
|
}
|
|
1343
1343
|
.x-star-editor-md-editor .x-star-editor-md-heading {
|
|
1344
|
-
line-height: 1.6em;
|
|
1345
1344
|
font-weight: bold;
|
|
1346
1345
|
}
|
|
1347
1346
|
.x-star-editor-md-editor .x-star-editor-md-heading.x-star-editor-md-heading-1 {
|
|
@@ -1767,7 +1766,7 @@ body {
|
|
|
1767
1766
|
border-bottom-right-radius: 0.3em;
|
|
1768
1767
|
border-bottom-left-radius: 0.3em;
|
|
1769
1768
|
padding: 0 1em;
|
|
1770
|
-
line-height: 1.
|
|
1769
|
+
line-height: 1.6;
|
|
1771
1770
|
white-space: break-spaces;
|
|
1772
1771
|
background-color: #fff;
|
|
1773
1772
|
outline: none;
|
|
@@ -1840,6 +1839,7 @@ body {
|
|
|
1840
1839
|
.x-star-editor-slide-viewer {
|
|
1841
1840
|
position: relative;
|
|
1842
1841
|
color: rgba(0, 0, 0, 0.88);
|
|
1842
|
+
line-height: 1.4;
|
|
1843
1843
|
overflow: hidden;
|
|
1844
1844
|
aspect-ratio: 16/9;
|
|
1845
1845
|
}
|
|
@@ -1966,7 +1966,6 @@ body {
|
|
|
1966
1966
|
flex-direction: column;
|
|
1967
1967
|
align-items: center;
|
|
1968
1968
|
justify-content: center;
|
|
1969
|
-
line-height: 30px;
|
|
1970
1969
|
white-space: nowrap;
|
|
1971
1970
|
font-size: 12px;
|
|
1972
1971
|
background-color: #fff;
|
package/dist/utils/slide.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export interface PadValue {
|
|
|
11
11
|
* @returns 新坐标值
|
|
12
12
|
*/
|
|
13
13
|
export declare const getScaledData: ({ data, scale }: PadValue, parentWidth: number) => {
|
|
14
|
+
minWidth: number;
|
|
15
|
+
maxWidth: number;
|
|
14
16
|
points: {
|
|
15
17
|
x: number;
|
|
16
18
|
y: number;
|
|
@@ -18,8 +20,6 @@ export declare const getScaledData: ({ data, scale }: PadValue, parentWidth: num
|
|
|
18
20
|
time: number;
|
|
19
21
|
}[];
|
|
20
22
|
dotSize: number;
|
|
21
|
-
minWidth: number;
|
|
22
|
-
maxWidth: number;
|
|
23
23
|
penColor: string;
|
|
24
24
|
velocityFilterWeight: number;
|
|
25
25
|
compositeOperation: GlobalCompositeOperation;
|
package/dist/utils/slide.js
CHANGED
|
@@ -11,6 +11,8 @@ export var getScaledData = function getScaledData(_ref, parentWidth) {
|
|
|
11
11
|
scale = _ref.scale;
|
|
12
12
|
return data.map(function (group) {
|
|
13
13
|
return _objectSpread(_objectSpread({}, group), {}, {
|
|
14
|
+
minWidth: group.minWidth / scale * (parentWidth / 1280),
|
|
15
|
+
maxWidth: group.maxWidth / scale * (parentWidth / 1280),
|
|
14
16
|
points: group.points.map(function (point) {
|
|
15
17
|
return _objectSpread(_objectSpread({}, point), {}, {
|
|
16
18
|
x: point.x / scale * (parentWidth / 1280),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ViewerOptions } from '../x-star-md-viewer';
|
|
3
|
+
/**
|
|
4
|
+
* 将 Markdown 文本映射到 React 虚拟 DOM 树
|
|
5
|
+
*
|
|
6
|
+
* @param sourceCode Markdown 文本
|
|
7
|
+
* @param options 配置项
|
|
8
|
+
* @returns React 虚拟 DOM 树
|
|
9
|
+
*/
|
|
10
|
+
export declare const useViewerRender: (sourceCode: string, options: ViewerOptions) => import("react").JSX.Element | undefined;
|