@myoc/math 0.19.519 → 0.19.520
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/types/common/src/constants.d.ts +8 -5
- package/dist/types/common/src/utils.d.ts +0 -42
- package/dist/types/element/src/comparisons.d.ts +1 -0
- package/dist/types/element/src/image.d.ts +5 -0
- package/dist/types/element/src/newElement.d.ts +2 -0
- package/dist/types/element/src/types.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +22 -11
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +6 -3
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +10 -4
- package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +4 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +16 -5
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -1
- package/dist/types/excalidraw/actions/index.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +2 -1
- package/dist/types/excalidraw/components/App.d.ts +12 -28
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +2 -0
- package/dist/types/excalidraw/data/blob.d.ts +2 -1
- package/dist/types/excalidraw/data/json.d.ts +2 -1
- package/dist/types/excalidraw/renderer/animation.d.ts +1 -0
- package/dist/types/excalidraw/scene/Renderer.d.ts +2 -0
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +1 -0
- package/dist/types/excalidraw/scroll.d.ts +46 -0
- package/dist/types/excalidraw/types.d.ts +16 -3
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +35 -0
- package/package.json +2 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Point } from "./math";
|
|
2
|
+
export type SizeMappingDetails = {
|
|
3
|
+
pressure: number;
|
|
4
|
+
runningLength: number;
|
|
5
|
+
currentIndex: number;
|
|
6
|
+
totalLength: number;
|
|
7
|
+
};
|
|
8
|
+
export type LaserPointerOptions = {
|
|
9
|
+
size: number;
|
|
10
|
+
streamline: number;
|
|
11
|
+
simplify: number;
|
|
12
|
+
simplifyPhase: "tail" | "output" | "input";
|
|
13
|
+
keepHead: boolean;
|
|
14
|
+
sizeMapping: (details: SizeMappingDetails) => number;
|
|
15
|
+
};
|
|
16
|
+
export declare class LaserPointer {
|
|
17
|
+
static defaults: LaserPointerOptions;
|
|
18
|
+
static constants: {
|
|
19
|
+
cornerDetectionMaxAngle: number;
|
|
20
|
+
cornerDetectionVariance: (s: number) => 1 | 0.5;
|
|
21
|
+
maxTailLength: number;
|
|
22
|
+
};
|
|
23
|
+
options: LaserPointerOptions;
|
|
24
|
+
constructor(options: Partial<LaserPointerOptions>);
|
|
25
|
+
originalPoints: Point[];
|
|
26
|
+
private stablePoints;
|
|
27
|
+
private tailPoints;
|
|
28
|
+
private isFresh;
|
|
29
|
+
private get lastPoint();
|
|
30
|
+
addPoint(point: Point): void;
|
|
31
|
+
close(): void;
|
|
32
|
+
stabilizeTail(): void;
|
|
33
|
+
private getSize;
|
|
34
|
+
getStrokeOutline(sizeOverride?: number | undefined): Point[];
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/math",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.520",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/math/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@excalidraw/common": "npm:@myoc/common@0.19.
|
|
65
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.520"
|
|
66
66
|
}
|
|
67
67
|
}
|