@opengis/widgets 0.0.65 → 0.0.66

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.
@@ -0,0 +1,10 @@
1
+ interface Props {
2
+ oldWkt?: string | null;
3
+ newWkt?: string | null;
4
+ }
5
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
6
+ oldWkt: string | null;
7
+ newWkt: string | null;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
10
+ //# sourceMappingURL=GeomChange.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeomChange.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/history/GeomChange.vue"],"names":[],"mappings":"AAsIA,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;;YAFU,MAAM,GAAG,IAAI;YACb,MAAM,GAAG,IAAI;;AAqRxB,wBAOG"}
@@ -1 +1 @@
1
- {"version":3,"file":"HistoryWidget.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/history/HistoryWidget.vue"],"names":[],"mappings":"AAoPA,OAAO,KAAK,EAAkC,kBAAkB,EAAE,MAAM,aAAa,CAAC;;;;;AA8gBtF,wBAOG"}
1
+ {"version":3,"file":"HistoryWidget.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/history/HistoryWidget.vue"],"names":[],"mappings":"AAkQA,OAAO,KAAK,EAAkC,kBAAkB,EAAE,MAAM,aAAa,CAAC;;;;;AA+iBtF,wBAOG"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Fast WKT → GeoJSON parser.
3
+ * Supports: POINT, LINESTRING, POLYGON.
4
+ * Also handles bare "lon,lat" strings (legacy format).
5
+ */
6
+ export type GeoJSONGeometry = {
7
+ type: "Point";
8
+ coordinates: [number, number];
9
+ } | {
10
+ type: "LineString";
11
+ coordinates: [number, number][];
12
+ } | {
13
+ type: "Polygon";
14
+ coordinates: [number, number][][];
15
+ };
16
+ /**
17
+ * Parses WKT string to GeoJSON geometry.
18
+ * Returns null if input is empty or parsing fails.
19
+ */
20
+ export declare function wktToGeoJSON(wkt: string | null | undefined): GeoJSONGeometry | null;
21
+ /**
22
+ * Checks if a string looks like WKT geometry (POINT, LINESTRING, POLYGON).
23
+ */
24
+ export declare function isWktGeometry(value: string | null | undefined): boolean;
25
+ /**
26
+ * Computes [minLng, minLat, maxLng, maxLat] from GeoJSON geometry.
27
+ */
28
+ export declare function computeBoundsFromGeometry(geom: GeoJSONGeometry | null): [number, number, number, number] | null;
29
+ /**
30
+ * Merges two bounds into one encompassing bbox.
31
+ */
32
+ export declare function mergeBounds(a: [number, number, number, number] | null, b: [number, number, number, number] | null): [number, number, number, number] | null;
33
+ /**
34
+ * Returns center [lng, lat] from bounds.
35
+ */
36
+ export declare function centerFromBounds(bounds: [number, number, number, number]): [number, number];
37
+ /**
38
+ * Extracts flat coordinate pairs from geometry (for Polygon/LineString uses first ring/line).
39
+ * For Polygon, drops the closing duplicate point (last === first) so we compare unique vertices.
40
+ */
41
+ export declare function getCoordinatesFromGeometry(geom: GeoJSONGeometry | null): [number, number][];
42
+ /**
43
+ * Counts vertices that differ between old and new geometry.
44
+ * Two coords match if within COORD_EPS. Returns count of unmatched vertices (added, removed, or moved).
45
+ */
46
+ export declare function countChangedVertices(oldGeom: GeoJSONGeometry | null, newGeom: GeoJSONGeometry | null): number;
47
+ /**
48
+ * Returns coordinates of changed vertices (unmatched in old or new).
49
+ */
50
+ export declare function getChangedVertexCoords(oldGeom: GeoJSONGeometry | null, newGeom: GeoJSONGeometry | null): {
51
+ removed: [number, number][];
52
+ added: [number, number][];
53
+ };
54
+ /**
55
+ * Converts GeoJSON geometry to FeatureCollection for MapWidget.
56
+ */
57
+ export declare function geomToFeatureCollection(geom: GeoJSONGeometry | null): {
58
+ type: "FeatureCollection";
59
+ features: Array<{
60
+ type: "Feature";
61
+ geometry: GeoJSONGeometry;
62
+ }>;
63
+ } | null;
64
+ //# sourceMappingURL=wkt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wkt.d.ts","sourceRoot":"","sources":["../../../src/widgets/history/wkt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAA;CAAE,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CA6CnF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMvE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAyB/G;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAC1C,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GACzC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CASzC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAG3F;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAiB3F;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,eAAe,GAAG,IAAI,EAC/B,OAAO,EAAE,eAAe,GAAG,IAAI,GAC9B,MAAM,CAwBR;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,GAAG,IAAI,EAC/B,OAAO,EAAE,eAAe,GAAG,IAAI,GAC9B;IAAE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;CAAE,CAoB5D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,QAAQ,EAAE,eAAe,CAAA;KAAE,CAAC,CAAA;CAAE,GAAG,IAAI,CAM3K"}
@@ -3,18 +3,20 @@ interface LegendDefinition {
3
3
  color?: string;
4
4
  label?: string;
5
5
  }
