@minmaps-dev/mm-web-sdk 1.0.0-rc.40 → 1.0.0-rc.42

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/dist/index.d.ts CHANGED
@@ -1349,8 +1349,7 @@ declare class MinuteMaps {
1349
1349
  * the DOM-side dyslexic-font accommodation onto the canvas, which CSS can't
1350
1350
  * reach.
1351
1351
  *
1352
- * Goes through the same local-glyph fallback the themes already use for
1353
- * `Material Icons` (`LOCAL_GLYPH_FONTS`): `text-font` values are swapped to
1352
+ * Goes through MapLibre's local-glyph fallback: `text-font` values are swapped to
1354
1353
  * fontstack names intentionally absent from the glyph server
1355
1354
  * (`OpenDyslexic Bold` etc.), so MapLibre rasterizes them from a
1356
1355
  * page-loaded `@font-face` instead. The consuming app owns loading that
@@ -1398,6 +1397,17 @@ declare class MinuteMaps {
1398
1397
  * and must not be held hostage to a network round-trip.
1399
1398
  */
1400
1399
  setLocale(locale: string): Promise<void>;
1400
+ /**
1401
+ * Start fetching the localized names for `locale` in the background so a
1402
+ * later `setLocale(locale)` only has the in-memory patch and redraw left to
1403
+ * do. Call it once after `ready` for each alternate language the UI offers.
1404
+ *
1405
+ * Never throws and never changes the active locale or the map — a provider
1406
+ * without locale support, an empty code or a failed fetch is a silent no-op
1407
+ * (a failed fetch is retried when `setLocale` runs). Safe to call
1408
+ * repeatedly; the fetch for a given code happens once.
1409
+ */
1410
+ prefetchLocale(locale: string): Promise<void>;
1401
1411
  /** Currently active locale (BCP-47), or `undefined` when no locale has
1402
1412
  * been set — meaning JACS resolves names to the customer's default. */
1403
1413
  getActiveLocale(): string | undefined;