@jnrs/lingshu-smart 2.2.28 → 2.2.30

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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as e, b as n, d as o, E as t, a as r, f as i, h as u, i as l, g as m, e as p, l as c, n as h, j as E, t as S, k as T } from "./index-tpebqVjC.js";
1
+ import { c as e, b as n, d as o, E as t, a as r, f as i, h as u, i as l, g as m, e as p, l as c, n as h, j as E, t as T, m as x, k as P } from "./index-xyCXB0RY.js";
2
2
  export {
3
3
  e as EnumComponent,
4
4
  n as EnumModel,
@@ -13,6 +13,7 @@ export {
13
13
  c as linearIncrease,
14
14
  h as numberLoopGenerator,
15
15
  E as transFraction,
16
- S as transPercentAndPixel,
17
- T as transRuntimeToPixel
16
+ T as transPercentAndPixel,
17
+ x as transPercentToPixel,
18
+ P as transRuntimeToPixel
18
19
  };
@@ -19,13 +19,13 @@ export declare class Rgv extends ModelAbs<IRGVConfig> {
19
19
  private moveX;
20
20
  /**
21
21
  * forks 前后移动
22
- * @param percent 移动比例,-1 ~ 1
22
+ * @param percent 移动比例,[-1,1]
23
23
  * @param duration 动画持续时间
24
24
  */
25
25
  private handleForkMove;
26
26
  /**
27
27
  * forks 上下移动
28
- * @param percent 移动比例,-1 ~ 1
28
+ * @param percent 移动比例,[0,1]
29
29
  * @param duration 动画持续时间
30
30
  */
31
31
  private handleForkMoveUpDown;
@@ -34,3 +34,11 @@ export declare const linearIncrease: (x: number | undefined, y: number | undefin
34
34
  export declare function transPercentAndPixel(val?: number, size?: number, precision?: number, getPercent?: boolean): number;
35
35
  export declare function transFraction(val?: number, size?: number): number;
36
36
  export declare function transRuntimeToPixel(val: number, precision?: number, type?: 'width' | 'height'): number;
37
+ /**
38
+ * 百分比转换为像素数值
39
+ * @param {number} percent - 百分比数字(范围 [0,1] )
40
+ * @param {number} [precision=0] - 保留的小数位数,默认为 0
41
+ * @param {string} [type='width'] - 转换类型,'width' 或 'height',默认 'width'
42
+ * @returns {number} 转换后的像素值
43
+ */
44
+ export declare function transPercentToPixel(percent: number, precision?: number, type?: 'width' | 'height'): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jnrs/lingshu-smart",
3
- "version": "2.2.28",
3
+ "version": "2.2.30",
4
4
  "description": "LingShu Smart 2D Digital Twin System.",
5
5
  "keywords": [
6
6
  "jnrs",
@@ -46,7 +46,7 @@
46
46
  "pinia-plugin-persistedstate": "^4.7.1",
47
47
  "vue": "^3.5.22",
48
48
  "vue-i18n": "^9.14.5",
49
- "@jnrs/shared": "1.1.26"
49
+ "@jnrs/shared": "1.1.31"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/lodash-es": "^4.17.12",