vis-core 0.21.10 → 0.21.11

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.
@@ -31222,27 +31222,21 @@ var doEval = function c(e) {
31222
31222
  }
31223
31223
  }
31224
31224
  return Re;
31225
- }, esDefineProperty, hasRequiredEsDefineProperty;
31226
- function requireEsDefineProperty() {
31227
- if (hasRequiredEsDefineProperty) return esDefineProperty;
31228
- hasRequiredEsDefineProperty = 1;
31229
- var c = getIntrinsic, e = c("%Object.defineProperty%", !0) || !1;
31230
- if (e)
31231
- try {
31232
- e({}, "a", { value: 1 });
31233
- } catch (s) {
31234
- e = !1;
31235
- }
31236
- return esDefineProperty = e, esDefineProperty;
31237
- }
31238
- var GetIntrinsic$8 = getIntrinsic, $gOPD$1 = GetIntrinsic$8("%Object.getOwnPropertyDescriptor%", !0);
31225
+ }, GetIntrinsic$9 = getIntrinsic, $defineProperty$3 = GetIntrinsic$9("%Object.defineProperty%", !0) || !1;
31226
+ if ($defineProperty$3)
31227
+ try {
31228
+ $defineProperty$3({}, "a", { value: 1 });
31229
+ } catch (c) {
31230
+ $defineProperty$3 = !1;
31231
+ }
31232
+ var esDefineProperty = $defineProperty$3, GetIntrinsic$8 = getIntrinsic, $gOPD$1 = GetIntrinsic$8("%Object.getOwnPropertyDescriptor%", !0);
31239
31233
  if ($gOPD$1)
31240
31234
  try {
31241
31235
  $gOPD$1([], "length");
31242
31236
  } catch (c) {
31243
31237
  $gOPD$1 = null;
31244
31238
  }
31245
- var gopd$1 = $gOPD$1, $defineProperty$2 = requireEsDefineProperty(), $SyntaxError$1 = syntax, $TypeError$5 = type, gopd = gopd$1, defineDataProperty$1 = function(e, s, h) {
31239
+ var gopd$1 = $gOPD$1, $defineProperty$2 = esDefineProperty, $SyntaxError$1 = syntax, $TypeError$5 = type, gopd = gopd$1, defineDataProperty$1 = function(e, s, h) {
31246
31240
  if (!e || typeof e != "object" && typeof e != "function")
31247
31241
  throw new $TypeError$5("`obj` must be an object or a function`");
31248
31242
  if (typeof s != "string" && typeof s != "symbol")
@@ -31303,7 +31297,7 @@ var hasPropertyDescriptors_1$1 = hasPropertyDescriptors$2, keys$1 = objectKeys$2
31303
31297
  defineProperty$2(c, h[Y], e[h[Y]], s[h[Y]]);
31304
31298
  };
31305
31299
  defineProperties$2.supportsDescriptors = !!supportsDescriptors$3;
31306
- var defineProperties_1$1 = defineProperties$2, callBind$6 = { exports: {} }, $defineProperty = requireEsDefineProperty(), hasPropertyDescriptors$1 = function() {
31300
+ var defineProperties_1$1 = defineProperties$2, callBind$6 = { exports: {} }, $defineProperty = esDefineProperty, hasPropertyDescriptors$1 = function() {
31307
31301
  return !!$defineProperty;
31308
31302
  };
31309
31303
  hasPropertyDescriptors$1.hasArrayLengthDefineBug = function() {
@@ -31340,7 +31334,7 @@ var hasPropertyDescriptors_1 = hasPropertyDescriptors$1, GetIntrinsic$6 = getInt
31340
31334
  )), e;
31341
31335
  };
