@edugis-org/webmapx 0.1.1 → 0.1.3

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/README.md CHANGED
@@ -19,7 +19,7 @@ Config-driven web map UI with adapters for MapLibre, OpenLayers, Leaflet, and Ce
19
19
 
20
20
  ```html
21
21
  <script type="module">
22
- import { WebMapX } from 'https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.0/dist-lib/webmapx.js'
22
+ import { WebMapX } from 'https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@latest/dist-lib/webmapx.js'
23
23
  WebMapX.mount('#map', { config: './mymap.json' })
24
24
  </script>
25
25
  ```
@@ -3,7 +3,7 @@ import { t } from "./webmapx-base-tool-Dm9NAWLD.js";
3
3
  import { i as n, n as r, o as i } from "./decorators-B35AgiCU.js";
4
4
  import { css as a, html as o, nothing as s } from "lit";
5
5
  //#region src/utils/epsg-lookup-manager.ts
6
- var c = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.1/public", l = 6e4, u = new class {
6
+ var c = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.3/public", l = 6e4, u = new class {
7
7
  constructor() {
8
8
  this.worker = null, this.isReady = !1, this.isInitializing = !1, this.initPromise = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.requestCounter = 0, this.idleTimeout = null, this.idleTimeoutMs = l;
9
9
  }
@@ -26,7 +26,7 @@ var i = {
26
26
  "3d": () => import("./webmapx-3d-tool-D4CTD2gB.js"),
27
27
  truearea: () => import("./webmapx-truearea-tool-CMB4Orm-.js"),
28
28
  "view-mode": () => import("./webmapx-view-mode-tool-CUpLNjOj.js"),
29
- coordinates: () => import("./webmapx-coordinates-tool-CNRwc0of.js"),
29
+ coordinates: () => import("./webmapx-coordinates-tool-CPC2mR5N.js"),
30
30
  settings: () => import("./webmapx-settings-DDEJ8aoV.js"),
31
31
  "config-edit": () => import("./webmapx-config-edit-tool-DCTyxqTk.js")
32
32
  };
@@ -1263,32 +1263,49 @@ var I = (e) => !c(e) && typeof e != "boolean" && typeof e != "number", L = class
1263
1263
  }
1264
1264
  }.createInstance();
1265
1265
  X.createInstance, X.dir, X.init, X.loadResources, X.reloadResources, X.use, X.changeLanguage, X.getFixedT, X.t, X.exists, X.setDefaultNamespace, X.hasLoadedNamespace, X.loadNamespaces, X.loadLanguages;
1266
- //#endregion
1267
- //#region src/i18n/i18n.ts
1268
- var Z = X.createInstance(), Q = !1;
1269
- async function se() {
1266
+ var se = {
1267
+ tools: {
1268
+ draw: "Draw",
1269
+ measure: "Measure",
1270
+ print: "Print",
1271
+ search: "Search",
1272
+ import: "Import layer",
1273
+ geolocation: "My location",
1274
+ info: "Info",
1275
+ "3d": "3D view",
1276
+ truearea: "True area",
1277
+ settings: "Settings"
1278
+ },
1279
+ common: {
1280
+ close: "Close",
1281
+ cancel: "Cancel",
1282
+ ok: "OK",
1283
+ loading: "Loading..."
1284
+ }
1285
+ }, Z = X.createInstance(), Q = !1;
1286
+ async function ce() {
1270
1287
  Q || (Q = !0, await Z.init({
1271
1288
  lng: "en",
1272
1289
  fallbackLng: "en",
1273
1290
  ns: ["webmapx"],
1274
1291
  defaultNS: "webmapx",
1275
- resources: { en: { webmapx: (await import("../locales/en/core.json", { with: { type: "json" } })).default } },
1292
+ resources: { en: { webmapx: se } },
1276
1293
  interpolation: { escapeValue: !1 }
1277
1294
  }));
1278
1295
  }
1279
- function ce(e, t) {
1296
+ function le(e, t) {
1280
1297
  return Z.t(e, t);
1281
1298
  }
1282
1299
  //#endregion
1283
1300
  //#region src/bootstrap/locale-loader.ts
1284
- var le = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.1/src/locales";
1301
+ var ue = "https://cdn.jsdelivr.net/npm/@edugis-org/webmapx@0.1.3/src/locales";
1285
1302
  async function $(e) {
1286
1303
  if (Z.hasResourceBundle(e, "webmapx")) {
1287
1304
  await Z.changeLanguage(e);
1288
1305
  return;
1289
1306
  }
1290
1307
  try {
1291
- let t = `${le}/${e}/core.json`, n = await fetch(t).then((e) => {
1308
+ let t = `${ue}/${e}/core.json`, n = await fetch(t).then((e) => {
1292
1309
  if (!e.ok) throw Error(`HTTP ${e.status}`);
1293
1310
  return e.json();
1294
1311
  });
@@ -1299,13 +1316,13 @@ async function $(e) {
1299
1316
  }
1300
1317
  //#endregion
1301
1318
  //#region src/bootstrap/WebMapX.ts
1302
- var ue = class {
1319
+ var de = class {
1303
1320
  static async mount(e, t) {
1304
1321
  let n = typeof t.config == "string" ? await fetch(t.config).then((e) => {
1305
1322
  if (!e.ok) throw Error(`[webmapx] Failed to load config: ${t.config}`);
1306
1323
  return e.json();
1307
1324
  }) : t.config;
1308
- await se();
1325
+ await ce();
1309
1326
  let i = n.engine ?? "maplibre";
1310
1327
  await Promise.all([
1311
1328
  r(i),
@@ -1318,4 +1335,4 @@ var ue = class {
1318
1335
  }
1319
1336
  };
1320
1337
  //#endregion
1321
- export { ue as WebMapX, e as WebmapxBaseTool, t as WebmapxPluginTool, $ as changeLocale, Z as i18n, ce as t };
1338
+ export { de as WebMapX, e as WebmapxBaseTool, t as WebmapxPluginTool, $ as changeLocale, Z as i18n, le as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edugis-org/webmapx",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "A modular web map UI with built-in adapters for MapLibre, OpenLayers, Leaflet, and Cesium.",
5
5
  "license": "ISC",
6
6
  "author": "Anne Blankert",
@@ -1,22 +0,0 @@
1
- var e = {
2
- tools: {
3
- draw: "Draw",
4
- measure: "Measure",
5
- print: "Print",
6
- search: "Search",
7
- import: "Import layer",
8
- geolocation: "My location",
9
- info: "Info",
10
- "3d": "3D view",
11
- truearea: "True area",
12
- settings: "Settings"
13
- },
14
- common: {
15
- close: "Close",
16
- cancel: "Cancel",
17
- ok: "OK",
18
- loading: "Loading..."
19
- }
20
- };
21
- //#endregion
22
- export { e as default };