ol 8.1.1-dev.1694608919656 → 8.1.1-dev.1694687206621
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/Feature.d.ts +2 -2
- package/Feature.d.ts.map +1 -1
- package/Feature.js +1 -1
- package/color.d.ts +1 -1
- package/color.d.ts.map +1 -1
- package/color.js +12 -11
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/format/EsriJSON.d.ts +8 -0
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/Feature.d.ts +79 -5
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +151 -11
- package/format/GeoJSON.d.ts +11 -0
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +144 -52
- package/format/JSONFeature.d.ts +4 -24
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +4 -4
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +3 -2
- package/format/TopoJSON.d.ts +8 -0
- package/format/TopoJSON.d.ts.map +1 -1
- package/geom/SimpleGeometry.d.ts +5 -0
- package/geom/SimpleGeometry.d.ts.map +1 -1
- package/geom/SimpleGeometry.js +1 -1
- package/interaction/DragAndDrop.d.ts +1 -1
- package/interaction/Draw.d.ts +2 -2
- package/interaction/Modify.d.ts +1 -1
- package/interaction/Snap.d.ts +1 -1
- package/layer/BaseVector.d.ts +2 -2
- package/layer/Graticule.d.ts +2 -1
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Heatmap.d.ts +2 -2
- package/layer/Heatmap.js +1 -1
- package/layer/Vector.d.ts +1 -1
- package/layer/VectorImage.d.ts +2 -2
- package/layer/WebGLPoints.d.ts +4 -4
- package/layer/WebGLPoints.js +2 -2
- package/package.json +2 -1
- package/render/Feature.d.ts +33 -11
- package/render/Feature.d.ts.map +1 -1
- package/render/Feature.js +115 -21
- package/render/webgl/MixedGeometryBatch.d.ts.map +1 -1
- package/render/webgl/MixedGeometryBatch.js +1 -3
- package/source/Cluster.d.ts +2 -2
- package/source/Vector.d.ts +74 -66
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +98 -67
- package/util.js +1 -1
package/Feature.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type FeatureOnSignature<Return> = import("./Observable").OnSignature<impo
|
|
|
17
17
|
/**
|
|
18
18
|
* *
|
|
19
19
|
*/
|
|
20
|
-
export type ObjectWithGeometry<Geometry> = {
|
|
20
|
+
export type ObjectWithGeometry<Geometry extends import("./geom/Geometry.js").default = import("./geom/Geometry.js").default> = {
|
|
21
21
|
[x: string]: any;
|
|
22
22
|
} & {
|
|
23
23
|
geometry?: Geometry;
|
|
@@ -36,7 +36,7 @@ export type ObjectWithGeometry<Geometry> = {
|
|
|
36
36
|
* |'change:geometry', Return>} FeatureOnSignature
|
|
37
37
|
*/
|
|
38
38
|
/***
|
|
39
|
-
* @template Geometry
|
|
39
|
+
* @template {import("./geom/Geometry.js").default} [Geometry=import("./geom/Geometry.js").default]
|
|
40
40
|
* @typedef {Object<string, *> & { geometry?: Geometry }} ObjectWithGeometry
|
|
41
41
|
*/
|
|
42
42
|
/**
|
package/Feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names":[],"mappings":"AAkTA;;;;;;;GAOG;AACH,yCAJY,OAAO,kBAAkB,EAAE,aAAa,GAAE,MAAM,OAAO,kBAAkB,EAAE,OAAO,CAAC,GAAE,OAAO,kBAAkB,EAAE,OAAO,GAEvH,OAAO,kBAAkB,EAAE,aAAa,CAuBnD;;2BAtUY,cAAc,GAAC,cAAc,qBAAqB,EAAE,OAAO;0BAI3D,OAAO,GAAC,OAAO,qBAAqB,EAAE,OAAO;;;;yCAK7C,OAAO,cAAc,EAAE,WAAW,CAAC,OAAO,cAAc,EAAE,UAAU,EAAE,OAAO,mBAAmB,EAAE,OAAO,EAAE,MAAM,CAAC,GAC9H,OAAW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O,UAAU,EAAE,SAAS,CAAC,CAEnD;IAEP;;OAEG;IACH,MAFU,mBAAmB,OAAO,UAAU,EAAE,SAAS,CAAC,CAEjD;IAET;;OAEG;IACH,IAFU,mBAAmB,IAAI,CAAC,CAE3B;IAEP;;;OAGG;IACH,YAAoB;IAEpB;;;OAGG;IACH,sBAA+B;IAE/B;;;;OAIG;IACH,eAAkB;IAElB;;;OAGG;IACH,uBAA+B;IAE/B;;;OAGG;IACH,2BAA8B;IAoBhC;;;;;OAKG;IACH,SAHY,QAAQ,QAAQ,CAAC,CAiB5B;IAED;;;;;;;OAOG;IACH,eAJY,QAAQ,GAAC,SAAS,CAM7B;IAED;;;;;;OAMG;IACH,SAHY,MAAM,GAAC,MAAM,GAAC,SAAS,CAKlC;IAED;;;;;;OAMG;IACH,mBAJY,MAAM,CAMjB;IAED;;;;;OAKG;IACH,YAHY,OAAO,kBAAkB,EAAE,SAAS,GAAC,SAAS,CAKzD;IAED;;;;;OAKG;IACH,oBAJY,OAAO,kBAAkB,EAAE,aAAa,GAAC,SAAS,CAM7D;IAED;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,+BAeC;IAED;;;;;;OAMG;IACH,sBAJW,QAAQ,GAAC,SAAS,QAM5B;IAED;;;;;;;;OAQG;IACH,yEAIC;IAED;;;;;;;;OAQG;IACH,UAJW,MAAM,GAAC,MAAM,GAAC,SAAS,QAOjC;IAED;;;;;;OAMG;IACH,sBAHW,MAAM,QAQhB;CACF;uBA7SsB,aAAa"}
|
package/Feature.js
CHANGED
|
@@ -23,7 +23,7 @@ import {listen, unlistenByKey} from './events.js';
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/***
|
|
26
|
-
* @template Geometry
|
|
26
|
+
* @template {import("./geom/Geometry.js").default} [Geometry=import("./geom/Geometry.js").default]
|
|
27
27
|
* @typedef {Object<string, *> & { geometry?: Geometry }} ObjectWithGeometry
|
|
28
28
|
*/
|
|
29
29
|
|
package/color.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export function asString(color: Color | string): string;
|
|
|
14
14
|
*/
|
|
15
15
|
export function asArray(color: Color | string): Color;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Exported for the tests.
|
|
18
18
|
* @param {Color} color Color.
|
|
19
19
|
* @return {Color} Clamped color.
|
|
20
20
|
*/
|
package/color.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["color.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["color.js"],"names":[],"mappings":"AA+BA;;;;;GAKG;AACH,gCAJW,QAAM,MAAM,GACX,MAAM,CAQjB;AAwED;;;;;;GAMG;AACH,+BAJW,QAAM,MAAM,SAStB;AAwDD;;;;GAIG;AACH,+CAMC;AAED;;;GAGG;AACH,wCAFY,MAAM,CAiBjB;AAED;;;GAGG;AACH,iCAHW,MAAM,GACL,OAAO,CAOlB;AA1IG;;;GAGG;AACH,8BAHW,MAAM,SAsBhB;;;;;;;oBAnGQ,MAAM,MAAM,CAAC"}
|
package/color.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module ol/color
|
|
3
3
|
*/
|
|
4
|
+
import colorNames from 'color-name';
|
|
4
5
|
import {clamp} from './math.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -42,20 +43,20 @@ export function asString(color) {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
* Return named color as an
|
|
46
|
+
* Return named color as an rgb(a) string.
|
|
46
47
|
* @param {string} color Named color.
|
|
47
|
-
* @return {string}
|
|
48
|
+
* @return {string} RGB(A) string.
|
|
48
49
|
*/
|
|
49
50
|
function fromNamed(color) {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return rgb;
|
|
51
|
+
const name = color.toLowerCase();
|
|
52
|
+
if (!colorNames.hasOwnProperty(name)) {
|
|
53
|
+
if (name === 'transparent') {
|
|
54
|
+
return 'rgba(0,0,0,0)';
|
|
55
|
+
}
|
|
56
|
+
return '';
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
const rgb = colorNames[name];
|
|
59
|
+
return 'rgb(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ')';
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
/**
|
|
@@ -180,7 +181,7 @@ function fromStringInternal_(s) {
|
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
/**
|
|
183
|
-
*
|
|
184
|
+
* Exported for the tests.
|
|
184
185
|
* @param {Color} color Color.
|
|
185
186
|
* @return {Color} Clamped color.
|
|
186
187
|
*/
|