@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.
Files changed (57) hide show
  1. package/dist/types/common/src/constants.d.ts +8 -5
  2. package/dist/types/common/src/utils.d.ts +0 -42
  3. package/dist/types/element/src/comparisons.d.ts +1 -0
  4. package/dist/types/element/src/image.d.ts +5 -0
  5. package/dist/types/element/src/newElement.d.ts +2 -0
  6. package/dist/types/element/src/types.d.ts +8 -0
  7. package/dist/types/excalidraw/actions/actionBoundText.d.ts +4 -2
  8. package/dist/types/excalidraw/actions/actionCanvas.d.ts +22 -11
  9. package/dist/types/excalidraw/actions/actionClipboard.d.ts +4 -2
  10. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -1
  11. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +6 -3
  12. package/dist/types/excalidraw/actions/actionDeselect.d.ts +2 -1
  13. package/dist/types/excalidraw/actions/actionElementLink.d.ts +2 -1
  14. package/dist/types/excalidraw/actions/actionElementLock.d.ts +4 -2
  15. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +2 -1
  16. package/dist/types/excalidraw/actions/actionExport.d.ts +4 -2
  17. package/dist/types/excalidraw/actions/actionFrame.d.ts +10 -4
  18. package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
  19. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +4 -1
  20. package/dist/types/excalidraw/actions/actionLink.d.ts +2 -1
  21. package/dist/types/excalidraw/actions/actionMenu.d.ts +2 -1
  22. package/dist/types/excalidraw/actions/actionProperties.d.ts +16 -5
  23. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
  24. package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -1
  25. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +2 -1
  26. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +2 -1
  27. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +2 -1
  28. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +2 -1
  29. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -1
  30. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -1
  31. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +2 -1
  32. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +2 -1
  33. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  34. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  35. package/dist/types/excalidraw/appState.d.ts +2 -1
  36. package/dist/types/excalidraw/components/App.d.ts +12 -28
  37. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  38. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
  39. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  40. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  41. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  42. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  43. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +2 -1
  44. package/dist/types/excalidraw/components/icons.d.ts +2 -0
  45. package/dist/types/excalidraw/data/blob.d.ts +2 -1
  46. package/dist/types/excalidraw/data/json.d.ts +2 -1
  47. package/dist/types/excalidraw/renderer/animation.d.ts +1 -0
  48. package/dist/types/excalidraw/scene/Renderer.d.ts +2 -0
  49. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  50. package/dist/types/excalidraw/scene/types.d.ts +1 -0
  51. package/dist/types/excalidraw/scroll.d.ts +46 -0
  52. package/dist/types/excalidraw/types.d.ts +16 -3
  53. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  54. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  55. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  56. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  57. 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.519",
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.519"
65
+ "@excalidraw/common": "npm:@myoc/common@0.19.520"
66
66
  }
67
67
  }