vis-core 0.22.10 → 0.22.12

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.
@@ -2,22 +2,31 @@ import type { FeatureCollection, Polygon, MultiPolygon } from 'geojson';
2
2
  type GeoJSON = FeatureCollection<Polygon | MultiPolygon>;
3
3
  export declare const worldJson: {
4
4
  features: ({
5
- type: string;
6
- properties: {
7
- NAME_CN: string;
8
- NAME_CN_FULL: string;
9
- ISO_A2: string;
10
- ISO_A3: string;
11
- CAPITAL: number[];
12
- NAME: string;
13
- CENTROID: number[];
14
- ignore?: undefined;
15
- };
16
5
  geometry: {
6
+ coordinates: (number[][] | number[][][])[];
7
+ type: string;
8
+ } | {
9
+ coordinates: (number[][] | number[][][])[];
10
+ type: string;
11
+ } | {
12
+ coordinates: (number[][] | number[][][])[];
13
+ type: string;
14
+ } | {
15
+ coordinates: (number[][] | number[][][])[];
16
+ type: string;
17
+ } | {
18
+ coordinates: (number[][] | number[][][])[];
19
+ type: string;
20
+ } | {
21
+ coordinates: (number[][] | number[][][])[];
22
+ type: string;
23
+ } | {
24
+ coordinates: (number[][] | number[][][])[];
25
+ type: string;
26
+ } | {
27
+ coordinates: (number[][] | number[][][])[];
17
28
  type: string;
18
- coordinates: number[][][];
19
29
  };
20
- } | {
21
30
  type: string;
22
31
  properties: {
23
32
  NAME_CN: string;
@@ -29,59 +38,32 @@ export declare const worldJson: {
29
38
  CENTROID: number[];
30
39
  ignore?: undefined;
31
40
  };
32
- geometry: {
33
- type: string;
34
- coordinates: number[][][][];
35
- };
36
41
  } | {
37
- type: string;
38
- properties: {
39
- NAME_CN: string;
40
- NAME_CN_FULL: string;
41
- ISO_A2: string;
42
- ISO_A3: string;
43
- CENTROID: number[];
44
- CAPITAL: number[];
45
- NAME?: undefined;
46
- ignore?: undefined;
47
- };
48
42
  geometry: {
43
+ coordinates: (number[][] | number[][][])[];
49
44
  type: string;
50
- coordinates: number[][][];
51
- };
52
- } | {
53
- type: string;
54
- properties: {
55
- NAME_CN: string;
56
- NAME_CN_FULL: string;
57
- ISO_A2: string;
58
- ISO_A3: string;
59
- CENTROID: number[];
60
- CAPITAL: number[];
61
- ignore: number;
62
- NAME?: undefined;
63
- };
64
- geometry: {
45
+ } | {
46
+ coordinates: (number[][] | number[][][])[];
65
47
  type: string;
66
- coordinates: number[][][];
67
- };
68
- } | {
69
- type: string;
70
- properties: {
71
- NAME_CN: string;
72
- NAME_CN_FULL: string;
73
- ISO_A2: string;
74
- ISO_A3: string;
75
- CAPITAL: number[];
76
- NAME: string;
77
- CENTROID: number[];
78
- ignore: number;
79
- };
80
- geometry: {
48
+ } | {
49
+ coordinates: (number[][] | number[][][])[];
50
+ type: string;
51
+ } | {
52
+ coordinates: (number[][] | number[][][])[];
53
+ type: string;
54
+ } | {
55
+ coordinates: (number[][] | number[][][])[];
56
+ type: string;
57
+ } | {
58
+ coordinates: (number[][] | number[][][])[];
59
+ type: string;
60
+ } | {
61
+ coordinates: (number[][] | number[][][])[];
62
+ type: string;
63
+ } | {
64
+ coordinates: (number[][] | number[][][])[];
81
65
  type: string;
82
- coordinates: number[][][][];
83
66
  };
84
- } | {
85
67
  type: string;
86
68
  properties: {
87
69
  NAME_CN: string;
@@ -93,11 +75,32 @@ export declare const worldJson: {
93
75
  NAME?: undefined;
94
76
  ignore?: undefined;
95
77
  };
78
+ } | {
96
79
  geometry: {
80
+ coordinates: (number[][] | number[][][])[];
81
+ type: string;
82
+ } | {
83
+ coordinates: (number[][] | number[][][])[];
84
+ type: string;
85
+ } | {
86
+ coordinates: (number[][] | number[][][])[];
87
+ type: string;
88
+ } | {
89
+ coordinates: (number[][] | number[][][])[];
90
+ type: string;
91
+ } | {
92
+ coordinates: (number[][] | number[][][])[];
93
+ type: string;
94
+ } | {
95
+ coordinates: (number[][] | number[][][])[];
96
+ type: string;
97
+ } | {
98
+ coordinates: (number[][] | number[][][])[];
99
+ type: string;
100
+ } | {
101
+ coordinates: (number[][] | number[][][])[];
97
102
  type: string;
98
- coordinates: number[][][][];
99
103
  };
100
- } | {
101
104
  type: string;
102
105
  properties: {
103
106
  NAME_CN: string;
@@ -109,11 +112,32 @@ export declare const worldJson: {
109
112
  ignore: number;
110
113
  NAME?: undefined;
111
114
  };
115
+ } | {
112
116
  geometry: {
117
+ coordinates: (number[][] | number[][][])[];
118
+ type: string;
119
+ } | {
120
+ coordinates: (number[][] | number[][][])[];
121
+ type: string;
122
+ } | {
123
+ coordinates: (number[][] | number[][][])[];
124
+ type: string;
125
+ } | {
126
+ coordinates: (number[][] | number[][][])[];
127
+ type: string;
128
+ } | {
129
+ coordinates: (number[][] | number[][][])[];
130
+ type: string;
131
+ } | {
132
+ coordinates: (number[][] | number[][][])[];
133
+ type: string;
134
+ } | {
135
+ coordinates: (number[][] | number[][][])[];
136
+ type: string;
137
+ } | {
138
+ coordinates: (number[][] | number[][][])[];
113
139
  type: string;
114
- coordinates: number[][][][];
115
140
  };
116
- } | {
117
141
  type: string;
118
142
  properties: {
119
143
  NAME_CN: string;
@@ -125,31 +149,36 @@ export declare const worldJson: {
125
149
  CENTROID: number[];
126
150
  ignore: number;
127
151
  };
128
- geometry: {
129
- type: string;
130
- coordinates: number[][][];
131
- };
132
152
  })[];
133
153
  type: string;
134
154
  };
135
155
  export declare const worldExclATAJson: {
136
156
  features: ({
137
- type: string;
138
- properties: {
139
- NAME_CN: string;
140
- NAME_CN_FULL: string;
141
- ISO_A2: string;
142
- ISO_A3: string;
143
- CAPITAL: number[];
144
- NAME: string;
145
- CENTROID: number[];
146
- ignore?: undefined;
147
- };
148
157
  geometry: {
158
+ coordinates: (number[][] | number[][][])[];
159
+ type: string;
160
+ } | {
161
+ coordinates: (number[][] | number[][][])[];
162
+ type: string;
163
+ } | {
164
+ coordinates: (number[][] | number[][][])[];
165
+ type: string;
166
+ } | {
167
+ coordinates: (number[][] | number[][][])[];
168
+ type: string;
169
+ } | {
170
+ coordinates: (number[][] | number[][][])[];
171
+ type: string;
172
+ } | {
173
+ coordinates: (number[][] | number[][][])[];
174
+ type: string;
175
+ } | {
176
+ coordinates: (number[][] | number[][][])[];
177
+ type: string;
178
+ } | {
179
+ coordinates: (number[][] | number[][][])[];
149
180
  type: string;
150
- coordinates: number[][][];
151
181
  };
152
- } | {
153
182
  type: string;
154
183
  properties: {
155
184
  NAME_CN: string;
@@ -161,59 +190,32 @@ export declare const worldExclATAJson: {
161
190
  CENTROID: number[];
162
191
  ignore?: undefined;
163
192
  };
164
- geometry: {
165
- type: string;
166
- coordinates: number[][][][];
167
- };
168
193
  } | {
169
- type: string;
170
- properties: {
171
- NAME_CN: string;
172
- NAME_CN_FULL: string;
173
- ISO_A2: string;
174
- ISO_A3: string;
175
- CENTROID: number[];
176
- CAPITAL: number[];
177
- NAME?: undefined;
178
- ignore?: undefined;
179
- };
180
194
  geometry: {
195
+ coordinates: (number[][] | number[][][])[];
181
196
  type: string;
182
- coordinates: number[][][];
183
- };
184
- } | {
185
- type: string;
186
- properties: {
187
- NAME_CN: string;
188
- NAME_CN_FULL: string;
189
- ISO_A2: string;
190
- ISO_A3: string;
191
- CENTROID: number[];
192
- CAPITAL: number[];
193
- ignore: number;
194
- NAME?: undefined;
195
- };
196
- geometry: {
197
+ } | {
198
+ coordinates: (number[][] | number[][][])[];
197
199
  type: string;
198
- coordinates: number[][][];
199
- };
200
- } | {
201
- type: string;
202
- properties: {
203
- NAME_CN: string;
204
- NAME_CN_FULL: string;
205
- ISO_A2: string;
206
- ISO_A3: string;
207
- CAPITAL: number[];
208
- NAME: string;
209
- CENTROID: number[];
210
- ignore: number;
211
- };
212
- geometry: {
200
+ } | {
201
+ coordinates: (number[][] | number[][][])[];
202
+ type: string;
203
+ } | {
204
+ coordinates: (number[][] | number[][][])[];
205
+ type: string;
206
+ } | {
207
+ coordinates: (number[][] | number[][][])[];
208
+ type: string;
209
+ } | {
210
+ coordinates: (number[][] | number[][][])[];
211
+ type: string;
212
+ } | {
213
+ coordinates: (number[][] | number[][][])[];
214
+ type: string;
215
+ } | {
216
+ coordinates: (number[][] | number[][][])[];
213
217
  type: string;
214
- coordinates: number[][][][];
215
218
  };
216
- } | {
217
219
  type: string;
218
220
  properties: {
219
221
  NAME_CN: string;
@@ -225,11 +227,32 @@ export declare const worldExclATAJson: {
225
227
  NAME?: undefined;
226
228
  ignore?: undefined;
227
229
  };
230
+ } | {
228
231
  geometry: {
232
+ coordinates: (number[][] | number[][][])[];
233
+ type: string;
234
+ } | {
235
+ coordinates: (number[][] | number[][][])[];
236
+ type: string;
237
+ } | {
238
+ coordinates: (number[][] | number[][][])[];
239
+ type: string;
240
+ } | {
241
+ coordinates: (number[][] | number[][][])[];
242
+ type: string;
243
+ } | {
244
+ coordinates: (number[][] | number[][][])[];
245
+ type: string;
246
+ } | {
247
+ coordinates: (number[][] | number[][][])[];
248
+ type: string;
249
+ } | {
250
+ coordinates: (number[][] | number[][][])[];
251
+ type: string;
252
+ } | {
253
+ coordinates: (number[][] | number[][][])[];
229
254
  type: string;
230
- coordinates: number[][][][];
231
255
  };
232
- } | {
233
256
  type: string;
234
257
  properties: {
235
258
  NAME_CN: string;
@@ -241,11 +264,32 @@ export declare const worldExclATAJson: {
241
264
  ignore: number;
242
265
  NAME?: undefined;
243
266
  };
267
+ } | {
244
268
  geometry: {
269
+ coordinates: (number[][] | number[][][])[];
270
+ type: string;
271
+ } | {
272
+ coordinates: (number[][] | number[][][])[];
273
+ type: string;
274
+ } | {
275
+ coordinates: (number[][] | number[][][])[];
276
+ type: string;
277
+ } | {
278
+ coordinates: (number[][] | number[][][])[];
279
+ type: string;
280
+ } | {
281
+ coordinates: (number[][] | number[][][])[];
282
+ type: string;
283
+ } | {
284
+ coordinates: (number[][] | number[][][])[];
285
+ type: string;
286
+ } | {
287
+ coordinates: (number[][] | number[][][])[];
288
+ type: string;
289
+ } | {
290
+ coordinates: (number[][] | number[][][])[];
245
291
  type: string;
246
- coordinates: number[][][][];
247
292
  };
248
- } | {
249
293
  type: string;
250
294
  properties: {
251
295
  NAME_CN: string;
@@ -257,10 +301,6 @@ export declare const worldExclATAJson: {
257
301
  CENTROID: number[];
258
302
  ignore: number;
259
303
  };
260
- geometry: {
261
- type: string;
262
- coordinates: number[][][];
263
- };
264
304
  })[];
265
305
  type: string;
266
306
  };
@@ -15,6 +15,7 @@ export interface BaseOptions {
15
15
  disableInitShow?: boolean;
16
16
  editor?: boolean;
17
17
  logarithmicDepthBuffer?: boolean;
18
+ workerOnce?: boolean;
18
19
  tier?: number;
19
20
  [key: string]: any;
20
21
  }
@@ -72,7 +73,7 @@ export default class Base extends Event {
72
73
  tier0: boolean;
73
74
  constructor(options: BaseOptions);
74
75
  setOptions(options: Record<string, any>): void;
75
- get fromJSON(): (jsonOrUrl: Record<string, any> | string, extendVisOptions?: (json: any) => any) => Promise<Record<string, any>>;
76
+ get fromJSON(): (jsonOrUrl: Record<string, any> | string, hooks?: import("../../editor").Hooks) => Promise<Record<string, any>>;
76
77
  get baseObjectByUuid(): {
77
78
  (uuid: `arc${string}`, flag?: boolean): import("../all/objects/Arc").default;
78
79
  (uuid: `sprite${string}`, flag?: boolean): import("../all/objects/Sprite").default;
@@ -16,7 +16,6 @@ export interface MapOptions extends BaseOptions {
16
16
  parentBgDepth?: number;
17
17
  parentBgTopSegments?: number;
18
18
  fixCity?: Record<number, number>;
19
- continentType?: string;
20
19
  continentsBg?: boolean;
21
20
  continentsBgDepth?: number;
22
21
  clickOusideBack?: boolean;
@@ -149,7 +148,7 @@ export default class extends Base {
149
148
  shadowMapDisabled(): void;
150
149
  getDepth(adcode: number, geojson: GeoJSON): number;
151
150
  getReferenceScale(bboxa: number[], bboxb: number[]): number;
152
- getAdcodeShowLevel(adcode: number): string;
151
+ getAdcodeShowLevel(adcode: number): string | undefined;
153
152
  handleClick(e: MouseEvent): void;
154
153
  beforeClickArea(adcodes: number[]): boolean;
155
154
  clickArea({ adcodes, duration, }: {
@@ -186,9 +185,10 @@ export default class extends Base {
186
185
  depth: number;
187
186
  adcode: number;
188
187
  }): Promise<PlaneMap>;
189
- handleBack({ duration, handleLookBack }?: {
188
+ handleBack({ duration, handleLookBack, keepOne, }?: {
190
189
  duration?: number | undefined;
191
190
  handleLookBack?: boolean | undefined;
191
+ keepOne?: boolean | undefined;
192
192
  }): Promise<void>;
193
193
  handleLookBack(duration?: number): Promise<void>;
194
194
  compareLocations(currentO: any[], destinationO: any[]): number[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.22.10",
3
+ "version": "0.22.12",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && bundler",