@rnacanvas/draw.bases.bonds 14.0.0 → 14.0.2
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.
- package/dist/Points.d.ts +20 -0
- package/dist/Points.d.ts.map +1 -0
- package/dist/TrailingSegment.d.ts +13 -0
- package/dist/TrailingSegment.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/Points.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collection of points.
|
|
3
|
+
*/
|
|
4
|
+
export declare class Points<P extends PointLike> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(points: P[]);
|
|
7
|
+
/**
|
|
8
|
+
* Returns the closest point to the specified point.
|
|
9
|
+
*
|
|
10
|
+
* Returns the same point object that's in the points collection
|
|
11
|
+
* (i.e., doesn't create any new point objects).
|
|
12
|
+
*/
|
|
13
|
+
closest(p: PointLike): P;
|
|
14
|
+
}
|
|
15
|
+
type PointLike = {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=Points.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Points.d.ts","sourceRoot":"","sources":["../src/Points.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,MAAM,CAAC,CAAC,SAAS,SAAS;;gBAGzB,MAAM,EAAE,CAAC,EAAE;IAIvB;;;;;OAKG;IACH,OAAO,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC;CAYzB;AAED,KAAK,SAAS,GAAG;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SVGCommand } from 'svg-pathdata';
|
|
2
|
+
import { FinitePoint } from '@rnacanvas/points.oopified';
|
|
3
|
+
/**
|
|
4
|
+
* A segment that comes after at least one previous segment in an SVG path definition (for a curved bond).
|
|
5
|
+
*/
|
|
6
|
+
export declare class TrailingSegment {
|
|
7
|
+
controlPoints: FinitePoint[];
|
|
8
|
+
readonly endPoint: FinitePoint;
|
|
9
|
+
static from(command: SVGCommand): TrailingSegment | never;
|
|
10
|
+
constructor(controlPoints: FinitePoint[], endPoint: FinitePoint);
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=TrailingSegment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrailingSegment.d.ts","sourceRoot":"","sources":["../src/TrailingSegment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;GAEG;AACH,qBAAa,eAAe;IAyBP,aAAa,EAAE,WAAW,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,WAAW;IAxB/E,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,eAAe,GAAG,KAAK;gBAwBtC,aAAa,EAAE,WAAW,EAAE,EAAW,QAAQ,EAAE,WAAW;IAE/E,QAAQ,IAAI,MAAM;CAoBnB"}
|