@fbltd/math 1.0.11 → 1.0.13

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.
@@ -1,4 +1,4 @@
1
- import { Angle, AngleUnits, approximately } from "../src";
1
+ import { Angle, AngleUnits, approximately } from "../src/index.js";
2
2
  describe('math.angle.toDeg', () => {
3
3
  test('from Turn', () => {
4
4
  expect(Angle.toDeg(1, AngleUnits.Turn)).toBe(360);
@@ -1,4 +1,4 @@
1
- import { approximately, identityMatrix, Matrix2d } from "../src";
1
+ import { approximately, identityMatrix, Matrix2d } from "../index.js";
2
2
  describe('Matrix', () => {
3
3
  let matrix;
4
4
  test('should be the same', () => {
@@ -1,4 +1,4 @@
1
- import { approximately, isCorrectNumber, toPositive } from "../src";
1
+ import { approximately, isCorrectNumber, toPositive } from "../src/index.js";
2
2
  test('approximately', () => {
3
3
  expect(approximately(0, 0)).toBe(true);
4
4
  expect(approximately(1 + 1e-8, 1)).toBe(true);
package/dist/bin/index.js CHANGED
@@ -1 +1 @@
1
- export * from './src';
1
+ export * from './src/index.js';
@@ -1,4 +1,4 @@
1
- import { isCorrectNumber, toPositive } from "./utils";
1
+ import { isCorrectNumber, toPositive } from "./utils.js";
2
2
  export var AngleUnits;
3
3
  (function (AngleUnits) {
4
4
  AngleUnits[AngleUnits["Deg"] = 0] = "Deg";
@@ -1,4 +1,4 @@
1
- import { Color } from "./color";
1
+ import { Color } from "./index.js";
2
2
  export class ConicGradient {
3
3
  colors;
4
4
  constructor(...colors) {
@@ -1,2 +1,2 @@
1
- export * from './color';
2
- export * from './conic.gradient';
1
+ export * from './color.js';
2
+ export * from './conic.gradient.js';
@@ -1,4 +1,4 @@
1
- import { Matrix2d } from "../matrix";
1
+ import { Matrix2d } from "../index.js";
2
2
  export class Circle {
3
3
  center;
4
4
  r;
@@ -1,3 +1,3 @@
1
- export * from './point';
2
- export * from './circle';
3
- export * from './straight-line';
1
+ export * from './point.js';
2
+ export * from './circle.js';
3
+ export * from './straight-line.js';
@@ -1,4 +1,4 @@
1
- import { Matrix2d } from "../matrix";
1
+ import { Matrix2d } from "../index.js";
2
2
  export class StraightLine {
3
3
  p1;
4
4
  p2;
@@ -1,6 +1,5 @@
1
- export * from './angle';
2
- export * from './matrix';
3
- export * from './operator';
4
- export * from './utils';
5
- export * from './colors';
6
- export * from './figures';
1
+ export * from './angle.js';
2
+ export * from './matrix.js';
3
+ export * from './utils.js';
4
+ export * from './colors/index.js';
5
+ export * from './figures/index.js';
@@ -1,4 +1,4 @@
1
- import { Angle, AngleUnits } from "./angle";
1
+ import { Angle, AngleUnits } from "./index.js";
2
2
  export const identityMatrix = [1, 0, 0, 1, 0, 0];
3
3
  export function getIdentityMatrix() {
4
4
  return [1, 0, 0, 1, 0, 0];
@@ -1,2 +1,2 @@
1
- export * from './src';
1
+ export * from './src/index.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,5 +1,5 @@
1
- import { Color } from "./color";
2
- import { IPoint2 } from "../figures";
1
+ import { Color } from "./index.js";
2
+ import type { IPoint2 } from "../index.js";
3
3
  export declare class ConicGradient {
4
4
  colors: {
5
5
  angle: number;
@@ -1 +1 @@
1
- {"version":3,"file":"conic.gradient.d.ts","sourceRoot":"","sources":["../../../../src/colors/conic.gradient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAEnC,qBAAa,aAAa;IACtB,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,EAAE,CAAA;gBAE7B,GAAG,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,EAAE;IAYxD,eAAe,CAAC,KAAK,EAAE,MAAM;IAuB7B,eAAe,CAAC,KAAK,EAAE,KAAK;IAgC5B,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAOrC,QAAQ,CAAC,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,OAAO;IAYvD,KAAK;CAYR"}
1
+ {"version":3,"file":"conic.gradient.d.ts","sourceRoot":"","sources":["../../../../src/colors/conic.gradient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,qBAAa,aAAa;IACtB,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,EAAE,CAAA;gBAE7B,GAAG,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,EAAE;IAYxD,eAAe,CAAC,KAAK,EAAE,MAAM;IAuB7B,eAAe,CAAC,KAAK,EAAE,KAAK;IAgC5B,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAOrC,QAAQ,CAAC,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,OAAO;IAYvD,KAAK;CAYR"}
@@ -1,3 +1,3 @@
1
- export * from './color';
2
- export * from './conic.gradient';
1
+ export * from './color.js';
2
+ export * from './conic.gradient.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,qBAAqB,CAAA"}
@@ -1,5 +1,5 @@
1
- import { IPoint2 } from "./point";
2
- import { IMatrix2d } from "../matrix";
1
+ import type { IPoint2 } from "./index.js";
2
+ import { type IMatrix2d } from "../index.js";
3
3
  export declare class Circle {
4
4
  center: IPoint2;
5
5
  r: number;
@@ -1 +1 @@
1
- {"version":3,"file":"circle.d.ts","sourceRoot":"","sources":["../../../../src/figures/circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAChC,OAAO,EAAC,SAAS,EAAW,MAAM,WAAW,CAAC;AAE9C,qBAAa,MAAM;IACI,MAAM,EAAE,OAAO;IAAS,CAAC,EAAE,MAAM;gBAAjC,MAAM,EAAE,OAAO,EAAS,CAAC,EAAE,MAAM;IAIpD,SAAS,CAAC,MAAM,EAAE,SAAS;CAG9B"}
1
+ {"version":3,"file":"circle.d.ts","sourceRoot":"","sources":["../../../../src/figures/circle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD,qBAAa,MAAM;IACI,MAAM,EAAE,OAAO;IAAS,CAAC,EAAE,MAAM;gBAAjC,MAAM,EAAE,OAAO,EAAS,CAAC,EAAE,MAAM;IAIpD,SAAS,CAAC,MAAM,EAAE,SAAS;CAG9B"}
@@ -1,4 +1,4 @@
1
- export * from './point';
2
- export * from './circle';
3
- export * from './straight-line';
1
+ export * from './point.js';
2
+ export * from './circle.js';
3
+ export * from './straight-line.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/figures/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/figures/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA"}
@@ -1,5 +1,5 @@
1
- import { IPoint2 } from "./point";
2
- import { IMatrix2d } from "../matrix";
1
+ import type { IPoint2 } from "./index.js";
2
+ import { type IMatrix2d } from "../index.js";
3
3
  export declare class StraightLine {
4
4
  p1: IPoint2;
5
5
  p2: IPoint2;
@@ -1 +1 @@
1
- {"version":3,"file":"straight-line.d.ts","sourceRoot":"","sources":["../../../../src/figures/straight-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAChC,OAAO,EAAC,SAAS,EAAW,MAAM,WAAW,CAAC;AAE9C,qBAAa,YAAY;IACF,EAAE,EAAE,OAAO;IAAS,EAAE,EAAE,OAAO;gBAA/B,EAAE,EAAE,OAAO,EAAS,EAAE,EAAE,OAAO;IAIlD,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,UAAQ;CAMrD"}
1
+ {"version":3,"file":"straight-line.d.ts","sourceRoot":"","sources":["../../../../src/figures/straight-line.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,aAAa,CAAA;AAEtD,qBAAa,YAAY;IACF,EAAE,EAAE,OAAO;IAAS,EAAE,EAAE,OAAO;gBAA/B,EAAE,EAAE,OAAO,EAAS,EAAE,EAAE,OAAO;IAIlD,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,UAAQ;CAMrD"}
@@ -1,7 +1,6 @@
1
- export * from './angle';
2
- export * from './matrix';
3
- export * from './operator';
4
- export * from './utils';
5
- export * from './colors';
6
- export * from './figures';
1
+ export * from './angle.js';
2
+ export * from './matrix.js';
3
+ export * from './utils.js';
4
+ export * from './colors/index.js';
5
+ export * from './figures/index.js';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
@@ -1,5 +1,4 @@
1
- import { AngleUnits } from "./angle";
2
- import { IPoint2 } from "./figures";
1
+ import { AngleUnits, type IPoint2 } from "./index.js";
3
2
  export type IMatrix2d = [
4
3
  number,
5
4
  number,
@@ -1 +1 @@
1
- {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../../src/matrix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,SAAS,GAAG;IACpB,MAAM;IAAE,MAAM;IAAE,MAAM;IACtB,MAAM;IAAE,MAAM;IAAE,MAAM;CACzB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,SAA8B,CAAA;AAC3D,wBAAgB,iBAAiB,IAAI,SAAS,CAE7C;AA2BD,qBAAa,QAAQ;IAWjB,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE;IAe3D,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO;IAOxD,MAAM,CAAC,aA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AM,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,aAAiB,GAAG,SAAS;IAQ5E,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,aAAiB,GAAG,SAAS;IAIxE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,aAAiB,GAAG,SAAS;IAIxE,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,SAAI,EAAE,KAAK,aAAiB,GAAG,SAAS;CAGjF"}
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@fbltd/math",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "main": "dist/bin/index.js",
6
6
  "types": "dist/types/index.d.ts",
7
+ "type": "module",
7
8
  "exports": {
8
9
  ".": {
9
10
  "require": "./dist/bin/index.js",
@@ -16,6 +17,7 @@
16
17
  "README.ms"
17
18
  ],
18
19
  "scripts": {
20
+ "start": "node_modules/.bin/tsc --watch --noEmit",
19
21
  "clean": "rm -r dist || echo ''",
20
22
  "build": "node_modules/.bin/tsc",
21
23
  "deploy": "npm run clean && npm run build && npm version patch && git push && npm publish && npm run clean",
@@ -36,7 +38,6 @@
36
38
  "access": "public"
37
39
  },
38
40
  "devDependencies": {
39
- "@fbltd/bundler": "^2.0.46",
40
- "typedoc": "^0.26.6"
41
+ "@fbltd/bundler": "^2.0.46"
41
42
  }
42
43
  }
@@ -1,2 +0,0 @@
1
- export class Operator {
2
- }
@@ -1,3 +0,0 @@
1
- export declare class Operator {
2
- }
3
- //# sourceMappingURL=operator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/operator.ts"],"names":[],"mappings":"AAGA,qBAAa,QAAQ;CAEpB"}