@shjjs/visual-ui 1.0.2 → 1.0.4

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.
Files changed (71) hide show
  1. package/es/components/chart-bar-contrast2/index.d.ts +51 -0
  2. package/es/components/chart-bar-contrast2/index.mjs +7 -0
  3. package/es/components/chart-bar-contrast2/index.vue.d.ts +51 -0
  4. package/es/components/chart-bar-contrast2/index.vue.mjs +75 -0
  5. package/es/components/chart-bar-contrast2/index.vue2.mjs +4 -0
  6. package/es/components/chart-line-rain-flow/index.d.ts +51 -0
  7. package/es/components/chart-line-rain-flow/index.mjs +7 -0
  8. package/es/components/chart-line-rain-flow/index.vue.d.ts +51 -0
  9. package/es/components/chart-line-rain-flow/index.vue.mjs +76 -0
  10. package/es/components/chart-line-rain-flow/index.vue2.mjs +4 -0
  11. package/es/components/index.d.ts +2 -0
  12. package/es/components/index.mjs +222 -218
  13. package/es/components/interaction-data-picker/index.d.ts +14 -12
  14. package/es/components/interaction-data-picker/index.mjs +2 -2
  15. package/es/components/interaction-data-picker/index.vue.d.ts +14 -12
  16. package/es/components/interaction-data-picker/index.vue.mjs +5 -11
  17. package/es/components/interaction-data-picker/index.vue2.mjs +130 -2
  18. package/es/components/interaction-input/index.d.ts +25 -5
  19. package/es/components/interaction-input/index.vue.d.ts +25 -5
  20. package/es/components/interaction-input/index.vue.mjs +2 -2
  21. package/es/components/interaction-input/index.vue2.mjs +67 -36
  22. package/es/components/interaction-slider/index.d.ts +22 -5
  23. package/es/components/interaction-slider/index.vue.d.ts +22 -5
  24. package/es/components/interaction-slider/index.vue.mjs +2 -2
  25. package/es/components/interaction-slider/index.vue2.mjs +84 -50
  26. package/es/components/scene-ue-iframe/index.d.ts +3 -3
  27. package/es/components/scene-ue-iframe/index.vue.d.ts +3 -3
  28. package/es/components/scene-ue-iframe/index.vue.mjs +1 -1
  29. package/es/components/scene-ue-iframe/index.vue2.mjs +9 -11
  30. package/es/components/scene-ue-shj/index.d.ts +3 -3
  31. package/es/components/scene-ue-shj/index.vue.d.ts +3 -3
  32. package/es/components/scene-ue-shj/index.vue.mjs +2 -2
  33. package/es/components/scene-ue-shj/index.vue2.mjs +4 -6
  34. package/es/components/scene-unity-iframe/index.d.ts +3 -3
  35. package/es/components/scene-unity-iframe/index.vue.d.ts +3 -3
  36. package/es/components/scene-unity-iframe/index.vue.mjs +2 -2
  37. package/es/components/scene-unity-iframe/index.vue2.mjs +10 -12
  38. package/es/components/scene-unity-webgl/index.d.ts +3 -3
  39. package/es/components/scene-unity-webgl/index.vue.d.ts +3 -3
  40. package/es/components/scene-unity-webgl/index.vue.mjs +1 -1
  41. package/es/components/scene-unity-webgl/index.vue2.mjs +12 -12
  42. package/es/env.d.ts +4 -1
  43. package/es/index.mjs +222 -218
  44. package/es/style.css +1 -1
  45. package/es/utils/parseDataset.mjs +12 -12
  46. package/lib/components/chart-bar-contrast2/index.js +1 -0
  47. package/lib/components/chart-bar-contrast2/index.vue.js +1 -0
  48. package/lib/components/chart-bar-contrast2/index.vue2.js +1 -0
  49. package/lib/components/chart-line-rain-flow/index.js +1 -0
  50. package/lib/components/chart-line-rain-flow/index.vue.js +1 -0
  51. package/lib/components/chart-line-rain-flow/index.vue2.js +1 -0
  52. package/lib/components/index.js +1 -1
  53. package/lib/components/interaction-data-picker/index.js +1 -1
  54. package/lib/components/interaction-data-picker/index.vue.js +1 -1
  55. package/lib/components/interaction-data-picker/index.vue2.js +1 -1
  56. package/lib/components/interaction-input/index.vue.js +1 -1
  57. package/lib/components/interaction-input/index.vue2.js +1 -1
  58. package/lib/components/interaction-slider/index.vue.js +1 -1
  59. package/lib/components/interaction-slider/index.vue2.js +1 -1
  60. package/lib/components/scene-ue-iframe/index.vue.js +1 -1
  61. package/lib/components/scene-ue-iframe/index.vue2.js +1 -1
  62. package/lib/components/scene-ue-shj/index.vue.js +1 -1
  63. package/lib/components/scene-ue-shj/index.vue2.js +1 -1
  64. package/lib/components/scene-unity-iframe/index.vue.js +1 -1
  65. package/lib/components/scene-unity-iframe/index.vue2.js +1 -1
  66. package/lib/components/scene-unity-webgl/index.vue.js +1 -1
  67. package/lib/components/scene-unity-webgl/index.vue2.js +1 -1
  68. package/lib/index.js +1 -1
  69. package/lib/style.css +1 -1
  70. package/lib/utils/parseDataset.js +1 -1
  71. package/package.json +1 -1
