@tomtom-org/maps-sdk-plugin-route-dragging 0.0.0-stage → 0.0.1
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/LICENSE.txt +87 -0
- package/README.md +51 -2
- package/THIRD_PARTY.txt +77 -0
- package/dist/THIRD_PARTY.txt +66 -0
- package/dist/index.d.ts +196 -0
- package/dist/index.es.js +1 -0
- package/dist/third-party.json +17 -0
- package/package.json +45 -3
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
TOMTOM MAPS SDK FOR JAVASCRIPT LICENSE AGREEMENT (“AGREEMENT”)
|
|
2
|
+
|
|
3
|
+
Last update: October 2026
|
|
4
|
+
|
|
5
|
+
By downloading or accessing the “TomTom Maps SDK for JavaScript” (the “SDK”), you are entering into a binding agreement with TomTom Global Content B.V. (“TomTom”). The SDK comprises all software, binaries and source code made available by TomTom for it, whether through the TomTom Developer Portal, package registries (e.g. npm) or otherwise. The example applications that TomTom publishes in public code repositories (e.g. GitHub) are not part of the SDK: they are licensed separately, under the license distributed with them. This Agreement with TomTom consists of the terms and conditions below together with the Data Processing Schedule. You should not use the SDK if you cannot agree to both.
|
|
6
|
+
|
|
7
|
+
You may not use the SDK or accept this Agreement if you are barred from receiving it under the laws of the European Union or of any other country, including the country in which you are resident or from which you use the SDK. If you accept this Agreement on behalf of your employer or another entity, you represent and warrant that you have full legal authority to bind that employer or entity. If you do not have that authority, you may not accept this Agreement or use the SDK on their behalf.
|
|
8
|
+
|
|
9
|
+
1. GRANT OF LICENSE: Subject to and conditional upon your compliance at all times with this Agreement, TomTom grants you a limited, non-exclusive, non-transferable, non-sublicensable, revocable, royalty-free license during the Term (as defined in Clause 9) to use the SDK to develop web or mobile applications that are used in connection with the TomTom APIs and, in addition, third party online APIs (“Permitted Applications”). For the avoidance of doubt, you must use the TomTom APIs in connection with the SDK. Any Permitted Application and any use of the TomTom APIs is subject to TomTom’s standard terms of use applicable to the TomTom APIs as made available on the TomTom Developer Portal, or to any other specific written agreement executed between you and TomTom regarding the use of the TomTom APIs.
|
|
10
|
+
|
|
11
|
+
2. UPDATES AND CHANGES TO THE SDK AND THIS AGREEMENT: TomTom reserves the right, with or without notice and at its sole discretion, to discontinue, update, modify, upgrade and supplement the SDK or any of its features, and to modify this Agreement. You agree that future versions of the SDK may be incompatible with applications developed on previous versions.
|
|
12
|
+
|
|
13
|
+
3. YOUR FURTHER OBLIGATIONS:
|
|
14
|
+
|
|
15
|
+
3.1. You agree to use the SDK only for purposes permitted by (a) this Agreement and (b) any applicable law, regulation or generally accepted practice or guideline in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
|
|
16
|
+
|
|
17
|
+
3.2. Except as permitted by applicable law or this Clause 3.2, you may not copy (except for backup purposes), modify, adapt, distribute, rent, lend, publicly present, decompile, reverse engineer, disassemble or create derivative works of the SDK. Solely for your Permitted Applications and subject to Clauses 3.3 to 3.5, you may: (a) inspect the SDK, including source code in its source maps, for debugging; (b) copy the SDK as reasonably necessary to develop, build, test and deploy them, including in internal repositories, mirrors and offline build environments used only by you, your Affiliates and your contractors; (c) modify the SDK to fix errors or security vulnerabilities, to maintain compatibility, or to prepare a Contribution under Clause 11.5, but you may not alter, circumvent or disable any functionality for authentication, metering, billing, the notices in Clause 5.2 or the data collection in Clause 4; and (d) distribute the SDK only as a bundled part of a Permitted Application, and not on a standalone basis or as a library. Modified versions remain part of the SDK, and TomTom need not support them. On termination, you must delete all copies held under (b), except copies already distributed under (d). The readability of the SDK's source code does not make it open source and grants no rights beyond those in Clause 1 and this Clause 3.2.
|
|
18
|
+
|
|
19
|
+
3.3. You may not use the SDK in connection with any illegal, fraudulent, dishonest or unethical activity or behaviour, and in particular not to create or develop, or help others create or develop, a product, service or library that competes, directly or indirectly, with the SDK or the TomTom APIs.
|
|
20
|
+
|
|
21
|
+
3.4. You are permitted to display TomTom APIs results (“Results”) on third party content or map data, and to display results from third party content or map data on a TomTom map as a separate layer. Nothing herein entitles you to add or incorporate Results into OSM or any other open source database.
|
|
22
|
+
|
|
23
|
+
3.5. The SDK may include data or software that TomTom licenses from third parties, including open-source software. Such components are made available to you under the terms and conditions of their applicable licenses, and you shall comply with all requirements and restrictions that those third parties may require TomTom to impose on you (as may be updated and amended by TomTom from time to time). It is your responsibility to check, review and comply with those terms as they apply to the SDK licensed to you under this Agreement. The applicable third party and open-source notices are set out in the accompanying THIRD_PARTY.txt file. In the event of a conflict between this Agreement and an open-source license governing a specific dependency, that open-source license shall prevail solely with respect to that dependency.
|
|
24
|
+
|
|
25
|
+
4. PRIVACY: In order to improve the TomTom Developer Portal and the SDK, TomTom may collect certain usage related information from the software, including but not limited to general SDK and product identifiers, version numbers, and information on which tools and/or services in the SDK are used and how you use them. In addition, TomTom may collect your unique identifier and associated IP address for legitimate business reasons (such as, without limitation, the processing of invoices). This data is retained for a maximum period of 120 days and is maintained in accordance with our Privacy Policy (https://www.tomtom.com/privacy/).
|
|
26
|
+
|
|
27
|
+
5. INTELLECTUAL PROPERTY RIGHTS AND COPYRIGHT NOTICES:
|
|
28
|
+
|
|
29
|
+
5.1. All intellectual property rights related to the SDK and to the TomTom APIs are owned by TomTom and/or its licensors and suppliers. TomTom obtains no intellectual property rights under this Agreement in or to any Permitted Application that you develop using the SDK and the TomTom APIs.
|
|
30
|
+
|
|
31
|
+
5.2. Your use of any trade names, logos, trademarks, service marks and other marks of TomTom is subject to TomTom’s prior written approval, and any goodwill arising out of such use shall inure to the benefit of TomTom. You also agree not to remove, obscure, mask or change any logo and/or copyright notice placed on, or automatically generated by, the SDK or the TomTom APIs.
|
|
32
|
+
|
|
33
|
+
6. WARRANTIES:
|
|
34
|
+
|
|
35
|
+
6.1. YOU ACKNOWLEDGE THAT THE SDK HAS NOT BEEN DEVELOPED TO MEET YOUR INDIVIDUAL REQUIREMENTS AND THAT IT IS THEREFORE YOUR RESPONSIBILITY TO ENSURE THAT ITS FACILITIES AND FUNCTIONS MEET YOUR REQUIREMENTS. TOMTOM DOES NOT AND CANNOT WARRANT THAT THE SDK OPERATES UNINTERRUPTED OR ERROR-FREE, OR THAT IT IS CAPABLE OF INTEROPERATING WITH ANY OTHER SYSTEM, DEVICE OR PRODUCT (EITHER SOFTWARE OR HARDWARE).
|
|
36
|
+
|
|
37
|
+
6.2. YOUR USE OF THE SDK AND OF ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH ITS USE IS AT YOUR OWN DISCRETION AND RISK, AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICES, OR ANY LOSS OF DATA, THAT RESULTS FROM SUCH USE.
|
|
38
|
+
|
|
39
|
+
6.3. WITHOUT LIMITING CLAUSES 6.1 AND 6.2 ABOVE, THE SDK IS PROVIDED ON AN “AS IS” AND “ALL FAULTS” BASIS AND TOMTOM EXPRESSLY DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, SATISFACTORY QUALITY, ACCURACY, TITLE AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
40
|
+
|
|
41
|
+
6.4. THIS CLAUSE 6 DOES NOT AFFECT ANY OF YOUR LEGAL RIGHTS UNDER APPLICABLE MANDATORY NATIONAL LEGISLATION, INCLUDING BUT NOT LIMITED TO ANY MANDATORY STATUTORY WARRANTIES.
|
|
42
|
+
|
|
43
|
+
7. LIMITATION OF LIABILITY:
|
|
44
|
+
|
|
45
|
+
7.1. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, NEITHER TOMTOM NOR ITS LICENSORS, SUPPLIERS, OFFICERS, DIRECTORS OR EMPLOYEES SHALL BE LIABLE TO YOU OR TO ANY THIRD PARTY FOR ANY DAMAGES, WHETHER DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL (INCLUDING BUT NOT LIMITED TO DAMAGES FOR THE INABILITY TO USE OR ACCESS THE SDK OR THE TOMTOM APIS, LOSS OF DATA, LOSS OF BUSINESS, LOSS OF PROFITS, BUSINESS INTERRUPTION OR THE LIKE) ARISING OUT OF OR RELATED TO THE USE OF, THE INABILITY TO USE OR ACCESS, OR OTHERWISE THE PERFORMANCE OF THE SDK, EVEN IF TOMTOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
46
|
+
|
|
47
|
+
7.2. TO THE EXTENT TOMTOM IS NOT PERMITTED UNDER APPLICABLE LAW TO EXCLUDE ITS LIABILITY PURSUANT TO CLAUSE 7.1 ABOVE, TOMTOM’S TOTAL AGGREGATE LIABILITY TO YOU SHALL BE LIMITED TO EUR 100.00.
|
|
48
|
+
|
|
49
|
+
7.3. THE LIMITATIONS OF LIABILITY UNDER THIS CLAUSE 7 DO NOT: (I) AFFECT YOUR RIGHTS UNDER ANY APPLICABLE MANDATORY NATIONAL LEGISLATION; OR (II) EXCLUDE OR LIMIT ANY LIABILITY THAT CANNOT BE EXCLUDED OR LIMITED UNDER APPLICABLE LAW.
|
|
50
|
+
|
|
51
|
+
8. IPR INDEMNITY: To the maximum extent permitted by law, you agree to defend, indemnify and hold TomTom and its respective directors, officers, employees, affiliates, agents and suppliers harmless from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorney’s fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person, or that defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this Agreement.
|
|
52
|
+
|
|
53
|
+
9. TERM AND TERMINATION AND DIRECT ENFORCEMENT:
|
|
54
|
+
|
|
55
|
+
9.1. This Agreement begins on either (a) the date you demonstrate your acceptance of its terms and conditions or (b) the date you first use the SDK, and continues until terminated (jointly the “Term”) by either TomTom or you in accordance with this Agreement. The provisions of this Agreement which by their nature are intended to survive termination will remain in effect after termination, and you agree that TomTom may directly enforce these provisions against you.
|
|
56
|
+
|
|
57
|
+
9.2. Without prejudice to any other rights, TomTom may immediately terminate this Agreement if (i) you fail to comply with any of its terms and conditions, (ii) the agreement governing the use of the TomTom APIs between you and TomTom has terminated, or (iii) TomTom decides to no longer provide the SDK, or certain parts of it, either entirely or in territories related to your use.
|
|
58
|
+
|
|
59
|
+
9.3. You may terminate this Agreement at any time by ceasing your use of the SDK.
|
|
60
|
+
|
|
61
|
+
10. GOVERNING LAW AND DISPUTE RESOLUTION:
|
|
62
|
+
|
|
63
|
+
10.1. This Agreement, and any dispute arising under or in connection with it (including any non-contractual claims and disputes), shall be governed by and construed in accordance with the laws of the Netherlands. The applicability of the United Nations Convention on Contracts for the International Sale of Goods is explicitly excluded.
|
|
64
|
+
|
|
65
|
+
10.2. If you, your employer or the entity on whose behalf you act is incorporated in the European Union, you and TomTom hereby irrevocably submit to the exclusive jurisdiction of the courts of Amsterdam, the Netherlands, in respect of any such dispute.
|
|
66
|
+
|
|
67
|
+
10.3. If you, your employer or the entity on whose behalf you act is incorporated outside the European Union, all such disputes shall be settled in accordance with the Arbitration Rules of the Netherlands Arbitration Institute. The arbitral tribunal shall be composed of three (3) arbitrators, the place of arbitration shall be Amsterdam and the language of the arbitration shall be English. Consolidation of the arbitral proceedings with other arbitral proceedings, as provided for in Article 1046 of the Dutch Code of Civil Procedure and Article 39 of the Arbitration Rules of the Netherlands Arbitration Institute, is excluded.
|
|
68
|
+
|
|
69
|
+
10.4. Notwithstanding Clauses 10.2 and 10.3, TomTom remains entitled to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
|
|
70
|
+
|
|
71
|
+
11. OTHER LEGAL TERMS:
|
|
72
|
+
|
|
73
|
+
11.1. No failure or delay by TomTom in exercising any right or remedy provided under this Agreement or by law constitutes a waiver of that or any other right or remedy, nor does it preclude or restrict the further exercise of that or any other right or remedy. No single or partial exercise of such right or remedy precludes or restricts its further exercise.
|
|
74
|
+
|
|
75
|
+
11.2. If any provision of this Agreement is held invalid or unenforceable, for any reason or to any extent, that does not affect the validity or enforceability of the remaining provisions, and the provision concerned shall be enforced to the extent permitted by law.
|
|
76
|
+
|
|
77
|
+
11.3. The rights granted to you in this Agreement may not be assigned or transferred by you without TomTom’s prior written approval.
|
|
78
|
+
|
|
79
|
+
11.4. The TomTom APIs and the SDK are provided as “Commercial Computer Software” or “restricted computer software”. Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions set forth in 48 C.F.R. Section 12.212 or 48 C.F.R. 227.2702, as applicable, or successor provisions. In respect of the Map API and Search API, the manufacturer is TomTom Global Content B.V.
|
|
80
|
+
|
|
81
|
+
11.5. By submitting any suggestion, bug fix or code contribution (“Contribution”) to TomTom (e.g. via a GitHub issue or discussion), you grant TomTom a perpetual, irrevocable, worldwide, royalty-free and non-exclusive license to use, reproduce, modify and distribute the Contribution as part of the SDK. You represent that you have the legal right to grant this license and that the Contribution does not infringe any third-party intellectual property rights.
|
|
82
|
+
|
|
83
|
+
THIRD PARTY SOFTWARE NOTICES
|
|
84
|
+
|
|
85
|
+
As referred to in Clause 3.5, the third party and open-source components included in or required by this package are listed, together with their applicable license notices, in the THIRD_PARTY.txt file distributed alongside this LICENSE.txt. For the SDK bundles themselves, that file is also published at:
|
|
86
|
+
|
|
87
|
+
https://github.com/tomtom-international/maps-sdk-js/blob/main/THIRD_PARTY.txt
|
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Route Dragging Plugin
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This plugin lets people edit a route on a [TomTom Maps SDK for JavaScript](https://docs.tomtom.com/maps-sdk-js/introduction/overview)
|
|
4
|
+
map by dragging it. Grab a stop's pin to move it, or pull the route line to add a stop. The route
|
|
5
|
+
re-plans while the pointer moves, so the road follows the hand.
|
|
6
|
+
|
|
7
|
+
> **Public preview.** This plugin is in [Public Preview](https://docs.tomtom.com/legal/public-preview) until its 1.0.0 release.
|
|
8
|
+
|
|
9
|
+
## Docs & examples
|
|
10
|
+
|
|
11
|
+
- Developer guide: https://docs.tomtom.com/maps-sdk-js/guides/plugins/route-dragging
|
|
12
|
+
- Example: https://docs.tomtom.com/maps-sdk-js/examples/route-dragging-plugin
|
|
13
|
+
|
|
14
|
+
## Quickstart
|
|
15
|
+
|
|
16
|
+
This plugin declares `@tomtom-org/maps-sdk` and `lodash-es` as peer dependencies and bundles neither. `lodash-es` is one of the SDK's own peers, so it installs with the SDK.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @tomtom-org/maps-sdk maplibre-gl @tomtom-org/maps-sdk-plugin-route-dragging
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```javascript
|
|
23
|
+
import { RoutingModule } from '@tomtom-org/maps-sdk/map';
|
|
24
|
+
import { RouteDragging } from '@tomtom-org/maps-sdk-plugin-route-dragging';
|
|
25
|
+
|
|
26
|
+
const routing = await RoutingModule.create(map);
|
|
27
|
+
const dragging = new RouteDragging(routing);
|
|
28
|
+
|
|
29
|
+
await dragging.setWaypoints([
|
|
30
|
+
[4.9041, 52.3676], // Amsterdam
|
|
31
|
+
[5.1214, 52.0907], // Utrecht
|
|
32
|
+
]);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- **Move a stop** by its pin. The pin keeps the spot you grabbed it by, so it doesn't jump under the pointer.
|
|
38
|
+
- **Add a stop** by pulling a route line. It goes between the two stops its detour fits best.
|
|
39
|
+
- **Live re-planning**, twice a second by default and once more on the drop.
|
|
40
|
+
- **Answers in order.** The requests overlap rather than cancel each other, so a slow route still
|
|
41
|
+
shows mid-drag, and an older answer never replaces a newer one.
|
|
42
|
+
- **Your own planner.** Pass `plan` to route with your own options, such as a truck profile or alternatives.
|
|
43
|
+
- **Your own state.** With `showOnMap: false`, it shows nothing itself: it reports each change and
|
|
44
|
+
each route, and your app shows them, as a React or Vue store would want.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
See [LICENSE.txt](./LICENSE.txt).
|
|
49
|
+
|
|
50
|
+
## Security
|
|
51
|
+
|
|
52
|
+
To report a security vulnerability, follow [SECURITY.md](https://github.com/tomtom-international/maps-sdk-js/blob/main/SECURITY.md), which keeps it private.
|
package/THIRD_PARTY.txt
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
THIRD-PARTY SOFTWARE NOTICES FOR @tomtom-org/maps-sdk-plugin-route-dragging
|
|
2
|
+
|
|
3
|
+
This file lists the third-party components used by this package, together with
|
|
4
|
+
their licenses. It is generated from the build output — do not edit it by hand.
|
|
5
|
+
|
|
6
|
+
Components marked "Bundled: false (peer dependency)" are not shipped inside it:
|
|
7
|
+
your package manager installs them alongside it and your application bundles them.
|
|
8
|
+
The licenses below apply to those copies, and each such component may in turn install
|
|
9
|
+
its own dependencies under their own licenses.
|
|
10
|
+
|
|
11
|
+
The software itself is licensed under the terms in LICENSE.txt, which is not affected
|
|
12
|
+
by the licenses reproduced here.
|
|
13
|
+
|
|
14
|
+
--------------------------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
Name: lodash-es
|
|
17
|
+
Version: 4.18.1
|
|
18
|
+
License: MIT
|
|
19
|
+
Bundled: false (peer dependency)
|
|
20
|
+
Description: Lodash exported as ES modules.
|
|
21
|
+
Repository: lodash/lodash
|
|
22
|
+
Homepage: https://lodash.com/custom-builds
|
|
23
|
+
Author: John-David Dalton <john.david.dalton@gmail.com>
|
|
24
|
+
Contributors:
|
|
25
|
+
John-David Dalton <john.david.dalton@gmail.com>
|
|
26
|
+
Mathias Bynens <mathias@qiwi.be>
|
|
27
|
+
License Text:
|
|
28
|
+
===
|
|
29
|
+
|
|
30
|
+
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
31
|
+
|
|
32
|
+
Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
33
|
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
34
|
+
|
|
35
|
+
This software consists of voluntary contributions made by many
|
|
36
|
+
individuals. For exact contribution history, see the revision history
|
|
37
|
+
available at https://github.com/lodash/lodash
|
|
38
|
+
|
|
39
|
+
The following license applies to all parts of this software except as
|
|
40
|
+
documented below:
|
|
41
|
+
|
|
42
|
+
====
|
|
43
|
+
|
|
44
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
45
|
+
a copy of this software and associated documentation files (the
|
|
46
|
+
"Software"), to deal in the Software without restriction, including
|
|
47
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
48
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
49
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
50
|
+
the following conditions:
|
|
51
|
+
|
|
52
|
+
The above copyright notice and this permission notice shall be
|
|
53
|
+
included in all copies or substantial portions of the Software.
|
|
54
|
+
|
|
55
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
56
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
57
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
58
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
59
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
60
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
61
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
62
|
+
|
|
63
|
+
====
|
|
64
|
+
|
|
65
|
+
Copyright and related rights for sample code are waived via CC0. Sample
|
|
66
|
+
code is defined as all source code displayed within the prose of the
|
|
67
|
+
documentation.
|
|
68
|
+
|
|
69
|
+
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
|
70
|
+
|
|
71
|
+
====
|
|
72
|
+
|
|
73
|
+
Files located in the node_modules and vendor directories are externally
|
|
74
|
+
maintained libraries used by this software which have their own
|
|
75
|
+
licenses; we recommend you read them, as their terms may differ from the
|
|
76
|
+
terms above.
|
|
77
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
The following third-party components are declared as peer dependencies. Their code is
|
|
2
|
+
NOT bundled into this package: your package manager installs them alongside it and
|
|
3
|
+
your application bundles them. The licenses below apply to those copies, and each of
|
|
4
|
+
these components may in turn install its own dependencies under their own licenses.
|
|
5
|
+
|
|
6
|
+
Name: lodash-es
|
|
7
|
+
Version: 4.18.1
|
|
8
|
+
License: MIT
|
|
9
|
+
Bundled: false (peer dependency)
|
|
10
|
+
Description: Lodash exported as ES modules.
|
|
11
|
+
Repository: lodash/lodash
|
|
12
|
+
Homepage: https://lodash.com/custom-builds
|
|
13
|
+
Author: John-David Dalton <john.david.dalton@gmail.com>
|
|
14
|
+
Contributors:
|
|
15
|
+
John-David Dalton <john.david.dalton@gmail.com>
|
|
16
|
+
Mathias Bynens <mathias@qiwi.be>
|
|
17
|
+
License Text:
|
|
18
|
+
===
|
|
19
|
+
|
|
20
|
+
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
21
|
+
|
|
22
|
+
Based on Underscore.js, copyright Jeremy Ashkenas,
|
|
23
|
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
|
24
|
+
|
|
25
|
+
This software consists of voluntary contributions made by many
|
|
26
|
+
individuals. For exact contribution history, see the revision history
|
|
27
|
+
available at https://github.com/lodash/lodash
|
|
28
|
+
|
|
29
|
+
The following license applies to all parts of this software except as
|
|
30
|
+
documented below:
|
|
31
|
+
|
|
32
|
+
====
|
|
33
|
+
|
|
34
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
35
|
+
a copy of this software and associated documentation files (the
|
|
36
|
+
"Software"), to deal in the Software without restriction, including
|
|
37
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
38
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
39
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
40
|
+
the following conditions:
|
|
41
|
+
|
|
42
|
+
The above copyright notice and this permission notice shall be
|
|
43
|
+
included in all copies or substantial portions of the Software.
|
|
44
|
+
|
|
45
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
46
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
47
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
48
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
49
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
50
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
51
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
52
|
+
|
|
53
|
+
====
|
|
54
|
+
|
|
55
|
+
Copyright and related rights for sample code are waived via CC0. Sample
|
|
56
|
+
code is defined as all source code displayed within the prose of the
|
|
57
|
+
documentation.
|
|
58
|
+
|
|
59
|
+
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
|
60
|
+
|
|
61
|
+
====
|
|
62
|
+
|
|
63
|
+
Files located in the node_modules and vendor directories are externally
|
|
64
|
+
maintained libraries used by this software which have their own
|
|
65
|
+
licenses; we recommend you read them, as their terms may differ from the
|
|
66
|
+
terms above.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { Routes, WaypointLike } from "@tomtom-org/maps-sdk/core";
|
|
2
|
+
import { DragEventType, PlanningWaypoint, RoutingModule } from "@tomtom-org/maps-sdk/map";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@types+geojson@7946.0.16/node_modules/@types/geojson/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A Position is an array of coordinates.
|
|
6
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.1
|
|
7
|
+
* Array should contain between two and three elements.
|
|
8
|
+
* The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),
|
|
9
|
+
* but the current specification only allows X, Y, and (optionally) Z to be defined.
|
|
10
|
+
*
|
|
11
|
+
* Note: the type will not be narrowed down to `[number, number] | [number, number, number]` due to
|
|
12
|
+
* marginal benefits and the large impact of breaking change.
|
|
13
|
+
*
|
|
14
|
+
* See previous discussions on the type narrowing:
|
|
15
|
+
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590|Nov 2017}
|
|
16
|
+
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773|Dec 2023}
|
|
17
|
+
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441| Dec 2024}
|
|
18
|
+
*
|
|
19
|
+
* One can use a
|
|
20
|
+
* {@link https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates|user-defined type guard that returns a type predicate}
|
|
21
|
+
* to determine if a position is a 2D or 3D position.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* import type { Position } from 'geojson';
|
|
25
|
+
*
|
|
26
|
+
* type StrictPosition = [x: number, y: number] | [x: number, y: number, z: number]
|
|
27
|
+
*
|
|
28
|
+
* function isStrictPosition(position: Position): position is StrictPosition {
|
|
29
|
+
* return position.length === 2 || position.length === 3
|
|
30
|
+
* };
|
|
31
|
+
*
|
|
32
|
+
* let position: Position = [-116.91, 45.54];
|
|
33
|
+
*
|
|
34
|
+
* let x: number;
|
|
35
|
+
* let y: number;
|
|
36
|
+
* let z: number | undefined;
|
|
37
|
+
*
|
|
38
|
+
* if (isStrictPosition(position)) {
|
|
39
|
+
* // `tsc` would throw an error if we tried to destructure a fourth parameter
|
|
40
|
+
* [x, y, z] = position;
|
|
41
|
+
* } else {
|
|
42
|
+
* throw new TypeError("Position is not a 2D or 3D point");
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
type Position = number[];
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/RouteDragging.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* How a drag edits the waypoints.
|
|
50
|
+
*
|
|
51
|
+
* - `'move'`: A waypoint's pin is dragged to a new position.
|
|
52
|
+
* - `'insert'`: A new waypoint is pulled off a route line, then dragged like a pin.
|
|
53
|
+
*
|
|
54
|
+
* @group Route dragging
|
|
55
|
+
*/
|
|
56
|
+
type WaypointDragKind = 'move' | 'insert';
|
|
57
|
+
/**
|
|
58
|
+
* One step of a drag, as {@link RouteDraggingOptions.onWaypointsChange} reports it.
|
|
59
|
+
*
|
|
60
|
+
* @group Route dragging
|
|
61
|
+
*/
|
|
62
|
+
type WaypointDrag = {
|
|
63
|
+
/** `'dragstart'` once, `'drag'` on every move, then `'dragend'` where the waypoint is dropped. */
|
|
64
|
+
type: DragEventType;
|
|
65
|
+
kind: WaypointDragKind;
|
|
66
|
+
/**
|
|
67
|
+
* The dragged waypoint's index in the waypoints, `null` placeholders included. For an
|
|
68
|
+
* `'insert'`, the index the new waypoint was inserted at.
|
|
69
|
+
*/
|
|
70
|
+
waypointIndex: number;
|
|
71
|
+
/** Where the dragged waypoint is now, as `[longitude, latitude]`. */
|
|
72
|
+
position: Position;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Plans the routes through the given locations, cancelled when `signal` aborts.
|
|
76
|
+
*
|
|
77
|
+
* @group Route dragging
|
|
78
|
+
*/
|
|
79
|
+
type RouteDraggingPlanner = (locations: WaypointLike[], signal: AbortSignal) => Promise<Routes>;
|
|
80
|
+
/**
|
|
81
|
+
* Options for {@link RouteDragging}.
|
|
82
|
+
*
|
|
83
|
+
* @group Route dragging
|
|
84
|
+
*/
|
|
85
|
+
type RouteDraggingOptions = {
|
|
86
|
+
/**
|
|
87
|
+
* Plans the routes for the waypoints, `null` placeholders left out.
|
|
88
|
+
*
|
|
89
|
+
* Pass your own to plan with your route options, or `false` to plan nothing and only get the
|
|
90
|
+
* waypoint changes.
|
|
91
|
+
*
|
|
92
|
+
* @defaultValue `calculateRoute({ locations, signal })`
|
|
93
|
+
*/
|
|
94
|
+
plan?: RouteDraggingPlanner | false;
|
|
95
|
+
/**
|
|
96
|
+
* How often the routes re-plan while a drag lasts, in milliseconds. The drop always plans once more.
|
|
97
|
+
*
|
|
98
|
+
* @defaultValue `500`
|
|
99
|
+
*/
|
|
100
|
+
planIntervalMS?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Whether dragging a route line pulls a new waypoint off it, between the stops its detour fits best.
|
|
103
|
+
*
|
|
104
|
+
* @defaultValue `true`
|
|
105
|
+
*/
|
|
106
|
+
insertFromRouteLines?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the plugin shows the dragged waypoints and the planned routes on the routing module.
|
|
109
|
+
*
|
|
110
|
+
* Set it to `false` when your app shows them itself: apply each change
|
|
111
|
+
* {@link onWaypointsChange} reports and show the routes {@link onRoutes} receives.
|
|
112
|
+
*
|
|
113
|
+
* @defaultValue `true`
|
|
114
|
+
*/
|
|
115
|
+
showOnMap?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Called on every step of a drag, with the waypoints it leaves.
|
|
118
|
+
*/
|
|
119
|
+
onWaypointsChange?: (waypoints: PlanningWaypoint[], drag: WaypointDrag) => void;
|
|
120
|
+
/**
|
|
121
|
+
* Called with each planned answer, in order: an answer older than one already received is dropped.
|
|
122
|
+
*
|
|
123
|
+
* @param waypoints - The waypoints the routes were planned for
|
|
124
|
+
*/
|
|
125
|
+
onRoutes?: (routes: Routes, waypoints: PlanningWaypoint[]) => void;
|
|
126
|
+
/**
|
|
127
|
+
* Called when planning fails.
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue a `console.warn`
|
|
130
|
+
*/
|
|
131
|
+
onError?: (error: unknown) => void;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Edits a route by dragging on a {@link RoutingModule}: a waypoint's pin moves its stop, and a route
|
|
135
|
+
* line pulls a new stop off it. The routes re-plan as you drag.
|
|
136
|
+
*
|
|
137
|
+
* @remarks
|
|
138
|
+
* **[Public Preview](https://docs.tomtom.com/legal/public-preview)** until the plugin's 1.0.0 release.
|
|
139
|
+
*
|
|
140
|
+
* - It edits the waypoints the routing module last showed, so its indexes are the pins' own.
|
|
141
|
+
* - While a drag lasts, the routes re-plan every {@link RouteDraggingOptions.planIntervalMS}, and once
|
|
142
|
+
* more on the drop.
|
|
143
|
+
* - The requests overlap rather than cancel each other, so a route slower than the interval still
|
|
144
|
+
* shows during the drag. An answer older than one already shown is dropped, through
|
|
145
|
+
* `createLatestRequest({ supersede: 'on-answer' })`.
|
|
146
|
+
* - With `showOnMap: false`, it shows nothing itself, and your app shows what it reports.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts
|
|
150
|
+
* const routing = await RoutingModule.create(map);
|
|
151
|
+
* const dragging = new RouteDragging(routing);
|
|
152
|
+
* await dragging.setWaypoints([[4.9041, 52.3676], [5.1214, 52.0907]]);
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @group Route dragging
|
|
156
|
+
*/
|
|
157
|
+
export declare class RouteDragging {
|
|
158
|
+
private readonly routing;
|
|
159
|
+
private readonly plan?;
|
|
160
|
+
private readonly showOnMap;
|
|
161
|
+
private readonly onWaypointsChange;
|
|
162
|
+
private readonly onRoutes;
|
|
163
|
+
private readonly onError;
|
|
164
|
+
private readonly latestRoutes;
|
|
165
|
+
private readonly planWhileDragging;
|
|
166
|
+
private readonly unsubscribes;
|
|
167
|
+
private waypoints;
|
|
168
|
+
private plannedWaypoints?;
|
|
169
|
+
private activeDrag?;
|
|
170
|
+
constructor(routing: RoutingModule, options?: RouteDraggingOptions);
|
|
171
|
+
/**
|
|
172
|
+
* Whether a waypoint is being dragged.
|
|
173
|
+
*/
|
|
174
|
+
get dragging(): boolean;
|
|
175
|
+
/**
|
|
176
|
+
* The waypoints, as the routing module last showed them or a drag left them.
|
|
177
|
+
*/
|
|
178
|
+
getWaypoints(): PlanningWaypoint[];
|
|
179
|
+
/**
|
|
180
|
+
* Shows the waypoints on the routing module and plans the routes through them.
|
|
181
|
+
*
|
|
182
|
+
* @remarks
|
|
183
|
+
* With `showOnMap: false`, call `routing.showWaypoints` yourself instead: the plugin follows
|
|
184
|
+
* whatever the routing module shows.
|
|
185
|
+
*/
|
|
186
|
+
setWaypoints(waypoints: PlanningWaypoint[]): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* Stops listening to the routing module, and drops the plans still in flight.
|
|
189
|
+
*/
|
|
190
|
+
remove(): void;
|
|
191
|
+
private startMove;
|
|
192
|
+
private dragTo;
|
|
193
|
+
private planRoutes;
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
export type { RouteDraggingOptions, RouteDraggingPlanner, WaypointDrag, WaypointDragKind };
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{findBestWaypointInsertionIndex,getPosition}from"@tomtom-org/maps-sdk/core";import{calculateRoute,createLatestRequest}from"@tomtom-org/maps-sdk/services";import{omit,throttle}from"lodash-es";var pinOnlyProperties=["id","index","indexType","iconID","stopDisplayIndex","stopDisplayLabel","stopDuration"],waypointAt=(t,n)=>{const o="object"!=typeof(i=n)||null===i||Array.isArray(i)||"Feature"!==i.type?void 0:n;var i;const{pauseDurationSeconds:s,legCostModel:a}=o?.properties??{};return{type:"Feature",...void 0!==o?.id&&{id:o.id},geometry:{type:"Point",coordinates:t},properties:{...void 0!==s&&{pauseDurationSeconds:s},...a&&{legCostModel:a}}}},planWithCalculateRoute=(t,n)=>calculateRoute({locations:t,signal:n}),warn=t=>console.warn("Route dragging could not plan the routes",t),RouteDragging=class{routing;plan;showOnMap;onWaypointsChange;onRoutes;onError;latestRoutes=createLatestRequest({supersede:"on-answer"});planWhileDragging;unsubscribes;waypoints;plannedWaypoints;activeDrag;constructor(t,n={}){this.routing=t,this.waypoints=(t=>{const n=[];for(const o of t.features){const{index:t}=o.properties;for(;n.length<t;)n.push(null);n[t]={...o,properties:omit(o.properties,pinOnlyProperties)}}return n})(t.getShown().waypoints),this.plan=!1===n.plan?void 0:n.plan??planWithCalculateRoute,this.showOnMap=n.showOnMap??!0,this.onWaypointsChange=n.onWaypointsChange,this.onRoutes=n.onRoutes,this.onError=n.onError??warn,this.planWhileDragging=throttle(()=>{this.planRoutes()},n.planIntervalMS??500);const{events:o}=t,i=t=>(n,o)=>this.dragTo(t,o.toArray());this.unsubscribes=[o.on("shown-features",t=>{"waypoints"in t&&(this.waypoints=Array.isArray(t.waypoints)?t.waypoints:t.waypoints.features)}),o.waypoints.on("dragstart",(t,n)=>this.startMove(t.properties.index,t.geometry.coordinates,n.toArray())),o.waypoints.on("drag",i("drag")),o.waypoints.on("dragend",i("dragend")),...n.insertFromRouteLines??!0?[o.mainLines.on("dragstart",(t,n)=>{const o=n.toArray(),i=((t,n,o)=>{const i=n.flatMap((t,n)=>t?[{waypoint:t,index:n}]:[]);if(i.length<2)return n.length;const s=findBestWaypointInsertionIndex(t,i.map(({waypoint:t})=>t),o);return i[Math.min(Math.max(s,1),i.length-1)].index})(t,this.waypoints,o);this.waypoints=[...this.waypoints.slice(0,i),waypointAt(o),...this.waypoints.slice(i)],this.activeDrag={kind:"insert",waypointIndex:i,offset:[0,0]},this.dragTo("dragstart",o)}),o.mainLines.on("drag",i("drag")),o.mainLines.on("dragend",i("dragend"))]:[]]}get dragging(){return void 0!==this.activeDrag}getWaypoints(){return this.waypoints}async setWaypoints(t){await this.routing.showWaypoints(t),this.plannedWaypoints=void 0,await this.planRoutes()}remove(){for(const t of this.unsubscribes)t();this.planWhileDragging.cancel(),this.latestRoutes.cancel(),this.activeDrag=void 0}startMove(t,n,o){const[i,s]=getPosition(this.waypoints[t]??void 0)??n;this.activeDrag={kind:"move",waypointIndex:t,offset:[i-o[0],s-o[1]]},this.dragTo("dragstart",o)}dragTo(t,n){const o=this.activeDrag;if(!o)return;const{kind:i,waypointIndex:s,offset:a}=o,e=[n[0]+a[0],n[1]+a[1]],r=getPosition(this.waypoints[s]??void 0);r?.[0]===e[0]&&r[1]===e[1]||(this.waypoints=this.waypoints.map((t,n)=>n===s?waypointAt(e,t):t)),"dragend"===t&&(this.activeDrag=void 0),this.showOnMap&&this.routing.showWaypoints(this.waypoints).catch(this.onError),this.onWaypointsChange?.(this.waypoints,{type:t,kind:i,waypointIndex:s,position:e}),"dragend"===t?(this.planWhileDragging.cancel(),this.planRoutes()):"drag"===t&&this.planWhileDragging()}async planRoutes(){const{plan:t,waypoints:n}=this;if(!t||n===this.plannedWaypoints)return;this.plannedWaypoints=n;const o=n.filter(t=>null!==t);if(o.length<2)this.showOnMap&&await this.routing.clearRoutes();else try{const i=await this.latestRoutes.run(n=>t(o,n));if(!i.current)return;this.showOnMap&&await this.routing.showRoutes(i.value),this.onRoutes?.(i.value,n)}catch(i){this.onError(i)}}};export{RouteDragging};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "lodash-es",
|
|
4
|
+
"version": "4.18.1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bundled": false,
|
|
7
|
+
"description": "Lodash exported as ES modules.",
|
|
8
|
+
"repository": "lodash/lodash",
|
|
9
|
+
"homepage": "https://lodash.com/custom-builds",
|
|
10
|
+
"author": "John-David Dalton <john.david.dalton@gmail.com>",
|
|
11
|
+
"contributors": [
|
|
12
|
+
"John-David Dalton <john.david.dalton@gmail.com>",
|
|
13
|
+
"Mathias Bynens <mathias@qiwi.be>"
|
|
14
|
+
],
|
|
15
|
+
"licenseText": "Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n\nBased on Underscore.js, copyright Jeremy Ashkenas,\nDocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/lodash/lodash\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nCopyright and related rights for sample code are waived via CC0. Sample\ncode is defined as all source code displayed within the prose of the\ndocumentation.\n\nCC0: http://creativecommons.org/publicdomain/zero/1.0/\n\n====\n\nFiles located in the node_modules and vendor directories are externally\nmaintained libraries used by this software which have their own\nlicenses; we recommend you read them, as their terms may differ from the\nterms above."
|
|
16
|
+
}
|
|
17
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomtom-org/maps-sdk-plugin-route-dragging",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"author": "TomTom International B.V.",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"description": "Edit a route on a TomTomMap by dragging: move a waypoint's pin or pull a new stop off the route line, and the route re-plans as you drag, its answers shown in order",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@tomtom-org/maps-sdk": "^1.0.0-rc.4",
|
|
12
|
+
"lodash-es": "^4.18.1"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@tsconfig/recommended": "^1.0.13",
|
|
16
|
+
"@types/geojson": "^7946.0.16",
|
|
17
|
+
"@types/lodash-es": "^4.17.12",
|
|
18
|
+
"@types/node": "^26.6.5",
|
|
19
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
20
|
+
"lodash-es": "^4.18.1",
|
|
21
|
+
"rolldown": "^1.2.14",
|
|
22
|
+
"typescript": "^6.0.3",
|
|
23
|
+
"vite": "^8.3.4",
|
|
24
|
+
"vitest": "^5.0.5",
|
|
25
|
+
"@tomtom-org/maps-sdk": "1.0.0-rc.4"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"package.json",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE.txt",
|
|
32
|
+
"THIRD_PARTY.txt",
|
|
33
|
+
"!**/*.map"
|
|
34
|
+
],
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"default": "./dist/index.es.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "vite build --config ../plugin-vite-config.ts",
|
|
43
|
+
"build:watch": "vite build --watch --config ../plugin-vite-config.ts",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"test:coverage": "vitest run --coverage",
|
|
46
|
+
"type-check": "tsc --noEmit"
|
|
47
|
+
}
|
|
6
48
|
}
|