@opensystemslab/map 0.5.6 → 0.5.9
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 +28 -133
 - package/dist/component-lib.es.js +26875 -12345
 - package/dist/component-lib.umd.js +127 -12688
 - package/dist/style.css +1 -1
 - package/package.json +27 -7
 - package/types/components/address-autocomplete/main.test.d.ts +6 -0
 - package/types/components/my-map/index.d.ts +8 -0
 - package/types/components/my-map/main.test.d.ts +6 -0
 - package/types/components/my-map/projections.d.ts +3 -0
 - package/types/components/postcode-search/main.test.d.ts +6 -0
 - package/types/test-utils.d.ts +2 -0
 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@opensystemslab/map",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "0.5. 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "0.5.9",
         
     | 
| 
       4 
4 
     | 
    
         
             
              "license": "OGL-UK-3.0",
         
     | 
| 
       5 
5 
     | 
    
         
             
              "private": false,
         
     | 
| 
       6 
6 
     | 
    
         
             
              "repository": {
         
     | 
| 
         @@ -19,29 +19,49 @@ 
     | 
|
| 
       19 
19 
     | 
    
         
             
                "dev": "vite",
         
     | 
| 
       20 
20 
     | 
    
         
             
                "build": "rm -rf dist types && tsc && vite build && sed 's/src=\".*\"/src=\"component-lib.es.js\"/' index.html > dist/index.html",
         
     | 
| 
       21 
21 
     | 
    
         
             
                "prepublishOnly": "npm run build",
         
     | 
| 
       22 
     | 
    
         
            -
                "prepare": "husky install"
         
     | 
| 
      
 22 
     | 
    
         
            +
                "prepare": "husky install",
         
     | 
| 
      
 23 
     | 
    
         
            +
                "test": "vitest",
         
     | 
| 
      
 24 
     | 
    
         
            +
                "test:ui": "vitest --ui",
         
     | 
| 
      
 25 
     | 
    
         
            +
                "docs": "NODE_ENV=development pitsby build --watch --port=7007",
         
     | 
| 
      
 26 
     | 
    
         
            +
                "docsPublish": "pitsby build"
         
     | 
| 
       23 
27 
     | 
    
         
             
              },
         
     | 
| 
       24 
28 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       25 
29 
     | 
    
         
             
                "@turf/union": "^6.5.0",
         
     | 
| 
       26 
30 
     | 
    
         
             
                "accessible-autocomplete": "^2.0.4",
         
     | 
| 
       27 
31 
     | 
    
         
             
                "govuk-frontend": "^4.0.1",
         
     | 
| 
       28 
     | 
    
         
            -
                "lit": "^2. 
     | 
| 
       29 
     | 
    
         
            -
                "ol": "^ 
     | 
| 
       30 
     | 
    
         
            -
                "ol-mapbox-style": "^ 
     | 
| 
      
 32 
     | 
    
         
            +
                "lit": "^2.3.1",
         
     | 
| 
      
 33 
     | 
    
         
            +
                "ol": "^7.0.0",
         
     | 
| 
      
 34 
     | 
    
         
            +
                "ol-mapbox-style": "^9.0.0",
         
     | 
| 
       31 
35 
     | 
    
         
             
                "postcode": "^5.1.0",
         
     | 
| 
      
 36 
     | 
    
         
            +
                "proj4": "^2.8.0",
         
     | 
| 
       32 
37 
     | 
    
         
             
                "rambda": "^7.0.1"
         
     | 
| 
       33 
38 
     | 
    
         
             
              },
         
     | 
| 
       34 
39 
     | 
    
         
             
              "devDependencies": {
         
     | 
| 
       35 
     | 
    
         
            -
                "@ 
     | 
| 
      
 40 
     | 
    
         
            +
                "@glorious/pitsby": "^1.30.16",
         
     | 
| 
      
 41 
     | 
    
         
            +
                "@testing-library/dom": "^8.17.1",
         
     | 
| 
      
 42 
     | 
    
         
            +
                "@testing-library/user-event": "^14.4.3",
         
     | 
| 
      
 43 
     | 
    
         
            +
                "@types/node": "^18.6.3",
         
     | 
| 
      
 44 
     | 
    
         
            +
                "@types/proj4": "^2.5.2",
         
     | 
| 
      
 45 
     | 
    
         
            +
                "@vitest/ui": "^0.22.1",
         
     | 
| 
      
 46 
     | 
    
         
            +
                "happy-dom": "^6.0.4",
         
     | 
| 
       36 
47 
     | 
    
         
             
                "husky": "^8.0.1",
         
     | 
| 
       37 
48 
     | 
    
         
             
                "lint-staged": "^13.0.3",
         
     | 
| 
       38 
49 
     | 
    
         
             
                "prettier": "^2.3.2",
         
     | 
| 
       39 
50 
     | 
    
         
             
                "rollup-plugin-postcss-lit": "^2.0.0",
         
     | 
| 
       40 
51 
     | 
    
         
             
                "sass": "^1.44.0",
         
     | 
| 
       41 
52 
     | 
    
         
             
                "typescript": "^4.3.5",
         
     | 
| 
       42 
     | 
    
         
            -
                "vite": "^ 
     | 
| 
      
 53 
     | 
    
         
            +
                "vite": "^3.0.4",
         
     | 
| 
      
 54 
     | 
    
         
            +
                "vitest": "0.20.3",
         
     | 
| 
      
 55 
     | 
    
         
            +
                "wait-for-expect": "^3.0.2"
         
     | 
| 
      
 56 
     | 
    
         
            +
              },
         
     | 
