@toolmain/components 1.2.4 → 1.2.5

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.d.ts CHANGED
@@ -14,6 +14,7 @@ import { OrbitControls } from 'three/addons';
14
14
  import { PointerLockControls } from 'three/addons';
15
15
  import { PublicProps } from 'vue';
16
16
  import { Reactive } from 'vue';
17
+ import { Ref } from 'vue';
17
18
  import { RoundedBoxGeometry } from 'three/addons';
18
19
  import { ShallowRef } from 'vue';
19
20
  import { default as Stats_2 } from 'three/addons/libs/stats.module.js';
@@ -253,6 +254,11 @@ export declare interface BotOptions {
253
254
  actionMap?: BotActionMap;
254
255
  }
255
256
 
257
+ /**
258
+ * 回调函数类型
259
+ */
260
+ declare type CallBackFn = (...arg: any[]) => void;
261
+
256
262
  export declare type CameraConf = {
257
263
  position: {
258
264
  x: number;
@@ -461,6 +467,12 @@ export declare function getModel(url: string, onProgress?: (progress: LoadProgre
461
467
 
462
468
  export declare function gradientColor(startColorHex: string, endColorHex: string, step: number): Array<string>;
463
469
 
470
+ export declare enum HandleEv {
471
+ AFTER_SHOW = "after_show",
472
+ AFTER_HIDE = "after_hide",
473
+ AFTER_STICK = "after_stick"
474
+ }
475
+
464
476
  /**
465
477
  * translate hex color to rgb color array
466
478
  */
@@ -728,6 +740,11 @@ export declare interface ScaleConfig {
728
740
  maskStyle?: CSSProperties;
729
741
  }
730
742
 
743
+ export declare enum ScaleEv {
744
+ SCALING = "scaling",
745
+ AFTER_SCALE = "after_scale"
746
+ }
747
+
731
748
  export declare interface ScaleExtraConfNode {
732
749
  label: string;
733
750
  node: VNode | Component | string;
@@ -820,7 +837,7 @@ export declare const Spinner: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, Com
820
837
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
821
838
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
822
839
 
823
- declare enum Status {
840
+ export declare enum Status {
824
841
  NORMAL = "NORMAL",
825
842
  HIDDEN = "HIDDEN"
826
843
  }
@@ -990,6 +1007,17 @@ export declare function useKeyboard(): {
990
1007
  dispose: () => void;
991
1008
  };
992
1009
 
1010
+ export declare const useScale: (data: {
1011
+ config: Ref<ScaleConfig>;
1012
+ targetEle: Readonly<Ref<HTMLElement | null | undefined>>;
1013
+ }) => {
1014
+ pointer: string[];
1015
+ getTarget: () => HTMLElement | null | undefined;
1016
+ onMouseDown: (e: MouseEvent, direction: string) => void;
1017
+ on: (e: ScaleEv, cb: CallBackFn) => void;
1018
+ dispose: () => void;
1019
+ };
1020
+
993
1021
  export declare interface World {
994
1022
  core: Core;
995
1023
  bot: Bot | null;
package/dist/index.js CHANGED
@@ -12705,15 +12705,18 @@ export {
12705
12705
  Fd as Core,
12706
12706
  Of as DialogPanel,
12707
12707
  Vd as El,
12708
+ So as HandleEv,
12708
12709
  ht as KeyCode,
12709
12710
  Vt as LightType,
12710
12711
  Hd as Lights,
12711
12712
  Po as LightsEvent,
12712
12713
  Wi as Loader,
12713
12714
  pf as ParentView,
12715
+ Ui as ScaleEv,
12714
12716
  ff as ScalePanel,
12715
12717
  Xd as Scene,
12716
12718
  Ff as Spinner,
12719
+ Da as Status,
12717
12720
  Df as ThreePanel,
12718
12721
  If as a2r,
12719
12722
  jr as db,
@@ -12728,5 +12731,6 @@ export {
12728
12731
  Oa as useDebugger,
12729
12732
  kc as useDialog,
12730
12733
  Rf as useElement,
12731
- Mc as useKeyboard
12734
+ Mc as useKeyboard,
12735
+ Ac as useScale
12732
12736
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolmain/components",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Convient components base on vue3",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "dexie": "^4.2.0",
39
39
  "three-mesh-bvh": "^0.9.1",
40
- "@toolmain/shared": "^1.2.3",
40
+ "@toolmain/shared": "^1.2.4",
41
41
  "@toolmain/libs": "^1.1.3"
42
42
  },
43
43
  "devDependencies": {