@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/index.d.ts +3 -1
- package/massif-maps.bundle.mjs +3 -3
- package/massif-web-full.data +0 -0
- package/massif-web-full.mjs +2 -0
- package/massif-web-full.wasm +0 -0
- package/massif-web.mjs +1 -1
- package/massif-web.wasm +0 -0
- package/massif.mjs +5 -4
- package/package.json +4 -3
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
|
|
375
|
-
* the emscripten factory
|
|
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
|
|
379
|
+
const MODULE_NAME = 'massif-web';
|
|
379
380
|
|
|
380
|
-
export async function loadModule({ moduleUrl = new URL(
|
|
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.
|
|
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.
|
|
29
|
+
"@massif-maps/api": "6.1.0-rc.2"
|
|
29
30
|
},
|
|
30
31
|
"repository": {
|
|
31
32
|
"type": "git",
|