terra-draw
Advanced tools
Comparing version 1.0.0-beta.11 to 1.0.0
@@ -1,4 +0,5 @@ | ||
import { TerraDrawBaseAdapter, BaseAdapterConfig } from "./adapters/common/base.adapter"; | ||
import { HexColorStyling, NumericStyling, TerraDrawCallbacks } from "./common"; | ||
import { TerraDrawBaseAdapter, BaseAdapterConfig } from "./common/base.adapter"; | ||
import { HexColorStyling, NumericStyling, SELECT_PROPERTIES, TerraDrawCallbacks } from "./common"; | ||
import { BaseModeOptions, TerraDrawBaseDrawMode } from "./modes/base.mode"; | ||
export { TerraDrawBaseDrawMode, TerraDrawBaseAdapter, BaseAdapterConfig, NumericStyling, HexColorStyling, BaseModeOptions, TerraDrawCallbacks, }; | ||
import { FeatureId, GeoJSONStore } from "./store/store"; | ||
export { GeoJSONStore, TerraDrawBaseDrawMode, TerraDrawBaseAdapter, BaseAdapterConfig, NumericStyling, HexColorStyling, BaseModeOptions, TerraDrawCallbacks, FeatureId, SELECT_PROPERTIES, }; |
@@ -1,7 +0,4 @@ | ||
import { TerraDrawGoogleMapsAdapter } from "./adapters/google-maps.adapter"; | ||
import { TerraDrawLeafletAdapter } from "./adapters/leaflet.adapter"; | ||
import { TerraDrawMapboxGLAdapter } from "./adapters/mapbox-gl.adapter"; | ||
import { TerraDrawMapLibreGLAdapter } from "./adapters/maplibre-gl.adapter"; | ||
import { TerraDrawOpenLayersAdapter } from "./adapters/openlayers.adapter"; | ||
import { TerraDrawArcGISMapsSDKAdapter } from "./adapters/arcgis-maps-sdk.adapter"; | ||
/** | ||
* @module terra-draw | ||
*/ | ||
import { TerraDrawAdapter, TerraDrawAdapterStyling, GetLngLatFromEvent, Project, SetCursor, TerraDrawChanges, TerraDrawStylingFunction, Unproject, HexColor, TerraDrawKeyboardEvent, TerraDrawMouseEvent, OnFinishContext } from "./common"; | ||
@@ -17,3 +14,3 @@ import { TerraDrawBaseDrawMode } from "./modes/base.mode"; | ||
import { TerraDrawSelectMode } from "./modes/select/select.mode"; | ||
import { FeatureId, GeoJSONStoreFeatures, IdStrategy, StoreValidation } from "./store/store"; | ||
import { FeatureId, GeoJSONStoreFeatures, GeoJSONStoreGeometries, IdStrategy, StoreValidation } from "./store/store"; | ||
import { BehaviorConfig } from "./modes/base.behavior"; | ||
@@ -223,2 +220,3 @@ import { ValidateMinAreaSquareMeters } from "./validations/min-size.validation"; | ||
} | ||
export { TerraDraw, TerraDrawSelectMode, TerraDrawPointMode, TerraDrawLineStringMode, TerraDrawPolygonMode, TerraDrawCircleMode, TerraDrawFreehandMode, TerraDrawRenderMode, TerraDrawRectangleMode, TerraDrawAngledRectangleMode, TerraDrawSectorMode, TerraDrawSensorMode, TerraDrawGoogleMapsAdapter, TerraDrawMapboxGLAdapter, TerraDrawLeafletAdapter, TerraDrawMapLibreGLAdapter, TerraDrawOpenLayersAdapter, TerraDrawArcGISMapsSDKAdapter, TerraDrawExtend, BehaviorConfig, GeoJSONStoreFeatures, HexColor, TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawChanges, TerraDrawStylingFunction, Project, Unproject, SetCursor, GetLngLatFromEvent, ValidateMinAreaSquareMeters, ValidateMaxAreaSquareMeters, ValidateNotSelfIntersecting, ValidationReasons, }; | ||
declare const HELLO = "HELLO"; | ||
export { TerraDraw, HELLO, TerraDrawSelectMode, TerraDrawPointMode, TerraDrawLineStringMode, TerraDrawPolygonMode, TerraDrawCircleMode, TerraDrawFreehandMode, TerraDrawRenderMode, TerraDrawRectangleMode, TerraDrawAngledRectangleMode, TerraDrawSectorMode, TerraDrawSensorMode, TerraDrawExtend, BehaviorConfig, GeoJSONStoreFeatures, GeoJSONStoreGeometries, HexColor, TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawChanges, TerraDrawStylingFunction, Project, Unproject, SetCursor, GetLngLatFromEvent, ValidateMinAreaSquareMeters, ValidateMaxAreaSquareMeters, ValidateNotSelfIntersecting, ValidationReasons, }; |
@@ -1,17 +0,8 @@ | ||
console.log("===== Using @swc/jest ======"); | ||
const noCheckConfig = require("../../jest.nocheck.config"); | ||
module.exports = { | ||
transform: { | ||
"^.+\\.(t|j)sx?$": "@swc/jest", | ||
}, | ||
testPathIgnorePatterns: [ | ||
"<rootDir>/node_modules/", | ||
"<rootDir>/e2e/", | ||
"<rootDir>/docs/", | ||
"<rootDir>/coverage/", | ||
"<rootDir>/scripts/", | ||
"<rootDir>/guides/", | ||
], | ||
coveragePathIgnorePatterns: ["<rootDir>/src/test/", "<rootDir>/e2e/"], | ||
setupFilesAfterEnv: ["<rootDir>/src/test/jest.matchers.ts"], | ||
...noCheckConfig, | ||
testPathIgnorePatterns: ["<rootDir>/dist"], | ||
coveragePathIgnorePatterns: ["<rootDir>/src/test/", "<rootDir>/dist"], | ||
collectCoverageFrom: ["./src/**"], | ||
}; |
127
package.json
{ | ||
"name": "terra-draw", | ||
"version": "1.0.0-beta.11", | ||
"version": "1.0.0", | ||
"description": "Frictionless map drawing across mapping provider", | ||
"scripts": { | ||
"docs": "typedoc", | ||
"docs:serve": "serve ./docs", | ||
"release:beta:increment": "standard-version --prerelease beta", | ||
"release:beta:changelog": "tsx ./scripts/changelog-valid.ts", | ||
"release:beta:next": "tsx ./scripts/next-beta-version.ts", | ||
"release": "commit-and-tag-version .versionrc.cjs", | ||
"release:dryrun": "commit-and-tag-version .versionrc.cjs -t terra-draw@ --dry-run", | ||
"build": "microbundle", | ||
@@ -23,4 +20,3 @@ "watch": "microbundle --watch --format modern", | ||
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"", | ||
"format:quiet": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\" --log-level=silent", | ||
"prepare": "husky install" | ||
"format:quiet": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\" --log-level=silent" | ||
}, | ||
@@ -47,116 +43,9 @@ "type": "module", | ||
"geometry", | ||
"arcgis", | ||
"leaflet", | ||
"leafletjs", | ||
"mapbox", | ||
"mapboxgl", | ||
"google maps", | ||
"maplibre", | ||
"openlayers", | ||
"maplibre" | ||
"mapbox" | ||
], | ||
"devDependencies": { | ||
"@arcgis/core": "4.27.6", | ||
"@commitlint/cli": "17.1.2", | ||
"@commitlint/config-conventional": "17.1.0", | ||
"@googlemaps/js-api-loader": "1.14.3", | ||
"@swc/jest": "0.2.36", | ||
"@types/geojson": "7946.0.8", | ||
"@types/google.maps": "3.49.2", | ||
"@types/jest": "29.5.12", | ||
"@types/leaflet": "1.9.12", | ||
"@types/mapbox-gl": "2.7.3", | ||
"@types/rbush": "3.0.0", | ||
"@typescript-eslint/eslint-plugin": "8.17.0", | ||
"@typescript-eslint/parser": "8.17.0", | ||
"eslint": "9.1.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-prettier": "5.2.1", | ||
"husky": "7.0.0", | ||
"jest": "29.7.0", | ||
"jest-environment-jsdom": "29.7.0", | ||
"knip": "^5.30.2", | ||
"leaflet": "^1.9.4", | ||
"mapbox-gl": "2.13.0", | ||
"maplibre-gl": "3.2.0", | ||
"microbundle": "0.15.0", | ||
"ol": "10.0.0", | ||
"serve": "14.1.2", | ||
"standard-version": "9.5.0", | ||
"ts-jest": "29.1.2", | ||
"ts-loader": "9.5.1", | ||
"tsx": "4.7.2", | ||
"typedoc": "0.26.11", | ||
"typescript": "5.6.3" | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"prettier": { | ||
"printWidth": 80, | ||
"semi": true, | ||
"useTabs": true | ||
}, | ||
"standard-version": { | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes" | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "style", | ||
"section": "Styling" | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "Refactors" | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "Performance" | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "Tests" | ||
}, | ||
{ | ||
"type": "build", | ||
"section": "Build System" | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "CI" | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Chore" | ||
}, | ||
{ | ||
"type": "revert", | ||
"section": "Reverts" | ||
} | ||
] | ||
}, | ||
"sideEffects": false, | ||
"knip": { | ||
"$schema": "https://unpkg.com/knip@5/schema.json", | ||
"entry": [ | ||
"src/terra-draw.ts" | ||
], | ||
"project": [ | ||
"src/**/*.ts" | ||
], | ||
"include": [ | ||
"files", | ||
"types" | ||
] | ||
} | ||
"sideEffects": false | ||
} |
@@ -1,50 +0,7 @@ | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="./assets/logo-dark-mode.png"> | ||
<source media="(prefers-color-scheme: light)" srcset="./assets/logo.png"> | ||
<img alt="Terra Draw logo" src="./assets/logo.png" width="400px"> | ||
</picture> | ||
# Terra Draw | ||
<p></p> | ||
This package is the core package for Terra Draw. You can read more context about what Terra Draw is in [the root level README](../../README.md) and more information on how to get started in the [GUIDES section of the Terra Draw monorepo](../../guides/1.GETTING_STARTED.md). | ||
![Terra Draw CI Badge](https://github.com/JamesLMilner/terra-draw/actions/workflows/ci.yml/badge.svg) | ||
[![npm version](https://badge.fury.io/js/terra-draw.svg)](https://badge.fury.io/js/terra-draw) | ||
## License | ||
Frictionless map drawing across mapping libraries. | ||
Terra Draw centralizes map drawing logic and provides a host of out-of-the-box drawing modes that work across different JavaScript mapping libraries. It also allows you to bring your own modes! | ||
![An example of drawing geodesic lines using Terra Draw with Leaflet](./assets/readme.gif) | ||
### Library Support | ||
Terra Draw uses the concept of 'adapters' to allow it to work with a host of different mapping libraries. Currently supported are: | ||
- [Leaflet](https://leafletjs.com/) v1 | ||
- [OpenLayers](https://openlayers.org/) v10 | ||
- [Mapbox GL JS](https://www.mapbox.com/mapbox-gljs) v2 | ||
- [MapLibre](https://maplibre.org/maplibre-gl-js/docs/) v2/v3 | ||
- [Google Maps JS API](https://developers.google.com/maps/documentation/javascript/overview) v3 | ||
- [ArcGIS JavaScript SDK](https://developers.arcgis.com/javascript/latest/) v4 (MapView) | ||
### Getting Started | ||
Please see the [the getting started guide](./guides/1.GETTING_STARTED.md) - this provides a host of information on how to get up and running with Terra Draw. | ||
### Development & Contributing | ||
* For development, please see the [the development documentation](./guides/7.DEVELOPMENT.md) | ||
* For guidance on contributing, please see the [the contributing documentation](./guides/7.DEVELOPMENT.md#contributing) | ||
### Project Website | ||
You can check out the official Terra Draw website at [terradraw.io](https://www.terradraw.io). If you are interested in contributing to the website please see [this repository](https://www.github.com/JamesLMilner/terra-draw-website). | ||
### Contact | ||
Email: [contact@terradraw.io](mailto:contact@terradraw.io) | ||
### License | ||
MIT | ||
[MIT](../../LICENSE) |
{ | ||
"extends": "./../../tsconfig.base.json", | ||
"include": ["src"], | ||
"compilerOptions": { | ||
"outDir": "./dist/", | ||
"strict": true, | ||
"module": "es6", | ||
"target": "es6", | ||
"jsx": "react", | ||
"sourceMap": true, | ||
"allowJs": true, | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true | ||
}, | ||
"typedocOptions": { | ||
"entryPoints": ["src/terra-draw.ts"], | ||
"exclude": ["src/geometry/**/*.ts", "src/test/**/*.ts", "src/util/**/*.ts"], | ||
"out": "docs", | ||
"skipErrorChecking": true, | ||
"sourceLinkExternal": true | ||
}, | ||
"exclude": [ | ||
"node_modules/", | ||
"guides/", | ||
"docs/", | ||
"dist/", | ||
"development/dist", | ||
"development/node_modules" | ||
] | ||
"composite": true, | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
176
1
2
0
2709095
3973
7