@ts-charts/quadtree 0.1.0
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/LICENSE.md +21 -0
- package/README.md +153 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/quad.d.ts +9 -0
- package/dist/quadtree.d.ts +33 -0
- package/dist/types.d.ts +21 -0
- package/package.json +22 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Open Web Foundation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<p align="center"><img src=".github/art/cover.jpg" alt="Social Card of this repo"></p>
|
|
2
|
+
|
|
3
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
+
[![GitHub Actions][github-actions-src]][github-actions-href]
|
|
5
|
+
[![Commitizen friendly][commitizen-src]][commitizen-href]
|
|
6
|
+
<!-- [![npm downloads][npm-downloads-src]][npm-downloads-href] -->
|
|
7
|
+
<!-- [![Codecov][codecov-src]][codecov-href] -->
|
|
8
|
+
|
|
9
|
+
# ts-charts
|
|
10
|
+
|
|
11
|
+
> A complete TypeScript rewrite of D3.js โ fully typed, zero dependencies, Bun-first.
|
|
12
|
+
|
|
13
|
+
All 30 D3.js packages, rewritten from the ground up in TypeScript with `isolatedDeclarations` support. Ships as a single umbrella package or 30+ individually installable sub-packages.
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- ๐ท **Fully Typed** โ strict TypeScript with `isolatedDeclarations: true`, no `any` leaks
|
|
18
|
+
- ๐ฆ **Zero Dependencies** โ no external runtime dependencies, everything inlined
|
|
19
|
+
- โก **Bun-First** โ optimized for Bun, works in all modern browsers
|
|
20
|
+
- ๐ณ **Tree-Shakeable** โ ESM-only, import only what you need
|
|
21
|
+
- ๐งช **3,500+ Tests** โ comprehensive test suite ported from D3, all passing
|
|
22
|
+
- ๐ฏ **D3 API Compatible** โ drop-in replacement for D3.js
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# install the umbrella package (everything)
|
|
28
|
+
bun add ts-charts
|
|
29
|
+
|
|
30
|
+
# or install individual packages
|
|
31
|
+
bun add @ts-charts/scale
|
|
32
|
+
bun add @ts-charts/selection
|
|
33
|
+
bun add @ts-charts/shape
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
// import everything
|
|
40
|
+
import { scaleLinear, line, select } from 'ts-charts'
|
|
41
|
+
|
|
42
|
+
// or import from individual packages
|
|
43
|
+
import { scaleLinear } from '@ts-charts/scale'
|
|
44
|
+
import { line } from '@ts-charts/shape'
|
|
45
|
+
import { select } from '@ts-charts/selection'
|
|
46
|
+
|
|
47
|
+
// create a linear scale
|
|
48
|
+
const x = scaleLinear()
|
|
49
|
+
.domain([0, 100])
|
|
50
|
+
.range([0, 960])
|
|
51
|
+
|
|
52
|
+
// create a line generator
|
|
53
|
+
const myLine = line()
|
|
54
|
+
.x((d: [number, number]) => x(d[0]))
|
|
55
|
+
.y((d: [number, number]) => d[1])
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Packages
|
|
59
|
+
|
|
60
|
+
| Package | Description |
|
|
61
|
+
|---------|-------------|
|
|
62
|
+
| `@ts-charts/array` | Array manipulation, statistics, histograms, bisection |
|
|
63
|
+
| `@ts-charts/axis` | SVG axis generators for scales |
|
|
64
|
+
| `@ts-charts/brush` | 1D and 2D brush selections |
|
|
65
|
+
| `@ts-charts/chord` | Chord diagram layout and ribbon generator |
|
|
66
|
+
| `@ts-charts/color` | Color spaces: RGB, HSL, Lab, HCL, Cubehelix |
|
|
67
|
+
| `@ts-charts/contour` | Contour polygons and density estimation |
|
|
68
|
+
| `@ts-charts/delaunay` | Delaunay triangulation and Voronoi diagrams |
|
|
69
|
+
| `@ts-charts/dispatch` | Named event dispatching |
|
|
70
|
+
| `@ts-charts/drag` | Drag-and-drop interaction |
|
|
71
|
+
| `@ts-charts/dsv` | CSV and TSV parsing and formatting |
|
|
72
|
+
| `@ts-charts/ease` | Easing functions for transitions |
|
|
73
|
+
| `@ts-charts/fetch` | Convenience wrappers for the Fetch API |
|
|
74
|
+
| `@ts-charts/force` | Force-directed graph layout |
|
|
75
|
+
| `@ts-charts/format` | Number formatting (SI, fixed, currency, etc.) |
|
|
76
|
+
| `@ts-charts/geo` | Geographic projections and path generators |
|
|
77
|
+
| `@ts-charts/hierarchy` | Tree, treemap, pack, and partition layouts |
|
|
78
|
+
| `@ts-charts/interpolate` | Value interpolation for animations |
|
|
79
|
+
| `@ts-charts/path` | SVG path serialization |
|
|
80
|
+
| `@ts-charts/polygon` | Polygon area, centroid, convex hull |
|
|
81
|
+
| `@ts-charts/quadtree` | 2D spatial indexing |
|
|
82
|
+
| `@ts-charts/random` | Random number generators for various distributions |
|
|
83
|
+
| `@ts-charts/scale` | Scales: linear, log, ordinal, time, etc. |
|
|
84
|
+
| `@ts-charts/scale-chromatic` | Color schemes: sequential, diverging, categorical |
|
|
85
|
+
| `@ts-charts/selection` | DOM selection and manipulation |
|
|
86
|
+
| `@ts-charts/shape` | Shape generators: line, area, arc, pie, stack |
|
|
87
|
+
| `@ts-charts/time` | Time intervals and rounding |
|
|
88
|
+
| `@ts-charts/time-format` | Date/time parsing and formatting |
|
|
89
|
+
| `@ts-charts/timer` | Efficient animation scheduling via `requestAnimationFrame` |
|
|
90
|
+
| `@ts-charts/transition` | Animated transitions on selections |
|
|
91
|
+
| `@ts-charts/zoom` | Pan and zoom interaction |
|
|
92
|
+
|
|
93
|
+
## Testing
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
bun test
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Changelog
|
|
100
|
+
|
|
101
|
+
Please see our [releases][releases-href] page for more information on what has changed recently.
|
|
102
|
+
|
|
103
|
+
## Contributing
|
|
104
|
+
|
|
105
|
+
Please see [CONTRIBUTING][contributing-href] for details.
|
|
106
|
+
|
|
107
|
+
## Community
|
|
108
|
+
|
|
109
|
+
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
|
|
110
|
+
|
|
111
|
+
[Discussions on GitHub][discussions-href]
|
|
112
|
+
|
|
113
|
+
For casual chit-chat with others using this package:
|
|
114
|
+
|
|
115
|
+
[Join the Stacks Discord Server][discord-href]
|
|
116
|
+
|
|
117
|
+
## Postcardware
|
|
118
|
+
|
|
119
|
+
"Software that is free, but hopes for a postcard." We love receiving postcards from around the world showing where Stacks is being used! We showcase them on our website too.
|
|
120
|
+
|
|
121
|
+
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States ๐
|
|
122
|
+
|
|
123
|
+
## Sponsors
|
|
124
|
+
|
|
125
|
+
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
|
|
126
|
+
|
|
127
|
+
- [JetBrains][jetbrains-href]
|
|
128
|
+
- [The Solana Foundation][solana-href]
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
The MIT License (MIT). Please see [LICENSE][license-href] for more information.
|
|
133
|
+
|
|
134
|
+
Made with ๐
|
|
135
|
+
|
|
136
|
+
<!-- Badges -->
|
|
137
|
+
[npm-version-src]: https://img.shields.io/npm/v/ts-charts?style=flat-square
|
|
138
|
+
[npm-version-href]: https://npmjs.com/package/ts-charts
|
|
139
|
+
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/ts-charts/ci.yml?style=flat-square&branch=main
|
|
140
|
+
[github-actions-href]: https://github.com/stacksjs/ts-charts/actions?query=workflow%3Aci
|
|
141
|
+
|
|
142
|
+
[commitizen-src]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
|
|
143
|
+
[commitizen-href]: http://commitizen.github.io/cz-cli/
|
|
144
|
+
[releases-href]: https://github.com/stacksjs/ts-charts/releases
|
|
145
|
+
[contributing-href]: .github/CONTRIBUTING.md
|
|
146
|
+
[discussions-href]: https://github.com/stacksjs/ts-charts/discussions
|
|
147
|
+
[discord-href]: https://discord.gg/stacksjs
|
|
148
|
+
[jetbrains-href]: https://www.jetbrains.com/
|
|
149
|
+
[solana-href]: https://solana.com/
|
|
150
|
+
[license-href]: LICENSE.md
|
|
151
|
+
|
|
152
|
+
<!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/ts-charts/main?style=flat-square
|
|
153
|
+
[codecov-href]: https://codecov.io/gh/stacksjs/ts-charts -->
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class W{node;x0;y0;x1;y1;constructor(L,E,D,B,F){this.node=L,this.x0=E,this.y0=D,this.x1=B,this.y1=F}}function v(L){return L[0]}function A(L){return L[1]}function k(L){let E={data:L.data},D=E,B=L.next;while(B)D=D.next={data:B.data},B=B.next;return E}function X(L){return Array.isArray(L)}class Y{_x;_y;_x0;_y0;_x1;_y1;_root;constructor(L,E,D,B,F,G){this._x=L??v,this._y=E??A,this._x0=D??NaN,this._y0=B??NaN,this._x1=F??NaN,this._y1=G??NaN,this._root=void 0}copy(){let L=new Y(this._x,this._y,this._x0,this._y0,this._x1,this._y1),E=this._root;if(!E)return L;if(!X(E))return L._root=k(E),L;let D=[],B=[,,,,];L._root=B,D.push({source:E,target:B});let F;while(F=D.pop())for(let G=0;G<4;++G){let H=F.source[G];if(H)if(X(H)){let J=[,,,,];F.target[G]=J,D.push({source:H,target:J})}else F.target[G]=k(H)}return L}add(L){let E=+this._x.call(null,L),D=+this._y.call(null,L);return w(this.cover(E,D),E,D,L),this}addAll(L){let E;if(!Array.isArray(L))E=Array.from(L);else E=L;let D=E.length,B=new Float64Array(D),F=new Float64Array(D),G=1/0,H=1/0,J=-1/0,M=-1/0;for(let K=0;K<D;++K){let R=E[K],P=+this._x.call(null,R),O=+this._y.call(null,R);if(isNaN(P)||isNaN(O))continue;if(B[K]=P,F[K]=O,P<G)G=P;if(P>J)J=P;if(O<H)H=O;if(O>M)M=O}if(G>J||H>M)return this;this.cover(G,H).cover(J,M);for(let K=0;K<D;++K)w(this,B[K],F[K],E[K]);return this}cover(L,E){if(isNaN(L=+L)||isNaN(E=+E))return this;let D=this._x0,B=this._y0,F=this._x1,G=this._y1;if(isNaN(D))F=(D=Math.floor(L))+1,G=(B=Math.floor(E))+1;else{let H=F-D||1,J=this._root,M,K;while(D>L||L>=F||B>E||E>=G)switch(K=(E<B)<<1|L<D,M=[,,,,],M[K]=J,J=M,H*=2,K){case 0:F=D+H,G=B+H;break;case 1:D=F-H,G=B+H;break;case 2:F=D+H,B=G-H;break;case 3:D=F-H,B=G-H;break}if(this._root&&X(this._root))this._root=J}return this._x0=D,this._y0=B,this._x1=F,this._y1=G,this}data(){let L=[];return this.visit((E)=>{if(!X(E)){let D=E;do L.push(D.data),D=D.next;while(D)}}),L}extent(L){if(L!==void 0)return this.cover(+L[0][0],+L[0][1]).cover(+L[1][0],+L[1][1]);return isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}find(L,E,D){let B,F=this._x0,G=this._y0,H,J,M,K,R=this._x1,P=this._y1,O=[],V=this._root,Z,_;if(V)O.push(new W(V,F,G,R,P));if(D==null)D=1/0;else F=L-D,G=E-D,R=L+D,P=E+D,D*=D;while(Z=O.pop()){if(!(V=Z.node)||(H=Z.x0)>R||(J=Z.y0)>P||(M=Z.x1)<F||(K=Z.y1)<G)continue;if(X(V)){let S=(H+M)/2,U=(J+K)/2;if(O.push(new W(V[3],S,U,M,K),new W(V[2],H,U,S,K),new W(V[1],S,J,M,U),new W(V[0],H,J,S,U)),_=(E>=U)<<1|L>=S)Z=O[O.length-1],O[O.length-1]=O[O.length-1-_],O[O.length-1-_]=Z}else{let S=L-+this._x.call(null,V.data),U=E-+this._y.call(null,V.data),$=S*S+U*U;if($<D){let T=Math.sqrt(D=$);F=L-T,G=E-T,R=L+T,P=E+T,B=V.data}}}return B}remove(L){let E=+this._x.call(null,L),D=+this._y.call(null,L);if(isNaN(E)||isNaN(D))return this;let B,F=this._root,G,H,J,M=this._x0,K=this._y0,R=this._x1,P=this._y1,O,V,Z,_,S=0,U=0;if(!F)return this;if(X(F))while(!0){if(Z=E>=(O=(M+R)/2),Z)M=O;else R=O;if(_=D>=(V=(K+P)/2),_)K=V;else P=V;if(S=_<<1|Z,B=F,F=F[S],!F)return this;if(!X(F))break;if(B[S+1&3]||B[S+2&3]||B[S+3&3])G=B,U=S}let $=F;while($.data!==L)if(H=$,$=$.next,!$)return this;if(J=$.next,J)delete $.next;if(H){if(J)H.next=J;else delete H.next;return this}if(!B)return this._root=J,this;if(J)B[S]=J;else delete B[S];let T=B[0]||B[1]||B[2]||B[3];if(T&&T===(B[3]||B[2]||B[1]||B[0])&&!X(T))if(G)G[U]=T;else this._root=T;return this}removeAll(L){for(let E of L)this.remove(E);return this}root(){return this._root}size(){let L=0;return this.visit((E)=>{if(!X(E)){let D=E;do++L,D=D.next;while(D)}}),L}visit(L){let E=[],D,B=this._root,F,G,H,J,M;if(B)E.push(new W(B,this._x0,this._y0,this._x1,this._y1));while(D=E.pop())if(!L(B=D.node,G=D.x0,H=D.y0,J=D.x1,M=D.y1)&&X(B)){let K=(G+J)/2,R=(H+M)/2;if(F=B[3])E.push(new W(F,K,R,J,M));if(F=B[2])E.push(new W(F,G,R,K,M));if(F=B[1])E.push(new W(F,K,H,J,R));if(F=B[0])E.push(new W(F,G,H,K,R))}return this}visitAfter(L){let E=[],D=[],B;if(this._root)E.push(new W(this._root,this._x0,this._y0,this._x1,this._y1));while(B=E.pop()){let F=B.node;if(X(F)){let G,H=B.x0,J=B.y0,M=B.x1,K=B.y1,R=(H+M)/2,P=(J+K)/2;if(G=F[0])E.push(new W(G,H,J,R,P));if(G=F[1])E.push(new W(G,R,J,M,P));if(G=F[2])E.push(new W(G,H,P,R,K));if(G=F[3])E.push(new W(G,R,P,M,K))}D.push(B)}while(B=D.pop())L(B.node,B.x0,B.y0,B.x1,B.y1);return this}x(L){if(L!==void 0)return this._x=L,this;return this._x}y(L){if(L!==void 0)return this._y=L,this;return this._y}}function w(L,E,D,B){if(isNaN(E)||isNaN(D))return L;let F,G=L._root,H={data:B},J=L._x0,M=L._y0,K=L._x1,R=L._y1,P,O,V,Z,_,S,U=0,$;if(!G)return L._root=H,L;while(X(G)){if(_=E>=(P=(J+K)/2),_)J=P;else K=P;if(S=D>=(O=(M+R)/2),S)M=O;else R=O;if(U=S<<1|_,F=G,G=G[U],!G)return F[U]=H,L}if(V=+L._x.call(null,G.data),Z=+L._y.call(null,G.data),E===V&&D===Z){if(H.next=G,F)F[U]=H;else L._root=H;return L}do{let T=[,,,,];if(F)F[U]=T;else L._root=T;if(F=T,_=E>=(P=(J+K)/2),_)J=P;else K=P;if(S=D>=(O=(M+R)/2),S)M=O;else R=O;U=S<<1|_,$=(Z>=O)<<1|V>=P}while(U===$);return F[$]=G,F[U]=H,L}function b(L,E,D){let B=new Y(E??void 0,D??void 0,NaN,NaN,NaN,NaN);return L==null?B:B.addAll(L)}export{b as quadtree,Y as Quadtree};
|
package/dist/quad.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { QuadtreeNode } from './types.ts';
|
|
2
|
+
export declare class Quad<T> {
|
|
3
|
+
node: QuadtreeNode<T> | undefined;
|
|
4
|
+
x0: number;
|
|
5
|
+
y0: number;
|
|
6
|
+
x1: number;
|
|
7
|
+
y1: number;
|
|
8
|
+
constructor(node: QuadtreeNode<T> | undefined, x0: number, y0: number, x1: number, y1: number);
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Accessor, QuadtreeNode, QuadtreeNodeCallback } from './types.ts';
|
|
2
|
+
export declare function quadtree<T = [number, number]>(nodes?: Iterable<T> | null, x?: Accessor<T>, y?: Accessor<T>): Quadtree<T>;
|
|
3
|
+
export declare class Quadtree<T = [number, number]> {
|
|
4
|
+
_x: Accessor<T>;
|
|
5
|
+
_y: Accessor<T>;
|
|
6
|
+
_x0: number;
|
|
7
|
+
_y0: number;
|
|
8
|
+
_x1: number;
|
|
9
|
+
_y1: number;
|
|
10
|
+
_root: QuadtreeNode<T> | undefined;
|
|
11
|
+
constructor(x?: Accessor<T>, y?: Accessor<T>, x0?: number, y0?: number, x1?: number, y1?: number);
|
|
12
|
+
copy(): Quadtree<T>;
|
|
13
|
+
add(d: T): this;
|
|
14
|
+
addAll(data: Iterable<T>): this;
|
|
15
|
+
cover(x: number, y: number): this;
|
|
16
|
+
data(): T[];
|
|
17
|
+
extent(): [[number, number], [number, number]] | undefined;
|
|
18
|
+
extent(extent: [[number, number], [number, number]]): this;
|
|
19
|
+
extent(extent?: [[number, number], [number, number]]): [[number, number], [number, number]] | undefined | this;
|
|
20
|
+
find(x: number, y: number, radius?: number | null): T | undefined;
|
|
21
|
+
remove(d: T): this;
|
|
22
|
+
removeAll(data: Iterable<T>): this;
|
|
23
|
+
root(): QuadtreeNode<T> | undefined;
|
|
24
|
+
size(): number;
|
|
25
|
+
visit(callback: QuadtreeNodeCallback<T>): this;
|
|
26
|
+
visitAfter(callback: QuadtreeNodeCallback<T>): this;
|
|
27
|
+
x(): Accessor<T>;
|
|
28
|
+
x(x: Accessor<T>): this;
|
|
29
|
+
x(x?: Accessor<T>): Accessor<T> | this;
|
|
30
|
+
y(): Accessor<T>;
|
|
31
|
+
y(y: Accessor<T>): this;
|
|
32
|
+
y(y?: Accessor<T>): Accessor<T> | this;
|
|
33
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare interface QuadtreeLeaf<T> {
|
|
2
|
+
data: T
|
|
3
|
+
next?: QuadtreeLeaf<T>
|
|
4
|
+
}
|
|
5
|
+
export type QuadtreeInternalNode<T> = [
|
|
6
|
+
// eslint-disable-next-line pickier/no-unused-vars
|
|
7
|
+
QuadtreeNode<T> | undefined,
|
|
8
|
+
QuadtreeNode<T> | undefined,
|
|
9
|
+
QuadtreeNode<T> | undefined,
|
|
10
|
+
QuadtreeNode<T> | undefined,
|
|
11
|
+
] & { length: 4 }
|
|
12
|
+
export type QuadtreeNode<T> = QuadtreeLeaf<T> | QuadtreeInternalNode<T>
|
|
13
|
+
export type QuadtreeNodeCallback<T> = (
|
|
14
|
+
node: QuadtreeNode<T>,
|
|
15
|
+
x0: number,
|
|
16
|
+
y0: number,
|
|
17
|
+
x1: number,
|
|
18
|
+
y1: number,
|
|
19
|
+
) => boolean | void
|
|
20
|
+
// eslint-disable-next-line pickier/no-unused-vars
|
|
21
|
+
export type Accessor<T> = (d: T) => number
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ts-charts/quadtree",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Two-dimensional recursive spatial subdivision.",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./src/index.ts"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"module": "./src/index.ts",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "bun --bun build.ts",
|
|
19
|
+
"prepublishOnly": "bun --bun run build",
|
|
20
|
+
"test": "bun test"
|
|
21
|
+
}
|
|
22
|
+
}
|