lucid-extension-sdk 0.0.325 → 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.
@@ -158,7 +158,9 @@ function objectValidatorWithList(validatorStructure) {
158
158
  let valid = true;
159
159
  Object.entries(validatorStructure).forEach(([key, validator]) => {
160
160
  if (!validator(subject[key])) {
161
- invalidFields === null || invalidFields === void 0 ? void 0 : invalidFields.push(key);
161
+ if (invalidFields && Array.isArray(invalidFields)) {
162
+ invalidFields.push(key);
163
+ }
162
164
  valid = false;
163
165
  }
164
166
  });
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.325",
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",