@@ -1,64 +1,98 @@
1
- import { defineComponent as a, useCssVars as r, ref as c, watch as b, openBlock as u, createElementBlock as O, createVNode as m, unref as f } from "vue";
2
- import { cloneDeep as g, isEqual as v } from "lodash";
3
- import h from "@vueform/slider";
1
+ import { defineComponent as p, useCssVars as m, ref as f, onMounted as h, watch as n, openBlock as g, createElementBlock as w, createVNode as v, unref as H } from "vue";
2
+ import { cloneDeep as a, isEqual as l } from "lodash";
3
+ import T from "@vueform/slider";
4
4
  import "@vueform/slider/themes/default.css";
5
- const T = { class: "zerov-widget-slider" }, H = a({ name: "zv-interaction-slider" }), E = /* @__PURE__ */ a({
6
- ...H,
5
+ const E = { class: "zerov-widget-slider" }, S = p({ name: "zv-interaction-slider" }), R = /* @__PURE__ */ p({
6
+ ...S,
7
7
  props: {
8
8
  basicOption: {},
9
- useEvents: {}
9
+ sources: {},
10
+ useEvents: {},
11
+ uuid: {}
10
12
  },
11
13
  emits: ["on-change"],
12
- setup(l, { emit: t }) {
13
- r((i) => ({
14
- "2d030a40": i.basicOption.css.sliderBg,
15
- "65515f18": i.basicOption.css.sliderConnectBg,
16
- ce4f56aa: i.basicOption.css.sliderHeight + "px",
17
- "2a384a40": i.basicOption.css.sliderRadius + "px",
18
- "49ece248": i.basicOption.css.sliderHandleBg,
19
- "1b937e4a": i.basicOption.css.sliderHandleWidth + "px",
20
- bd36b0ba: i.basicOption.css.sliderHandleHeight + "px",
21
- "191fa450": i.basicOption.css.sliderHandleRadius + "px",
22
- a4c0c9cc: i.basicOption.css.sliderHandleRingWidth + "px",
23
- "7823a3b0": i.basicOption.css.sliderHandleRingColor,
24
- "10d74d95": i.basicOption.css.sliderTooltipFontSize + "px",
25
- "2da020fe": i.basicOption.css.sliderTooltipFontWeight + "px",
26
- "4f957566": i.basicOption.css.sliderTooltipBg,
27
- "5f3ef95b": i.basicOption.css.sliderTooltipColor,
28
- "019425b3": i.basicOption.css.sliderTooltipRadius + "px",
29
- "98e20748": i.basicOption.css.sliderTooltipPy + "px",
30
- "4badcf7d": i.basicOption.css.sliderTooltipPx + "px",
31
- d65c76aa: i.basicOption.css.sliderTooltipArrowSize + "px",
32
- "5247e2f0": i.basicOption.css.sliderTooltipDistance + "px"
14
+ setup(r, { expose: d, emit: c }) {
15
+ m((s) => ({
16
+ "2711d843": s.basicOption.css.sliderBg,
17
+ 71484911: s.basicOption.css.sliderConnectBg,
18
+ "7431b6c8": s.basicOption.css.sliderHeight + "px",
19
+ 73858606: s.basicOption.css.sliderRadius + "px",
20
+ "38483bea": s.basicOption.css.sliderHandleBg,
21
+ 47783366: s.basicOption.css.sliderHandleWidth + "px",
22
+ "127d8000": s.basicOption.css.sliderHandleHeight + "px",
23
+ "48ccc635": s.basicOption.css.sliderHandleRadius + "px",
24
+ "5006499d": s.basicOption.css.sliderHandleRingWidth + "px",
25
+ "3aa61ae6": s.basicOption.css.sliderHandleRingColor,
26
+ "998407d0": s.basicOption.css.sliderTooltipFontSize + "px",
27
+ "5dd58a7e": s.basicOption.css.sliderTooltipFontWeight + "px",
28
+ "7c263dea": s.basicOption.css.sliderTooltipBg,
29
+ "66525f9e": s.basicOption.css.sliderTooltipColor,
30
+ "57ca98f6": s.basicOption.css.sliderTooltipRadius + "px",
31
+ cba0edc2: s.basicOption.css.sliderTooltipPy + "px",
32
+ "324e5c40": s.basicOption.css.sliderTooltipPx + "px",
33
+ "3f40e688": s.basicOption.css.sliderTooltipArrowSize + "px",
34
+ "16a2dd1a": s.basicOption.css.sliderTooltipDistance + "px"
33
35
  }));
34
- const n = t, s = c(20), e = l;
35
- s.value = e.basicOption.slider.defaultValue || 0, b(() => g(e.basicOption), (i, o) => {
36
- v(i, o) || (s.value = e.basicOption.slider.defaultValue || 0);
37
- }, {
38
- deep: !0
39
- });
40
- const p = (i) => {
41
- n("on-change", i, s.value), window.SHJParseEvent(e.useEvents, "on-change", {
42
- data: s.value,
43
- event: i
36
+ const i = r, u = c, t = f(20), o = () => {
37
+ window.SHJDatasourceV2({
38
+ tId: i.uuid,
39
+ sources: i.sources,
40
+ callback: ({ data: s }) => {
41
+ try {
42
+ window.SHJParseEvent(i.useEvents, "dataListener", s), t.value = s[0].data[0].value;
43
+ } catch {
44
+ window.SHJParseEvent(i.useEvents, "dataListener", null);
45
+ }
46
+ }
44
47
  });
45
48
  };
46
- return (i, o) => (u(), O("div", T, [
47
- m(f(h), {
48
- modelValue: s.value,
49
- "onUpdate:modelValue": o[0] || (o[0] = (d) => s.value = d),
49
+ h(() => o());
50
+ const b = (s) => {
51
+ u("on-change", {
52
+ data: s,
53
+ event: s
54
+ }), window.SHJParseEvent(i.useEvents, "on-change", {
55
+ data: s,
56
+ event: s
57
+ });
58
+ };
59
+ return n(
60
+ () => a(i.basicOption),
61
+ (s, e) => {
62
+ l(s, e) || o();
63
+ },
64
+ { deep: !0 }
65
+ ), n(
66
+ () => a(i.sources),
67
+ (s, e) => {
68
+ l(s, e) || o();
69
+ },
70
+ { deep: !0 }
71
+ ), d({
72
+ refresh: () => o(),
73
+ refreshView: () => o(),
74
+ refreshData: () => o()
75
+ }), (s, e) => (g(), w("div", E, [
76
+ v(H(T), {
77
+ modelValue: t.value,
78
+ "onUpdate:modelValue": e[0] || (e[0] = (O) => t.value = O),
50
79
  class: "slider",
51
- min: i.basicOption.slider.min,
52
- max: i.basicOption.slider.max,
53
- step: i.basicOption.slider.step,
54
- tooltips: i.basicOption.slider.tooltips,
55
- "show-tooltip": i.basicOption.slider.showTooltip,
56
- "tooltip-position": i.basicOption.slider.tooltipPosition,
57
- onUpdate: p
58
- }, null, 8, ["modelValue", "min", "max", "step", "tooltips", "show-tooltip", "tooltip-position"])
80
+ min: s.basicOption.slider.min,
81
+ max: s.basicOption.slider.max,
82
+ step: s.basicOption.slider.step,
83
+ tooltips: s.basicOption.slider.tooltips,
84
+ "show-tooltip": s.basicOption.slider.showTooltip,
85
+ "tooltip-position": s.basicOption.slider.tooltipPosition,
86
+ format: {
87
+ prefix: s.basicOption.slider.prefix,
88
+ suffix: s.basicOption.slider.suffix,
89
+ decimals: s.basicOption.slider.decimals
90
+ },
91
+ onChange: b
92
+ }, null, 8, ["modelValue", "min", "max", "step", "tooltips", "show-tooltip", "tooltip-position", "format"])
59
93
  ]));
60
94
  }
61
95
  });
62
96
  export {
63
- E as default
97
+ R as default
64
98
  };
@@ -21,9 +21,9 @@ export declare const ZvSceneUeIframe: import("../../utils/typescript").SFCWithIn
21
21
  };
22
22
  }, {
23
23
  props: any;
24
- emit: (event: "on-message", ...args: any[]) => void;
24
+ emit: (event: "ue-scoket-on-message", ...args: any[]) => void;
25
25
  useUeScene: (basicOption: any) => void;
26
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "ue-scoket-on-message"[], "ue-scoket-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
27
  basicOption: {
28
28
  type: any;
29
29
  required: true;
@@ -45,6 +45,6 @@ export declare const ZvSceneUeIframe: import("../../utils/typescript").SFCWithIn
45
45
  required: true;
46
46
  };
47
47
  }>> & {
48
- "onOn-message"?: (...args: any[]) => any;
48
+ "onUe-scoket-on-message"?: (...args: any[]) => any;
49
49
  }, {}, {}>> & Record<string, any>;
50
50
  export default ZvSceneUeIframe;
@@ -21,9 +21,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
21
21
  };
22
22
  }, {
23
23
  props: any;
24
- emit: (event: "on-message", ...args: any[]) => void;
24
+ emit: (event: "ue-scoket-on-message", ...args: any[]) => void;
25
25
  useUeScene: (basicOption: any) => void;
26
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "ue-scoket-on-message"[], "ue-scoket-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
27
  basicOption: {
28
28
  type: any;
29
29
  required: true;
@@ -45,6 +45,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
45
45
  required: true;
46
46
  };
47
47
  }>> & {
48
- "onOn-message"?: (...args: any[]) => any;
48
+ "onUe-scoket-on-message"?: (...args: any[]) => any;
49
49
  }, {}, {}>;
50
50
  export default _sfc_main;
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-031ce7f8"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-69715dcf"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as n, openBlock as c, createElementBlock as i, createElementVNode as d, onMounted as w, onBeforeUnmount as S } from "vue";
2
- const m = { class: "iframe-webscoket" }, f = ["src"], l = n({ name: "zv-scene-ue-shj" }), k = /* @__PURE__ */ n({
1
+ import { defineComponent as t, openBlock as c, createElementBlock as i, createElementVNode as d, onMounted as w, onBeforeUnmount as m } from "vue";
2
+ const S = { class: "iframe-webscoket" }, f = ["src"], l = t({ name: "zv-scene-ue-iframe" }), b = /* @__PURE__ */ t({
3
3
  ...l,
4
4
  props: {
5
5
  basicOption: {},
@@ -8,11 +8,9 @@ const m = { class: "iframe-webscoket" }, f = ["src"], l = n({ name: "zv-scene-ue
8
8
  uuid: {},
9
9
  isPreview: { type: Boolean }
10
10
  },
11
- emits: [
12
- "on-message"
13
- ],
14
- setup(t, { emit: r }) {
15
- const s = t, a = r;
11
+ emits: ["ue-scoket-on-message"],
12
+ setup(n, { emit: r }) {
13
+ const s = n, a = r;
16
14
  return ((o) => {
17
15
  w(() => {
18
16
  if (o.webSocketUrl)
@@ -23,7 +21,7 @@ const m = { class: "iframe-webscoket" }, f = ["src"], l = n({ name: "zv-scene-ue
23
21
  return;
24
22
  if (!JSON.parse(e.data).data)
25
23
  throw new Error("");
26
- a("on-message", JSON.parse(e.data).data), window.SHJParseEvent(s.useEvents, "on-message", JSON.parse(e.data).data);
24
+ a("ue-scoket-on-message", JSON.parse(e.data).data), window.SHJParseEvent(s.useEvents, "ue-scoket-on-message", JSON.parse(e.data).data);
27
25
  } catch {
28
26
  }
29
27
  }, window.SHJSceneUEIframeWebscoket.onopen = () => {
@@ -31,10 +29,10 @@ const m = { class: "iframe-webscoket" }, f = ["src"], l = n({ name: "zv-scene-ue
31
29
  };
32
30
  } catch {
33
31
  }
34
- }), S(() => {
32
+ }), m(() => {
35
33
  window.SHJSceneUEIframeWebscoket && window.SHJSceneUEIframeWebscoket.close();
36
34
  });
37
- })(s.basicOption), (o, e) => (c(), i("div", m, [
35
+ })(s.basicOption), (o, e) => (c(), i("div", S, [
38
36
  d("iframe", {
39
37
  src: o.basicOption.iframeUrl,
40
38
  sandbox: "allow-scripts allow-same-origin",
@@ -44,5 +42,5 @@ const m = { class: "iframe-webscoket" }, f = ["src"], l = n({ name: "zv-scene-ue
44
42
  }
45
43
  });
46
44
  export {
47
- k as default
45
+ b as default
48
46
  };
@@ -21,9 +21,9 @@ export declare const ZvSceneUeShj: import("../../utils/typescript").SFCWithInsta
21
21
  };
22
22
  }, {
23
23
  props: any;
24
- emit: (event: "on-message", ...args: any[]) => void;
24
+ emit: (event: "ue-scene-on-message", ...args: any[]) => void;
25
25
  useShjForUeScene: () => void;
26
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "ue-scene-on-message"[], "ue-scene-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
27
  basicOption: {
28
28
  type: any;
29
29
  required: true;
@@ -45,6 +45,6 @@ export declare const ZvSceneUeShj: import("../../utils/typescript").SFCWithInsta
45
45
  required: true;
46
46
  };
47
47
  }>> & {
48
- "onOn-message"?: (...args: any[]) => any;
48
+ "onUe-scene-on-message"?: (...args: any[]) => any;
49
49
  }, {}, {}>> & Record<string, any>;
50
50
  export default ZvSceneUeShj;
@@ -21,9 +21,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
21
21
  };
22
22
  }, {
23
23
  props: any;
24
- emit: (event: "on-message", ...args: any[]) => void;
24
+ emit: (event: "ue-scene-on-message", ...args: any[]) => void;
25
25
  useShjForUeScene: () => void;
26
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "ue-scene-on-message"[], "ue-scene-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
27
  basicOption: {
28
28
  type: any;
29
29
  required: true;
@@ -45,6 +45,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
45
45
  required: true;
46
46
  };
47
47
  }>> & {
48
- "onOn-message"?: (...args: any[]) => any;
48
+ "onUe-scene-on-message"?: (...args: any[]) => any;
49
49
  }, {}, {}>;
50
50
  export default _sfc_main;
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9f2fe2d2"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-139ba6a4"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -8,11 +8,9 @@ const h = t({ name: "zv-scene-ue-shj" }), m = /* @__PURE__ */ t({
8
8
  uuid: {},
9
9
  isPreview: { type: Boolean }
10
10
  },
11
- emits: [
12
- "on-message"
13
- ],
14
- setup(i, { emit: c }) {
15
- const n = i, a = c;
11
+ emits: ["ue-scene-on-message"],
12
+ setup(c, { emit: i }) {
13
+ const n = c, a = i;
16
14
  return (() => {
17
15
  d(() => {
18
16
  n.useEvents.length > 0 && n.useEvents.forEach((e) => {
@@ -21,7 +19,7 @@ const h = t({ name: "zv-scene-ue-shj" }), m = /* @__PURE__ */ t({
21
19
  if (!JSON.parse(s).data)
22
20
  throw new Error("");
23
21
  const o = n.useEvents.filter((r) => r.receivingMethod === e.receivingMethod && r.eventType === "on-message");
24
- a("on-message", JSON.parse(s).data), window.SHJParseEvent(o, "on-message", JSON.parse(s).data);
22
+ a("ue-scene-on-message", JSON.parse(s).data), window.SHJParseEvent(o, "ue-scene-on-message", JSON.parse(s).data);
25
23
  } catch {
26
24
  }
27
25
  });
@@ -25,12 +25,12 @@ export declare const ZvSceneUnityIframe: import("../../utils/typescript").SFCWit
25
25
  };
26
26
  }, {
27
27
  props: any;
28
- emit: (event: "on-message", ...args: any[]) => void;
28
+ emit: (event: "unity-scene-on-message", ...args: any[]) => void;
29
29
  useUnityScene: () => {
30
30
  unityIframeRef: import("vue").Ref<any>;
31
31
  };
32
32
  unityIframeRef: import("vue").Ref<any>;
33
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unity-scene-on-message"[], "unity-scene-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
34
  basicOption: {
35
35
  type: any;
36
36
  required: true;
@@ -56,6 +56,6 @@ export declare const ZvSceneUnityIframe: import("../../utils/typescript").SFCWit
56
56
  required: true;
57
57
  };
58
58
  }>> & {
59
- "onOn-message"?: (...args: any[]) => any;
59
+ "onUnity-scene-on-message"?: (...args: any[]) => any;
60
60
  }, {}, {}>> & Record<string, any>;
61
61
  export default ZvSceneUnityIframe;
@@ -25,12 +25,12 @@ declare const _sfc_main: import("vue").DefineComponent<{
25
25
  };
26
26
  }, {
27
27
  props: any;
28
- emit: (event: "on-message", ...args: any[]) => void;
28
+ emit: (event: "unity-scene-on-message", ...args: any[]) => void;
29
29
  useUnityScene: () => {
30
30
  unityIframeRef: import("vue").Ref<any>;
31
31
  };
32
32
  unityIframeRef: import("vue").Ref<any>;
33
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unity-scene-on-message"[], "unity-scene-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
34
  basicOption: {
35
35
  type: any;
36
36
  required: true;
@@ -56,6 +56,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
56
56
  required: true;
57
57
  };
58
58
  }>> & {
59
- "onOn-message"?: (...args: any[]) => any;
59
+ "onUnity-scene-on-message"?: (...args: any[]) => any;
60
60
  }, {}, {}>;
61
61
  export default _sfc_main;
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8088ee8f"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f93f10bb"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as t, openBlock as f, createElementBlock as m, ref as u, onMounted as l, onBeforeUnmount as d } from "vue";
2
- const p = ["src"], w = t({ name: "zv-scene-unity-iframe" }), I = /* @__PURE__ */ t({
3
- ...w,
1
+ import { defineComponent as s, openBlock as f, createElementBlock as m, ref as u, onMounted as l, onBeforeUnmount as d } from "vue";
2
+ const w = ["src"], y = s({ name: "zv-scene-unity-iframe" }), I = /* @__PURE__ */ s({
3
+ ...y,
4
4
  props: {
5
5
  basicOption: {},
6
6
  sources: {},
@@ -9,18 +9,16 @@ const p = ["src"], w = t({ name: "zv-scene-unity-iframe" }), I = /* @__PURE__ */
9
9
  isPreview: { type: Boolean },
10
10
  disableDrag: { type: Boolean }
11
11
  },
12
- emits: [
13
- "on-message"
14
- ],
15
- setup(s, { emit: o }) {
16
- const a = s, i = o, r = () => {
12
+ emits: ["unity-scene-on-message"],
13
+ setup(i, { emit: a }) {
14
+ const t = i, o = a, r = () => {
17
15
  const e = u();
18
16
  return l(() => {
19
- window.SHJSceneUnityIframeInstance = e.value;
17
+ window.SHJSceneUnityIframeInstance || (window.SHJSceneUnityIframeInstance = {}), window.SHJSceneUnityIframeInstance.url = t.basicOption.iframeUrl, window.SHJSceneUnityIframeInstance.ref = e.value;
20
18
  }), d(() => {
21
- window.SHJSceneUnityIframeInstance && (window.SHJSceneUnityIframeInstance = null);
19
+ window.SHJSceneUnityIframeInstance = null;
22
20
  }), window.addEventListener("message", (n) => {
23
- i("on-message", n.data), window.SHJParseEvent(a.useEvents, "on-message", n.data);
21
+ o("unity-scene-on-message", n.data), window.SHJParseEvent(t.useEvents, "unity-scene-on-message", n.data);
24
22
  }, !1), { unityIframeRef: e };
25
23
  }, { unityIframeRef: c } = r();
26
24
  return (e, n) => (f(), m("iframe", {
@@ -29,7 +27,7 @@ const p = ["src"], w = t({ name: "zv-scene-unity-iframe" }), I = /* @__PURE__ */
29
27
  src: e.basicOption.iframeUrl,
30
28
  sandbox: "allow-scripts allow-same-origin",
31
29
  style: { width: "100%", height: "100%", border: "0" }
32
- }, null, 8, p));
30
+ }, null, 8, w));
33
31
  }
34
32
  });
35
33
  export {
@@ -25,12 +25,12 @@ export declare const ZvSceneUnityWebgl: import("../../utils/typescript").SFCWith
25
25
  };
26
26
  }, {
27
27
  props: any;
28
- emit: (event: "on-message", ...args: any[]) => void;
28
+ emit: (event: "unity-scene-on-message", ...args: any[]) => void;
29
29
  useUnityScene: () => {
30
30
  unityIframeRef: import("vue").Ref<any>;
31
31
  };
32
32
  unityIframeRef: import("vue").Ref<any>;
33
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unity-scene-on-message"[], "unity-scene-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
34
  basicOption: {
35
35
  type: any;
36
36
  required: true;
@@ -56,6 +56,6 @@ export declare const ZvSceneUnityWebgl: import("../../utils/typescript").SFCWith
56
56
  required: true;
57
57
  };
58
58
  }>> & {
59
- "onOn-message"?: (...args: any[]) => any;
59
+ "onUnity-scene-on-message"?: (...args: any[]) => any;
60
60
  }, {}, {}>> & Record<string, any>;
61
61
  export default ZvSceneUnityWebgl;
@@ -25,12 +25,12 @@ declare const _sfc_main: import("vue").DefineComponent<{
25
25
  };
26
26
  }, {
27
27
  props: any;
28
- emit: (event: "on-message", ...args: any[]) => void;
28
+ emit: (event: "unity-scene-on-message", ...args: any[]) => void;
29
29
  useUnityScene: () => {
30
30
  unityIframeRef: import("vue").Ref<any>;
31
31
  };
32
32
  unityIframeRef: import("vue").Ref<any>;
33
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "on-message"[], "on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unity-scene-on-message"[], "unity-scene-on-message", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
34
  basicOption: {
35
35
  type: any;
36
36
  required: true;
@@ -56,6 +56,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
56
56
  required: true;
57
57
  };
58
58
  }>> & {
59
- "onOn-message"?: (...args: any[]) => any;
59
+ "onUnity-scene-on-message"?: (...args: any[]) => any;
60
60
  }, {}, {}>;
61
61
  export default _sfc_main;
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fa09b254"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-50d20c64"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as t, openBlock as f, createElementBlock as m, ref as u, onMounted as d, onBeforeUnmount as l } from "vue";
2
- const p = ["src"], w = t({ name: "zv-scene-unity-webgl" }), I = /* @__PURE__ */ t({
1
+ import { defineComponent as s, openBlock as u, createElementBlock as f, ref as m, onMounted as d, onBeforeUnmount as l } from "vue";
2
+ const y = ["src"], w = s({ name: "zv-scene-unity-webgl" }), I = /* @__PURE__ */ s({
3
3
  ...w,
4
4
  props: {
5
5
  basicOption: {},
@@ -10,26 +10,26 @@ const p = ["src"], w = t({ name: "zv-scene-unity-webgl" }), I = /* @__PURE__ */
10
10
  disableDrag: { type: Boolean }
11
11
  },
12
12
  emits: [
13
- "on-message"
13
+ "unity-scene-on-message"
14
14
  ],
15
- setup(s, { emit: o }) {
16
- const a = s, r = o, i = () => {
17
- const e = u();
15
+ setup(a, { emit: i }) {
16
+ const t = a, o = i, r = () => {
17
+ const e = m();
18
18
  return d(() => {
19
- window.SHJSceneUnityIframeInstance = e.value;
19
+ window.SHJSceneUnityIframeInstance || (window.SHJSceneUnityIframeInstance = {}), window.SHJSceneUnityIframeInstance.url = t.basicOption.url + "/index.html", window.SHJSceneUnityIframeInstance.ref = e.value;
20
20
  }), l(() => {
21
- window.SHJSceneUnityIframeInstance && (window.SHJSceneUnityIframeInstance = null);
21
+ window.SHJSceneUnityIframeInstance = null;
22
22
  }), window.addEventListener("message", (n) => {
23
- r("on-message", n.data), window.SHJParseEvent(a.useEvents, "on-message", n.data);
23
+ o("unity-scene-on-message", n.data), window.SHJParseEvent(t.useEvents, "unity-scene-on-message", n.data);
24
24
  }, !1), { unityIframeRef: e };
25
- }, { unityIframeRef: c } = i();
26
- return (e, n) => (f(), m("iframe", {
25
+ }, { unityIframeRef: c } = r();
26
+ return (e, n) => (u(), f("iframe", {
27
27
  ref_key: "unityIframeRef",
28
28
  ref: c,
29
29
  class: "unity-wrap",
30
30
  src: `${e.basicOption.url}/index.html`,
31
31
  frameborder: "0"
32
- }, null, 8, p));
32
+ }, null, 8, y));
33
33
  }
34
34
  });
35
35
  export {
package/es/env.d.ts CHANGED
@@ -16,7 +16,10 @@ declare interface Window {
16
16
  // Vr场景
17
17
  SHJSceneVrViewer: any;
18
18
  // Unity场景
19
- SHJSceneUnityIframeInstance: any;
19
+ SHJSceneUnityIframeInstance: {
20
+ url: string
21
+ ref: any
22
+ };
20
23
  // 全局数据源函数
21
24
  SHJDatasourceV2: ({ sources, callback, tId, isStore, noUseMapping, isInterval }: { sources: IDataSource[], callback?: Function, tId: string, isStore?: boolean, noUseMapping?: boolean, isInterval?: boolean }) => void;
22
25
  SHJDatasourceV2Timer: {