@soonspacejs/plugin-cps-soonmanager 2.14.1 → 2.14.2

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.
@@ -38,6 +38,10 @@ export declare const MODEL_VISIONS_DATA_FILE_PATH = "/db/model_visions";
38
38
  * 空间
39
39
  */
40
40
  export declare const SPACES_DATA_FILE_PATH = "/db/spaces";
41
+ /**
42
+ * 流程
43
+ */
44
+ export declare const FLOWS_DATA_FILE_PATH = "/db/flows2";
41
45
  /**
42
46
  * 自定义属性 key
43
47
  */
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { default as SoonSpace, TopologyNodeInfo, BaseObject3D, Group, TopologyIn
2
2
  import { PoiNodeData } from '@soonspacejs/plugin-poi-renderer';
3
3
  import { default as EffectPlugin } from '@soonspacejs/plugin-effect';
4
4
  import { default as AtmospherePlugin } from '@soonspacejs/plugin-atmosphere';
5
+ import { FlowType } from '@soonspacejs/plugin-flow';
5
6
  import { default as SoonFlow } from '@soonflow/core';
6
7
  import { AnimationPlayer } from 'umanager-animation-parser';
7
8
  import { EventDispatcher } from 'three';
@@ -59,6 +60,10 @@ declare class CpsSoonmanagerPlugin extends EventDispatcher<IProgressEventMap> {
59
60
  * 空间数据
60
61
  */
61
62
  spacesData: TSpacesMap | null;
63
+ /**
64
+ * 流程数据
65
+ */
66
+ flowsData: FlowType[] | null;
62
67
  /**
63
68
  * effect 插件
64
69
  */
@@ -130,6 +135,7 @@ declare class CpsSoonmanagerPlugin extends EventDispatcher<IProgressEventMap> {
130
135
  * @returns
131
136
  */
132
137
  fetchSpacesData(): Promise<Map<string, import('./types').BaseTreeNode<ISpaces>>>;
138
+ fetchFlowsData(): Promise<FlowType[]>;
133
139
  /**
134
140
  * 格式化 Poi 数据完成 Poi Renderer 插件使用
135
141
  */
@@ -166,6 +172,10 @@ declare class CpsSoonmanagerPlugin extends EventDispatcher<IProgressEventMap> {
166
172
  * 获取拓扑路径列表
167
173
  */
168
174
  getTopologies(): Promise<TopologyInfo[]>;
175
+ /**
176
+ * 加载拓扑路径
177
+ */
178
+ loadTopologies(): Promise<import('soonspacejs').Topology[]>;
169
179
  /**
170
180
  * 对 nodes 排序(只适用于线路结构的拓扑路径)
171
181
  */
package/dist/index.esm.js CHANGED
@@ -24704,7 +24704,7 @@ function map(v, e) {
24704
24704
  function flatMapDepth(v, e, E) {
24705
24705
  return E = E === void 0 ? 1 : toInteger(E), baseFlatten(map(v, e), E);
24706
24706
  }
24707
- const META_DATA_FILE_PATH = "/SceneMetadata.json", dbBase = "/db", TREE_DATA_FILE_PATH = `${dbBase}/tree_models`, FLAT_DATA_FILE_PATH = `${dbBase}/flat_models`, POI_DATA_FILE_PATH = `${dbBase}/pois`, DATA_SOURCE_FILE_PATH = `${dbBase}/data_source`, TOPOLOGY_DATA_FILE_PATH = `${dbBase}/topology_paths`, PROPERTIES_DATA_FLEE_PATH = `${dbBase}/properties`, ANIMATIONS_DATA_FILE_PATH = `${dbBase}/animations`, MODEL_VISIONS_DATA_FILE_PATH = `${dbBase}/model_visions`, SPACES_DATA_FILE_PATH = `${dbBase}/spaces`, PROPERTIES_KEY = "properties", POI_PLUGIN_NAME = "poiRenderer";
24707
+ const META_DATA_FILE_PATH = "/SceneMetadata.json", dbBase = "/db", TREE_DATA_FILE_PATH = `${dbBase}/tree_models`, FLAT_DATA_FILE_PATH = `${dbBase}/flat_models`, POI_DATA_FILE_PATH = `${dbBase}/pois`, DATA_SOURCE_FILE_PATH = `${dbBase}/data_source`, TOPOLOGY_DATA_FILE_PATH = `${dbBase}/topology_paths`, PROPERTIES_DATA_FLEE_PATH = `${dbBase}/properties`, ANIMATIONS_DATA_FILE_PATH = `${dbBase}/animations`, MODEL_VISIONS_DATA_FILE_PATH = `${dbBase}/model_visions`, SPACES_DATA_FILE_PATH = `${dbBase}/spaces`, FLOWS_DATA_FILE_PATH = `${dbBase}/flows2`, PROPERTIES_KEY = "properties", POI_PLUGIN_NAME = "poiRenderer";
24708
24708
  var PoiContentTypeEnum = /* @__PURE__ */ ((v) => (v.PANEL = "PANEL", v.VIDEO = "VIDEO", v.VIDEO_STREAM = "VIDEO_STREAM", v))(PoiContentTypeEnum || {}), LoadSceneAlgorithm = /* @__PURE__ */ ((v) => (v.BFS = "BFS", v.DFS = "DFS", v))(LoadSceneAlgorithm || {});
24709
24709
  const encryptInfo = {
24710
24710
  // verifyKey:'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxKqQyl4uc99WxJ3CGNz/2AF3lMj4yCHebEG6MP+XM+r0oqV7EuLTL26AlpGxWMBxshMS+IQOnuSiteVdMe8oVJexd9GBrfeBlkwo5yqOrcUtVTwfq8z/NdcSsb4oDKx1Qec3AB9abnFLChP0dZCaKADB+FKrarXI1mw3SQjfLLwIDAQAB',
@@ -32481,7 +32481,7 @@ function requireMqtt() {
32481
32481
  #h;
32482
32482
  #g;
32483
32483
  #c;
32484
- #a;
32484
+ #s;
32485
32485
  #S;
32486
32486
  #E;
32487
32487
  #v;
@@ -32498,7 +32498,7 @@ function requireMqtt() {
32498
32498
  return {
32499
32499
  // properties
32500
32500
  starts: fe.#c,
32501
- ttls: fe.#a,
32501
+ ttls: fe.#s,
32502
32502
  sizes: fe.#g,
32503
32503
  keyMap: fe.#o,
32504
32504
  keyList: fe.#r,
@@ -32513,7 +32513,7 @@ function requireMqtt() {
32513
32513
  },
32514
32514
  free: fe.#_,
32515
32515
  // methods
32516
- isBackgroundFetch: (Re) => fe.#s(Re),
32516
+ isBackgroundFetch: (Re) => fe.#a(Re),
32517
32517
  backgroundFetch: (Re, me, Te, ye) => fe.#k(Re, me, Te, ye),
32518
32518
  moveToTail: (Re) => fe.#q(Re),
32519
32519
  indexes: (Re) => fe.#x(Re),
@@ -32612,7 +32612,7 @@ function requireMqtt() {
32612
32612
  }
32613
32613
  #P() {
32614
32614
  const fe = new ae(this.#t), Re = new ae(this.#t);
32615
- this.#a = fe, this.#c = Re, this.#$ = (ye, Pe, De = pe.now()) => {
32615
+ this.#s = fe, this.#c = Re, this.#$ = (ye, Pe, De = pe.now()) => {
32616
32616
  if (Re[ye] = Pe !== 0 ? De : 0, fe[ye] = Pe, Pe !== 0 && this.ttlAutopurge) {
32617
32617
  const Ee = setTimeout(() => {
32618
32618
  this.#A(ye) && this.#B(this.#r[ye], "expire");
@@ -32669,7 +32669,7 @@ function requireMqtt() {
32669
32669
  this.#m = 0, this.#g = fe, this.#O = (Re) => {
32670
32670
  this.#m -= fe[Re], fe[Re] = 0;
32671
32671
  }, this.#D = (Re, me, Te, ye) => {
32672
- if (this.#s(me))
32672
+ if (this.#a(me))
32673
32673
  return 0;
32674
32674
  if (!V(Te))
32675
32675
  if (ye) {
@@ -32717,7 +32717,7 @@ function requireMqtt() {
32717
32717
  */
32718
32718
  *entries() {
32719
32719
  for (const fe of this.#x())
32720
- this.#e[fe] !== void 0 && this.#r[fe] !== void 0 && !this.#s(this.#e[fe]) && (yield [this.#r[fe], this.#e[fe]]);
32720
+ this.#e[fe] !== void 0 && this.#r[fe] !== void 0 && !this.#a(this.#e[fe]) && (yield [this.#r[fe], this.#e[fe]]);
32721
32721
  }
32722
32722
  /**
32723
32723
  * Inverse order version of {@link LRUCache.entries}
@@ -32727,7 +32727,7 @@ function requireMqtt() {
32727
32727
  */
32728
32728
  *rentries() {
32729
32729
  for (const fe of this.#R())
32730
- this.#e[fe] !== void 0 && this.#r[fe] !== void 0 && !this.#s(this.#e[fe]) && (yield [this.#r[fe], this.#e[fe]]);
32730
+ this.#e[fe] !== void 0 && this.#r[fe] !== void 0 && !this.#a(this.#e[fe]) && (yield [this.#r[fe], this.#e[fe]]);
32731
32731
  }
32732
32732
  /**
32733
32733
  * Return a generator yielding the keys in the cache,
@@ -32736,7 +32736,7 @@ function requireMqtt() {
32736
32736
  *keys() {
32737
32737
  for (const fe of this.#x()) {
32738
32738
  const Re = this.#r[fe];
32739
- Re !== void 0 && !this.#s(this.#e[fe]) && (yield Re);
32739
+ Re !== void 0 && !this.#a(this.#e[fe]) && (yield Re);
32740
32740
  }
32741
32741
  }
32742
32742
  /**
@@ -32748,7 +32748,7 @@ function requireMqtt() {
32748
32748
  *rkeys() {
32749
32749
  for (const fe of this.#R()) {
32750
32750
  const Re = this.#r[fe];
32751
- Re !== void 0 && !this.#s(this.#e[fe]) && (yield Re);
32751
+ Re !== void 0 && !this.#a(this.#e[fe]) && (yield Re);
32752
32752
  }
32753
32753
  }
32754
32754
  /**
@@ -32757,7 +32757,7 @@ function requireMqtt() {
32757
32757
  */
32758
32758
  *values() {
32759
32759
  for (const fe of this.#x())
32760
- this.#e[fe] !== void 0 && !this.#s(this.#e[fe]) && (yield this.#e[fe]);
32760
+ this.#e[fe] !== void 0 && !this.#a(this.#e[fe]) && (yield this.#e[fe]);
32761
32761
  }
32762
32762
  /**
32763
32763
  * Inverse order version of {@link LRUCache.values}
@@ -32767,7 +32767,7 @@ function requireMqtt() {
32767
32767
  */
32768
32768
  *rvalues() {
32769
32769
  for (const fe of this.#R())
32770
- this.#e[fe] !== void 0 && !this.#s(this.#e[fe]) && (yield this.#e[fe]);
32770
+ this.#e[fe] !== void 0 && !this.#a(this.#e[fe]) && (yield this.#e[fe]);
32771
32771
  }
32772
32772
  /**
32773
32773
  * Iterating over the cache itself yields the same results as
@@ -32788,7 +32788,7 @@ function requireMqtt() {
32788
32788
  */
32789
32789
  find(fe, Re = {}) {
32790
32790
  for (const me of this.#x()) {
32791
- const Te = this.#e[me], ye = this.#s(Te) ? Te.__staleWhileFetching : Te;
32791
+ const Te = this.#e[me], ye = this.#a(Te) ? Te.__staleWhileFetching : Te;
32792
32792
  if (ye !== void 0 && fe(ye, this.#r[me], this))
32793
32793
  return this.get(this.#r[me], Re);
32794
32794
  }
@@ -32806,7 +32806,7 @@ function requireMqtt() {
32806
32806
  */
32807
32807
  forEach(fe, Re = this) {
32808
32808
  for (const me of this.#x()) {
32809
- const Te = this.#e[me], ye = this.#s(Te) ? Te.__staleWhileFetching : Te;
32809
+ const Te = this.#e[me], ye = this.#a(Te) ? Te.__staleWhileFetching : Te;
32810
32810
  ye !== void 0 && fe.call(Re, ye, this.#r[me], this);
32811
32811
  }
32812
32812
  }
@@ -32816,7 +32816,7 @@ function requireMqtt() {
32816
32816
  */
32817
32817
  rforEach(fe, Re = this) {
32818
32818
  for (const me of this.#R()) {
32819
- const Te = this.#e[me], ye = this.#s(Te) ? Te.__staleWhileFetching : Te;
32819
+ const Te = this.#e[me], ye = this.#a(Te) ? Te.__staleWhileFetching : Te;
32820
32820
  ye !== void 0 && fe.call(Re, ye, this.#r[me], this);
32821
32821
  }
32822
32822
  }
@@ -32846,12 +32846,12 @@ function requireMqtt() {
32846
32846
  const Re = this.#o.get(fe);
32847
32847
  if (Re === void 0)
32848
32848
  return;
32849
- const me = this.#e[Re], Te = this.#s(me) ? me.__staleWhileFetching : me;
32849
+ const me = this.#e[Re], Te = this.#a(me) ? me.__staleWhileFetching : me;
32850
32850
  if (Te === void 0)
32851
32851
  return;
32852
32852
  const ye = { value: Te };
32853
- if (this.#a && this.#c) {
32854
- const Pe = this.#a[Re], De = this.#c[Re];
32853
+ if (this.#s && this.#c) {
32854
+ const Pe = this.#s[Re], De = this.#c[Re];
32855
32855
  if (Pe && De) {
32856
32856
  const Ee = Pe - (pe.now() - De);
32857
32857
  ye.ttl = Ee, ye.start = Date.now();
@@ -32875,12 +32875,12 @@ function requireMqtt() {
32875
32875
  dump() {
32876
32876
  const fe = [];
32877
32877
  for (const Re of this.#x({ allowStale: !0 })) {
32878
- const me = this.#r[Re], Te = this.#e[Re], ye = this.#s(Te) ? Te.__staleWhileFetching : Te;
32878
+ const me = this.#r[Re], Te = this.#e[Re], ye = this.#a(Te) ? Te.__staleWhileFetching : Te;
32879
32879
  if (ye === void 0 || me === void 0)
32880
32880
  continue;
32881
32881
  const Pe = { value: ye };
32882
- if (this.#a && this.#c) {
32883
- Pe.ttl = this.#a[Re];
32882
+ if (this.#s && this.#c) {
32883
+ Pe.ttl = this.#s[Re];
32884
32884
  const De = pe.now() - this.#c[Re];
32885
32885
  Pe.start = Math.floor(Date.now() - De);
32886
32886
  }
@@ -32952,19 +32952,19 @@ function requireMqtt() {
32952
32952
  this.#q(Je);
32953
32953
  const bt = this.#e[Je];
32954
32954
  if (Re !== bt) {
32955
- if (this.#E && this.#s(bt)) {
32955
+ if (this.#E && this.#a(bt)) {
32956
32956
  bt.__abortController.abort(new Error("replaced"));
32957
32957
  const { __staleWhileFetching: ut } = bt;
32958
32958
  ut !== void 0 && !Pe && (this.#S && this.#n?.(ut, fe, "set"), this.#v && this.#h?.push([ut, fe, "set"]));
32959
32959
  } else Pe || (this.#S && this.#n?.(bt, fe, "set"), this.#v && this.#h?.push([bt, fe, "set"]));
32960
32960
  if (this.#O(Je), this.#M(Je, Me, Ee), this.#e[Je] = Re, Ee) {
32961
32961
  Ee.set = "replace";
32962
- const ut = bt && this.#s(bt) ? bt.__staleWhileFetching : bt;
32962
+ const ut = bt && this.#a(bt) ? bt.__staleWhileFetching : bt;
32963
32963
  ut !== void 0 && (Ee.oldValue = ut);
32964
32964
  }
32965
32965
  } else Ee && (Ee.set = "update");
32966
32966
  }
32967
- if (Te !== 0 && !this.#a && this.#P(), this.#a && (Ce || this.#$(Je, Te, ye), Ee && this.#I(Ee, Je)), !Pe && this.#v && this.#h) {
32967
+ if (Te !== 0 && !this.#s && this.#P(), this.#s && (Ce || this.#$(Je, Te, ye), Ee && this.#I(Ee, Je)), !Pe && this.#v && this.#h) {
32968
32968
  const bt = this.#h;
32969
32969
  let ut;
32970
32970
  for (; ut = bt?.shift(); )
@@ -32980,7 +32980,7 @@ function requireMqtt() {
32980
32980
  try {
32981
32981
  for (; this.#i; ) {
32982
32982
  const fe = this.#e[this.#b];
32983
- if (this.#C(!0), this.#s(fe)) {
32983
+ if (this.#C(!0), this.#a(fe)) {
32984
32984
  if (fe.__staleWhileFetching)
32985
32985
  return fe.__staleWhileFetching;
32986
32986
  } else if (fe !== void 0)
@@ -32997,7 +32997,7 @@ function requireMqtt() {
32997
32997
  }
32998
32998
  #C(fe) {
32999
32999
  const Re = this.#b, me = this.#r[Re], Te = this.#e[Re];
33000
- return this.#E && this.#s(Te) ? Te.__abortController.abort(new Error("evicted")) : (this.#S || this.#v) && (this.#S && this.#n?.(Te, me, "evict"), this.#v && this.#h?.push([Te, me, "evict"])), this.#O(Re), fe && (this.#r[Re] = void 0, this.#e[Re] = void 0, this.#_.push(Re)), this.#i === 1 ? (this.#b = this.#u = 0, this.#_.length = 0) : this.#b = this.#d[Re], this.#o.delete(me), this.#i--, Re;
33000
+ return this.#E && this.#a(Te) ? Te.__abortController.abort(new Error("evicted")) : (this.#S || this.#v) && (this.#S && this.#n?.(Te, me, "evict"), this.#v && this.#h?.push([Te, me, "evict"])), this.#O(Re), fe && (this.#r[Re] = void 0, this.#e[Re] = void 0, this.#_.push(Re)), this.#i === 1 ? (this.#b = this.#u = 0, this.#_.length = 0) : this.#b = this.#d[Re], this.#o.delete(me), this.#i--, Re;
33001
33001
  }
33002
33002
  /**
33003
33003
  * Check if a key is in the cache, without updating the recency of use.
@@ -33019,7 +33019,7 @@ function requireMqtt() {
33019
33019
  const { updateAgeOnHas: me = this.updateAgeOnHas, status: Te } = Re, ye = this.#o.get(fe);
33020
33020
  if (ye !== void 0) {
33021
33021
  const Pe = this.#e[ye];
33022
- if (this.#s(Pe) && Pe.__staleWhileFetching === void 0)
33022
+ if (this.#a(Pe) && Pe.__staleWhileFetching === void 0)
33023
33023
  return !1;
33024
33024
  if (this.#A(ye))
33025
33025
  Te && (Te.has = "stale", this.#I(Te, ye));
@@ -33039,11 +33039,11 @@ function requireMqtt() {
33039
33039
  if (Te === void 0 || !me && this.#A(Te))
33040
33040
  return;
33041
33041
  const ye = this.#e[Te];
33042
- return this.#s(ye) ? ye.__staleWhileFetching : ye;
33042
+ return this.#a(ye) ? ye.__staleWhileFetching : ye;
33043
33043
  }
33044
33044
  #k(fe, Re, me, Te) {
33045
33045
  const ye = Re === void 0 ? void 0 : this.#e[Re];
33046
- if (this.#s(ye))
33046
+ if (this.#a(ye))
33047
33047
  return ye;
33048
33048
  const Pe = new Z(), { signal: De } = me;
33049
33049
  De?.addEventListener("abort", () => Pe.abort(De.reason), {
@@ -33079,7 +33079,7 @@ function requireMqtt() {
33079
33079
  });
33080
33080
  return Re === void 0 ? (this.set(fe, Dt, { ...Ee.options, status: void 0 }), Re = this.#o.get(fe)) : this.#e[Re] = Dt, Dt;
33081
33081
  }
33082
- #s(fe) {
33082
+ #a(fe) {
33083
33083
  if (!this.#E)
33084
33084
  return !1;
33085
33085
  const Re = fe;
@@ -33137,7 +33137,7 @@ function requireMqtt() {
33137
33137
  return St.__returned = St;
33138
33138
  } else {
33139
33139
  const St = this.#e[Lt];
33140
- if (this.#s(St)) {
33140
+ if (this.#a(St)) {
33141
33141
  const Tt = me && St.__staleWhileFetching !== void 0;
33142
33142
  return dt && (dt.fetch = "inflight", Tt && (dt.returnedStale = !0)), Tt ? St.__staleWhileFetching : St.__returned = St;
33143
33143
  }
@@ -33176,7 +33176,7 @@ function requireMqtt() {
33176
33176
  get(fe, Re = {}) {
33177
33177
  const { allowStale: me = this.allowStale, updateAgeOnGet: Te = this.updateAgeOnGet, noDeleteOnStaleGet: ye = this.noDeleteOnStaleGet, status: Pe } = Re, De = this.#o.get(fe);
33178
33178
  if (De !== void 0) {
33179
- const Ee = this.#e[De], Ce = this.#s(Ee);
33179
+ const Ee = this.#e[De], Ce = this.#a(Ee);
33180
33180
  return Pe && this.#I(Pe, De), this.#A(De) ? (Pe && (Pe.get = "stale"), Ce ? (Pe && me && Ee.__staleWhileFetching !== void 0 && (Pe.returnedStale = !0), me ? Ee.__staleWhileFetching : void 0) : (ye || this.#B(fe, "expire"), Pe && me && (Pe.returnedStale = !0), me ? Ee : void 0)) : (Pe && (Pe.get = "hit"), Ce ? Ee.__staleWhileFetching : (this.#q(De), Te && this.#T(De), Ee));
33181
33181
  } else Pe && (Pe.get = "miss");
33182
33182
  }
@@ -33204,7 +33204,7 @@ function requireMqtt() {
33204
33204
  else {
33205
33205
  this.#O(Te);
33206
33206
  const ye = this.#e[Te];
33207
- if (this.#s(ye) ? ye.__abortController.abort(new Error("deleted")) : (this.#S || this.#v) && (this.#S && this.#n?.(ye, fe, Re), this.#v && this.#h?.push([ye, fe, Re])), this.#o.delete(fe), this.#r[Te] = void 0, this.#e[Te] = void 0, Te === this.#u)
33207
+ if (this.#a(ye) ? ye.__abortController.abort(new Error("deleted")) : (this.#S || this.#v) && (this.#S && this.#n?.(ye, fe, Re), this.#v && this.#h?.push([ye, fe, Re])), this.#o.delete(fe), this.#r[Te] = void 0, this.#e[Te] = void 0, Te === this.#u)
33208
33208
  this.#u = this.#w[Te];
33209
33209
  else if (Te === this.#b)
33210
33210
  this.#b = this.#d[Te];
@@ -33234,14 +33234,14 @@ function requireMqtt() {
33234
33234
  #j(fe) {
33235
33235
  for (const Re of this.#R({ allowStale: !0 })) {
33236
33236
  const me = this.#e[Re];
33237
- if (this.#s(me))
33237
+ if (this.#a(me))
33238
33238
  me.__abortController.abort(new Error("deleted"));
33239
33239
  else {
33240
33240
  const Te = this.#r[Re];
33241
33241
  this.#S && this.#n?.(me, Te, fe), this.#v && this.#h?.push([me, Te, fe]);
33242
33242
  }
33243
33243
  }
33244
- if (this.#o.clear(), this.#e.fill(void 0), this.#r.fill(void 0), this.#a && this.#c && (this.#a.fill(0), this.#c.fill(0)), this.#g && this.#g.fill(0), this.#b = 0, this.#u = 0, this.#_.length = 0, this.#m = 0, this.#i = 0, this.#v && this.#h) {
33244
+ if (this.#o.clear(), this.#e.fill(void 0), this.#r.fill(void 0), this.#s && this.#c && (this.#s.fill(0), this.#c.fill(0)), this.#g && this.#g.fill(0), this.#b = 0, this.#u = 0, this.#_.length = 0, this.#m = 0, this.#i = 0, this.#v && this.#h) {
33245
33245
  const Re = this.#h;
33246
33246
  let me;
33247
33247
  for (; me = Re?.shift(); )
@@ -42505,6 +42505,7 @@ const { groupBy, warn, getExtension } = SoonSpace.utils, defaultLoadSceneOptions
42505
42505
  loadSceneAlgorithm: LoadSceneAlgorithm.DFS,
42506
42506
  loadLevel: 1 / 0,
42507
42507
  loadPoi: !1,
42508
+ loadTopologies: !1,
42508
42509
  refreshPoiByDataSource: !1,
42509
42510
  loadFlowData: !1,
42510
42511
  objectPrefixId: "",
@@ -42579,6 +42580,10 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42579
42580
  * 空间数据
42580
42581
  */
42581
42582
  spacesData = null;
42583
+ /**
42584
+ * 流程数据
42585
+ */
42586
+ flowsData = null;
42582
42587
  /**
42583
42588
  * effect 插件
42584
42589
  */
@@ -42730,14 +42735,14 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42730
42735
  * 验证公有版本(调试包)
42731
42736
  */
42732
42737
  async #_(e) {
42733
- const E = await this.#a(e), _ = decodeString(this.#n.debugKey), { verifiedRes: B, dec: A } = this.#u(E, _);
42738
+ const E = await this.#s(e), _ = decodeString(this.#n.debugKey), { verifiedRes: B, dec: A } = this.#u(E, _);
42734
42739
  this.#y = B, this.#y && this.#o(A);
42735
42740
  }
42736
42741
  /**
42737
42742
  * 验证应用(安装包)
42738
42743
  */
42739
42744
  async #h(e) {
42740
- const E = await this.#a(e), _ = this.#n.key, { verifiedRes: B, dec: A } = this.#u(E, _);
42745
+ const E = await this.#s(e), _ = this.#n.key, { verifiedRes: B, dec: A } = this.#u(E, _);
42741
42746
  return this.#i = B, this.#y = B, this.#i && this.#o(A), { verifiedRes: B, dec: A };
42742
42747
  }
42743
42748
  #g(e) {
@@ -42752,7 +42757,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42752
42757
  const { resource: E } = await this.fetchMetaData(), _ = getExtension(E) || "json";
42753
42758
  return `${e}.${_}`;
42754
42759
  }
42755
- async #a(e) {
42760
+ async #s(e) {
42756
42761
  const { utils: E } = this.ssp;
42757
42762
  return E.fetchFile(this.#g(e), "json");
42758
42763
  }
@@ -42760,7 +42765,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42760
42765
  * 获取场景元数据
42761
42766
  */
42762
42767
  async fetchMetaData() {
42763
- const e = await this.#a(META_DATA_FILE_PATH);
42768
+ const e = await this.#s(META_DATA_FILE_PATH);
42764
42769
  return this.metaData = e, e;
42765
42770
  }
42766
42771
  /**
@@ -42768,11 +42773,11 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42768
42773
  * @returns
42769
42774
  */
42770
42775
  async fetchTreeData() {
42771
- const e = await this.#a(await this.#c(TREE_DATA_FILE_PATH));
42776
+ const e = await this.#s(await this.#c(TREE_DATA_FILE_PATH));
42772
42777
  return this.#o(e), e;
42773
42778
  }
42774
42779
  async fetchFlatData() {
42775
- const e = await this.#a(await this.#c(FLAT_DATA_FILE_PATH));
42780
+ const e = await this.#s(await this.#c(FLAT_DATA_FILE_PATH));
42776
42781
  return this.flatData = e, this.faltDataMap = groupBy(e, "id"), e;
42777
42782
  }
42778
42783
  /**
@@ -42780,7 +42785,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42780
42785
  * @returns
42781
42786
  */
42782
42787
  async fetchPoiData() {
42783
- const e = await this.#a(await this.#c(POI_DATA_FILE_PATH));
42788
+ const e = await this.#s(await this.#c(POI_DATA_FILE_PATH));
42784
42789
  return this.poiData = e.map((E) => ({
42785
42790
  ...E,
42786
42791
  contentData: JSON.parse(E.content || "{}")
@@ -42791,7 +42796,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42791
42796
  * @returns
42792
42797
  */
42793
42798
  async fetchDataSourceData() {
42794
- const e = await this.#a(await this.#c(DATA_SOURCE_FILE_PATH));
42799
+ const e = await this.#s(await this.#c(DATA_SOURCE_FILE_PATH));
42795
42800
  return this.dataSourceData = e, e;
42796
42801
  }
42797
42802
  /**
@@ -42799,7 +42804,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42799
42804
  * @returns
42800
42805
  */
42801
42806
  async fetchTopologyData() {
42802
- const e = await this.#a(
42807
+ const e = await this.#s(
42803
42808
  await this.#c(TOPOLOGY_DATA_FILE_PATH)
42804
42809
  ).then((E) => {
42805
42810
  const _ = {
@@ -42820,7 +42825,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42820
42825
  * @returns
42821
42826
  */
42822
42827
  async fetchPropertiesData() {
42823
- const e = await this.#a(
42828
+ const e = await this.#s(
42824
42829
  await this.#c(PROPERTIES_DATA_FLEE_PATH)
42825
42830
  ).then((E) => E.map((B) => {
42826
42831
  const A = this.ssp.utils.propertiesCtx;
@@ -42842,7 +42847,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42842
42847
  * @returns
42843
42848
  */
42844
42849
  async fetchAnimationsData() {
42845
- const e = await this.#a(
42850
+ const e = await this.#s(
42846
42851
  await this.#c(ANIMATIONS_DATA_FILE_PATH)
42847
42852
  ).then((E) => groupBy(E, "modelId"));
42848
42853
  return this.animationsData = e, e;
@@ -42852,7 +42857,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42852
42857
  * @returns
42853
42858
  */
42854
42859
  async fetchModelVisionsData() {
42855
- const e = await this.#a(await this.#c(MODEL_VISIONS_DATA_FILE_PATH)).then((E) => new Map(Object.entries(E)));
42860
+ const e = await this.#s(await this.#c(MODEL_VISIONS_DATA_FILE_PATH)).then((E) => new Map(Object.entries(E)));
42856
42861
  return this.modelVisionsData = e, e;
42857
42862
  }
42858
42863
  /**
@@ -42860,11 +42865,17 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42860
42865
  * @returns
42861
42866
  */
42862
42867
  async fetchSpacesData() {
42863
- const e = await this.#a(
42868
+ const e = await this.#s(
42864
42869
  await this.#c(SPACES_DATA_FILE_PATH)
42865
42870
  ).then((E) => mapTreeNodeByKey(E, "sid"));
42866
42871
  return this.spacesData = e, e;
42867
42872
  }
42873
+ async fetchFlowsData() {
42874
+ const e = await this.#s(
42875
+ await this.#c(FLOWS_DATA_FILE_PATH)
42876
+ );
42877
+ return this.flowsData = e, e;
42878
+ }
42868
42879
  /**
42869
42880
  * 格式化 Poi 数据完成 Poi Renderer 插件使用
42870
42881
  */
@@ -42982,7 +42993,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
42982
42993
  return this.ssp.utils.runWithCode(e);
42983
42994
  }
42984
42995
  #S(e, E = defaultLoadSceneOptions.asId) {
42985
- return e[E] ?? e.id;
42996
+ return (E && e[E]) ?? e.id;
42986
42997
  }
42987
42998
  #E(e) {
42988
42999
  return e.sid || e.id;
@@ -43157,7 +43168,7 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
43157
43168
  const M = [
43158
43169
  this.presetGis()
43159
43170
  ];
43160
- A.applyPresetEffects && M.push(this.presetEffects()), A.loadPoi && M.push(this.loadPoi(A.refreshPoiByDataSource)), A.loadFlowData && M.push(this.loadFlowData()), await Promise.allSettled(M), A.needsModelsBoundsTree && this.ssp.computeModelsBoundsTree();
43171
+ A.applyPresetEffects && M.push(this.presetEffects()), A.loadPoi && M.push(this.loadPoi(A.refreshPoiByDataSource)), A.loadTopologies && M.push(this.loadTopologies()), A.loadFlowData && M.push(this.loadFlowData()), await Promise.allSettled(M), A.needsModelsBoundsTree && this.ssp.computeModelsBoundsTree();
43161
43172
  }
43162
43173
  async presetGis() {
43163
43174
  const { gisSettings: e } = await this.fetchMetaData();
@@ -43217,6 +43228,12 @@ class CpsSoonmanagerPlugin extends EventDispatcher {
43217
43228
  async getTopologies() {
43218
43229
  return this.fetchTopologyData();
43219
43230
  }
43231
+ /**
43232
+ * 加载拓扑路径
43233
+ */
43234
+ async loadTopologies() {
43235
+ return (await this.fetchTopologyData()).map((E) => this.ssp.createTopology(E));
43236
+ }
43220
43237
  /**
43221
43238
  * 对 nodes 排序(只适用于线路结构的拓扑路径)
43222
43239
  */
@@ -43414,6 +43431,7 @@ export {
43414
43431
  ANIMATIONS_DATA_FILE_PATH,
43415
43432
  DATA_SOURCE_FILE_PATH,
43416
43433
  FLAT_DATA_FILE_PATH,
43434
+ FLOWS_DATA_FILE_PATH,
43417
43435
  LoadSceneAlgorithm,
43418
43436
  META_DATA_FILE_PATH,
43419
43437
  MODEL_VISIONS_DATA_FILE_PATH,
package/dist/types.d.ts CHANGED
@@ -293,6 +293,10 @@ export interface ILoadSceneOptions extends ConstructorOptions {
293
293
  * 加载 poi
294
294
  */
295
295
  loadPoi?: boolean;
296
+ /**
297
+ * 加载 topology
298
+ */
299
+ loadTopologies?: boolean;
296
300
  /**
297
301
  * 通过数据源刷新 poi
298
302
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soonspacejs/plugin-cps-soonmanager",
3
3
  "pluginName": "CpsSoonmanagerPlugin",
4
- "version": "2.14.1",
4
+ "version": "2.14.2",
5
5
  "description": "Sync cps soonmanager data plugin for SoonSpace.js",
6
6
  "main": "dist/index.esm.js",
7
7
  "module": "dist/index.esm.js",
@@ -13,12 +13,13 @@
13
13
  ],
14
14
  "author": "xunwei",
15
15
  "license": "UNLICENSED",
16
- "gitHead": "27d5e0bcd79ff71c8e2943a8420c39624ae6f8e6",
16
+ "gitHead": "00bbf1c9241f4466abe494c009c99a316ccfc24a",
17
17
  "dependencyPlugins": [
18
18
  "plugin-poi-renderer",
19
19
  "plugin-effect",
20
20
  "plugin-atmosphere",
21
- "plugin-gs3d-loader"
21
+ "plugin-gs3d-loader",
22
+ "plugin-flow"
22
23
  ],
23
24
  "devDependencies": {
24
25
  "@soonflow/core": "0.2.13",
@@ -34,11 +35,12 @@
34
35
  },
35
36
  "peerDependencies": {
36
37
  "3d-tiles-renderer": "^0.4.14",
37
- "@soonspacejs/plugin-atmosphere": "2.14.1",
38
- "@soonspacejs/plugin-effect": "2.14.1",
39
- "@soonspacejs/plugin-gs3d-loader": "2.14.1",
40
- "@soonspacejs/plugin-poi-renderer": "2.14.1",
41
- "soonspacejs": "2.14.1",
38
+ "@soonspacejs/plugin-atmosphere": "2.14.2",
39
+ "@soonspacejs/plugin-effect": "2.14.2",
40
+ "@soonspacejs/plugin-flow": "2.14.2",
41
+ "@soonspacejs/plugin-gs3d-loader": "2.14.2",
42
+ "@soonspacejs/plugin-poi-renderer": "2.14.2",
43
+ "soonspacejs": "2.14.2",
42
44
  "umanager-animation-parser": "^0.0.6"
43
45
  }
44
46
  }