@ingissa/navcore-types 2.0.0 → 2.1.0

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 CHANGED
@@ -1,3 +1,241 @@
1
- Copyright (c) 2026 Abdelnasser Aitabi. All rights reserved.
1
+ NAVCORE SDK LICENSE AGREEMENT
2
2
 
3
- No license is granted except by separate written agreement.
3
+ Copyright (c) 2026 Abdelnasser Aitabi, trading as Udereva. All rights
4
+ reserved.
5
+
6
+ This Agreement governs your use of the NavCore SDK published on npm under
7
+ the scope @ingissa. By installing, importing or using the Software you
8
+ accept this Agreement. If you do not accept it, do not use the Software.
9
+
10
+
11
+ 1. DEFINITIONS
12
+
13
+ "Licensor": Abdelnasser Aitabi, trading as Udereva, and its successors and
14
+ assigns, including any legal entity to which the rights in the Software
15
+ are transferred.
16
+
17
+ "Software": every package published as @ingissa/navcore-* (including
18
+ navcore-core, -types, -mapbox, -react-native, -simulator, -headless,
19
+ -maplibre, -leaflet and -google-maps), its documentation, and every Update.
20
+
21
+ "Pro Modules": the modules enabled by a valid License Key, currently the
22
+ dead-reckoning engine, compound deviation detection, parallel-road
23
+ resolver, VoiceTriggerEngine, ETAEngine and GeofencingEngine, with their
24
+ typings, and any module the documentation later designates as "Pro".
25
+
26
+ "Core Modules": all of the Software other than the Pro Modules, including
27
+ the renderer adapters (such as @ingissa/navcore-mapbox).
28
+
29
+ "Application": one software product identified by a single bundle ID /
30
+ application ID (or, for web products, a single domain), together with its
31
+ non-public development, test, CI and staging builds.
32
+
33
+ "Production": any build or deployment of an Application that is made
34
+ available to End Users or used for the Licensee's live business.
35
+
36
+ "License Key": the cryptographically signed key issued by the Licensor and
37
+ bound to one Application.
38
+
39
+ "Licensee": the person or entity that accepts this Agreement or purchases
40
+ a License Key. "End User": any person who uses an Application.
41
+
42
+ "Update": any new release of the Software. "Update Period": 12 months from
43
+ the purchase date of a Suite License.
44
+
45
+
46
+ 2. CORE LICENSE (FREE)
47
+
48
+ 2.1 Subject to this Agreement, the Licensor grants you a non-exclusive,
49
+ non-transferable, non-sublicensable, worldwide, royalty-free license to
50
+ install and use the Core Modules, in development and in Production, to
51
+ build and operate Applications.
52
+
53
+ 2.2 You may distribute the Core Modules to End Users only as an embedded
54
+ part of your compiled or bundled Application, and only so that the
55
+ Application can run. End Users receive no right to extract or reuse the
56
+ Software.
57
+
58
+ 2.3 The Core License does not include the Pro Modules.
59
+
60
+
61
+ 3. SUITE LICENSE (PAID, PER APPLICATION)
62
+
63
+ 3.1 Upon payment of the applicable fee (currently USD 49 per Application,
64
+ as shown on the Licensor's pricing page), the Licensor grants you a
65
+ non-exclusive, non-transferable, non-sublicensable, worldwide license to
66
+ use the Pro Modules in one Application, in development and in Production.
67
+ The License Key is bound to that Application's bundle ID or domain.
68
+
69
+ 3.2 Perpetual use. The Suite License has no expiry. You may use, forever,
70
+ every version of the Software released on or before the last day of the
71
+ Update Period.
72
+
73
+ 3.3 Updates. You receive all Updates released during the Update Period.
74
+ Updates released afterwards require renewal at the then-current renewal
75
+ price, currently USD 25 per Application per year. Not renewing never
76
+ disables a License Key you already hold for a version you are entitled to
77
+ use. Security fixes for the major version you hold remain free for at
78
+ least 24 months after that major version's first release.
79
+
80
+ 3.4 Verification. License Keys are verified offline. The Licensor does not
81
+ require a network connection to keep an activated Suite License working.
82
+
83
+ 3.5 Support. Suite licensees receive priority developer support during the
84
+ Update Period, by e-mail at contact@udereva.be, with a target first
85
+ response within 3 business days. This target is not a service-level
86
+ commitment. Ending support never disables a License Key.
87
+
88
+ 3.6 Changing the Application bound to a License Key requires the
89
+ Licensor's written consent. One reissue per License Key is free; each
90
+ further reissue costs USD 10.
91
+
92
+
93
+ 4. STUDIO AND ENTERPRISE LICENSES
94
+
95
+ 4.1 Studio. A Studio License grants the Suite rights for up to 10
96
+ Applications, including Applications built for the Licensee's clients,
97
+ each with its own License Key. Price: USD 349.
98
+
99
+ 4.2 Enterprise. Enterprise licenses (unlimited Applications within one
100
+ company, service levels, optional source escrow) are granted only under a
101
+ separate written order form signed by both parties, which prevails over
102
+ this Agreement in case of conflict.
103
+
104
+
105
+ 5. RESTRICTIONS
106
+
107
+ You must not, and must not allow others to:
108
+
109
+ (a) circumvent, disable, falsify or tamper with license verification,
110
+ including by generating or sharing License Keys, replacing the
111
+ verification public key, patching the Software, or enabling
112
+ development mode ("isDev") in Production;
113
+ (b) use development mode or evaluation builds in Production;
114
+ (c) copy, redistribute, resell, rent, lease, sublicense or publish the
115
+ Software or a License Key, except as allowed in Section 2.2;
116
+ (d) offer the Software, or substantially its functionality, as a hosted
117
+ service, API, SDK, library or wrapper to third parties, or use it to
118
+ build a product that competes with the Software;
119
+ (e) decompile, reverse-engineer or extract the Pro Modules, except to the
120
+ extent applicable law allows this despite this restriction;
121
+ (f) remove or alter copyright, license or attribution notices;
122
+ (g) use the Software unlawfully.
123
+
124
+ Using one License Key for more than one Application is a breach of this
125
+ Agreement.
126
+
127
+
128
+ 6. SAFETY
129
+
130
+ Navigation output (positions, snapped routes, ETAs, voice cues, alerts) is
131
+ informational and may be wrong or late. The Software is not designed or
132
+ licensed for safety-critical use, including aviation, emergency response,
133
+ or the control of autonomous or semi-autonomous vehicles. You are solely
134
+ responsible for how your Application presents and relies on this output,
135
+ and for informing End Users that they must obey traffic laws and road
136
+ signs.
137
+
138
+
139
+ 7. OWNERSHIP
140
+
141
+ The Software is licensed, not sold. The Licensor and its licensors keep
142
+ all rights not expressly granted. No trademark right is granted. If you
143
+ send the Licensor suggestions or feedback, the Licensor may use them
144
+ freely, without obligation to you.
145
+
146
+
147
+ 8. THIRD-PARTY COMPONENTS
148
+
149
+ Third-party components are listed in THIRD-PARTY-NOTICES.md where
150
+ applicable and remain under their own licenses.
151
+
152
+
153
+ 9. FEES AND REFUNDS
154
+
155
+ Fees are due in advance and exclude taxes. You may request a refund within
156
+ 14 days of purchase. Fees are otherwise not refundable.
157
+
158
+
159
+ 10. NO WARRANTY
160
+
161
+ THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY OF
162
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING FITNESS FOR A PARTICULAR PURPOSE,
163
+ ACCURACY, NON-INFRINGEMENT AND UNINTERRUPTED OR ERROR-FREE OPERATION.
164
+
165
+
166
+ 11. LIMITATION OF LIABILITY
167
+
168
+ 11.1 To the maximum extent permitted by law, the Licensor is not liable
169
+ for indirect, incidental, special, consequential or punitive damages, or
170
+ for loss of profits, revenue, data or goodwill.
171
+
172
+ 11.2 The Licensor's total liability under this Agreement is limited to the
173
+ fees you paid for the Software in the 12 months before the event giving
174
+ rise to the claim (for the free Core License: EUR 0).
175
+
176
+ 11.3 Nothing in this Agreement excludes liability that cannot be excluded
177
+ by law, including for intent, gross negligence, or death or personal
178
+ injury caused by negligence.
179
+
180
+ 11.4 You are responsible for your Application and for claims from End
181
+ Users or third parties arising from it, and you will indemnify the
182
+ Licensor against such claims, except where the claim is caused by the
183
+ Software infringing a third party's rights as delivered by the Licensor.
184
+ The Licensor gives no intellectual-property indemnity, except as agreed in
185
+ a signed Enterprise order form.
186
+
187
+
188
+ 12. TERM AND TERMINATION
189
+
190
+ 12.1 The Core License lasts until terminated. The Suite, Studio and
191
+ Enterprise Licenses last as described in Sections 3 and 4.
192
+
193
+ 12.2 The Licensor may terminate any license immediately on written notice
194
+ if you breach Section 5 or Section 2.2, or, for any other material breach,
195
+ if it is not cured within 30 days of notice.
196
+
197
+ 12.3 On termination, you must stop using the affected Software and delete
198
+ all copies. Applications already distributed to End Users are not disabled
199
+ by termination, but you must not ship new builds containing the Pro
200
+ Modules. No fees are refunded on termination for breach.
201
+
202
+ 12.4 Sections 5, 6, 7, 10, 11, 12, 14 and 15 survive termination.
203
+
204
+
205
+ 13. EXPORT AND SANCTIONS
206
+
207
+ You must comply with applicable export-control and sanctions laws, and
208
+ must not use the Software in a country or for a party subject to
209
+ sanctions that prohibit such use.
210
+
211
+
212
+ 14. CHANGES TO THIS AGREEMENT
213
+
214
+ The Licensor may publish a new version of this Agreement. A new version
215
+ applies to Updates released after its publication and to new purchases. It
216
+ does not reduce rights you already hold for versions of the Software
217
+ released before that date.
218
+
219
+
220
+ 15. GOVERNING LAW AND DISPUTES
221
+
222
+ This Agreement is governed by the laws of Belgium, excluding its
223
+ conflict-of-law rules and the UN Convention on Contracts for the
224
+ International Sale of Goods. Before starting court proceedings, the
225
+ parties will attempt in good faith to settle the dispute by mediation for
226
+ 30 days after written notice. The courts of Brussels, Belgium have
227
+ exclusive jurisdiction, except where mandatory consumer law gives you
228
+ another forum.
229
+
230
+
231
+ 16. GENERAL
232
+
233
+ This Agreement, together with any signed order form, is the entire
234
+ agreement on its subject. If a provision is unenforceable, the rest
235
+ remains in force. The Licensor may assign this Agreement, in whole or in part, to any
236
+ successor or affiliate, including the legal entity that carries the
237
+ Udereva name once incorporated, by notice published on its website; your
238
+ consent is not required. You may not assign this Agreement without the
239
+ Licensor's written consent, except to a successor of your entire business
240
+ that accepts it in writing. The English text prevails over any
241
+ translation. Notices and license requests: contact@udereva.be
package/LICENSE.fr.md ADDED
@@ -0,0 +1,117 @@
1
+ # CONTRAT DE LICENCE NAVCORE SDK
2
+
3
+ Traduction de courtoisie. En cas de divergence, le texte anglais (fichier `LICENSE`) prévaut.
4
+
5
+ Copyright (c) 2026 Abdelnasser Aitabi, exerçant sous le nom Udereva. Tous droits réservés.
6
+
7
+ Le présent contrat régit l'utilisation du NavCore SDK publié sur npm sous le scope @ingissa. En installant, important ou utilisant le Logiciel, vous acceptez ce contrat. Si vous ne l'acceptez pas, n'utilisez pas le Logiciel.
8
+
9
+ ## 1. Définitions
10
+
11
+ - **« Concédant »** : Abdelnasser Aitabi, exerçant sous le nom Udereva, ainsi que ses successeurs et ayants droit, y compris toute entité juridique à laquelle les droits sur le Logiciel seraient transférés.
12
+ - **« Logiciel »** : tous les packages publiés sous `@ingissa/navcore-*` (dont navcore-core, -types, -mapbox, -react-native, -simulator, -headless, -maplibre, -leaflet et -google-maps), leur documentation et chaque Mise à jour.
13
+ - **« Modules Pro »** : les modules activés par une Clé de licence valide, actuellement le moteur de dead reckoning, la détection de déviation composée, le résolveur de routes parallèles, VoiceTriggerEngine, ETAEngine et GeofencingEngine, avec leurs typages, ainsi que tout module que la documentation désignera ultérieurement comme « Pro ».
14
+ - **« Modules Core »** : tout le Logiciel autre que les Modules Pro, y compris les adaptateurs de rendu (comme `@ingissa/navcore-mapbox`).
15
+ - **« Application »** : un produit logiciel identifié par un seul bundle ID / application ID (ou, pour le web, un seul domaine), avec ses builds de développement, de test, de CI et de staging non publics.
16
+ - **« Production »** : tout build ou déploiement d'une Application mis à disposition des Utilisateurs finaux ou utilisé pour l'activité réelle du Licencié.
17
+ - **« Clé de licence »** : la clé signée cryptographiquement, émise par le Concédant et liée à une seule Application.
18
+ - **« Licencié »** : la personne ou l'entité qui accepte ce contrat ou achète une Clé de licence. **« Utilisateur final »** : toute personne qui utilise une Application.
19
+ - **« Mise à jour »** : toute nouvelle version du Logiciel. **« Période de mises à jour »** : 12 mois à compter de l'achat d'une Licence Suite.
20
+
21
+ ## 2. Licence Core (gratuite)
22
+
23
+ 2.1 Sous réserve du présent contrat, le Concédant vous accorde une licence non exclusive, non transférable, non sous-licenciable, mondiale et gratuite d'installer et d'utiliser les Modules Core, en développement et en Production, pour construire et exploiter des Applications.
24
+
25
+ 2.2 Vous pouvez distribuer les Modules Core aux Utilisateurs finaux uniquement comme partie intégrée de votre Application compilée ou packagée, et seulement pour que l'Application fonctionne. Les Utilisateurs finaux n'obtiennent aucun droit d'extraire ou de réutiliser le Logiciel.
26
+
27
+ 2.3 La Licence Core n'inclut pas les Modules Pro.
28
+
29
+ ## 3. Licence Suite (payante, par Application)
30
+
31
+ 3.1 Après paiement du tarif applicable (actuellement 49 USD par Application, selon la page tarifs du Concédant), le Concédant vous accorde une licence non exclusive, non transférable, non sous-licenciable et mondiale d'utiliser les Modules Pro dans une Application, en développement et en Production. La Clé de licence est liée au bundle ID ou au domaine de cette Application.
32
+
33
+ 3.2 **Usage perpétuel.** La Licence Suite n'expire pas. Vous pouvez utiliser à vie toutes les versions du Logiciel publiées au plus tard le dernier jour de la Période de mises à jour.
34
+
35
+ 3.3 **Mises à jour.** Vous recevez toutes les Mises à jour publiées pendant la Période de mises à jour. Celles publiées ensuite nécessitent un renouvellement au prix de renouvellement en vigueur, actuellement 25 USD par Application et par an. Ne pas renouveler ne désactive jamais une Clé de licence que vous détenez pour une version que vous avez le droit d'utiliser. Les correctifs de sécurité de la version majeure que vous détenez restent gratuits pendant au moins 24 mois après la première publication de cette version majeure.
36
+
37
+ 3.4 **Vérification.** Les Clés de licence sont vérifiées hors ligne. Le Concédant n'exige aucune connexion réseau pour qu'une Licence Suite activée continue de fonctionner.
38
+
39
+ 3.5 **Support.** Les titulaires Suite bénéficient d'un support développeur prioritaire pendant la Période de mises à jour, par e-mail à contact@udereva.be, avec un délai cible de première réponse de 3 jours ouvrés. Ce délai est un objectif, pas un engagement de niveau de service. La fin du support ne désactive jamais une Clé de licence.
40
+
41
+ 3.6 Changer l'Application liée à une Clé de licence requiert l'accord écrit du Concédant. Une réémission par Clé de licence est gratuite ; chaque réémission supplémentaire coûte 10 USD.
42
+
43
+ ## 4. Licences Studio et Enterprise
44
+
45
+ 4.1 **Studio.** Une Licence Studio accorde les droits Suite pour au plus 10 Applications, y compris des Applications réalisées pour les clients du Licencié, chacune avec sa propre Clé de licence. Prix : 349 USD.
46
+
47
+ 4.2 **Enterprise.** Les licences Enterprise (Applications illimitées au sein d'une société, niveaux de service, éventuel séquestre du code source) ne sont accordées que par un bon de commande écrit distinct, signé par les deux parties, qui prévaut sur le présent contrat en cas de conflit.
48
+
49
+ ## 5. Restrictions
50
+
51
+ Vous ne devez pas, ni permettre à autrui de :
52
+
53
+ - (a) contourner, désactiver, falsifier ou altérer la vérification de licence, notamment en générant ou partageant des Clés de licence, en remplaçant la clé publique de vérification, en modifiant le Logiciel, ou en activant le mode développement (`isDev`) en Production ;
54
+ - (b) utiliser le mode développement ou des builds d'évaluation en Production ;
55
+ - (c) copier, redistribuer, revendre, louer, sous-licencier ou publier le Logiciel ou une Clé de licence, sauf dans la mesure de la section 2.2 ;
56
+ - (d) proposer le Logiciel, ou l'essentiel de ses fonctionnalités, comme service hébergé, API, SDK, bibliothèque ou surcouche à des tiers, ou l'utiliser pour construire un produit concurrent du Logiciel ;
57
+ - (e) décompiler, rétro-concevoir ou extraire les Modules Pro, sauf dans la mesure où la loi applicable l'autorise malgré cette restriction ;
58
+ - (f) retirer ou modifier les mentions de copyright, de licence ou d'attribution ;
59
+ - (g) utiliser le Logiciel de manière illicite.
60
+
61
+ Utiliser une même Clé de licence pour plus d'une Application constitue une violation du présent contrat.
62
+
63
+ ## 6. Sécurité
64
+
65
+ Les sorties de navigation (positions, routes calées, ETA, instructions vocales, alertes) sont informatives et peuvent être erronées ou tardives. Le Logiciel n'est ni conçu ni licencié pour un usage critique pour la sécurité, notamment l'aviation, les interventions d'urgence ou le contrôle de véhicules autonomes ou semi-autonomes. Vous êtes seul responsable de la manière dont votre Application présente et s'appuie sur ces sorties, et d'informer les Utilisateurs finaux qu'ils doivent respecter le code de la route et la signalisation.
66
+
67
+ ## 7. Propriété
68
+
69
+ Le Logiciel est concédé sous licence, non vendu. Le Concédant et ses concédants conservent tous les droits non expressément accordés. Aucun droit sur les marques n'est accordé. Si vous envoyez au Concédant des suggestions ou retours, il peut les utiliser librement, sans obligation envers vous.
70
+
71
+ ## 8. Composants tiers
72
+
73
+ Les composants tiers sont listés dans `THIRD-PARTY-NOTICES.md` le cas échéant et restent soumis à leurs propres licences.
74
+
75
+ ## 9. Tarifs et remboursements
76
+
77
+ Les tarifs sont dus d'avance et s'entendent hors taxes. Vous pouvez demander un remboursement dans les 14 jours suivant l'achat. Les sommes payées ne sont par ailleurs pas remboursables.
78
+
79
+ ## 10. Absence de garantie
80
+
81
+ LE LOGICIEL EST FOURNI « EN L'ÉTAT » ET « SELON DISPONIBILITÉ », SANS GARANTIE D'AUCUNE SORTE, EXPRESSE OU IMPLICITE, Y COMPRIS D'ADÉQUATION À UN USAGE PARTICULIER, D'EXACTITUDE, DE NON-CONTREFAÇON OU DE FONCTIONNEMENT ININTERROMPU OU SANS ERREUR.
82
+
83
+ ## 11. Limitation de responsabilité
84
+
85
+ 11.1 Dans toute la mesure permise par la loi, le Concédant n'est pas responsable des dommages indirects, accessoires, spéciaux, consécutifs ou punitifs, ni de la perte de profits, de revenus, de données ou de clientèle.
86
+
87
+ 11.2 La responsabilité totale du Concédant au titre du présent contrat est limitée aux sommes que vous avez payées pour le Logiciel au cours des 12 mois précédant le fait générateur de la réclamation (pour la Licence Core gratuite : 0 EUR).
88
+
89
+ 11.3 Rien dans le présent contrat n'exclut une responsabilité qui ne peut être exclue par la loi, notamment en cas de dol, de faute lourde, ou de décès ou dommage corporel causé par négligence.
90
+
91
+ 11.4 Vous êtes responsable de votre Application et des réclamations d'Utilisateurs finaux ou de tiers qui en découlent, et vous garantissez le Concédant contre ces réclamations, sauf si elles résultent d'une contrefaçon de droits de tiers par le Logiciel tel que livré par le Concédant. Le Concédant n'offre aucune garantie de propriété intellectuelle, sauf stipulation dans un bon de commande Enterprise signé.
92
+
93
+ ## 12. Durée et résiliation
94
+
95
+ 12.1 La Licence Core dure jusqu'à sa résiliation. Les Licences Suite, Studio et Enterprise durent comme décrit aux sections 3 et 4.
96
+
97
+ 12.2 Le Concédant peut résilier toute licence immédiatement sur notification écrite si vous violez la section 5 ou la section 2.2, ou, pour tout autre manquement grave, s'il n'est pas corrigé dans les 30 jours suivant la notification.
98
+
99
+ 12.3 En cas de résiliation, vous devez cesser d'utiliser le Logiciel concerné et en supprimer toutes les copies. Les Applications déjà distribuées aux Utilisateurs finaux ne sont pas désactivées par la résiliation, mais vous ne devez plus livrer de nouveaux builds contenant les Modules Pro. Aucun tarif n'est remboursé en cas de résiliation pour manquement.
100
+
101
+ 12.4 Les sections 5, 6, 7, 10, 11, 12, 14 et 15 survivent à la résiliation.
102
+
103
+ ## 13. Export et sanctions
104
+
105
+ Vous devez respecter les lois applicables de contrôle des exportations et de sanctions, et ne pas utiliser le Logiciel dans un pays ou pour une partie visée par des sanctions interdisant cet usage.
106
+
107
+ ## 14. Modifications du contrat
108
+
109
+ Le Concédant peut publier une nouvelle version du présent contrat. Elle s'applique aux Mises à jour publiées après sa publication et aux nouveaux achats. Elle ne réduit pas les droits que vous détenez déjà pour les versions du Logiciel publiées avant cette date.
110
+
111
+ ## 15. Droit applicable et litiges
112
+
113
+ Le présent contrat est régi par le droit belge, à l'exclusion de ses règles de conflit de lois et de la Convention des Nations unies sur les contrats de vente internationale de marchandises. Avant toute action en justice, les parties tentent de bonne foi de résoudre le litige par médiation pendant 30 jours à compter d'une notification écrite. Les tribunaux de Bruxelles (Belgique) sont exclusivement compétents, sauf si le droit impératif de la consommation vous donne un autre for.
114
+
115
+ ## 16. Dispositions générales
116
+
117
+ Le présent contrat, avec tout bon de commande signé, constitue l'intégralité de l'accord sur son objet. Si une clause est inapplicable, le reste demeure en vigueur. Le Concédant peut céder ce contrat, en tout ou partie, à tout successeur ou société affiliée, y compris l'entité juridique qui portera le nom Udereva une fois constituée, par avis publié sur son site ; votre consentement n'est pas requis. Vous ne pouvez pas céder ce contrat sans l'accord écrit du Concédant, sauf à un successeur de l'ensemble de votre activité qui l'accepte par écrit. Le texte anglais prévaut sur toute traduction. Notifications et demandes de licence : contact@udereva.be
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > Shared TypeScript definitions and interfaces for the NavCore SDK ecosystem.
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@ingissa/navcore-types)](https://www.npmjs.com/package/@ingissa/navcore-types)
8
- ![License](https://img.shields.io/badge/license-Proprietary-red)
8
+ ![License](https://img.shields.io/badge/license-Commercial%20%2B%20free%20Core-blue)
9
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue)](https://www.typescriptlang.org/)
10
10
 
11
11
  ---
@@ -77,4 +77,4 @@ export class CustomRouter implements DirectionsProvider {
77
77
 
78
78
  ## Licensing
79
79
 
80
- Proprietary software. Copyright (c) 2026 Abdelnasser Aitabi. All rights reserved. No license is granted except by separate written agreement.
80
+ Core Modules are free to use in development and production under the NavCore SDK License Agreement (see LICENSE). Pro Modules require a Suite license key, bound to one application.
package/dist/index.d.mts CHANGED
@@ -1,9 +1,5 @@
1
- /**
2
- * Core types used throughout the NavCore SDK.
3
- */
4
- /** [longitude, latitude] — Mapbox/GeoJSON order */
5
1
  type Coord = [number, number];
6
- /** GPS update from the device */
2
+
7
3
  interface NavGpsUpdate {
8
4
  coord: Coord;
9
5
  accuracy: number | null;
@@ -11,7 +7,7 @@ interface NavGpsUpdate {
11
7
  speed: number;
12
8
  timestamp: number;
13
9
  }
14
- /** Full navigation engine state snapshot */
10
+
15
11
  interface NavCoreState {
16
12
  snappedCoord: Coord | null;
17
13
  ghostCoord: Coord | null;
@@ -56,16 +52,16 @@ interface NavCoreState {
56
52
  jump: number;
57
53
  };
58
54
  }
59
- /** Navigation lifecycle states */
55
+
60
56
  type NavLifecycleState = 'IDLE' | 'OVERVIEW' | 'APPROACHING_ROUTE' | 'ON_ROUTE' | 'DEVIATING' | 'OFF_ROUTE' | 'REROUTING' | 'REJOINING' | 'REJOINED' | 'FAILED';
61
- /** License validation status */
57
+
62
58
  type LicenseStatus = 'VALID' | 'INVALID' | 'EXPIRED' | 'MISSING';
63
- /** License info returned by the engine */
59
+
64
60
  interface NavLicenseInfo {
65
61
  plan: 'free' | 'pro' | 'ai';
66
62
  limitations: string[];
67
63
  }
68
- /** Engine configuration (all optional with defaults) */
64
+
69
65
  interface NavOptions {
70
66
  baseCorridorMeters?: number;
71
67
  speedFactor?: number;
@@ -90,10 +86,10 @@ interface NavOptions {
90
86
  kalmanQ?: number;
91
87
  kalmanRBase?: number;
92
88
  licenseKey?: string;
93
- /** Application bundle ID or web domain bound into a Suite license. */
89
+
94
90
  applicationId?: string;
95
91
  }
96
- /** Navigation instruction (turn-by-turn step) */
92
+
97
93
  interface NavInstruction {
98
94
  location: Coord;
99
95
  geometryIndex: number;
@@ -101,7 +97,7 @@ interface NavInstruction {
101
97
  instruction?: string;
102
98
  cumulativeOffset?: number;
103
99
  }
104
- /** Deviation event emitted when vehicle goes off-route */
100
+
105
101
  interface DeviationEvent {
106
102
  anchorIndex: number;
107
103
  ghostCoord: Coord;
@@ -110,39 +106,39 @@ interface DeviationEvent {
110
106
  index: number;
111
107
  };
112
108
  }
113
- /** Alert event emitted on state changes */
109
+
114
110
  interface AlertEvent {
115
111
  type: NavCoreState['alertState'];
116
112
  message: string | null;
117
113
  }
118
- /** Feature key for license gating */
114
+
119
115
  type FeatureKey = 'advanced_snapping' | 'dead_reckoning' | 'route_offset' | 'progress_tracking' | 'advanced_bearing' | 'compound_deviation' | 'nav_ai';
120
- /** Route snapping result */
116
+
121
117
  interface SnapResult {
122
118
  idx: number;
123
119
  dist: number;
124
120
  proj: Coord;
125
121
  }
126
- /** Dead reckoning prediction */
122
+
127
123
  interface DRPrediction {
128
124
  predictedCoord: Coord;
129
125
  isActive: boolean;
130
126
  ageMs: number;
131
127
  }
132
- /** Dead reckoning anchor point */
128
+
133
129
  interface DRAnchor {
134
130
  coord: Coord;
135
131
  idx: number;
136
132
  ts: number;
137
133
  }
138
- /** Line style for renderer adapters */
134
+
139
135
  interface LineStyle {
140
136
  color?: string;
141
137
  width?: number;
142
138
  opacity?: number;
143
139
  dashPattern?: number[];
144
140
  }
145
- /** Camera target for renderer adapters */
141
+
146
142
  interface CameraTarget {
147
143
  coord: Coord;
148
144
  bearing: number;
@@ -150,36 +146,23 @@ interface CameraTarget {
150
146
  pitch?: number;
151
147
  }
152
148
 
153
- /**
154
- * NavCoreRenderer — Adapter contract
155
- *
156
- * Any map renderer (Mapbox, MapLibre, Leaflet, or a headless test harness)
157
- * implements this interface to receive rendering commands from NavCore.
158
- *
159
- * NavCore NEVER depends on a specific renderer — adapters depend on core,
160
- * core never depends on adapters.
161
- */
162
-
163
149
  interface NavCoreRenderer {
164
- /** Update the vehicle marker position and rotation */
150
+
165
151
  setVehiclePosition(coord: Coord, bearing: number): void;
166
- /** Draw or update the main route polyline */
152
+
167
153
  setRouteGeometry(coords: Coord[], style?: LineStyle): void;
168
- /** Draw or clear the detour/reroute polyline */
154
+
169
155
  setDetourGeometry(coords: Coord[] | null, style?: LineStyle): void;
170
- /** Show or hide the ghost vehicle (on-route projection when off-route) */
156
+
171
157
  setGhostPosition(coord: Coord | null, bearing: number): void;
172
- /** Set the camera center, bearing, and optional zoom */
158
+
173
159
  setCameraTarget(coord: Coord, bearing: number, zoom?: number): void;
174
- /** Animate the camera to a target over durationMs */
160
+
175
161
  animateCamera(target: CameraTarget, durationMs: number): void;
176
- /** Teardown — release all map resources */
162
+
177
163
  destroy(): void;
178
164
  }
179
- /**
180
- * HeadlessRenderer — No-op implementation for CI/CD testing.
181
- * Records all calls for assertion in integration tests.
182
- */
165
+
183
166
  declare class HeadlessRenderer implements NavCoreRenderer {
184
167
  readonly calls: Array<{
185
168
  method: string;
@@ -194,38 +177,27 @@ declare class HeadlessRenderer implements NavCoreRenderer {
194
177
  destroy(): void;
195
178
  }
196
179
 
197
- /**
198
- * DirectionsProvider — Data source contract
199
- *
200
- * Any directions API (Mapbox, OSRM, Valhalla, or a custom server)
201
- * implements this interface to provide routing data to NavCore.
202
- *
203
- * The provider MUST handle waypoint chunking internally if the
204
- * underlying API has waypoint limits. NavCore imposes no limit.
205
- */
206
-
207
- /** Options for route calculation */
208
180
  interface RouteOptions {
209
- /** Driving profile: 'driving' | 'driving-traffic' | 'cycling' | 'walking' */
181
+
210
182
  profile?: string;
211
- /** Request alternatives */
183
+
212
184
  alternatives?: boolean;
213
- /** Include step-by-step instructions */
185
+
214
186
  steps?: boolean;
215
- /** Geometry format: 'geojson' | 'polyline' | 'polyline6' */
187
+
216
188
  geometries?: string;
217
- /** Route overview level: 'full' | 'simplified' | 'false' */
189
+
218
190
  overview?: string;
219
- /** Language code for instructions (e.g. 'en', 'fr', 'nl') */
191
+
220
192
  language?: string;
221
193
  }
222
- /** A single route leg between two waypoints */
194
+
223
195
  interface RouteLeg {
224
196
  distance: number;
225
197
  duration: number;
226
198
  steps?: RouteStep[];
227
199
  }
228
- /** A single step within a leg */
200
+
229
201
  interface RouteStep {
230
202
  distance: number;
231
203
  duration: number;
@@ -240,69 +212,58 @@ interface RouteStep {
240
212
  };
241
213
  name?: string;
242
214
  }
243
- /** Complete route result from a directions provider */
215
+
244
216
  interface RouteResult {
245
- /** Full route geometry */
217
+
246
218
  geometry: Coord[];
247
- /** Total distance in metres */
219
+
248
220
  distance: number;
249
- /** Total duration in seconds */
221
+
250
222
  duration: number;
251
- /** Individual legs */
223
+
252
224
  legs: RouteLeg[];
253
- /** Raw provider response (for debugging) */
225
+
254
226
  raw?: unknown;
255
227
  }
256
- /** The provider interface */
228
+
257
229
  interface DirectionsProvider {
258
- /**
259
- * Calculate a route through the given waypoints.
260
- * Must handle chunking internally if the provider has waypoint limits.
261
- */
230
+
262
231
  getRoute(waypoints: Coord[], options?: RouteOptions): Promise<RouteResult>;
263
232
  }
264
233
 
265
- /**
266
- * CustomRouteBuilder — Types for building custom routes
267
- *
268
- * Build routes with unlimited waypoints, GPX/GeoJSON import/export,
269
- * and configurable chunking strategies.
270
- */
271
-
272
- /** Options when adding a waypoint */
273
234
  interface WaypointOptions {
274
- /** Whether this is a silent waypoint (no instruction generated) */
235
+
275
236
  silent?: boolean;
276
- /** Optional name/label for the waypoint */
237
+
277
238
  name?: string;
278
239
  }
279
- /** How to connect waypoints when building */
240
+
280
241
  interface BuildOptions {
281
- /** Connection mode between waypoints */
242
+
282
243
  connectionMode?: 'ROUTED' | 'STRAIGHT' | 'MIXED';
283
- /** Chunk overlap strategy for multi-segment API calls */
244
+
284
245
  chunkStrategy?: 'OVERLAP_1' | 'OVERLAP_2';
285
- /** Maximum waypoints per API call (provider-specific, default 25) */
246
+
286
247
  maxWaypointsPerChunk?: number;
287
248
  }
288
- /** A waypoint in the custom route */
249
+
289
250
  interface CustomWaypoint {
290
251
  id: string;
291
252
  coord: Coord;
292
253
  options?: WaypointOptions;
293
254
  }
294
- /** The built custom route */
255
+
295
256
  interface CustomRoute {
296
- /** Full stitched geometry */
257
+
297
258
  geometry: Coord[];
298
- /** Individual waypoints */
259
+
299
260
  waypoints: CustomWaypoint[];
300
- /** Total distance in metres */
261
+
301
262
  distance: number;
302
- /** Total duration in seconds */
263
+
303
264
  duration: number;
304
265
  }
305
- /** GeoJSON FeatureCollection (minimal typing for zero-dep constraint) */
266
+
306
267
  interface FeatureCollection {
307
268
  type: 'FeatureCollection';
308
269
  features: Array<{
@@ -314,38 +275,30 @@ interface FeatureCollection {
314
275
  properties: Record<string, unknown>;
315
276
  }>;
316
277
  }
317
- /** The builder interface */
278
+
318
279
  interface CustomRouteBuilderInterface {
319
- /** Add a waypoint at the end of the route */
280
+
320
281
  addWaypoint(coord: Coord, options?: WaypointOptions): string;
321
- /** Insert a waypoint after an existing one */
282
+
322
283
  insertWaypoint(coord: Coord, afterId: string): string;
323
- /** Remove a waypoint by ID */
284
+
324
285
  removeWaypoint(id: string): void;
325
- /** Move an existing waypoint to a new coordinate */
286
+
326
287
  moveWaypoint(id: string, newCoord: Coord): void;
327
- /** Build the route using the configured directions provider */
288
+
328
289
  build(options?: BuildOptions): Promise<CustomRoute>;
329
- /** Import waypoints from a GPX string */
290
+
330
291
  fromGPX(gpxString: string): void;
331
- /** Import waypoints from a GeoJSON FeatureCollection */
292
+
332
293
  fromGeoJSON(geojson: FeatureCollection): void;
333
- /** Export the current route as GeoJSON */
294
+
334
295
  toGeoJSON(): FeatureCollection;
335
- /** Export the current route as GPX */
296
+
336
297
  toGPX(): string;
337
298
  }
338
299
 
339
- /**
340
- * ExamInstruction — Klaroways-specific extension
341
- *
342
- * Extends the base NavInstruction with exam-specific scoring fields,
343
- * trigger conditions, and mandatory/optional classification.
344
- */
345
-
346
- /** Actions the examiner evaluates */
347
300
  type ExamAction = 'MIRROR_CHECK' | 'SIGNAL' | 'OBSERVATION' | 'SPEED_REDUCE' | 'BLIND_SPOT_CHECK' | 'YIELD' | 'FULL_STOP' | 'LANE_POSITION';
348
- /** Condition that must be met for the instruction to trigger */
301
+
349
302
  interface TriggerCondition {
350
303
  minSpeedKmh?: number;
351
304
  maxSpeedKmh?: number;
@@ -354,32 +307,32 @@ interface TriggerCondition {
354
307
  to: string;
355
308
  };
356
309
  }
357
- /** Exam instruction extending the base navigation instruction */
310
+
358
311
  interface ExamInstruction extends NavInstruction {
359
- /** The action being evaluated */
312
+
360
313
  examAction: ExamAction;
361
- /** Points awarded/deducted for this instruction */
314
+
362
315
  pointValue: number;
363
- /** Whether this instruction is mandatory (failure = immediate fail) */
316
+
364
317
  mandatory: boolean;
365
- /** Optional note for the examiner */
318
+
366
319
  examNote?: string;
367
- /** Condition gating when this instruction activates */
320
+
368
321
  triggerCondition?: TriggerCondition;
369
- /** Multilingual instruction group ID (from Convex backend) */
322
+
370
323
  instructionGroupId?: string;
371
324
  }
372
- /** Hazard zone definition for exam routes */
325
+
373
326
  interface ExamHazardZone {
374
- /** Center coordinate of the hazard zone */
327
+
375
328
  center: [number, number];
376
- /** Radius in metres */
329
+
377
330
  radiusM: number;
378
- /** Type of hazard */
331
+
379
332
  type: 'SCHOOL_ZONE' | 'HOSPITAL' | 'PEDESTRIAN_CROSSING' | 'TRAM_TRACKS' | 'RESIDENTIAL';
380
- /** Required actions within this zone */
333
+
381
334
  requiredActions: ExamAction[];
382
- /** Maximum allowed speed in km/h */
335
+
383
336
  maxSpeedKmh?: number;
384
337
  }
385
338
 
package/dist/index.d.ts CHANGED
@@ -1,9 +1,5 @@
1
- /**
2
- * Core types used throughout the NavCore SDK.
3
- */
4
- /** [longitude, latitude] — Mapbox/GeoJSON order */
5
1
  type Coord = [number, number];
6
- /** GPS update from the device */
2
+
7
3
  interface NavGpsUpdate {
8
4
  coord: Coord;
9
5
  accuracy: number | null;
@@ -11,7 +7,7 @@ interface NavGpsUpdate {
11
7
  speed: number;
12
8
  timestamp: number;
13
9
  }
14
- /** Full navigation engine state snapshot */
10
+
15
11
  interface NavCoreState {
16
12
  snappedCoord: Coord | null;
17
13
  ghostCoord: Coord | null;
@@ -56,16 +52,16 @@ interface NavCoreState {
56
52
  jump: number;
57
53
  };
58
54
  }
59
- /** Navigation lifecycle states */
55
+
60
56
  type NavLifecycleState = 'IDLE' | 'OVERVIEW' | 'APPROACHING_ROUTE' | 'ON_ROUTE' | 'DEVIATING' | 'OFF_ROUTE' | 'REROUTING' | 'REJOINING' | 'REJOINED' | 'FAILED';
61
- /** License validation status */
57
+
62
58
  type LicenseStatus = 'VALID' | 'INVALID' | 'EXPIRED' | 'MISSING';
63
- /** License info returned by the engine */
59
+
64
60
  interface NavLicenseInfo {
65
61
  plan: 'free' | 'pro' | 'ai';
66
62
  limitations: string[];
67
63
  }
68
- /** Engine configuration (all optional with defaults) */
64
+
69
65
  interface NavOptions {
70
66
  baseCorridorMeters?: number;
71
67
  speedFactor?: number;
@@ -90,10 +86,10 @@ interface NavOptions {
90
86
  kalmanQ?: number;
91
87
  kalmanRBase?: number;
92
88
  licenseKey?: string;
93
- /** Application bundle ID or web domain bound into a Suite license. */
89
+
94
90
  applicationId?: string;
95
91
  }
96
- /** Navigation instruction (turn-by-turn step) */
92
+
97
93
  interface NavInstruction {
98
94
  location: Coord;
99
95
  geometryIndex: number;
@@ -101,7 +97,7 @@ interface NavInstruction {
101
97
  instruction?: string;
102
98
  cumulativeOffset?: number;
103
99
  }
104
- /** Deviation event emitted when vehicle goes off-route */
100
+
105
101
  interface DeviationEvent {
106
102
  anchorIndex: number;
107
103
  ghostCoord: Coord;
@@ -110,39 +106,39 @@ interface DeviationEvent {
110
106
  index: number;
111
107
  };
112
108
  }
113
- /** Alert event emitted on state changes */
109
+
114
110
  interface AlertEvent {
115
111
  type: NavCoreState['alertState'];
116
112
  message: string | null;
117
113
  }
118
- /** Feature key for license gating */
114
+
119
115
  type FeatureKey = 'advanced_snapping' | 'dead_reckoning' | 'route_offset' | 'progress_tracking' | 'advanced_bearing' | 'compound_deviation' | 'nav_ai';
120
- /** Route snapping result */
116
+
121
117
  interface SnapResult {
122
118
  idx: number;
123
119
  dist: number;
124
120
  proj: Coord;
125
121
  }
126
- /** Dead reckoning prediction */
122
+
127
123
  interface DRPrediction {
128
124
  predictedCoord: Coord;
129
125
  isActive: boolean;
130
126
  ageMs: number;
131
127
  }
132
- /** Dead reckoning anchor point */
128
+
133
129
  interface DRAnchor {
134
130
  coord: Coord;
135
131
  idx: number;
136
132
  ts: number;
137
133
  }
138
- /** Line style for renderer adapters */
134
+
139
135
  interface LineStyle {
140
136
  color?: string;
141
137
  width?: number;
142
138
  opacity?: number;
143
139
  dashPattern?: number[];
144
140
  }
145
- /** Camera target for renderer adapters */
141
+
146
142
  interface CameraTarget {
147
143
  coord: Coord;
148
144
  bearing: number;
@@ -150,36 +146,23 @@ interface CameraTarget {
150
146
  pitch?: number;
151
147
  }
152
148
 
153
- /**
154
- * NavCoreRenderer — Adapter contract
155
- *
156
- * Any map renderer (Mapbox, MapLibre, Leaflet, or a headless test harness)
157
- * implements this interface to receive rendering commands from NavCore.
158
- *
159
- * NavCore NEVER depends on a specific renderer — adapters depend on core,
160
- * core never depends on adapters.
161
- */
162
-
163
149
  interface NavCoreRenderer {
164
- /** Update the vehicle marker position and rotation */
150
+
165
151
  setVehiclePosition(coord: Coord, bearing: number): void;
166
- /** Draw or update the main route polyline */
152
+
167
153
  setRouteGeometry(coords: Coord[], style?: LineStyle): void;
168
- /** Draw or clear the detour/reroute polyline */
154
+
169
155
  setDetourGeometry(coords: Coord[] | null, style?: LineStyle): void;
170
- /** Show or hide the ghost vehicle (on-route projection when off-route) */
156
+
171
157
  setGhostPosition(coord: Coord | null, bearing: number): void;
172
- /** Set the camera center, bearing, and optional zoom */
158
+
173
159
  setCameraTarget(coord: Coord, bearing: number, zoom?: number): void;
174
- /** Animate the camera to a target over durationMs */
160
+
175
161
  animateCamera(target: CameraTarget, durationMs: number): void;
176
- /** Teardown — release all map resources */
162
+
177
163
  destroy(): void;
178
164
  }
179
- /**
180
- * HeadlessRenderer — No-op implementation for CI/CD testing.
181
- * Records all calls for assertion in integration tests.
182
- */
165
+
183
166
  declare class HeadlessRenderer implements NavCoreRenderer {
184
167
  readonly calls: Array<{
185
168
  method: string;
@@ -194,38 +177,27 @@ declare class HeadlessRenderer implements NavCoreRenderer {
194
177
  destroy(): void;
195
178
  }
196
179
 
197
- /**
198
- * DirectionsProvider — Data source contract
199
- *
200
- * Any directions API (Mapbox, OSRM, Valhalla, or a custom server)
201
- * implements this interface to provide routing data to NavCore.
202
- *
203
- * The provider MUST handle waypoint chunking internally if the
204
- * underlying API has waypoint limits. NavCore imposes no limit.
205
- */
206
-
207
- /** Options for route calculation */
208
180
  interface RouteOptions {
209
- /** Driving profile: 'driving' | 'driving-traffic' | 'cycling' | 'walking' */
181
+
210
182
  profile?: string;
211
- /** Request alternatives */
183
+
212
184
  alternatives?: boolean;
213
- /** Include step-by-step instructions */
185
+
214
186
  steps?: boolean;
215
- /** Geometry format: 'geojson' | 'polyline' | 'polyline6' */
187
+
216
188
  geometries?: string;
217
- /** Route overview level: 'full' | 'simplified' | 'false' */
189
+
218
190
  overview?: string;
219
- /** Language code for instructions (e.g. 'en', 'fr', 'nl') */
191
+
220
192
  language?: string;
221
193
  }
222
- /** A single route leg between two waypoints */
194
+
223
195
  interface RouteLeg {
224
196
  distance: number;
225
197
  duration: number;
226
198
  steps?: RouteStep[];
227
199
  }
228
- /** A single step within a leg */
200
+
229
201
  interface RouteStep {
230
202
  distance: number;
231
203
  duration: number;
@@ -240,69 +212,58 @@ interface RouteStep {
240
212
  };
241
213
  name?: string;
242
214
  }
243
- /** Complete route result from a directions provider */
215
+
244
216
  interface RouteResult {
245
- /** Full route geometry */
217
+
246
218
  geometry: Coord[];
247
- /** Total distance in metres */
219
+
248
220
  distance: number;
249
- /** Total duration in seconds */
221
+
250
222
  duration: number;
251
- /** Individual legs */
223
+
252
224
  legs: RouteLeg[];
253
- /** Raw provider response (for debugging) */
225
+
254
226
  raw?: unknown;
255
227
  }
256
- /** The provider interface */
228
+
257
229
  interface DirectionsProvider {
258
- /**
259
- * Calculate a route through the given waypoints.
260
- * Must handle chunking internally if the provider has waypoint limits.
261
- */
230
+
262
231
  getRoute(waypoints: Coord[], options?: RouteOptions): Promise<RouteResult>;
263
232
  }
264
233
 
265
- /**
266
- * CustomRouteBuilder — Types for building custom routes
267
- *
268
- * Build routes with unlimited waypoints, GPX/GeoJSON import/export,
269
- * and configurable chunking strategies.
270
- */
271
-
272
- /** Options when adding a waypoint */
273
234
  interface WaypointOptions {
274
- /** Whether this is a silent waypoint (no instruction generated) */
235
+
275
236
  silent?: boolean;
276
- /** Optional name/label for the waypoint */
237
+
277
238
  name?: string;
278
239
  }
279
- /** How to connect waypoints when building */
240
+
280
241
  interface BuildOptions {
281
- /** Connection mode between waypoints */
242
+
282
243
  connectionMode?: 'ROUTED' | 'STRAIGHT' | 'MIXED';
283
- /** Chunk overlap strategy for multi-segment API calls */
244
+
284
245
  chunkStrategy?: 'OVERLAP_1' | 'OVERLAP_2';
285
- /** Maximum waypoints per API call (provider-specific, default 25) */
246
+
286
247
  maxWaypointsPerChunk?: number;
287
248
  }
288
- /** A waypoint in the custom route */
249
+
289
250
  interface CustomWaypoint {
290
251
  id: string;
291
252
  coord: Coord;
292
253
  options?: WaypointOptions;
293
254
  }
294
- /** The built custom route */
255
+
295
256
  interface CustomRoute {
296
- /** Full stitched geometry */
257
+
297
258
  geometry: Coord[];
298
- /** Individual waypoints */
259
+
299
260
  waypoints: CustomWaypoint[];
300
- /** Total distance in metres */
261
+
301
262
  distance: number;
302
- /** Total duration in seconds */
263
+
303
264
  duration: number;
304
265
  }
305
- /** GeoJSON FeatureCollection (minimal typing for zero-dep constraint) */
266
+
306
267
  interface FeatureCollection {
307
268
  type: 'FeatureCollection';
308
269
  features: Array<{
@@ -314,38 +275,30 @@ interface FeatureCollection {
314
275
  properties: Record<string, unknown>;
315
276
  }>;
316
277
  }
317
- /** The builder interface */
278
+
318
279
  interface CustomRouteBuilderInterface {
319
- /** Add a waypoint at the end of the route */
280
+
320
281
  addWaypoint(coord: Coord, options?: WaypointOptions): string;
321
- /** Insert a waypoint after an existing one */
282
+
322
283
  insertWaypoint(coord: Coord, afterId: string): string;
323
- /** Remove a waypoint by ID */
284
+
324
285
  removeWaypoint(id: string): void;
325
- /** Move an existing waypoint to a new coordinate */
286
+
326
287
  moveWaypoint(id: string, newCoord: Coord): void;
327
- /** Build the route using the configured directions provider */
288
+
328
289
  build(options?: BuildOptions): Promise<CustomRoute>;
329
- /** Import waypoints from a GPX string */
290
+
330
291
  fromGPX(gpxString: string): void;
331
- /** Import waypoints from a GeoJSON FeatureCollection */
292
+
332
293
  fromGeoJSON(geojson: FeatureCollection): void;
333
- /** Export the current route as GeoJSON */
294
+
334
295
  toGeoJSON(): FeatureCollection;
335
- /** Export the current route as GPX */
296
+
336
297
  toGPX(): string;
337
298
  }
338
299
 
339
- /**
340
- * ExamInstruction — Klaroways-specific extension
341
- *
342
- * Extends the base NavInstruction with exam-specific scoring fields,
343
- * trigger conditions, and mandatory/optional classification.
344
- */
345
-
346
- /** Actions the examiner evaluates */
347
300
  type ExamAction = 'MIRROR_CHECK' | 'SIGNAL' | 'OBSERVATION' | 'SPEED_REDUCE' | 'BLIND_SPOT_CHECK' | 'YIELD' | 'FULL_STOP' | 'LANE_POSITION';
348
- /** Condition that must be met for the instruction to trigger */
301
+
349
302
  interface TriggerCondition {
350
303
  minSpeedKmh?: number;
351
304
  maxSpeedKmh?: number;
@@ -354,32 +307,32 @@ interface TriggerCondition {
354
307
  to: string;
355
308
  };
356
309
  }
357
- /** Exam instruction extending the base navigation instruction */
310
+
358
311
  interface ExamInstruction extends NavInstruction {
359
- /** The action being evaluated */
312
+
360
313
  examAction: ExamAction;
361
- /** Points awarded/deducted for this instruction */
314
+
362
315
  pointValue: number;
363
- /** Whether this instruction is mandatory (failure = immediate fail) */
316
+
364
317
  mandatory: boolean;
365
- /** Optional note for the examiner */
318
+
366
319
  examNote?: string;
367
- /** Condition gating when this instruction activates */
320
+
368
321
  triggerCondition?: TriggerCondition;
369
- /** Multilingual instruction group ID (from Convex backend) */
322
+
370
323
  instructionGroupId?: string;
371
324
  }
372
- /** Hazard zone definition for exam routes */
325
+
373
326
  interface ExamHazardZone {
374
- /** Center coordinate of the hazard zone */
327
+
375
328
  center: [number, number];
376
- /** Radius in metres */
329
+
377
330
  radiusM: number;
378
- /** Type of hazard */
331
+
379
332
  type: 'SCHOOL_ZONE' | 'HOSPITAL' | 'PEDESTRIAN_CROSSING' | 'TRAM_TRACKS' | 'RESIDENTIAL';
380
- /** Required actions within this zone */
333
+
381
334
  requiredActions: ExamAction[];
382
- /** Maximum allowed speed in km/h */
335
+
383
336
  maxSpeedKmh?: number;
384
337
  }
385
338
 
package/dist/index.js CHANGED
@@ -1,31 +1 @@
1
- 'use strict';
2
-
3
- // src/renderer.ts
4
- var HeadlessRenderer = class {
5
- constructor() {
6
- this.calls = [];
7
- }
8
- setVehiclePosition(coord, bearing) {
9
- this.calls.push({ method: "setVehiclePosition", args: [coord, bearing] });
10
- }
11
- setRouteGeometry(coords, style) {
12
- this.calls.push({ method: "setRouteGeometry", args: [coords, style] });
13
- }
14
- setDetourGeometry(coords, style) {
15
- this.calls.push({ method: "setDetourGeometry", args: [coords, style] });
16
- }
17
- setGhostPosition(coord, bearing) {
18
- this.calls.push({ method: "setGhostPosition", args: [coord, bearing] });
19
- }
20
- setCameraTarget(coord, bearing, zoom) {
21
- this.calls.push({ method: "setCameraTarget", args: [coord, bearing, zoom] });
22
- }
23
- animateCamera(target, durationMs) {
24
- this.calls.push({ method: "animateCamera", args: [target, durationMs] });
25
- }
26
- destroy() {
27
- this.calls.push({ method: "destroy", args: [] });
28
- }
29
- };
30
-
31
- exports.HeadlessRenderer = HeadlessRenderer;
1
+ 'use strict';var r=class{constructor(){this.calls=[];}setVehiclePosition(e,o){this.calls.push({method:"setVehiclePosition",args:[e,o]});}setRouteGeometry(e,o){this.calls.push({method:"setRouteGeometry",args:[e,o]});}setDetourGeometry(e,o){this.calls.push({method:"setDetourGeometry",args:[e,o]});}setGhostPosition(e,o){this.calls.push({method:"setGhostPosition",args:[e,o]});}setCameraTarget(e,o,t){this.calls.push({method:"setCameraTarget",args:[e,o,t]});}animateCamera(e,o){this.calls.push({method:"animateCamera",args:[e,o]});}destroy(){this.calls.push({method:"destroy",args:[]});}};exports.HeadlessRenderer=r;
package/dist/index.mjs CHANGED
@@ -1,29 +1 @@
1
- // src/renderer.ts
2
- var HeadlessRenderer = class {
3
- constructor() {
4
- this.calls = [];
5
- }
6
- setVehiclePosition(coord, bearing) {
7
- this.calls.push({ method: "setVehiclePosition", args: [coord, bearing] });
8
- }
9
- setRouteGeometry(coords, style) {
10
- this.calls.push({ method: "setRouteGeometry", args: [coords, style] });
11
- }
12
- setDetourGeometry(coords, style) {
13
- this.calls.push({ method: "setDetourGeometry", args: [coords, style] });
14
- }
15
- setGhostPosition(coord, bearing) {
16
- this.calls.push({ method: "setGhostPosition", args: [coord, bearing] });
17
- }
18
- setCameraTarget(coord, bearing, zoom) {
19
- this.calls.push({ method: "setCameraTarget", args: [coord, bearing, zoom] });
20
- }
21
- animateCamera(target, durationMs) {
22
- this.calls.push({ method: "animateCamera", args: [target, durationMs] });
23
- }
24
- destroy() {
25
- this.calls.push({ method: "destroy", args: [] });
26
- }
27
- };
28
-
29
- export { HeadlessRenderer };
1
+ var r=class{constructor(){this.calls=[];}setVehiclePosition(e,o){this.calls.push({method:"setVehiclePosition",args:[e,o]});}setRouteGeometry(e,o){this.calls.push({method:"setRouteGeometry",args:[e,o]});}setDetourGeometry(e,o){this.calls.push({method:"setDetourGeometry",args:[e,o]});}setGhostPosition(e,o){this.calls.push({method:"setGhostPosition",args:[e,o]});}setCameraTarget(e,o,t){this.calls.push({method:"setCameraTarget",args:[e,o,t]});}animateCamera(e,o){this.calls.push({method:"animateCamera",args:[e,o]});}destroy(){this.calls.push({method:"destroy",args:[]});}};export{r as HeadlessRenderer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingissa/navcore-types",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Shared type definitions for the NavCore SDK ecosystem.",
5
5
  "author": "Ingissa <8abnav@gmail.com>",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -17,7 +17,8 @@
17
17
  },
18
18
  "files": [
19
19
  "dist",
20
- "LICENSE"
20
+ "LICENSE",
21
+ "LICENSE.fr.md"
21
22
  ],
22
23
  "sideEffects": false,
23
24
  "publishConfig": {
@@ -28,6 +29,6 @@
28
29
  },
29
30
  "scripts": {
30
31
  "build": "tsup",
31
- "prepublishOnly": "npm run build --prefix ../.. && node ../../scripts/check-release.mjs"
32
+ "prepublishOnly": "node ../../scripts/build-stamp.mjs --verify && node ../../scripts/check-license.mjs && node ../../scripts/check-release.mjs --workspace=@ingissa/navcore-types"
32
33
  }
33
34
  }