@mappable-world/mappable-types 1.0.16076882 → 1.0.16159873

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.
@@ -12,4 +12,7 @@ type Change<T> = {
12
12
  type Changes<T> = {
13
13
  readonly [TKey in keyof T]: Change<T[TKey]>;
14
14
  };
15
- export { DeepReadonly, DeepReadonlyArray, DeepReadonlyObject, Nullable, Change, Changes };
15
+ type WithDefaults<Props, DefaultProps extends Partial<Props>> = Props & {
16
+ [K in keyof DefaultProps]: K extends keyof Props ? NonNullable<Props[K]> : never;
17
+ };
18
+ export { DeepReadonly, DeepReadonlyArray, DeepReadonlyObject, Nullable, Change, Changes, WithDefaults };
@@ -1,3 +1,4 @@
1
+ import type { WithDefaults } from "../common/types";
1
2
  type ContextWatcherFn = () => void;
2
3
  declare class Context<_T> {
3
4
  readonly name: string;
@@ -10,9 +11,6 @@ declare class ContextProvider<T> {
10
11
  provide(nextContext: T): void;
11
12
  }
12
13
  export declare const __implEntityKeepOldPropValue: {};
13
- type WithDefaults<Props, DefaultProps extends Partial<Props>> = Props & {
14
- [K in keyof DefaultProps]: K extends keyof Props ? NonNullable<Props[K]> : never;
15
- };
16
14
  /**
17
15
  * Entity Base Class. It has event handlers for attaching, detaching and updating props. Has a method for providing and using context.
18
16
  * @typeParam Props - Type of input props of the Entity.
@@ -1,9 +1,14 @@
1
1
  import { Context } from "./Entities";
2
- export type MMapType = string;
2
+ import type { MAP_TYPES } from "./MMapDefaultSchemeLayer";
3
+ export type MMapType = keyof typeof MAP_TYPES;
3
4
  export type MMapTypeContext = {
4
5
  type?: MMapType;
5
6
  };
6
7
  /**
7
- * Selects one of predefined map style modes optimized for particular use case.
8
+ * Selects one of predefined map style modes optimized for particular use case. The following values are supported:
9
+ * * `map` - basic map
10
+ * * `driving` - automobile navigation map
11
+ * * `transit` - public transport map
12
+ * * `admin` - administrative map
8
13
  */
9
14
  export declare const TypeContext: Context<MMapTypeContext>;
@@ -12,8 +12,8 @@ export declare class MMapRuler extends MMapComplexEntity<MMapRulerProps, typeof
12
12
  type: import("./MMapRulerCommon").RulerType;
13
13
  source?: string | undefined;
14
14
  geometry: import("./MMapRulerCommon").RulerGeometry;
15
- zIndex?: number | undefined;
16
15
  onUpdate?: import("./MMapRulerCommon").UpdateCommonFn | undefined;
16
+ zIndex?: number | undefined;
17
17
  points: import("../../common/types/lng-lat").LngLat[];
18
18
  editable?: boolean | undefined;
19
19
  onUpdateStart?: import("./MMapRulerCommon").UpdateStartFn | undefined;
@@ -23,8 +23,8 @@ export declare class MMapRuler extends MMapComplexEntity<MMapRulerProps, typeof
23
23
  type: import("./MMapRulerCommon").RulerType;
24
24
  source?: string | undefined;
25
25
  geometry: import("./MMapRulerCommon").RulerGeometry;
26
- zIndex?: number | undefined;
27
26
  onUpdate?: import("./MMapRulerCommon").UpdateCommonFn | undefined;
27
+ zIndex?: number | undefined;
28
28
  points: import("../../common/types/lng-lat").LngLat[];
29
29
  editable?: boolean | undefined;
30
30
  onUpdateStart?: import("./MMapRulerCommon").UpdateStartFn | undefined;
@@ -38,8 +38,8 @@ export declare class MMapRuler extends MMapComplexEntity<MMapRulerProps, typeof
38
38
  type: import("./MMapRulerCommon").RulerType;
39
39
  source?: string | undefined;
40
40
  geometry: import("./MMapRulerCommon").RulerGeometry;
41
- zIndex?: number | undefined;
42
41
  onUpdate?: import("./MMapRulerCommon").UpdateCommonFn | undefined;
42
+ zIndex?: number | undefined;
43
43
  points: import("../../common/types/lng-lat").LngLat[];
44
44
  editable?: boolean | undefined;
45
45
  onUpdateStart?: import("./MMapRulerCommon").UpdateStartFn | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappable-world/mappable-types",
3
- "version": "1.0.16076882",
3
+ "version": "1.0.16159873",
4
4
  "description": "Types for mappable maps library",
5
5
  "main": "",
6
6
  "types": "index.d.ts",
File without changes
File without changes
@@ -1,2 +0,0 @@
1
- import * as mappable from "../imperative";
2
- export { mappable };
File without changes