31342
31336
  (function(c) {
31343
- var e = functionBind, s = getIntrinsic, h = setFunctionLength, Y = type, Ge = s("%Function.prototype.apply%"), We = s("%Function.prototype.call%"), Re = s("%Reflect.apply%", !0) || e.call(We, Ge), Le = requireEsDefineProperty(), ve = s("%Math.max%");
31337
+ var e = functionBind, s = getIntrinsic, h = setFunctionLength, Y = type, Ge = s("%Function.prototype.apply%"), We = s("%Function.prototype.call%"), Re = s("%Reflect.apply%", !0) || e.call(We, Ge), Le = esDefineProperty, ve = s("%Math.max%");
31344
31338
  c.exports = function(ke) {
31345
31339
  if (typeof ke != "function")
31346
31340
  throw new Y("a function is required");
@@ -47203,7 +47197,7 @@ function createAreaLightMaterial(c) {
47203
47197
  const e = new MeshBasicMaterial();
47204
47198
  return e.color.setScalar(c), e;
47205
47199
  }
47206
- const version = "0.21.10";
47200
+ const version = "0.21.11";
47207
47201
  class Event {
47208
47202
  constructor() {
47209
47203
  F0(this, "event", new EventEmitter());
@@ -53154,7 +53148,7 @@ function stringToUtf8ByteArray(c) {
53154
53148
  }
53155
53149
  let b = "/";
53156
53150
  b === "/" && (b = "");
53157
- const getMapConfig = (s, ...h) => $0(void 0, [s, ...h], function* (c, e = b) {
53151
+ const getMapConfig = (h, ...Y) => $0(void 0, [h, ...Y], function* (c, e = b, s) {
53158
53152
  if (c === 0)
53159
53153
  return {
53160
53154
  mapDepth: 5,
@@ -53164,94 +53158,98 @@ const getMapConfig = (s, ...h) => $0(void 0, [s, ...h], function* (c, e = b) {
53164
53158
  center: [0, 0]
53165
53159
  };
53166
53160
  {
53167
- const Y = adcodeMap[c];
53161
+ const Ge = adcodeMap[c];
53168
53162
  return extendMapConfig(
53169
53163
  "map",
53170
53164
  {
53171
- center: [Y.lng, Y.lat],
53172
- adcode: Y.adcode
53165
+ center: [Ge.lng, Ge.lat],
53166
+ adcode: Ge.adcode
53173
53167
  },
53174
- e
53168
+ e,
53169
+ s
53175
53170
  );
53176
53171
  }
53177
- }), getMap2Config = (s, ...h) => $0(void 0, [s, ...h], function* (c, e = b) {
53178
- const Y = adcodeMap[c];
53172
+ }), getMap2Config = (h, ...Y) => $0(void 0, [h, ...Y], function* (c, e = b, s) {
53173
+ const Ge = adcodeMap[c];
53179
53174
  return extendMapConfig(
53180
53175
  "map2",
53181
53176
  {
53182
- center: [Y.lng, Y.lat],
53183
- adcode: Y.adcode,
53184
- parentBg: Y.adcode !== 1e5
53177
+ center: [Ge.lng, Ge.lat],
53178
+ adcode: Ge.adcode,
53179
+ parentBg: Ge.adcode !== 1e5
53185
53180
  },
53186
- e
53181
+ e,
53182
+ s
53187
53183
  );
53188
- }), getMap2WithCityConfig = (s, ...h) => $0(void 0, [s, ...h], function* (c, e = b) {
53189
- const Y = adcodeMap[c];
53184
+ }), getMap2WithCityConfig = (h, ...Y) => $0(void 0, [h, ...Y], function* (c, e = b, s) {
53185
+ const Ge = adcodeMap[c];
53190
53186
  return extendMapConfig(
53191
53187
  "map2",
53192
53188
  {
53193
- center: [Y.lng, Y.lat],
53194
- adcode: Y.adcode,
53189
+ center: [Ge.lng, Ge.lat],
53190
+ adcode: Ge.adcode,
53195
53191
  showOneLevel: !0,
53196
- allCity: Y.level === "province",
53192
+ allCity: Ge.level === "province",
53197
53193
  cityOnMap: !0,
53198
53194
  parentBg: !1,
53199
53195
  mapDepth: 4e-3,
53200
53196
  bottomPlane: !1
53201
53197
  },
53202
- e
53198
+ e,
53199
+ s
53203
53200
  );
53204
- }), extendMapConfig = (h, Y, ...Ge) => $0(void 0, [h, Y, ...Ge], function* (c, e, s = b) {
53205
- var We, Re;
53201
+ }), extendMapConfig = (Y, Ge, ...We) => $0(void 0, [Y, Ge, ...We], function* (c, e, s = b, h) {
53202
+ var Re, Le;
53206
53203
  if (e.adcode !== 0 && e.adcode !== 1e5) {
53207
- const Le = (We = e.fixGeojson) == null ? void 0 : We[e.adcode], ve = (Re = e.fixGeojson) == null ? void 0 : Re[e.adcode + "-lite"];
53208
- let { res: Ie } = yield jsonFetch(
53209
- s + `/geojson/${Le || "json"}/${e.adcode}.json`
53204
+ const ve = (Re = e.fixGeojson) == null ? void 0 : Re[e.adcode], Ie = (Le = e.fixGeojson) == null ? void 0 : Le[e.adcode + "-lite"];
53205
+ let { res: Te } = yield jsonFetch(
53206
+ s + `/geojson/${ve || "json"}/${e.adcode}.json`
53210
53207
  );
53211
- const { res: Te } = yield jsonFetch(
53212
- s + `/geojson/${ve || "json-lite"}/${e.adcode}.json`
53213
- ), ke = bbox(Te), ze = e.adcode, je = sn(xi({}, e), {
53208
+ const { res: ke } = yield jsonFetch(
53209
+ s + `/geojson/${Ie || "json-lite"}/${e.adcode}.json`
53210
+ ), ze = bbox(ke), je = e.adcode, pt = sn(xi({}, e), {
53214
53211
  geojsonMap: {
53215
- [ze]: Ie
53212
+ [je]: Te
53216
53213
  },
53217
53214
  extrudeLineGeojsonMap: {
53218
- [ze]: Te
53215
+ [je]: ke
53219
53216
  },
53220
53217
  bboxMap: {
53221
- [ze]: ke
53218
+ [je]: ze
53222
53219
  },
53223
53220
  cityBboxMap: {},
53224
- jsonNameObj: {}
53221
+ jsonNameObj: {},
53222
+ depthReference: void 0
53225
53223
  });
53226
53224
  if (c === "map2") {
53227
- if (!(adcodeMap[ze].level === "province")) {
53228
- let nt = adcodeMap[ze].parent;
53229
- for (; adcodeMap[nt].level !== "province"; )
53230
- nt = adcodeMap[nt].parent;
53231
- const { res: Be } = yield jsonFetch(
53232
- s + `/geojson/${Le || "json"}/${nt}.json`
53225
+ if (!(adcodeMap[je].level === "province")) {
53226
+ let Be = adcodeMap[je].parent;
53227
+ for (; adcodeMap[Be].level !== "province"; )
53228
+ Be = adcodeMap[Be].parent;
53229
+ const { res: at } = yield jsonFetch(
53230
+ s + `/geojson/${ve || "json"}/${Be}.json`
53233
53231
  );
53234
- Ie = Be;
53232
+ Te = at;
53235
53233
  }
53236
- Ie.features.forEach((nt) => {
53237
- je.cityBboxMap[nt.properties.adcode] = bbox(nt), je.jsonNameObj[nt.properties.adcode] = ec(
53238
- nt.properties.name,
53239
- `${nt.properties.adcode}`
53234
+ Te.features.forEach((Be) => {
53235
+ pt.cityBboxMap[Be.properties.adcode] = bbox(Be), pt.jsonNameObj[Be.properties.adcode] = ec(
53236
+ Be.properties.name,
53237
+ `${Be.properties.adcode}`
53240
53238
  );
53241
53239
  });
53242
53240
  }
53243
53241
  if (e.parentBg) {
53244
- const pt = adcodeMap[ze].parent;
53245
- if (pt !== 1e5) {
53246
- const { res: nt } = yield jsonFetch(
53247
- s + `/geojson/json/${pt}.json`
53248
- ), { res: Be } = yield jsonFetch(
53249
- s + `/geojson/json-lite/${pt}.json`
53242
+ const nt = adcodeMap[je].parent;
53243
+ if (nt !== 1e5) {
53244
+ const { res: Be } = yield jsonFetch(
53245
+ s + `/geojson/json/${nt}.json`
53246
+ ), { res: at } = yield jsonFetch(
53247
+ s + `/geojson/json-lite/${nt}.json`
53250
53248
  );
53251
- je.geojsonMap[pt] = nt, je.extrudeLineGeojsonMap[pt] = Be, je.bboxMap[pt] = bbox(Be);
53249
+ pt.geojsonMap[nt] = Be, pt.extrudeLineGeojsonMap[nt] = at, pt.bboxMap[nt] = bbox(at);
53252
53250
  }
53253
53251
  }
53254
- return je;
53252
+ return h && (pt.depthReference = h.depthReference || h.bboxMap[h.adcode]), pt;
53255
53253
  }
53256
53254
  return xi({}, e);
53257
53255
  }), getCityConfig = (s, ...h) => $0(void 0, [s, ...h], function* (c, e = b) {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.21.10";
1
+ declare const _default: "0.21.11";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.21.10",
3
+ "version": "0.21.11",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version &&PUBLIC_EXCLUDE=public/city bundler",