lucid-extension-sdk 0.0.326 → 0.0.327

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 (3) hide show
  1. package/math.d.ts +4 -0
  2. package/math.js +4 -0
  3. package/package.json +1 -1
package/math.d.ts CHANGED
@@ -42,5 +42,9 @@ export declare function boxCenter(b: Box): {
42
42
  export declare function rotatedBoundingBox(b: Box, angle: number, center?: Point): Box;
43
43
  export declare function rotateBox(b: Box, angle: number, center?: Point): [Point, Point, Point, Point];
44
44
  export declare function boxFrom4Points(a: Point, b: Point, c: Point, d: Point): Box;
45
+ /**
46
+ * @return An array containing the 4 points of the box in this exact order:
47
+ * [top left, top right, bottom right, bottom left].
48
+ */
45
49
  export declare function toCornersAsArray(box: Box): [Point, Point, Point, Point];
46
50
  export declare function rotateAroundFn(anchor: Point, angle: number): (p1: Point) => Point;
package/math.js CHANGED
@@ -97,6 +97,10 @@ function boxFrom4Points(a, b, c, d) {
97
97
  return { x: xMin, y: yMin, w: xMax - xMin, h: yMax - yMin };
98
98
  }
99
99
  exports.boxFrom4Points = boxFrom4Points;
100
+ /**
101
+ * @return An array containing the 4 points of the box in this exact order:
102
+ * [top left, top right, bottom right, bottom left].
103
+ */
100
104
  function toCornersAsArray(box) {
101
105
  return [
102
106
  { x: box.x, y: box.y },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.326",
3
+ "version": "0.0.327",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",