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