@maptiler/sdk 3.2.1-rc-1 → 3.2.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.
@@ -7942,7 +7942,7 @@ class Is {
7942
7942
  this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"), this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"), this.map.isGlobeProjection() ? (this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"), this.projectionButton.title = "Enable Mercator projection") : (this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"), this.projectionButton.title = "Enable Globe projection");
7943
7943
  }
7944
7944
  }
7945
- const Es = "@maptiler/sdk", Ms = "3.2.1rc-1", _s = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", zs = "MapTiler", Ps = "dist/maptiler-sdk.mjs", Rs = "dist/maptiler-sdk.d.ts", $s = "dist/maptiler-sdk.css", js = "module", Ns = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, Os = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Fs = "https://docs.maptiler.com/sdk-js/", Ds = "BSD-3-Clause", qs = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Bs = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "eslint src", "lint:fix": "eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Us = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Vs = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.3.2", events: "^3.3.0", "js-base64": "^3.7.7", "maplibre-gl": "^5.3.1", uuid: "^11.0.5" }, Gs = {
7945
+ const Es = "@maptiler/sdk", Ms = "3.2.2", _s = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", zs = "MapTiler", Ps = "dist/maptiler-sdk.mjs", Rs = "dist/maptiler-sdk.d.ts", $s = "dist/maptiler-sdk.css", js = "module", Ns = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, Os = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Fs = "https://docs.maptiler.com/sdk-js/", Ds = "BSD-3-Clause", qs = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Bs = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "eslint src", "lint:fix": "eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Us = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Vs = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.3.2", events: "^3.3.0", "js-base64": "^3.7.7", "maplibre-gl": "^5.3.1", uuid: "^11.0.5" }, Gs = {
7946
7946
  name: Es,
7947
7947
  version: Ms,
7948
7948
  description: _s,
@@ -10628,7 +10628,7 @@ const Ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10628
10628
  }, Symbol.toStringTag, { value: "Module" }));
10629
10629
  Wa();
10630
10630
  function Fl() {
10631
- return "3.2.1rc-1";
10631
+ return "3.2.2";
10632
10632
  }
10633
10633
  const Dl = S.Map, ql = S.Marker, Bl = S.Popup, Ul = S.Style, Vl = S.CanvasSource, Gl = S.GeoJSONSource, Hl = S.ImageSource, Kl = S.RasterTileSource, Wl = S.RasterDEMTileSource, Zl = S.VectorTileSource, Jl = S.VideoSource, Yl = S.NavigationControl, Xl = S.GeolocateControl, Ql = S.AttributionControl, eu = S.LogoControl, tu = S.ScaleControl, ru = S.FullscreenControl, nu = S.TerrainControl, au = S.BoxZoomHandler, ou = S.ScrollZoomHandler, iu = S.CooperativeGesturesHandler, su = S.KeyboardHandler, lu = S.TwoFingersTouchPitchHandler, uu = S.MapWheelEvent, cu = S.MapTouchEvent, pu = S.MapMouseEvent, fu = S.config, du = S.getVersion, {
10634
10634
  setRTLTextPlugin: yu,
package/eslint.config.mjs CHANGED
@@ -8,6 +8,77 @@ export default tseslint.config(
8
8
  tseslint.configs.strictTypeChecked,
9
9
  tseslint.configs.stylisticTypeChecked,
10
10
  tseslint.configs.recommendedTypeChecked,
11
+ {
12
+ // forked from https://www.npmjs.com/package/eslint-plugin-restrict-imports
13
+ plugins: {
14
+ import: {
15
+ rules: {
16
+ "default-imports-only": {
17
+ meta: {
18
+ type: "suggestion",
19
+ docs: {},
20
+ schema: [
21
+ {
22
+ bannedImport: {
23
+ locations: ["filePaths"],
24
+ message: "string",
25
+ fixedLocation: "string",
26
+ },
27
+ },
28
+ ],
29
+ },
30
+ create: function (context) {
31
+ const filePath = context.getFilename();
32
+ const options = context.options[0] || {
33
+ "^/(.*)": {
34
+ locations: ["(.*)"],
35
+ },
36
+ };
37
+
38
+ return {
39
+ ImportDeclaration: (node) => {
40
+ Object.entries(options).forEach(([bannedImport, config]) => {
41
+ const importLocationRegex = new RegExp(bannedImport);
42
+
43
+ if (config.ignoreTypeImports && node.importKind === "type") return;
44
+
45
+ if (importLocationRegex.test(node.source.value)) {
46
+ config.locations.forEach((fp) => {
47
+ const bannedLocationRegex = new RegExp(fp);
48
+
49
+ if (bannedLocationRegex.test(filePath)) {
50
+ node.specifiers.forEach((specifier) => {
51
+ if (specifier.type !== "ImportDefaultSpecifier") {
52
+ context.report({
53
+ message: config.message ?? `Importing from '${bannedImport}' is banned in '${fp}'`,
54
+ node,
55
+ });
56
+ }
57
+ });
58
+ }
59
+ });
60
+ }
61
+ });
62
+ },
63
+ };
64
+ },
65
+ },
66
+ },
67
+ },
68
+ },
69
+ rules: {
70
+ "import/default-imports-only": [
71
+ "error",
72
+ {
73
+ "maplibre-gl$": {
74
+ locations: ["^(?!.*\.d\.ts$).*\.((ts|js))$"],
75
+ message: `Maplibre-gl uses CJS modules, only default imports are supported, named imports may fail on some setups.`,
76
+ ignoreTypeImports: true,
77
+ },
78
+ },
79
+ ],
80
+ },
81
+ },
11
82
  {
12
83
  languageOptions: {
13
84
  parserOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "3.2.1rc-1",
3
+ "version": "3.2.2",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",
package/tsconfig.json CHANGED
@@ -26,7 +26,6 @@
26
26
  },
27
27
  "include": [
28
28
  "src",
29
- "./eslint.config.mjs",
30
29
  "test",
31
30
  "./vite.config-test.ts",
32
31
  "./vitest-setup-tests.ts"
@@ -1,2 +0,0 @@
1
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
2
- export default _default;