| 
      
 57 
     | 
    
         
            +
              "engines": {
         
     | 
| 
      
 58 
     | 
    
         
            +
                "node": "^16",
         
     | 
| 
      
 59 
     | 
    
         
            +
                "pnpm": "^7.8.0"
         
     | 
| 
       43 
60 
     | 
    
         
             
              },
         
     | 
| 
       44 
61 
     | 
    
         
             
              "lint-staged": {
         
     | 
| 
       45 
62 
     | 
    
         
             
                "src/**/*.{js,jsx,ts,tsx,json,css,scss,md,html}": "prettier --write"
         
     | 
| 
      
 63 
     | 
    
         
            +
              },
         
     | 
| 
      
 64 
     | 
    
         
            +
              "stackblitz": {
         
     | 
| 
      
 65 
     | 
    
         
            +
                "startCommand": "npm run test:ui"
         
     | 
| 
       46 
66 
     | 
    
         
             
              }
         
     | 
| 
       47 
67 
     | 
    
         
             
            }
         
     | 
| 
         @@ -1,12 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import { LitElement } from "lit";
         
     | 
| 
       2 
2 
     | 
    
         
             
            import Map from "ol/Map";
         
     | 
| 
       3 
3 
     | 
    
         
             
            import { DrawPointerEnum } from "./drawing";
         
     | 
| 
      
 4 
     | 
    
         
            +
            import { ProjectionEnum } from "./projections";
         
     | 
| 
       4 
5 
     | 
    
         
             
            import { AreaUnitEnum } from "./utils";
         
     | 
| 
      
 6 
     | 
    
         
            +
            declare type MarkerImageEnum = "circle" | "pin";
         
     | 
| 
       5 
7 
     | 
    
         
             
            export declare class MyMap extends LitElement {
         
     | 
| 
       6 
8 
     | 
    
         
             
                static styles: import("lit").CSSResult;
         
     | 
| 
       7 
9 
     | 
    
         
             
                id: string;
         
     | 
| 
       8 
10 
     | 
    
         
             
                latitude: number;
         
     | 
| 
       9 
11 
     | 
    
         
             
                longitude: number;
         
     | 
| 
      
 12 
     | 
    
         
            +
                projection: ProjectionEnum;
         
     | 
| 
       10 
13 
     | 
    
         
             
                zoom: number;
         
     | 
| 
       11 
14 
     | 
    
         
             
                minZoom: number;
         
     | 
| 
       12 
15 
     | 
    
         
             
                maxZoom: number;
         
     | 
| 
         @@ -43,6 +46,7 @@ export declare class MyMap extends LitElement { 
     | 
|
| 
       43 
46 
     | 
    
         
             
                areaUnit: AreaUnitEnum;
         
     | 
| 
       44 
47 
     | 
    
         
             
                showScale: boolean;
         
     | 
| 
       45 
48 
     | 
    
         
             
                useScaleBarStyle: boolean;
         
     | 
| 
      
 49 
     | 
    
         
            +
                markerImage: MarkerImageEnum;
         
     | 
| 
       46 
50 
     | 
    
         
             
                map?: Map;
         
     | 
| 
       47 
51 
     | 
    
         
             
                constructor();
         
     | 
| 
       48 
52 
     | 
    
         
             
                firstUpdated(): void;
         
     | 
| 
         @@ -56,7 +60,11 @@ export declare class MyMap extends LitElement { 
     | 
|
| 
       56 
60 
     | 
    
         
             
                private dispatch;
         
     | 
| 
       57 
61 
     | 
    
         
             
            }
         
     | 
| 
       58 
62 
     | 
    
         
             
            declare global {
         
     | 
| 
      
 63 
     | 
    
         
            +
                interface Window {
         
     | 
| 
      
 64 
     | 
    
         
            +
                    olMap: Map | undefined;
         
     | 
| 
      
 65 
     | 
    
         
            +
                }
         
     | 
| 
       59 
66 
     | 
    
         
             
                interface HTMLElementTagNameMap {
         
     | 
| 
       60 
67 
     | 
    
         
             
                    "my-map": MyMap;
         
     | 
| 
       61 
68 
     | 
    
         
             
                }
         
     | 
| 
       62 
69 
     | 
    
         
             
            }
         
     | 
| 
      
 70 
     | 
    
         
            +
            export {};
         
     |