vis-core 0.30.0-beta.30 → 0.30.0-beta.31

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.
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
63
63
  Array.prototype.at || (Array.prototype.at = function(v) {
64
64
  return v < 0 && (v = this.length + v), this[v];
65
65
  });
66
- const version = "0.30.0-beta.30", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
66
+ const version = "0.30.0-beta.31", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
67
67
  token: void 0,
68
68
  getInfo() {
69
69
  if (!this.token)
@@ -140399,39 +140399,39 @@ class Editor {
140399
140399
  }
140400
140400
  fromJSON(e, r) {
140401
140401
  return B0(this, null, function* () {
140402
- var V, le, fe;
140402
+ var V, le;
140403
140403
  let o = null;
140404
140404
  try {
140405
140405
  r && !y(r) ? console.warn(
140406
140406
  "fromJSON 第二个参数已修改,{beforeSetVisOptions:(r)=>r} 替代"
140407
140407
  ) : r && (o = r.fj, delete r.fj, this.hooks.addEvents(r));
140408
- let Le;
140408
+ let fe;
140409
140409
  if (typeof e == "string") {
140410
- const Ce = this.options.assetsPrefix + e;
140410
+ const Le = this.options.assetsPrefix + e;
140411
140411
  console.time("vis-core:time.json-fetch");
140412
- const { res: Re, err: Pe } = yield jsonFetch(Ce);
140413
- if (console.timeEnd("vis-core:time.json-fetch"), Pe)
140414
- throw new Error("fromJSON error:" + Pe);
140415
- Le = Re;
140412
+ const { res: Ce, err: Re } = yield jsonFetch(Le);
140413
+ if (console.timeEnd("vis-core:time.json-fetch"), Re)
140414
+ throw new Error("fromJSON error:" + Re);
140415
+ fe = Ce;
140416
140416
  } else
140417
- Le = e;
140418
- if (this.hooks.dispatch("beforeFromJSON"), o && (Le = yield o(Le)), Le = fixJSON(Le), Le.at && (accessToken.token = Le.at), !this.storage) {
140417
+ fe = e;
140418
+ if (this.hooks.dispatch("beforeFromJSON"), o && (fe = yield o(fe)), fe = fixJSON(fe), fe.at && (accessToken.token = fe.at), !this.storage) {
140419
140419
  if (!accessToken.token)
140420
140420
  throw new Error("设置 token 或平台重新下载 JSON 文件");
140421
- const Ce = accessToken.getInfo();
140422
- if (!Ce || !Ce.isValid)
140421
+ const Le = accessToken.getInfo();
140422
+ if (!Le || !Le.isValid)
140423
140423
  throw new Error("need accessToken");
140424
140424
  }
140425
- if (this.config.fromJSON(Le.c), this.history.fromJSON(Le.h), this.viewport.fromJSON(Le.v), this.hooks.fromJSON(Le.s), this.config.compareVersion(), yield this.history.processUndos(this.options.processUndosMaxFrameTime), (V = Le.v.bg) != null && V.texture && this.viewport.vis) {
140426
- const Ce = parseTexture(Le.v.bg.texture);
140427
- Ce.colorSpace = SRGBColorSpace, this.viewport.vis.pencil.scene.background = Ce;
140425
+ if (this.config.fromJSON(fe.c), this.history.fromJSON(fe.h), this.viewport.fromJSON(fe.v), this.hooks.fromJSON(fe.s), this.config.compareVersion(), yield this.history.processUndos(this.options.processUndosMaxFrameTime), (V = fe.v.bg) != null && V.texture && this.viewport.vis) {
140426
+ const Le = parseTexture(fe.v.bg.texture);
140427
+ Le.colorSpace = SRGBColorSpace, this.viewport.vis.pencil.scene.background = Le;
140428
140428
  }
140429
- return this.hooks.dispatch("beforeShow"), (le = this.viewport.vis) == null || le.show(), this.hooks.dispatch("afterShow"), (fe = this.pencil.controls) == null || fe.saveState(), this.select(null), window.requestIdleCallback(() => {
140430
- var Ce;
140431
- (Ce = this.viewport.vis) == null || Ce.worker.dispose();
140432
- }), this.hooks.dispatch("afterFromJSON"), Le;
140433
- } catch (Le) {
140434
- throw this.hooks.dispatch("errorFromJSON"), new Error("fromJSON error:" + Le);
140429
+ return this.hooks.dispatch("beforeShow"), this.viewport.vis && (this.playing && this.viewport.vis.lead.prefabGroup.hide(), this.viewport.vis.show()), this.hooks.dispatch("afterShow"), (le = this.pencil.controls) == null || le.saveState(), this.select(null), window.requestIdleCallback(() => {
140430
+ var Le;
140431
+ (Le = this.viewport.vis) == null || Le.worker.dispose();
140432
+ }), this.hooks.dispatch("afterFromJSON"), fe;
140433
+ } catch (fe) {
140434
+ throw this.hooks.dispatch("errorFromJSON"), new Error("fromJSON error:" + fe);
140435
140435
  }
140436
140436
  });
140437
140437
  }
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.30.0-beta.30";
1
+ declare const _default: "0.30.0-beta.31";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.30.0-beta.30",
3
+ "version": "0.30.0-beta.31",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",