@geoblocks/elevation-profile 0.0.1 → 0.0.2
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/elevation-profile.ts
CHANGED
|
@@ -12,14 +12,14 @@ import {select, pointer} from 'd3-selection';
|
|
|
12
12
|
|
|
13
13
|
@customElement('elevation-profile')
|
|
14
14
|
export class ElevationProfile extends LitElement {
|
|
15
|
-
@property({type: Array}) lines = [];
|
|
15
|
+
@property({type: Array}) lines: number[][] = [];
|
|
16
16
|
@property({type: Object}) margin = {top: 20, right: 20, bottom: 20, left: 40};
|
|
17
17
|
@property({type: Object}) tickSize = {x: 100, y: 40};
|
|
18
18
|
|
|
19
19
|
@state() pointer = {x: 0, y: 0};
|
|
20
20
|
private resizeController = new ResizeController(this, {});
|
|
21
21
|
|
|
22
|
-
private plotData;
|
|
22
|
+
private plotData: number[][] = [];
|
|
23
23
|
private scaleX = scaleLinear();
|
|
24
24
|
private scaleY = scaleLinear();
|
|
25
25
|
|
|
@@ -147,3 +147,10 @@ export class ElevationProfile extends LitElement {
|
|
|
147
147
|
return this;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
declare global {
|
|
153
|
+
interface HTMLElementTagNameMap {
|
|
154
|
+
'elevation-profile': ElevationProfile;
|
|
155
|
+
}
|
|
156
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geoblocks/elevation-profile",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": "github:geoblocks/elevation-profile",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"source": "elevation-profile.ts",
|
|
8
|
+
"main": "dist/elevation-profile.js",
|
|
9
|
+
"types": "dist/elevation-profile.d.ts",
|
|
7
10
|
"publishConfig": {
|
|
8
11
|
"access": "public"
|
|
9
12
|
},
|
|
@@ -11,11 +14,18 @@
|
|
|
11
14
|
"elevation-profile.ts",
|
|
12
15
|
"dist/"
|
|
13
16
|
],
|
|
17
|
+
"targets": {
|
|
18
|
+
"demo": {
|
|
19
|
+
"context": "browser",
|
|
20
|
+
"distDir": "build",
|
|
21
|
+
"publicUrl": "./"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
14
24
|
"scripts": {
|
|
15
25
|
"start": "parcel index.html",
|
|
16
26
|
"build": "rm -rf dist && parcel build",
|
|
17
|
-
"build-demo": "parcel build index.html",
|
|
18
|
-
"publish-demo": "rm -rf
|
|
27
|
+
"build-demo": "parcel build --target demo index.html",
|
|
28
|
+
"publish-demo": "rm -rf build && npm run build-demo && gh-pages -d build"
|
|
19
29
|
},
|
|
20
30
|
"dependencies": {
|
|
21
31
|
"@lit-labs/observers": "2.0.2",
|
|
@@ -27,8 +37,11 @@
|
|
|
27
37
|
"lit": "3.0.2"
|
|
28
38
|
},
|
|
29
39
|
"devDependencies": {
|
|
30
|
-
"@
|
|
40
|
+
"@parcel/packager-ts": "2.10.2",
|
|
41
|
+
"@parcel/transformer-typescript-tsc": "2.10.2",
|
|
42
|
+
"@parcel/transformer-typescript-types": "2.10.2",
|
|
31
43
|
"gh-pages": "6.0.0",
|
|
32
|
-
"parcel": "2.10.2"
|
|
44
|
+
"parcel": "2.10.2",
|
|
45
|
+
"typescript": "5.2.2"
|
|
33
46
|
}
|
|
34
47
|
}
|