@versatiles/style 5.2.2 → 5.2.4
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/README.MD +13 -89
- package/dist/color/abstract.d.ts +6 -5
- package/dist/color/abstract.js +4 -0
- package/dist/color/hsl.d.ts +8 -8
- package/dist/color/hsl.js +17 -22
- package/dist/color/hsv.d.ts +8 -7
- package/dist/color/hsv.js +10 -11
- package/dist/color/index.d.ts +5 -5
- package/dist/color/index.js +16 -13
- package/dist/color/random.d.ts +1 -1
- package/dist/color/random.js +3 -2
- package/dist/color/rgb.d.ts +8 -8
- package/dist/color/rgb.js +25 -50
- package/dist/color/utils.js +1 -0
- package/dist/guess_style/guess_style.d.ts +1 -1
- package/dist/guess_style/guess_style.js +6 -5
- package/dist/guess_style/index.d.ts +2 -2
- package/dist/guess_style/index.js +2 -1
- package/dist/index.d.ts +15 -11
- package/dist/index.js +11 -3
- package/dist/lib/utils.js +2 -1
- package/dist/shortbread/index.d.ts +2 -2
- package/dist/shortbread/index.js +3 -2
- package/dist/shortbread/layers.d.ts +2 -2
- package/dist/shortbread/layers.js +1 -0
- package/dist/shortbread/properties.js +1 -0
- package/dist/shortbread/template.js +1 -0
- package/dist/style_builder/decorator.d.ts +3 -3
- package/dist/style_builder/decorator.js +4 -3
- package/dist/style_builder/recolor.d.ts +1 -1
- package/dist/style_builder/recolor.js +2 -1
- package/dist/style_builder/style_builder.d.ts +11 -11
- package/dist/style_builder/style_builder.js +14 -11
- package/dist/style_builder/types.d.ts +100 -19
- package/dist/style_builder/types.js +2 -0
- package/dist/styles/colorful.d.ts +5 -88
- package/dist/styles/colorful.js +2 -1
- package/dist/styles/eclipse.d.ts +1 -1
- package/dist/styles/eclipse.js +2 -1
- package/dist/styles/empty.d.ts +4 -9
- package/dist/styles/empty.js +4 -9
- package/dist/styles/graybeard.d.ts +1 -1
- package/dist/styles/graybeard.js +2 -1
- package/dist/styles/index.d.ts +10 -27
- package/dist/styles/index.js +6 -5
- package/dist/styles/neutrino.d.ts +5 -30
- package/dist/styles/neutrino.js +35 -4
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +3 -2
- package/dist/types/maplibre.js +1 -0
- package/dist/types/tilejson.d.ts +1 -1
- package/dist/types/tilejson.js +1 -0
- package/dist/types/vector_layer.js +1 -0
- package/package.json +11 -8
- package/dist/style_builder/index.d.ts +0 -1
- package/dist/style_builder/index.js +0 -1
package/dist/styles/neutrino.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class Neutrino extends
|
|
1
|
+
import Colorful from './colorful';
|
|
2
|
+
export default class Neutrino extends Colorful {
|
|
3
3
|
name = 'Neutrino';
|
|
4
4
|
defaultFonts = {
|
|
5
5
|
regular: 'noto_sans_regular',
|
|
@@ -17,7 +17,7 @@ export default class Neutrino extends StyleBuilder {
|
|
|
17
17
|
/** Color used for agricultural land. */
|
|
18
18
|
agriculture: '#f8eeee',
|
|
19
19
|
/** Color for site areas such as parks or recreational facilities. */
|
|
20
|
-
|
|
20
|
+
commercial: '#ebe8e6',
|
|
21
21
|
/** Primary color for buildings. */
|
|
22
22
|
building: '#e0d1d9',
|
|
23
23
|
/** Color for streets and roads. */
|
|
@@ -30,6 +30,36 @@ export default class Neutrino extends StyleBuilder {
|
|
|
30
30
|
rail: '#e8d5e0',
|
|
31
31
|
/** Primary color used for text labels. */
|
|
32
32
|
label: '#cbb7b7',
|
|
33
|
+
// Don't need these colors:
|
|
34
|
+
buildingbg: '#000',
|
|
35
|
+
burial: '#000',
|
|
36
|
+
construction: '#000',
|
|
37
|
+
cycle: '#000',
|
|
38
|
+
danger: '#000',
|
|
39
|
+
disputed: '#000',
|
|
40
|
+
education: '#000',
|
|
41
|
+
glacier: '#000',
|
|
42
|
+
hospital: '#000',
|
|
43
|
+
industrial: '#000',
|
|
44
|
+
labelHalo: '#000',
|
|
45
|
+
leisure: '#000',
|
|
46
|
+
motorway: '#000',
|
|
47
|
+
motorwaybg: '#000',
|
|
48
|
+
park: '#000',
|
|
49
|
+
parking: '#000',
|
|
50
|
+
poi: '#000',
|
|
51
|
+
prison: '#000',
|
|
52
|
+
residential: '#000',
|
|
53
|
+
rock: '#000',
|
|
54
|
+
sand: '#000',
|
|
55
|
+
shield: '#000',
|
|
56
|
+
streetbg: '#000',
|
|
57
|
+
subway: '#000',
|
|
58
|
+
symbol: '#000',
|
|
59
|
+
trunk: '#000',
|
|
60
|
+
trunkbg: '#000',
|
|
61
|
+
waste: '#000',
|
|
62
|
+
wetland: '#000',
|
|
33
63
|
};
|
|
34
64
|
getStyleRules(options) {
|
|
35
65
|
const { colors, fonts } = options;
|
|
@@ -103,7 +133,7 @@ export default class Neutrino extends StyleBuilder {
|
|
|
103
133
|
opacity: { 10: 0, 11: 1 },
|
|
104
134
|
},
|
|
105
135
|
'site-{bicycleparking,parking}': {
|
|
106
|
-
color: colors.
|
|
136
|
+
color: colors.commercial,
|
|
107
137
|
},
|
|
108
138
|
'building': {
|
|
109
139
|
color: colors.building,
|
|
@@ -368,3 +398,4 @@ export default class Neutrino extends StyleBuilder {
|
|
|
368
398
|
};
|
|
369
399
|
}
|
|
370
400
|
}
|
|
401
|
+
//# sourceMappingURL=neutrino.js.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { MaplibreLayerDefinition, MaplibreLayer } from './maplibre
|
|
2
|
-
export type { VectorLayer } from './vector_layer
|
|
3
|
-
export { isTileJSONSpecification } from './tilejson
|
|
4
|
-
export type { TileJSONSpecification, TileJSONSpecificationRaster, TileJSONSpecificationVector } from './tilejson
|
|
5
|
-
export { isVectorLayers } from './vector_layer
|
|
1
|
+
export type { MaplibreLayerDefinition, MaplibreLayer } from './maplibre';
|
|
2
|
+
export type { VectorLayer } from './vector_layer';
|
|
3
|
+
export { isTileJSONSpecification } from './tilejson';
|
|
4
|
+
export type { TileJSONSpecification, TileJSONSpecificationRaster, TileJSONSpecificationVector } from './tilejson';
|
|
5
|
+
export { isVectorLayers } from './vector_layer';
|
package/dist/types/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { isTileJSONSpecification } from './tilejson
|
|
2
|
-
export { isVectorLayers } from './vector_layer
|
|
1
|
+
export { isTileJSONSpecification } from './tilejson';
|
|
2
|
+
export { isVectorLayers } from './vector_layer';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
package/dist/types/maplibre.js
CHANGED
package/dist/types/tilejson.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VectorLayer } from './vector_layer
|
|
1
|
+
import type { VectorLayer } from './vector_layer';
|
|
2
2
|
/** Basic structure for TileJSON specification, applicable to both raster and vector types. */
|
|
3
3
|
export interface TileJSONSpecificationRaster {
|
|
4
4
|
tilejson?: '3.0.0';
|
package/dist/types/tilejson.js
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versatiles/style",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.4",
|
|
4
4
|
"description": "Generate StyleJSON for MapLibre",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"check": "npm run lint && npm run test && npm run build",
|
|
9
|
-
"build": "rm -rf release; npm run build-browser && npm run build-node && npm run build-styles && npm run build-sprites",
|
|
9
|
+
"build": "rm -rf release; npm run build-browser && npm run build-node && npm run build-styles && npm run build-sprites && npm run doc",
|
|
10
10
|
"build-browser": "rollup -c=rollup.config.js && $(cd release/versatiles-style; tar -cf - versatiles-style.* | gzip -9 > ../versatiles-style.tar.gz)",
|
|
11
11
|
"build-node": "rm -rf dist && tsc -p tsconfig.node.json && chmod +x dist/index.js",
|
|
12
12
|
"build-styles": "tsx scripts/build-styles.ts",
|
|
13
13
|
"build-sprites": "tsx scripts/build-sprites.ts",
|
|
14
14
|
"dev": "tsx scripts/dev.ts",
|
|
15
|
-
"
|
|
15
|
+
"doc": "tsx scripts/screenshots.ts && typedoc --options typedoc.json",
|
|
16
16
|
"lint": "eslint --color .",
|
|
17
17
|
"prepack": "npm run build",
|
|
18
18
|
"release": "npx vrt release-npm",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"dist/**/*.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"devDependencies": {
|
|
39
|
+
"@maplibre/maplibre-gl-native": "^6.0.0",
|
|
39
40
|
"@maplibre/maplibre-gl-style-spec": "^23.1.0",
|
|
40
41
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
41
42
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
@@ -45,10 +46,10 @@
|
|
|
45
46
|
"@types/brace-expansion": "^1.1.2",
|
|
46
47
|
"@types/inquirer": "^9.0.7",
|
|
47
48
|
"@types/jest": "^29.5.14",
|
|
48
|
-
"@types/node": "^22.10.
|
|
49
|
+
"@types/node": "^22.10.10",
|
|
49
50
|
"@types/tar-stream": "^3.1.3",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
51
|
-
"@typescript-eslint/parser": "^8.
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
52
|
+
"@typescript-eslint/parser": "^8.21.0",
|
|
52
53
|
"@versatiles/release-tool": "^1.2.6",
|
|
53
54
|
"bin-pack": "^1.0.2",
|
|
54
55
|
"eslint": "^9.18.0",
|
|
@@ -57,14 +58,16 @@
|
|
|
57
58
|
"jest-environment-jsdom": "^29.7.0",
|
|
58
59
|
"jest-ts-webcompat-resolver": "^1.0.0",
|
|
59
60
|
"npm-check-updates": "^17.1.14",
|
|
60
|
-
"rollup": "^4.
|
|
61
|
+
"rollup": "^4.32.0",
|
|
61
62
|
"rollup-plugin-dts": "^6.1.1",
|
|
62
63
|
"sharp": "^0.33.5",
|
|
63
64
|
"tar-stream": "^3.1.7",
|
|
64
65
|
"ts-jest": "^29.2.5",
|
|
65
66
|
"ts-node": "^10.9.2",
|
|
66
67
|
"tsx": "^4.19.2",
|
|
68
|
+
"typedoc": "^0.27.6",
|
|
69
|
+
"typedoc-plugin-markdown": "^4.4.1",
|
|
67
70
|
"typescript": "^5.7.3",
|
|
68
|
-
"typescript-eslint": "^8.
|
|
71
|
+
"typescript-eslint": "^8.21.0"
|
|
69
72
|
}
|
|
70
73
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Language } from './types.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|