@vsleem-realsee-viewer/projection-plugin 2.0.26 → 2.0.27

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.
@@ -1,4 +1,4 @@
1
- import { _ as l } from "./index-CGohpb9V.mjs";
1
+ import { _ as l } from "./index-rvgozCFN.mjs";
2
2
  const r = {
3
3
  // Options.jsx
4
4
  items_per_page: "件 / ページ",
@@ -1,11 +1 @@
1
- import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
2
1
  export type { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
3
- /**
4
- * 组件配置参数
5
- */
6
- export type ConfigProviderProps = {
7
- /** 主题配置 */
8
- theme?: ThemeConfig;
9
- /** 当前语音 */
10
- locale?: string;
11
- };
@@ -1,8 +1,10 @@
1
- import { AppSetting as AppConfig, Coordinate, Point, Vector3 } from '@vsleem-realsee-viewer/shared';
2
- import { ConfigProviderProps } from './antd';
1
+ import { AppSetting as AppConfig, Coordinate, Point, ProjectModel, Vector3 } from '@vsleem-realsee-viewer/shared';
2
+ import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
3
3
  import { MapSetting } from './map';
4
4
  /**应用设置 */
5
- export type AppSetting = AppConfig & ConfigProviderProps & {
5
+ export type AppSetting = AppConfig & {
6
+ /** 主题配置 */
7
+ theme?: ThemeConfig;
6
8
  /**选项扁平化 */
7
9
  flattenPicker?: boolean;
8
10
  /**是否显示标题头 */
@@ -31,6 +33,14 @@ export type ProjectionProps = {
31
33
  /**映射指定目标坐标系的模型类型*/
32
34
  dstModelType?: number[];
33
35
  };
36
+ /**控制组件传参 */
37
+ export type ControlProps = {
38
+ mapSetting?: MapSetting;
39
+ currentProject?: ProjectModel;
40
+ currentModel?: Coordinate;
41
+ points?: Point[];
42
+ connected?: boolean;
43
+ };
34
44
  /**
35
45
  * 插槽状态
36
46
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vsleem-realsee-viewer/projection-plugin",
3
- "version": "2.0.26",
3
+ "version": "2.0.27",
4
4
  "description": "Projection plugin for VSLeem RealSee Viewer",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.mjs",
@@ -13,11 +13,11 @@
13
13
  "dist"
14
14
  ],
15
15
  "dependencies": {
16
- "@vsleem-realsee-viewer/shared": "2.0.26"
16
+ "@vsleem-realsee-viewer/shared": "2.0.27"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "vue": "^3.0.0",
20
- "@vsleem-realsee-viewer/shared": "2.0.26"
20
+ "@vsleem-realsee-viewer/shared": "2.0.27"
21
21
  },
22
22
  "peerDependenciesMeta": {
23
23
  "vue": {
@@ -1,72 +0,0 @@
1
- import { defineComponent as g, ref as v, computed as m, watch as w, onMounted as y, createElementBlock as C, openBlock as N, createElementVNode as a, createVNode as f, createTextVNode as c, toDisplayString as s, unref as l, withCtx as S } from "vue";
2
- import { Point as A } from "@vsleem-realsee-viewer/shared";
3
- import { x as E, A as V, V as z, W as L, D as $ } from "./index-CGohpb9V.mjs";
4
- const k = { class: "vsleem-scale-control" }, B = { class: "scale-wrapper" }, D = { class: "title-wrapper" }, P = { style: { color: "#5bb36f" } }, U = { style: { color: "#5bb36f" } }, I = /* @__PURE__ */ g({
5
- name: "ScaleControl",
6
- __name: "ScaleControl",
7
- props: {
8
- currentModel: {},
9
- points: {}
10
- },
11
- emits: ["change"],
12
- setup(_, { expose: x, emit: M }) {
13
- const r = _, [t] = E("ScaleControl"), n = v(""), i = v(1), p = m(() => [
14
- { label: `${t.value?.millimeter}(mm)`, value: 1 },
15
- { label: `${t.value?.meter}(m)`, value: 1e3 }
16
- ]), b = m(() => p.value.find((o) => o.value === i.value));
17
- w([() => r.points], d), y(() => {
18
- d();
19
- });
20
- function d() {
21
- if (r.points?.length === 2) {
22
- const [o, e] = r.points || [];
23
- n.value = A.distXY(o, e)?.toFixed(2);
24
- }
25
- }
26
- function h() {
27
- if (Number(n.value) > 0) {
28
- const o = b.value?.value || 1;
29
- return { points: [
30
- { x: 0, y: 0, z: 0 },
31
- { x: Number(n.value) * o, y: 0, z: 0 }
32
- ] };
33
- } else
34
- throw L.error(`${t.value?.pleaseEnter}${t.value?.actualLength}`), new Error("Actual length is a required field");
35
- }
36
- return x({
37
- getData: h
38
- }), (o, e) => (N(), C("div", k, [
39
- a("div", B, [
40
- a("div", D, [
41
- a("div", null, [
42
- c(s(l(t)?.pleaseEnter) + " ", 1),
43
- a("span", P, s(l(t)?.locationPoint1), 1),
44
- e[2] || (e[2] = c(" → ", -1)),
45
- a("span", U, s(l(t)?.locationPoint2), 1),
46
- c(" " + s(l(t)?.actualLength), 1)
47
- ])
48
- ]),
49
- f(l(V), {
50
- value: n.value,
51
- "onUpdate:value": e[1] || (e[1] = (u) => n.value = u),
52
- size: "large",
53
- style: { width: "350px", "border-radius": "8px", overflow: "hidden" }
54
- }, {
55
- addonAfter: S(() => [
56
- f(l(z), {
57
- value: i.value,
58
- "onUpdate:value": e[0] || (e[0] = (u) => i.value = u),
59
- size: "large",
60
- style: { width: "150px", "background-color": "#fff" },
61
- options: p.value
62
- }, null, 8, ["value", "options"])
63
- ]),
64
- _: 1
65
- }, 8, ["value"])
66
- ])
67
- ]));
68
- }
69
- }), T = /* @__PURE__ */ $(I, [["__scopeId", "data-v-983dd042"]]);
70
- export {
71
- T as default
72
- };