@xyo-network/quadkey 5.3.24 → 5.3.26

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 (2) hide show
  1. package/README.md +786 -10
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,23 +1,799 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/quadkey
2
4
 
3
- [![logo][]](https://xyo.network)
5
+ [![npm][npm-badge]][npm-link]
6
+ [![license][license-badge]][license-link]
7
+
8
+ > Primary SDK for using XYO Protocol 2.0
9
+
10
+ ## Install
11
+
12
+ Using npm:
4
13
 
5
- Version: 5.0.2
14
+ ```sh
15
+ npm install {{name}}
16
+ ```
6
17
 
7
- Primary SDK for using XYO Protocol 2.0
18
+ Using yarn:
8
19
 
9
- ## Documentation
20
+ ```sh
21
+ yarn add {{name}}
22
+ ```
10
23
 
11
- [TypeDoc Generated Documentation](https://gitbook.xyo.network/xyo-data-lab/xyo-reference/package-documentation/xyo-network__quadkey)
24
+ Using pnpm:
25
+
26
+ ```sh
27
+ pnpm add {{name}}
28
+ ```
29
+
30
+ Using bun:
31
+
32
+ ```sh
33
+ bun add {{name}}
34
+ ```
12
35
 
13
- Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)
14
36
 
15
37
  ## License
16
38
 
17
- > See the [LICENSE](LICENSE) file for license details
39
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
+
41
+ ## Reference
42
+
43
+ ### packages
44
+
45
+ ### sdk-utils
46
+
47
+ ### packages
48
+
49
+ ### quadkey
50
+
51
+ ### .temp-typedoc
52
+
53
+ ### classes
54
+
55
+ ### <a id="Quadkey"></a>Quadkey
56
+
57
+ [**@xyo-network/quadkey**](#../README)
58
+
59
+ ***
60
+
61
+ ## Constructors
62
+
63
+ ### Constructor
64
+
65
+ ```ts
66
+ new Quadkey(key?): Quadkey;
67
+ ```
68
+
69
+ ### Parameters
70
+
71
+ #### key?
72
+
73
+ `bigint` = `0n`
74
+
75
+ ### Returns
76
+
77
+ `Quadkey`
78
+
79
+ ## Properties
80
+
81
+ ### Zero
82
+
83
+ ```ts
84
+ readonly static Zero: Quadkey;
85
+ ```
86
+
87
+ ***
88
+
89
+ ### root
90
+
91
+ ```ts
92
+ readonly static root: Quadkey;
93
+ ```
94
+
95
+ ***
96
+
97
+ ### type
98
+
99
+ ```ts
100
+ readonly static type: "Quadkey" = 'Quadkey';
101
+ ```
102
+
103
+ ***
104
+
105
+ ### key
106
+
107
+ ```ts
108
+ key: bigint;
109
+ ```
110
+
111
+ ***
112
+
113
+ ### type
114
+
115
+ ```ts
116
+ type: string = Quadkey.type;
117
+ ```
118
+
119
+ ## Accessors
120
+
121
+ ### base10String
122
+
123
+ ### Get Signature
124
+
125
+ ```ts
126
+ get base10String(): string;
127
+ ```
128
+
129
+ #### Returns
130
+
131
+ `string`
132
+
133
+ ***
134
+
135
+ ### base16String
136
+
137
+ ### Get Signature
138
+
139
+ ```ts
140
+ get base16String(): string;
141
+ ```
142
+
143
+ #### Returns
144
+
145
+ `string`
146
+
147
+ ***
148
+
149
+ ### base4Hash
150
+
151
+ ### Get Signature
152
+
153
+ ```ts
154
+ get base4Hash(): string;
155
+ ```
156
+
157
+ #### Returns
158
+
159
+ `string`
160
+
161
+ ***
162
+
163
+ ### base4HashLabel
164
+
165
+ ### Get Signature
166
+
167
+ ```ts
168
+ get base4HashLabel(): string;
169
+ ```
170
+
171
+ #### Returns
172
+
173
+ `string`
174
+
175
+ ***
176
+
177
+ ### boundingBox
178
+
179
+ ### Get Signature
180
+
181
+ ```ts
182
+ get boundingBox(): MercatorBoundingBox;
183
+ ```
184
+
185
+ #### Returns
186
+
187
+ `MercatorBoundingBox`
188
+
189
+ ***
190
+
191
+ ### center
192
+
193
+ ### Get Signature
194
+
195
+ ```ts
196
+ get center(): LngLat;
197
+ ```
198
+
199
+ #### Returns
200
+
201
+ `LngLat`
202
+
203
+ ***
204
+
205
+ ### children
206
+
207
+ ### Get Signature
208
+
209
+ ```ts
210
+ get children(): Quadkey[];
211
+ ```
212
+
213
+ #### Returns
214
+
215
+ `Quadkey`[]
216
+
217
+ ***
218
+
219
+ ### gridLocation
220
+
221
+ ### Get Signature
222
+
223
+ ```ts
224
+ get gridLocation(): object;
225
+ ```
226
+
227
+ #### Returns
228
+
229
+ `object`
230
+
231
+ ##### col
232
+
233
+ ```ts
234
+ col: number;
235
+ ```
236
+
237
+ ##### row
238
+
239
+ ```ts
240
+ row: number;
241
+ ```
242
+
243
+ ##### zoom
244
+
245
+ ```ts
246
+ zoom: number;
247
+ ```
248
+
249
+ ***
250
+
251
+ ### id
252
+
253
+ ### Get Signature
254
+
255
+ ```ts
256
+ get id(): bigint;
257
+ ```
258
+
259
+ #### Returns
260
+
261
+ `bigint`
262
+
263
+ ***
264
+
265
+ ### parent
266
+
267
+ ### Get Signature
268
+
269
+ ```ts
270
+ get parent(): Quadkey | undefined;
271
+ ```
272
+
273
+ #### Returns
274
+
275
+ `Quadkey` \| `undefined`
276
+
277
+ ***
278
+
279
+ ### siblings
280
+
281
+ ### Get Signature
282
+
283
+ ```ts
284
+ get siblings(): Quadkey[];
285
+ ```
286
+
287
+ #### Returns
288
+
289
+ `Quadkey`[]
290
+
291
+ ***
292
+
293
+ ### tile
294
+
295
+ ### Get Signature
296
+
297
+ ```ts
298
+ get tile(): MercatorTile;
299
+ ```
300
+
301
+ #### Returns
302
+
303
+ `MercatorTile`
304
+
305
+ ***
306
+
307
+ ### valid
308
+
309
+ ### Get Signature
310
+
311
+ ```ts
312
+ get valid(): boolean;
313
+ ```
314
+
315
+ #### Returns
316
+
317
+ `boolean`
318
+
319
+ ***
320
+
321
+ ### zoom
322
+
323
+ ### Get Signature
324
+
325
+ ```ts
326
+ get zoom(): number;
327
+ ```
328
+
329
+ #### Returns
330
+
331
+ `number`
332
+
333
+ ## Methods
334
+
335
+ ### from()
336
+
337
+ ```ts
338
+ static from(zoom, id): Quadkey;
339
+ ```
340
+
341
+ ### Parameters
342
+
343
+ #### zoom
344
+
345
+ `number`
346
+
347
+ #### id
348
+
349
+ `bigint`
350
+
351
+ ### Returns
352
+
353
+ `Quadkey`
354
+
355
+ ***
356
+
357
+ ### fromArrayBuffer()
358
+
359
+ ```ts
360
+ static fromArrayBuffer(zoom, id): Quadkey;
361
+ ```
362
+
363
+ ### Parameters
364
+
365
+ #### zoom
366
+
367
+ `number`
368
+
369
+ #### id
370
+
371
+ `ArrayBuffer`
372
+
373
+ ### Returns
374
+
375
+ `Quadkey`
376
+
377
+ ***
378
+
379
+ ### fromBase16String()
380
+
381
+ ```ts
382
+ static fromBase16String(value): Quadkey;
383
+ ```
384
+
385
+ ### Parameters
386
+
387
+ #### value
388
+
389
+ `string`
390
+
391
+ ### Returns
392
+
393
+ `Quadkey`
394
+
395
+ ***
396
+
397
+ ### fromBase4String()
398
+
399
+ ```ts
400
+ static fromBase4String(value?): Quadkey;
401
+ ```
402
+
403
+ ### Parameters
404
+
405
+ #### value?
406
+
407
+ `string`
408
+
409
+ ### Returns
410
+
411
+ `Quadkey`
412
+
413
+ ***
414
+
415
+ ### fromBoundingBox()
416
+
417
+ ```ts
418
+ static fromBoundingBox(boundingBox, zoom): Quadkey[];
419
+ ```
420
+
421
+ ### Parameters
422
+
423
+ #### boundingBox
424
+
425
+ `MercatorBoundingBox`
426
+
427
+ #### zoom
428
+
429
+ `number`
430
+
431
+ ### Returns
432
+
433
+ `Quadkey`[]
434
+
435
+ ***
436
+
437
+ ### fromLngLat()
438
+
439
+ ```ts
440
+ static fromLngLat(point, zoom): Quadkey;
441
+ ```
442
+
443
+ ### Parameters
444
+
445
+ #### point
446
+
447
+ `LngLatLike`
448
+
449
+ #### zoom
450
+
451
+ `number`
452
+
453
+ ### Returns
454
+
455
+ `Quadkey`
456
+
457
+ ***
458
+
459
+ ### fromString()
460
+
461
+ ```ts
462
+ static fromString(
463
+ zoom,
464
+ id,
465
+ base?): Quadkey;
466
+ ```
467
+
468
+ ### Parameters
469
+
470
+ #### zoom
471
+
472
+ `number`
473
+
474
+ #### id
475
+
476
+ `string`
477
+
478
+ #### base?
479
+
480
+ `number` = `16`
481
+
482
+ ### Returns
483
+
484
+ `Quadkey`
485
+
486
+ ***
487
+
488
+ ### fromTile()
489
+
490
+ ```ts
491
+ static fromTile(tile): Quadkey;
492
+ ```
493
+
494
+ ### Parameters
495
+
496
+ #### tile
497
+
498
+ `MercatorTile`
499
+
500
+ ### Returns
501
+
502
+ `Quadkey`
503
+
504
+ ***
505
+
506
+ ### childrenByZoom()
507
+
508
+ ```ts
509
+ childrenByZoom(zoom): Quadkey[];
510
+ ```
511
+
512
+ ### Parameters
513
+
514
+ #### zoom
515
+
516
+ `number`
517
+
518
+ ### Returns
519
+
520
+ `Quadkey`[]
521
+
522
+ ***
523
+
524
+ ### clone()
525
+
526
+ ```ts
527
+ clone(): Quadkey;
528
+ ```
529
+
530
+ ### Returns
531
+
532
+ `Quadkey`
533
+
534
+ ***
535
+
536
+ ### equals()
537
+
538
+ ```ts
539
+ equals(obj): boolean;
540
+ ```
541
+
542
+ ### Parameters
543
+
544
+ #### obj
545
+
546
+ `Quadkey`
547
+
548
+ ### Returns
549
+
550
+ `boolean`
551
+
552
+ ***
553
+
554
+ ### geoJson()
555
+
556
+ ```ts
557
+ geoJson(): GeoJson;
558
+ ```
559
+
560
+ ### Returns
561
+
562
+ `GeoJson`
563
+
564
+ ***
565
+
566
+ ### getGridBoundingBox()
567
+
568
+ ```ts
569
+ getGridBoundingBox(size): object;
570
+ ```
571
+
572
+ ### Parameters
573
+
574
+ #### size
575
+
576
+ `number`
577
+
578
+ ### Returns
579
+
580
+ `object`
581
+
582
+ #### height
583
+
584
+ ```ts
585
+ height: number = blockSize;
586
+ ```
587
+
588
+ #### left
589
+
590
+ ```ts
591
+ left: number;
592
+ ```
593
+
594
+ #### top
595
+
596
+ ```ts
597
+ top: number;
598
+ ```
599
+
600
+ #### width
601
+
602
+ ```ts
603
+ width: number = blockSize;
604
+ ```
605
+
606
+ ***
607
+
608
+ ### ~~getGridLocation()~~
609
+
610
+ ```ts
611
+ getGridLocation(): object;
612
+ ```
613
+
614
+ ### Returns
615
+
616
+ `object`
617
+
618
+ #### ~~col~~
619
+
620
+ ```ts
621
+ col: number;
622
+ ```
623
+
624
+ #### ~~row~~
625
+
626
+ ```ts
627
+ row: number;
628
+ ```
629
+
630
+ #### ~~zoom~~
631
+
632
+ ```ts
633
+ zoom: number;
634
+ ```
635
+
636
+ ### Deprecated
637
+
638
+ use .gridLocation instead
639
+
640
+ ***
641
+
642
+ ### isInBoundingBox()
643
+
644
+ ```ts
645
+ isInBoundingBox(boundingBox): boolean;
646
+ ```
647
+
648
+ ### Parameters
649
+
650
+ #### boundingBox
651
+
652
+ `MercatorBoundingBox`
653
+
654
+ ### Returns
655
+
656
+ `boolean`
657
+
658
+ ***
659
+
660
+ ### relative()
661
+
662
+ ```ts
663
+ relative(direction): Quadkey;
664
+ ```
665
+
666
+ ### Parameters
667
+
668
+ #### direction
669
+
670
+ `string`
671
+
672
+ ### Returns
673
+
674
+ `Quadkey`
675
+
676
+ ***
677
+
678
+ ### setId()
679
+
680
+ ```ts
681
+ setId(id): Quadkey;
682
+ ```
683
+
684
+ ### Parameters
685
+
686
+ #### id
687
+
688
+ `bigint`
689
+
690
+ ### Returns
691
+
692
+ `Quadkey`
693
+
694
+ ***
695
+
696
+ ### setKey()
697
+
698
+ ```ts
699
+ setKey(zoom, key): Quadkey;
700
+ ```
701
+
702
+ ### Parameters
703
+
704
+ #### zoom
705
+
706
+ `number`
707
+
708
+ #### key
709
+
710
+ `bigint`
711
+
712
+ ### Returns
713
+
714
+ `Quadkey`
715
+
716
+ ***
717
+
718
+ ### setZoom()
719
+
720
+ ```ts
721
+ setZoom(zoom): Quadkey;
722
+ ```
723
+
724
+ ### Parameters
725
+
726
+ #### zoom
727
+
728
+ `number`
729
+
730
+ ### Returns
731
+
732
+ `Quadkey`
733
+
734
+ ***
735
+
736
+ ### toJSON()
737
+
738
+ ```ts
739
+ toJSON(): string;
740
+ ```
741
+
742
+ ### Returns
743
+
744
+ `string`
745
+
746
+ ***
747
+
748
+ ### toString()
749
+
750
+ ```ts
751
+ toString(): string;
752
+ ```
753
+
754
+ ### Returns
755
+
756
+ `string`
757
+
758
+ ***
759
+
760
+ ### guessZoom()
761
+
762
+ ```ts
763
+ protected guessZoom(): void;
764
+ ```
765
+
766
+ ### Returns
767
+
768
+ `void`
769
+
770
+ ### functions
771
+
772
+ ### <a id="isQuadkey"></a>isQuadkey
773
+
774
+ [**@xyo-network/quadkey**](#../README)
775
+
776
+ ***
777
+
778
+ ```ts
779
+ function isQuadkey(obj): boolean;
780
+ ```
781
+
782
+ ## Parameters
783
+
784
+ ### obj
785
+
786
+ ### type
787
+
788
+ `string`
789
+
790
+ ## Returns
18
791
 
19
- ## Credits
792
+ `boolean`
20
793
 
21
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
22
794
 
23
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
795
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
796
+ [npm-badge]: https://img.shields.io/npm/v/@xyo-network/quadkey.svg
797
+ [npm-link]: https://www.npmjs.com/package/@xyo-network/quadkey
798
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/quadkey.svg
799
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/quadkey",
3
- "version": "5.3.24",
3
+ "version": "5.3.26",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -22,11 +22,11 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/neutral/index.d.ts",
25
+ "import": "./dist/neutral/index.mjs",
25
26
  "default": "./dist/neutral/index.mjs"
26
27
  },
27
28
  "./package.json": "./package.json"
28
29
  },
29
- "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
@@ -37,13 +37,13 @@
37
37
  ],
38
38
  "devDependencies": {
39
39
  "@opentelemetry/api": "^1.9.1",
40
- "@types/node": "^25.5.0",
41
- "@xylabs/geo": "^5.0.93",
42
- "@xylabs/sdk-js": "^5.0.93",
43
- "@xylabs/ts-scripts-common": "~7.6.16",
44
- "@xylabs/ts-scripts-pnpm": "~7.6.16",
45
- "@xylabs/tsconfig": "~7.6.16",
46
- "@xylabs/vitest-extended": "~5.0.93",
40
+ "@types/node": "^25.5.2",
41
+ "@xylabs/geo": "^5.0.94",
42
+ "@xylabs/sdk-js": "^5.0.94",
43
+ "@xylabs/ts-scripts-common": "~7.7.5",
44
+ "@xylabs/ts-scripts-pnpm": "~7.7.5",
45
+ "@xylabs/tsconfig": "~7.7.5",
46
+ "@xylabs/vitest-extended": "~5.0.94",
47
47
  "acorn": "^8.16.0",
48
48
  "axios": "^1.14.0",
49
49
  "esbuild": "^0.28.0",