@chrtco/sdk 0.10.54 → 0.10.55
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 +28 -0
- package/README.md +16 -3
- package/dist/atlas/browser.cjs +673 -17
- package/dist/atlas/browser.cjs.map +1 -1
- package/dist/atlas/browser.d.cts +36 -2
- package/dist/atlas/browser.d.ts +36 -2
- package/dist/atlas/browser.js +670 -16
- package/dist/atlas/browser.js.map +1 -1
- package/dist/index.cjs +1589 -158
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +334 -6
- package/dist/index.d.ts +334 -6
- package/dist/index.js +1555 -158
- package/dist/index.js.map +1 -1
- package/dist/{symbol-families-De7sN-p5.d.cts → symbol-family-ids-elOgiCo8.d.cts} +27 -25
- package/dist/{symbol-families-De7sN-p5.d.ts → symbol-family-ids-elOgiCo8.d.ts} +27 -25
- package/package.json +1 -1
|
@@ -61,33 +61,35 @@ declare function getColorTable(name: ColorTableName): Record<string, string>;
|
|
|
61
61
|
declare function resolveColor(token: string, table?: ColorTableName): string;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* The symbol-artwork
|
|
64
|
+
* The symbol-artwork family ids, and the one name that used to be an id.
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
66
|
+
* No imports, on purpose: the style generator, the family helpers and the
|
|
67
|
+
* workers all read these, and none of them should pull another module in to
|
|
68
|
+
* do it.
|
|
69
|
+
*
|
|
70
|
+
* `raster` WAS the id of the paper-chart family until 2026-11 (shown as
|
|
71
|
+
* "CHRTraster"). It is `int1` now, after the standard it draws: IHO INT 1, the
|
|
72
|
+
* symbols of paper charts. The old id is stored and sent in too many places
|
|
73
|
+
* to drop: the Style API's `?symbols=`, offline packs on devices, CHRTweb's
|
|
74
|
+
* saved and synced settings, `/map?symbols=` links, and every published SDK.
|
|
75
|
+
* So every input accepts it, forever, and turns it into `int1` once, where it
|
|
76
|
+
* comes in. It is never listed as a family of its own.
|
|
71
77
|
*/
|
|
72
|
-
type SymbolFamily = "s52" | "s101" | "chrt" | "raster";
|
|
73
|
-
/** Every family, in presentation order. Mirrors the Style API's
|
|
74
|
-
* `?symbols=` values (SYMBOL_SET_PARAMS in the tile worker). */
|
|
75
|
-
declare const SYMBOL_FAMILIES: readonly SymbolFamily[];
|
|
76
|
-
interface SymbolFamilyMeta {
|
|
77
|
-
/** Short UI label. */
|
|
78
|
-
label: string;
|
|
79
|
-
/** One-line description of what the family is. */
|
|
80
|
-
description: string;
|
|
81
|
-
}
|
|
82
|
-
declare const SYMBOL_FAMILY_META: Record<SymbolFamily, SymbolFamilyMeta>;
|
|
83
|
-
/** Narrow an arbitrary string to a family, or null. Case-insensitive. */
|
|
84
|
-
declare function parseSymbolFamily(raw: string | null | undefined): SymbolFamily | null;
|
|
85
78
|
/**
|
|
86
|
-
*
|
|
87
|
-
* the
|
|
88
|
-
*
|
|
89
|
-
* exactly as they do on a served style.
|
|
79
|
+
* A symbol-artwork family: what a style draws its symbols with. `uschart1` is
|
|
80
|
+
* INT-1 with the aids drawn as U.S. Chart No. 1's NOAA column draws them
|
|
81
|
+
* (diamond buoys, filled daybeacons; uschart1-marks.ts).
|
|
90
82
|
*/
|
|
91
|
-
|
|
83
|
+
type SymbolFamily = "s52" | "s101" | "chrt" | "int1" | "uschart1";
|
|
84
|
+
/** The family ids before 2026-11 that are no longer ids, and what each became. */
|
|
85
|
+
declare const LEGACY_SYMBOL_FAMILY_ALIASES: {
|
|
86
|
+
readonly raster: "int1";
|
|
87
|
+
};
|
|
88
|
+
/** An old family id that is still accepted as input. */
|
|
89
|
+
type LegacySymbolFamily = keyof typeof LEGACY_SYMBOL_FAMILY_ALIASES;
|
|
90
|
+
/** What an input may say: a family, or an old id for one. */
|
|
91
|
+
type SymbolFamilyInput = SymbolFamily | LegacySymbolFamily;
|
|
92
|
+
/** The family an input names: itself, or what an old id became. */
|
|
93
|
+
declare function normalizeSymbolFamily(family: SymbolFamilyInput): SymbolFamily;
|
|
92
94
|
|
|
93
|
-
export { type ColorTableName as C, EINK_COLOR_TABLES as E,
|
|
95
|
+
export { type ColorTableName as C, EINK_COLOR_TABLES as E, LEGACY_SYMBOL_FAMILY_ALIASES as L, type SymbolFamilyInput as S, type SymbolFamily as a, EINK_MONO_GREYS as b, type LegacySymbolFamily as c, S52_COLORS as d, S52_DAY as e, S52_DUSK as f, S52_EINK_COLOR as g, S52_EINK_MONO as h, S52_EINK_NIGHT as i, S52_NIGHT as j, getColorTable as k, isEinkColorTable as l, isEinkGreyTable as m, normalizeSymbolFamily as n, resolveColor as r };
|
|
@@ -61,33 +61,35 @@ declare function getColorTable(name: ColorTableName): Record<string, string>;
|
|
|
61
61
|
declare function resolveColor(token: string, table?: ColorTableName): string;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* The symbol-artwork
|
|
64
|
+
* The symbol-artwork family ids, and the one name that used to be an id.
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
66
|
+
* No imports, on purpose: the style generator, the family helpers and the
|
|
67
|
+
* workers all read these, and none of them should pull another module in to
|
|
68
|
+
* do it.
|
|
69
|
+
*
|
|
70
|
+
* `raster` WAS the id of the paper-chart family until 2026-11 (shown as
|
|
71
|
+
* "CHRTraster"). It is `int1` now, after the standard it draws: IHO INT 1, the
|
|
72
|
+
* symbols of paper charts. The old id is stored and sent in too many places
|
|
73
|
+
* to drop: the Style API's `?symbols=`, offline packs on devices, CHRTweb's
|
|
74
|
+
* saved and synced settings, `/map?symbols=` links, and every published SDK.
|
|
75
|
+
* So every input accepts it, forever, and turns it into `int1` once, where it
|
|
76
|
+
* comes in. It is never listed as a family of its own.
|
|
71
77
|
*/
|
|
72
|
-
type SymbolFamily = "s52" | "s101" | "chrt" | "raster";
|
|
73
|
-
/** Every family, in presentation order. Mirrors the Style API's
|
|
74
|
-
* `?symbols=` values (SYMBOL_SET_PARAMS in the tile worker). */
|
|
75
|
-
declare const SYMBOL_FAMILIES: readonly SymbolFamily[];
|
|
76
|
-
interface SymbolFamilyMeta {
|
|
77
|
-
/** Short UI label. */
|
|
78
|
-
label: string;
|
|
79
|
-
/** One-line description of what the family is. */
|
|
80
|
-
description: string;
|
|
81
|
-
}
|
|
82
|
-
declare const SYMBOL_FAMILY_META: Record<SymbolFamily, SymbolFamilyMeta>;
|
|
83
|
-
/** Narrow an arbitrary string to a family, or null. Case-insensitive. */
|
|
84
|
-
declare function parseSymbolFamily(raw: string | null | undefined): SymbolFamily | null;
|
|
85
78
|
/**
|
|
86
|
-
*
|
|
87
|
-
* the
|
|
88
|
-
*
|
|
89
|
-
* exactly as they do on a served style.
|
|
79
|
+
* A symbol-artwork family: what a style draws its symbols with. `uschart1` is
|
|
80
|
+
* INT-1 with the aids drawn as U.S. Chart No. 1's NOAA column draws them
|
|
81
|
+
* (diamond buoys, filled daybeacons; uschart1-marks.ts).
|
|
90
82
|
*/
|
|
91
|
-
|
|
83
|
+
type SymbolFamily = "s52" | "s101" | "chrt" | "int1" | "uschart1";
|
|
84
|
+
/** The family ids before 2026-11 that are no longer ids, and what each became. */
|
|
85
|
+
declare const LEGACY_SYMBOL_FAMILY_ALIASES: {
|
|
86
|
+
readonly raster: "int1";
|
|
87
|
+
};
|
|
88
|
+
/** An old family id that is still accepted as input. */
|
|
89
|
+
type LegacySymbolFamily = keyof typeof LEGACY_SYMBOL_FAMILY_ALIASES;
|
|
90
|
+
/** What an input may say: a family, or an old id for one. */
|
|
91
|
+
type SymbolFamilyInput = SymbolFamily | LegacySymbolFamily;
|
|
92
|
+
/** The family an input names: itself, or what an old id became. */
|
|
93
|
+
declare function normalizeSymbolFamily(family: SymbolFamilyInput): SymbolFamily;
|
|
92
94
|
|
|
93
|
-
export { type ColorTableName as C, EINK_COLOR_TABLES as E,
|
|
95
|
+
export { type ColorTableName as C, EINK_COLOR_TABLES as E, LEGACY_SYMBOL_FAMILY_ALIASES as L, type SymbolFamilyInput as S, type SymbolFamily as a, EINK_MONO_GREYS as b, type LegacySymbolFamily as c, S52_COLORS as d, S52_DAY as e, S52_DUSK as f, S52_EINK_COLOR as g, S52_EINK_MONO as h, S52_EINK_NIGHT as i, S52_NIGHT as j, getColorTable as k, isEinkColorTable as l, isEinkGreyTable as m, normalizeSymbolFamily as n, resolveColor as r };
|