6
- type ToolName = "home" | "fullscreen" | "scale" | "position" | "search";
7
- type __VLS_Props = {
6
+ interface Props {
8
7
  height?: string | number;
9
8
  center?: [number, number];
10
9
  zoom?: number;
11
10
  geom?: any;
11
+ bounds?: [number, number, number, number] | null;
12
+ highlightPoints?: [number, number][] | null;
12
13
  layers?: MapLayerDefinition[];
13
14
  legend?: LegendDefinition[];
14
15
  tools?: ToolName[];
15
16
  katottg?: string;
16
- };
17
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ }
18
+ type ToolName = "home" | "fullscreen" | "scale" | "position" | "search";
19
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
18
20
  height: string | number;
19
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
22
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"MapWidget.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/map/MapWidget.vue"],"names":[],"mappings":"AAw8BA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAa/E,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,QAAQ,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAExE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC9B,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;;YARS,MAAM,GAAG,MAAM;;AAyoC1B,wBAOG"}
1
+ {"version":3,"file":"MapWidget.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/map/MapWidget.vue"],"names":[],"mappings":"AAshCA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAa/E,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACjD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC9B,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,QAAQ,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;;YAZ7D,MAAM,GAAG,MAAM;;AAytC1B,wBAOG"}
package/package.json CHANGED
@@ -1,58 +1,58 @@
1
- {
2
- "name": "@opengis/widgets",
3
- "private": false,
4
- "version": "0.0.65",
5
- "type": "module",
6
- "description": "A collection of independent widgets for comments, history, files, and gallery",
7
- "types": "./dist/index.d.ts",
8
- "main": "./dist/index.js",
9
- "files": [
10
- "dist"
11
- ],
12
- "scripts": {
13
- "dev": "vite",
14
- "build:ts": "vue-tsc -b && vite build",
15
- "type-check": "vue-tsc --noEmit -p tsconfig.app.json",
16
- "build:types": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json",
17
- "build": "vue-tsc -b && vite build && npm run build:types",
18
- "build:app": "app=true vite build",
19
- "preview": "vite preview",
20
- "prepublishOnly": "bun run build"
21
- },
22
- "homepage": "https://widget.opengis.info/",
23
- "author": {
24
- "name": "OpenGIS",
25
- "url": "https://opengis.info/"
26
- },
27
- "keywords": [
28
- "widgets",
29
- "comments",
30
- "history",
31
- "files",
32
- "gallery",
33
- "vue",
34
- "components",
35
- "opengis"
36
- ],
37
- "license": "MIT",
38
- "dependencies": {},
39
- "devDependencies": {
40
- "@opengis/core": "^0.0.25",
41
- "@tsconfig/node22": "^22.0.2",
42
- "@types/node": "^24.2.0",
43
- "@vitejs/plugin-vue": "^6.0.0",
44
- "@vue/tsconfig": "^0.7.0",
45
- "autoprefixer": "^10.4.16",
46
- "lucide-vue-next": "^0.535.0",
47
- "postcss": "^8.4.31",
48
- "sass-embedded": "^1.92.1",
49
- "tailwindcss": "^3.4.0",
50
- "typescript": "~5.8.3",
51
- "vite": "^7.0.0",
52
- "vue": "^3.0.0",
53
- "vue-tsc": "^2.2.12"
54
- },
55
- "peerDependencies": {
56
- "vue": "^3.0.0"
57
- }
58
- }
1
+ {
2
+ "name": "@opengis/widgets",
3
+ "private": false,
4
+ "version": "0.0.66",
5
+ "type": "module",
6
+ "description": "A collection of independent widgets for comments, history, files, and gallery",
7
+ "types": "./dist/index.d.ts",
8
+ "main": "./dist/index.js",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "dev": "vite",
14
+ "build:ts": "vue-tsc -b && vite build",
15
+ "type-check": "vue-tsc --noEmit -p tsconfig.app.json",
16
+ "build:types": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json",
17
+ "build": "vue-tsc -b && vite build && npm run build:types",
18
+ "build:app": "app=true vite build",
19
+ "preview": "vite preview",
20
+ "prepublishOnly": "bun run build"
21
+ },
22
+ "homepage": "https://widget.opengis.info/",
23
+ "author": {
24
+ "name": "OpenGIS",
25
+ "url": "https://opengis.info/"
26
+ },
27
+ "keywords": [
28
+ "widgets",
29
+ "comments",
30
+ "history",
31
+ "files",
32
+ "gallery",
33
+ "vue",
34
+ "components",
35
+ "opengis"
36
+ ],
37
+ "license": "MIT",
38
+ "dependencies": {},
39
+ "devDependencies": {
40
+ "@opengis/core": "^0.0.25",
41
+ "@tsconfig/node22": "^22.0.2",
42
+ "@types/node": "^24.2.0",
43
+ "@vitejs/plugin-vue": "^6.0.0",
44
+ "@vue/tsconfig": "^0.7.0",
45
+ "autoprefixer": "^10.4.16",
46
+ "lucide-vue-next": "^0.535.0",
47
+ "postcss": "^8.4.31",
48
+ "sass-embedded": "^1.92.1",
49
+ "tailwindcss": "^3.4.0",
50
+ "typescript": "~5.8.3",
51
+ "vite": "^7.0.0",
52
+ "vue": "^3.0.0",
53
+ "vue-tsc": "^2.2.12"
54
+ },
55
+ "peerDependencies": {
56
+ "vue": "^3.0.0"
57
+ }
58
+ }