@mark1russell7/cartography-emergency 0.0.0-stage → 0.1.1
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 +21 -0
- package/README.md +33 -2
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mark Russell
|
|
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
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mark1russell7/cartography-emergency
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The add-on of `@mark1russell7/cartography` for emergency maps. Each function gives layers of the core, with black and white styles for a print with no color.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { renderMap } from "@mark1russell7/cartography";
|
|
7
|
+
import { evacuationRouteLayer, evacuationZoneLayers, shelterLayer } from "@mark1russell7/cartography-emergency";
|
|
8
|
+
|
|
9
|
+
const layers = [
|
|
10
|
+
...evacuationZoneLayers(zones, { property: "zone", zones: [{ value: "A", legend: "Zone A" }, { value: "B", legend: "Zone B" }], source }),
|
|
11
|
+
evacuationRouteLayer(routes, source),
|
|
12
|
+
shelterLayer(shelters, source),
|
|
13
|
+
];
|
|
14
|
+
const svg = renderMap({ id: "evacuation", title: "Evacuation zones and shelters", frame, layers });
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## The functions
|
|
18
|
+
|
|
19
|
+
| Function | Result |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `evacuationZoneLayers(features, options)` | One layer for each zone. The first zone has the densest hatch. |
|
|
22
|
+
| `shelterLayer(features, source, options)` | The layer of the shelters: an open square for a point, and a dark gray area for a building. |
|
|
23
|
+
| `evacuationRouteLayer(features, source, options)` | The layer of the routes: a dashed black line of 0.8 mm. |
|
|
24
|
+
| `zoneHatch(index)` | The hatch of a zone from its position in the sequence of the zones. |
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- Give the zones in their sequence: the first zone to leave first. A map has from 1 to `MAX_EVACUATION_ZONES` zones.
|
|
29
|
+
- Each layer keeps only the features of its kind. Thus all the layers can use one feature collection.
|
|
30
|
+
- The add-on gives no data. The features and their sources are input data.
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The add-on of `@mark1russell7/cartography` for emergency maps: evacuation zones, shelters and evacuation routes.
|
|
3
|
+
* Each function gives layers of the core, with black and white styles for a print with no color.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import { FilterValue, HatchStyle, Layer, Source } from "@mark1russell7/cartography";
|
|
8
|
+
/** The features of a layer: GeoJSON features with positions `[lon, lat]` on WGS84. */
|
|
9
|
+
export type Features = Layer["features"];
|
|
10
|
+
/** An evacuation zone: a value of the property of the zone features, and its text in the legend. */
|
|
11
|
+
export interface EvacuationZone {
|
|
12
|
+
/** The value of the property of the zone, for example `A` or `1`. */
|
|
13
|
+
readonly value: FilterValue;
|
|
14
|
+
/** The text of the zone in the legend, for example `Zone A`. */
|
|
15
|
+
readonly legend: string;
|
|
16
|
+
}
|
|
17
|
+
/** The options of `evacuationZoneLayers`. */
|
|
18
|
+
export interface EvacuationZoneOptions {
|
|
19
|
+
/** The property of a feature that has the zone, for example `zone`. */
|
|
20
|
+
readonly property: string;
|
|
21
|
+
/** The zones, the first zone to leave first. The first zone gets the densest hatch. */
|
|
22
|
+
readonly zones: readonly EvacuationZone[];
|
|
23
|
+
/** The source of the zone features. */
|
|
24
|
+
readonly source: Source;
|
|
25
|
+
}
|
|
26
|
+
/** The options of `shelterLayer` and `evacuationRouteLayer`. */
|
|
27
|
+
export interface EmergencyLayerOptions {
|
|
28
|
+
/** The identifier of the layer. The default is `shelters` or `evacuation-routes`. */
|
|
29
|
+
readonly id?: string;
|
|
30
|
+
/** The text of the layer in the legend. The default is `Shelter` or `Evacuation route`. */
|
|
31
|
+
readonly legend?: string;
|
|
32
|
+
}
|
|
33
|
+
/** The maximum number of evacuation zones on one map. More zones give hatches that a reader cannot tell apart. */
|
|
34
|
+
export declare const MAX_EVACUATION_ZONES = 6;
|
|
35
|
+
/**
|
|
36
|
+
* This function gives the hatch of a zone from its position in the sequence. The first zone has a cross hatch with
|
|
37
|
+
* the smallest spacing. Each next zone has a larger spacing and a different angle.
|
|
38
|
+
*/
|
|
39
|
+
export declare function zoneHatch(index: number): HatchStyle;
|
|
40
|
+
/**
|
|
41
|
+
* This function gives one layer for each evacuation zone, in the sequence of the zones. Each layer keeps the areas
|
|
42
|
+
* whose property has the value of its zone. Each area has the hatch of `zoneHatch` and a line of 0.3 mm on its edge.
|
|
43
|
+
*
|
|
44
|
+
* @throws MapError - The code is `style`: there is no zone, there are more than `MAX_EVACUATION_ZONES` zones, or two
|
|
45
|
+
* zones have the same value.
|
|
46
|
+
*/
|
|
47
|
+
export declare function evacuationZoneLayers(features: Features, options: EvacuationZoneOptions): Layer[];
|
|
48
|
+
/**
|
|
49
|
+
* This function gives the layer of the shelters. A shelter point has an open square of 3 mm. A shelter area, for
|
|
50
|
+
* example a building, has a dark gray fill and a black edge.
|
|
51
|
+
*/
|
|
52
|
+
export declare function shelterLayer(features: Features, source: Source, options?: EmergencyLayerOptions): Layer;
|
|
53
|
+
/** This function gives the layer of the evacuation routes: a dashed black line of 0.8 mm. */
|
|
54
|
+
export declare function evacuationRouteLayer(features: Features, source: Source, options?: EmergencyLayerOptions): Layer;
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;YAUY,WAAW;;iBAGN;;WAEN,OAAO;;WAEP;;;iBAIM;;WAEN;;WAEA,gBAAgB;;WAEhB,QAAQ;;;iBAIF;;WAEN;;WAEA;;;qBAIE;;;;;wBAQG,UAAU,gBAAgB;;;;;;;;wBAW1B,qBAAqB,UAAU,UAAU,SAAS,wBAAwB;;;;;wBAqB1E,aAAa,UAAU,UAAU,QAAQ,QAAQ,UAAS,wBAA6B;;wBAYvF,qBAAqB,UAAU,UAAU,QAAQ,QAAQ,UAAS,wBAA6B"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { MapError } from "@mark1russell7/cartography";
|
|
2
|
+
// src/index.ts
|
|
3
|
+
/**
|
|
4
|
+
* The add-on of `@mark1russell7/cartography` for emergency maps: evacuation zones, shelters and evacuation routes.
|
|
5
|
+
* Each function gives layers of the core, with black and white styles for a print with no color.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/** The maximum number of evacuation zones on one map. More zones give hatches that a reader cannot tell apart. */
|
|
10
|
+
const MAX_EVACUATION_ZONES = 6;
|
|
11
|
+
const ANGLES = [
|
|
12
|
+
45,
|
|
13
|
+
-45,
|
|
14
|
+
0,
|
|
15
|
+
90
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* This function gives the hatch of a zone from its position in the sequence. The first zone has a cross hatch with
|
|
19
|
+
* the smallest spacing. Each next zone has a larger spacing and a different angle.
|
|
20
|
+
*/
|
|
21
|
+
function zoneHatch(index) {
|
|
22
|
+
return {
|
|
23
|
+
angleDegrees: ANGLES[index % ANGLES.length],
|
|
24
|
+
spacingMm: 1.2 + .8 * index,
|
|
25
|
+
widthMm: .25,
|
|
26
|
+
cross: index === 0
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* This function gives one layer for each evacuation zone, in the sequence of the zones. Each layer keeps the areas
|
|
31
|
+
* whose property has the value of its zone. Each area has the hatch of `zoneHatch` and a line of 0.3 mm on its edge.
|
|
32
|
+
*
|
|
33
|
+
* @throws MapError - The code is `style`: there is no zone, there are more than `MAX_EVACUATION_ZONES` zones, or two
|
|
34
|
+
* zones have the same value.
|
|
35
|
+
*/
|
|
36
|
+
function evacuationZoneLayers(features, options) {
|
|
37
|
+
const { property, zones, source } = options;
|
|
38
|
+
if (zones.length === 0 || zones.length > 6) throw new MapError("style", `The number of evacuation zones ${zones.length} is not from 1 to 6`);
|
|
39
|
+
if (new Set(zones.map((zone) => zone.value)).size !== zones.length) throw new MapError("style", "Two evacuation zones have the same value");
|
|
40
|
+
return zones.map((zone, index) => ({
|
|
41
|
+
id: `evacuation-zone-${index + 1}`,
|
|
42
|
+
features,
|
|
43
|
+
filter: { all: [{ geometry: "area" }, {
|
|
44
|
+
property,
|
|
45
|
+
in: [zone.value]
|
|
46
|
+
}] },
|
|
47
|
+
style: {
|
|
48
|
+
fill: { hatch: zoneHatch(index) },
|
|
49
|
+
stroke: { widthMm: .3 }
|
|
50
|
+
},
|
|
51
|
+
source,
|
|
52
|
+
legend: zone.legend
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* This function gives the layer of the shelters. A shelter point has an open square of 3 mm. A shelter area, for
|
|
57
|
+
* example a building, has a dark gray fill and a black edge.
|
|
58
|
+
*/
|
|
59
|
+
function shelterLayer(features, source, options = {}) {
|
|
60
|
+
return {
|
|
61
|
+
id: options.id ?? "shelters",
|
|
62
|
+
features,
|
|
63
|
+
filter: { any: [{ geometry: "point" }, { geometry: "area" }] },
|
|
64
|
+
style: {
|
|
65
|
+
point: {
|
|
66
|
+
symbol: "square",
|
|
67
|
+
sizeMm: 3,
|
|
68
|
+
filled: false
|
|
69
|
+
},
|
|
70
|
+
fill: { gray: .35 },
|
|
71
|
+
stroke: { widthMm: .25 }
|
|
72
|
+
},
|
|
73
|
+
source,
|
|
74
|
+
legend: options.legend ?? "Shelter"
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** This function gives the layer of the evacuation routes: a dashed black line of 0.8 mm. */
|
|
78
|
+
function evacuationRouteLayer(features, source, options = {}) {
|
|
79
|
+
return {
|
|
80
|
+
id: options.id ?? "evacuation-routes",
|
|
81
|
+
features,
|
|
82
|
+
filter: { geometry: "line" },
|
|
83
|
+
style: { stroke: {
|
|
84
|
+
widthMm: .8,
|
|
85
|
+
dashMm: [3, 1.5]
|
|
86
|
+
} },
|
|
87
|
+
source,
|
|
88
|
+
legend: options.legend ?? "Evacuation route"
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export { MAX_EVACUATION_ZONES, evacuationRouteLayer, evacuationZoneLayers, shelterLayer, zoneHatch };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * The add-on of `@mark1russell7/cartography` for emergency maps: evacuation zones, shelters and evacuation routes.\n * Each function gives layers of the core, with black and white styles for a print with no color.\n *\n * @packageDocumentation\n */\n\nimport { MapError, type FilterValue, type HatchStyle, type Layer, type Source } from \"@mark1russell7/cartography\";\n\n/** The features of a layer: GeoJSON features with positions `[lon, lat]` on WGS84. */\nexport type Features = Layer[\"features\"];\n\n/** An evacuation zone: a value of the property of the zone features, and its text in the legend. */\nexport interface EvacuationZone {\n /** The value of the property of the zone, for example `A` or `1`. */\n readonly value: FilterValue;\n /** The text of the zone in the legend, for example `Zone A`. */\n readonly legend: string;\n}\n\n/** The options of `evacuationZoneLayers`. */\nexport interface EvacuationZoneOptions {\n /** The property of a feature that has the zone, for example `zone`. */\n readonly property: string;\n /** The zones, the first zone to leave first. The first zone gets the densest hatch. */\n readonly zones: readonly EvacuationZone[];\n /** The source of the zone features. */\n readonly source: Source;\n}\n\n/** The options of `shelterLayer` and `evacuationRouteLayer`. */\nexport interface EmergencyLayerOptions {\n /** The identifier of the layer. The default is `shelters` or `evacuation-routes`. */\n readonly id?: string;\n /** The text of the layer in the legend. The default is `Shelter` or `Evacuation route`. */\n readonly legend?: string;\n}\n\n/** The maximum number of evacuation zones on one map. More zones give hatches that a reader cannot tell apart. */\nexport const MAX_EVACUATION_ZONES = 6;\n\nconst ANGLES = [45, -45, 0, 90] as const;\n\n/**\n * This function gives the hatch of a zone from its position in the sequence. The first zone has a cross hatch with\n * the smallest spacing. Each next zone has a larger spacing and a different angle.\n */\nexport function zoneHatch(index: number): HatchStyle {\n return { angleDegrees: ANGLES[index % ANGLES.length]!, spacingMm: 1.2 + 0.8 * index, widthMm: 0.25, cross: index === 0 };\n}\n\n/**\n * This function gives one layer for each evacuation zone, in the sequence of the zones. Each layer keeps the areas\n * whose property has the value of its zone. Each area has the hatch of `zoneHatch` and a line of 0.3 mm on its edge.\n *\n * @throws MapError - The code is `style`: there is no zone, there are more than `MAX_EVACUATION_ZONES` zones, or two\n * zones have the same value.\n */\nexport function evacuationZoneLayers(features: Features, options: EvacuationZoneOptions): Layer[] {\n const { property, zones, source } = options;\n if (zones.length === 0 || zones.length > MAX_EVACUATION_ZONES) {\n throw new MapError(\"style\", `The number of evacuation zones ${zones.length} is not from 1 to ${MAX_EVACUATION_ZONES}`);\n }\n const values = new Set(zones.map((zone) => zone.value));\n if (values.size !== zones.length) throw new MapError(\"style\", \"Two evacuation zones have the same value\");\n return zones.map((zone, index) => ({\n id: `evacuation-zone-${index + 1}`,\n features,\n filter: { all: [{ geometry: \"area\" }, { property, in: [zone.value] }] },\n style: { fill: { hatch: zoneHatch(index) }, stroke: { widthMm: 0.3 } },\n source,\n legend: zone.legend,\n }));\n}\n\n/**\n * This function gives the layer of the shelters. A shelter point has an open square of 3 mm. A shelter area, for\n * example a building, has a dark gray fill and a black edge.\n */\nexport function shelterLayer(features: Features, source: Source, options: EmergencyLayerOptions = {}): Layer {\n return {\n id: options.id ?? \"shelters\",\n features,\n filter: { any: [{ geometry: \"point\" }, { geometry: \"area\" }] },\n style: { point: { symbol: \"square\", sizeMm: 3, filled: false }, fill: { gray: 0.35 }, stroke: { widthMm: 0.25 } },\n source,\n legend: options.legend ?? \"Shelter\",\n };\n}\n\n/** This function gives the layer of the evacuation routes: a dashed black line of 0.8 mm. */\nexport function evacuationRouteLayer(features: Features, source: Source, options: EmergencyLayerOptions = {}): Layer {\n return {\n id: options.id ?? \"evacuation-routes\",\n features,\n filter: { geometry: \"line\" },\n style: { stroke: { widthMm: 0.8, dashMm: [3, 1.5] } },\n source,\n legend: options.legend ?? \"Evacuation route\",\n };\n}\n"],"mappings":";;;;;;;;;AAuCA,MAAa,uBAAuB;AAEpC,MAAM,SAAS;CAAC;CAAI;CAAK;CAAG;AAAE;;;;;AAM9B,SAAgB,UAAU,OAA2B;CACnD,OAAO;EAAE,cAAc,OAAO,QAAQ,OAAO;EAAU,WAAW,MAAM,KAAM;EAAO,SAAS;EAAM,OAAO,UAAU;CAAE;AACzH;;;;;;;;AASA,SAAgB,qBAAqB,UAAoB,SAAyC;CAChG,MAAM,EAAE,UAAU,OAAO,WAAW;CACpC,IAAI,MAAM,WAAW,KAAK,MAAM,SAAA,GAC9B,MAAM,IAAI,SAAS,SAAS,kCAAkC,MAAM,OAAO,oBAA0C;CAGvH,IAAI,IADe,IAAI,MAAM,KAAK,SAAS,KAAK,KAAK,CAC5C,CAAC,CAAC,SAAS,MAAM,QAAQ,MAAM,IAAI,SAAS,SAAS,0CAA0C;CACxG,OAAO,MAAM,KAAK,MAAM,WAAW;EACjC,IAAI,mBAAmB,QAAQ;EAC/B;EACA,QAAQ,EAAE,KAAK,CAAC,EAAE,UAAU,OAAO,GAAG;GAAE;GAAU,IAAI,CAAC,KAAK,KAAK;EAAE,CAAC,EAAE;EACtE,OAAO;GAAE,MAAM,EAAE,OAAO,UAAU,KAAK,EAAE;GAAG,QAAQ,EAAE,SAAS,GAAI;EAAE;EACrE;EACA,QAAQ,KAAK;CACf,EAAE;AACJ;;;;;AAMA,SAAgB,aAAa,UAAoB,QAAgB,UAAiC,CAAC,GAAU;CAC3G,OAAO;EACL,IAAI,QAAQ,MAAM;EAClB;EACA,QAAQ,EAAE,KAAK,CAAC,EAAE,UAAU,QAAQ,GAAG,EAAE,UAAU,OAAO,CAAC,EAAE;EAC7D,OAAO;GAAE,OAAO;IAAE,QAAQ;IAAU,QAAQ;IAAG,QAAQ;GAAM;GAAG,MAAM,EAAE,MAAM,IAAK;GAAG,QAAQ,EAAE,SAAS,IAAK;EAAE;EAChH;EACA,QAAQ,QAAQ,UAAU;CAC5B;AACF;;AAGA,SAAgB,qBAAqB,UAAoB,QAAgB,UAAiC,CAAC,GAAU;CACnH,OAAO;EACL,IAAI,QAAQ,MAAM;EAClB;EACA,QAAQ,EAAE,UAAU,OAAO;EAC3B,OAAO,EAAE,QAAQ;GAAE,SAAS;GAAK,QAAQ,CAAC,GAAG,GAAG;EAAE,EAAE;EACpD;EACA,QAAQ,QAAQ,UAAU;CAC5B;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/package",
|
|
2
3
|
"name": "@mark1russell7/cartography-emergency",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"version": "0.1.1",
|
|
5
|
+
"description": "An add-on of @mark1russell7/cartography: the layers of evacuation zones, evacuation routes and shelters, in black and white.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"map",
|
|
8
|
+
"cartography",
|
|
9
|
+
"emergency",
|
|
10
|
+
"evacuation",
|
|
11
|
+
"shelter"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/mark1russell7/cartography/tree/main/packages/cartography-emergency#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/mark1russell7/cartography/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/mark1russell7/cartography.git",
|
|
20
|
+
"directory": "packages/cartography-emergency"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"!dist/.tsbuildinfo"
|
|
29
|
+
],
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=22.12"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@mark1russell7/cartography": "0.1.1"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@mark1russell7/cue": "^2.0.0",
|
|
41
|
+
"@types/node": "^26.6.5",
|
|
42
|
+
"@vitest/coverage-v8": "^5.0.3",
|
|
43
|
+
"typescript": "^7.0.2",
|
|
44
|
+
"vitest": "^5.0.3",
|
|
45
|
+
"tsdown": "^0.23.7"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsdown",
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"test:watch": "vitest",
|
|
51
|
+
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.test.json"
|
|
52
|
+
},
|
|
53
|
+
"types": "./dist/index.d.ts",
|
|
54
|
+
"exports": {
|
|
55
|
+
".": {
|
|
56
|
+
"types": "./dist/index.d.ts",
|
|
57
|
+
"import": "./dist/index.js",
|
|
58
|
+
"default": "./dist/index.js"
|
|
59
|
+
},
|
|
60
|
+
"./package.json": "./package.json"
|
|
61
|
+
}
|
|
6
62
|
}
|