x-star-editor 0.6.5 → 0.6.6
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/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;
|