@massif-maps/web 6.1.0-rc.1 → 6.1.0-rc.2

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/massif-web.wasm CHANGED
Binary file
package/massif.mjs CHANGED
@@ -371,13 +371,14 @@ export function canvasSelector(canvas, id = 'map') {
371
371
  }
372
372
 
373
373
  /**
374
- * Loads the SDK module. `moduleUrl` defaults to massif-web.mjs beside this file; `options` go to
375
- * the emscripten factory (print, printErr, locateFile...).
374
+ * Loads the SDK module. `moduleUrl` defaults to massif-web.mjs beside this file, or
375
+ * massif-web-<variant>.mjs for a `variant` such as 'full'; `options` go to the emscripten factory
376
+ * (print, printErr, locateFile...).
376
377
  */
377
378
  // Not a literal in new URL(): a bundler would take that for an asset to bundle.
378
- const MODULE_FILE = 'massif-web.mjs';
379
+ const MODULE_NAME = 'massif-web';
379
380
 
380
- export async function loadModule({ moduleUrl = new URL(MODULE_FILE, import.meta.url).href, ...options } = {}) {
381
+ export async function loadModule({ variant, moduleUrl = new URL(`${MODULE_NAME}${variant ? `-${variant}` : ''}.mjs`, import.meta.url).href, ...options } = {}) {
381
382
  // webpackIgnore: a bundler must not inline the module, its pthread workers import it by URL.
382
383
  const { default: factory } = await import(/* webpackIgnore: true */ moduleUrl);
383
384
  const base = new URL('.', new URL(moduleUrl, location.href)).href;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massif-maps/web",
3
- "version": "6.1.0-rc.1",
3
+ "version": "6.1.0-rc.2",
4
4
  "description": "Massif Maps in the browser: the SDK compiled to WebAssembly, with its typed API",
5
5
  "license": "BSD-3-Clause",
6
6
  "type": "module",
@@ -14,7 +14,8 @@
14
14
  "./bundle": "./massif-maps.bundle.mjs",
15
15
  "./massif.mjs": "./massif.mjs",
16
16
  "./coi-serviceworker.js": "./coi-serviceworker.js",
17
- "./massif-web.mjs": "./massif-web.mjs"
17
+ "./massif-web.mjs": "./massif-web.mjs",
18
+ "./massif-web-full.mjs": "./massif-web-full.mjs"
18
19
  },
19
20
  "files": [
20
21
  "*.mjs",
@@ -25,7 +26,7 @@
25
26
  ],
26
27
  "sideEffects": false,
27
28
  "dependencies": {
28
- "@massif-maps/api": "6.1.0-rc.1"
29
+ "@massif-maps/api": "6.1.0-rc.2"
29
30
  },
30
31
  "repository": {
31
32
  "type": "git",