@chrtco/sdk 0.4.1 → 0.6.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/CHANGELOG.md +51 -0
- package/README.md +69 -0
- package/dist/atlas/browser.cjs +3186 -0
- package/dist/atlas/browser.cjs.map +1 -0
- package/dist/atlas/browser.d.cts +33 -0
- package/dist/atlas/browser.d.ts +33 -0
- package/dist/atlas/browser.js +3156 -0
- package/dist/atlas/browser.js.map +1 -0
- package/dist/fs-adapter-D5iwdb1Q.d.cts +33 -0
- package/dist/fs-adapter-D5iwdb1Q.d.ts +33 -0
- package/dist/index.cjs +7830 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +964 -1
- package/dist/index.d.ts +964 -1
- package/dist/index.js +7763 -1
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +90 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +5 -0
- package/dist/node/index.d.ts +5 -0
- package/dist/node/index.js +66 -0
- package/dist/node/index.js.map +1 -0
- package/dist/s52-colors-CdVzqt2K.d.cts +17 -0
- package/dist/s52-colors-CdVzqt2K.d.ts +17 -0
- package/package.json +31 -6
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import maplibregl from 'maplibre-gl';
|
|
2
|
+
import { C as ColorTableName } from '../s52-colors-CdVzqt2K.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Browser-only S-52 SVG image loaders. Uses `new Image()` and `map.addImage()`
|
|
6
|
+
* to push themed S-52 raster icons into a MapLibre map. Imported from the
|
|
7
|
+
* `@chrtco/sdk/atlas/browser` sub-export so non-DOM consumers (Workers, Node)
|
|
8
|
+
* don't pull DOM-typed code into their bundle.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Load all S-52 symbol images into a MapLibre map with the given color theme.
|
|
13
|
+
*/
|
|
14
|
+
declare function loadS52SymbolImages(map: maplibregl.Map, colorTable?: ColorTableName): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Reload all S-52 symbol images with a new color theme.
|
|
17
|
+
*/
|
|
18
|
+
declare function reloadS52SymbolImages(map: maplibregl.Map, colorTable: ColorTableName): Promise<void>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Browser-only nautical symbol image loaders. Sourced from `./symbols.ts`'s
|
|
22
|
+
* pure data; pushes themed icons into a MapLibre map via `new Image()` +
|
|
23
|
+
* `map.addImage()`. Imported from `@chrtco/sdk/atlas/browser`.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Load all nautical symbol images into a MapLibre map. */
|
|
27
|
+
declare function loadSymbolImages(map: maplibregl.Map): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Reload bridge symbol images with colors from the active S-52 color table.
|
|
30
|
+
*/
|
|
31
|
+
declare function loadThemedBridgeImages(map: maplibregl.Map, colorTable: ColorTableName): Promise<void>;
|
|
32
|
+
|
|
33
|
+
export { loadS52SymbolImages, loadSymbolImages, loadThemedBridgeImages, reloadS52SymbolImages };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import maplibregl from 'maplibre-gl';
|
|
2
|
+
import { C as ColorTableName } from '../s52-colors-CdVzqt2K.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Browser-only S-52 SVG image loaders. Uses `new Image()` and `map.addImage()`
|
|
6
|
+
* to push themed S-52 raster icons into a MapLibre map. Imported from the
|
|
7
|
+
* `@chrtco/sdk/atlas/browser` sub-export so non-DOM consumers (Workers, Node)
|
|
8
|
+
* don't pull DOM-typed code into their bundle.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Load all S-52 symbol images into a MapLibre map with the given color theme.
|
|
13
|
+
*/
|
|
14
|
+
declare function loadS52SymbolImages(map: maplibregl.Map, colorTable?: ColorTableName): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Reload all S-52 symbol images with a new color theme.
|
|
17
|
+
*/
|
|
18
|
+
declare function reloadS52SymbolImages(map: maplibregl.Map, colorTable: ColorTableName): Promise<void>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Browser-only nautical symbol image loaders. Sourced from `./symbols.ts`'s
|
|
22
|
+
* pure data; pushes themed icons into a MapLibre map via `new Image()` +
|
|
23
|
+
* `map.addImage()`. Imported from `@chrtco/sdk/atlas/browser`.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Load all nautical symbol images into a MapLibre map. */
|
|
27
|
+
declare function loadSymbolImages(map: maplibregl.Map): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Reload bridge symbol images with colors from the active S-52 color table.
|
|
30
|
+
*/
|
|
31
|
+
declare function loadThemedBridgeImages(map: maplibregl.Map, colorTable: ColorTableName): Promise<void>;
|
|
32
|
+
|
|
33
|
+
export { loadS52SymbolImages, loadSymbolImages, loadThemedBridgeImages, reloadS52SymbolImages };
|