@maptiler/sdk 3.8.0-rc2 → 3.8.0-rc3
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/eslint.mjs +133 -0
- package/dist/maptiler-sdk.d.ts +2 -0
- package/dist/maptiler-sdk.mjs +12711 -0
- package/dist/maptiler-sdk.mjs.map +1 -0
- package/dist/src/ColorRamp.d.ts +359 -0
- package/dist/src/ImageViewer/ImageViewer.d.ts +66 -0
- package/dist/src/ImageViewer/events.d.ts +22 -0
- package/dist/src/ImageViewer/index.d.ts +1 -0
- package/dist/src/ImageViewer/utils.d.ts +5 -0
- package/dist/src/MLAdapters/AttributionControl.d.ts +5 -0
- package/dist/src/MLAdapters/BoxZoomHandler.d.ts +7 -0
- package/dist/src/MLAdapters/CanvasSource.d.ts +5 -0
- package/dist/src/MLAdapters/CooperativeGesturesHandler.d.ts +5 -0
- package/dist/src/MLAdapters/FullscreenControl.d.ts +5 -0
- package/dist/src/MLAdapters/GeoJSONSource.d.ts +5 -0
- package/dist/src/MLAdapters/GeolocateControl.d.ts +5 -0
- package/dist/src/MLAdapters/ImageSource.d.ts +5 -0
- package/dist/src/MLAdapters/KeyboardHandler.d.ts +5 -0
- package/dist/src/MLAdapters/LogoControl.d.ts +5 -0
- package/dist/src/MLAdapters/MapMouseEvent.d.ts +5 -0
- package/dist/src/MLAdapters/MapTouchEvent.d.ts +5 -0
- package/dist/src/MLAdapters/MapWheelEvent.d.ts +5 -0
- package/dist/src/MLAdapters/Marker.d.ts +5 -0
- package/dist/src/MLAdapters/NavigationControl.d.ts +5 -0
- package/dist/src/MLAdapters/Popup.d.ts +5 -0
- package/dist/src/MLAdapters/RasterDEMTileSource.d.ts +5 -0
- package/dist/src/MLAdapters/RasterTileSource.d.ts +5 -0
- package/dist/src/MLAdapters/ScaleControl.d.ts +5 -0
- package/dist/src/MLAdapters/ScrollZoomHandler.d.ts +5 -0
- package/dist/src/MLAdapters/Style.d.ts +5 -0
- package/dist/src/MLAdapters/TerrainControl.d.ts +5 -0
- package/dist/src/MLAdapters/TwoFingersTouchPitchHandler.d.ts +5 -0
- package/dist/src/MLAdapters/VectorTileSource.d.ts +5 -0
- package/dist/src/MLAdapters/VideoSource.d.ts +5 -0
- package/dist/src/Map.d.ts +431 -0
- package/dist/src/Point.d.ts +177 -0
- package/dist/src/Telemetry.d.ts +23 -0
- package/dist/src/caching.d.ts +4 -0
- package/dist/src/config.d.ts +85 -0
- package/dist/src/constants/defaults.d.ts +15 -0
- package/dist/src/controls/MaptilerGeolocateControl.d.ts +21 -0
- package/dist/src/controls/MaptilerLogoControl.d.ts +19 -0
- package/dist/src/controls/MaptilerNavigationControl.d.ts +17 -0
- package/dist/src/controls/MaptilerProjectionControl.d.ts +14 -0
- package/dist/src/controls/MaptilerTerrainControl.d.ts +16 -0
- package/dist/src/controls/Minimap.d.ts +57 -0
- package/dist/src/controls/index.d.ts +6 -0
- package/dist/src/converters/index.d.ts +1 -0
- package/dist/src/converters/xml.d.ts +54 -0
- package/dist/src/custom-layers/CubemapLayer/CubemapLayer.d.ts +227 -0
- package/dist/src/custom-layers/CubemapLayer/constants.d.ts +3 -0
- package/dist/src/custom-layers/CubemapLayer/index.d.ts +2 -0
- package/dist/src/custom-layers/CubemapLayer/loadCubemapTexture.d.ts +41 -0
- package/dist/src/custom-layers/CubemapLayer/types.d.ts +67 -0
- package/dist/src/custom-layers/RadialGradientLayer/RadialGradientLayer.d.ts +128 -0
- package/dist/src/custom-layers/RadialGradientLayer/index.d.ts +2 -0
- package/dist/src/custom-layers/RadialGradientLayer/types.d.ts +50 -0
- package/dist/src/custom-layers/extractCustomLayerStyle.d.ts +17 -0
- package/dist/src/custom-layers/index.d.ts +5 -0
- package/dist/src/helpers/index.d.ts +5 -0
- package/dist/src/helpers/screenshot.d.ts +18 -0
- package/dist/src/helpers/stylehelper.d.ts +28 -0
- package/dist/src/helpers/vectorlayerhelpers.d.ts +508 -0
- package/dist/src/index.d.ts +91 -0
- package/dist/src/language.d.ts +107 -0
- package/dist/src/mapstyle.d.ts +17 -0
- package/dist/src/tools.d.ts +84 -0
- package/dist/src/types.d.ts +1 -0
- package/dist/src/utils/dom.d.ts +2 -0
- package/dist/src/utils/geo-utils.d.ts +6 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/math-utils.d.ts +8 -0
- package/dist/src/utils/webgl-utils.d.ts +49 -0
- package/package.json +1 -1
package/dist/eslint.mjs
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
|
5
|
+
|
|
6
|
+
export default tseslint.config(
|
|
7
|
+
// https://typescript-eslint.io/getting-started/typed-linting/
|
|
8
|
+
tseslint.configs.strictTypeChecked,
|
|
9
|
+
tseslint.configs.stylisticTypeChecked,
|
|
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
|
+
// @ts-expect-error `message` seems to work with this...
|
|
54
|
+
message: config.message ?? `Importing from '${bannedImport}' is banned in '${fp}'`,
|
|
55
|
+
node,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
rules: {
|
|
71
|
+
"import/default-imports-only": [
|
|
72
|
+
"error",
|
|
73
|
+
{
|
|
74
|
+
"maplibre-gl$": {
|
|
75
|
+
locations: ["^(?!.*\.d\.ts$).*\.((ts|js))$"],
|
|
76
|
+
message: `Maplibre-gl uses CJS modules, only default imports are supported, named imports may fail on some setups.`,
|
|
77
|
+
ignoreTypeImports: true,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
languageOptions: {
|
|
85
|
+
parserOptions: {
|
|
86
|
+
projectService: true,
|
|
87
|
+
tsconfigRootDir: import.meta.dirname,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
// https://github.com/prettier/eslint-plugin-prettier
|
|
92
|
+
eslintPluginPrettierRecommended,
|
|
93
|
+
//
|
|
94
|
+
{
|
|
95
|
+
rules: {
|
|
96
|
+
"@typescript-eslint/array-type": "off",
|
|
97
|
+
"@typescript-eslint/consistent-indexed-object-style": "warn",
|
|
98
|
+
"@typescript-eslint/consistent-type-definitions": "off",
|
|
99
|
+
"@typescript-eslint/no-base-to-string": "warn",
|
|
100
|
+
"@typescript-eslint/no-confusing-void-expression": "warn",
|
|
101
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
102
|
+
"@typescript-eslint/no-empty-function": "warn", // this is to satisfy maplibre-gl custom layer interface
|
|
103
|
+
"@typescript-eslint/no-floating-promises": "warn",
|
|
104
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
105
|
+
"@typescript-eslint/no-misused-promises": "warn",
|
|
106
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
|
|
107
|
+
"@typescript-eslint/no-unnecessary-condition": "warn",
|
|
108
|
+
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
109
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
110
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "off",
|
|
111
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
112
|
+
"@typescript-eslint/no-unsafe-argument": "warn",
|
|
113
|
+
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
114
|
+
"@typescript-eslint/no-unsafe-call": "warn",
|
|
115
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
116
|
+
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
117
|
+
"@typescript-eslint/no-unsafe-return": "warn",
|
|
118
|
+
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
119
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
|
|
120
|
+
"@typescript-eslint/prefer-for-of": "off",
|
|
121
|
+
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
122
|
+
"@typescript-eslint/prefer-optional-chain": "off",
|
|
123
|
+
"@typescript-eslint/prefer-return-this-type": "off",
|
|
124
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
|
|
125
|
+
"@typescript-eslint/restrict-plus-operands": "warn",
|
|
126
|
+
"@typescript-eslint/restrict-template-expressions": "warn",
|
|
127
|
+
"@typescript-eslint/related-getter-setter-pairs": "off",
|
|
128
|
+
"@typescript-eslint/unbound-method": "warn",
|
|
129
|
+
"@typescript-eslint/use-unknown-in-catch-callback-variable": "warn",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
//
|
|
133
|
+
);
|