@whitesev/pops 4.0.1 → 4.0.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.
@@ -235,6 +235,24 @@ declare class Pops {
235
235
  sub(number1: number, number2: number): string;
236
236
  division(number1: number, number2: number): number;
237
237
  };
238
+ /** 实例处理函数 */
239
+ PopsInstHandler: {
240
+ removeInstance(totalInstConfigList: import("./types/inst").PopsInstGeneralConfig[][], guid?: string, isAll?: boolean): Promise<import("./types/inst").PopsInstGeneralConfig[][]>;
241
+ hide(config: PopsAlertConfig | PopsDrawerConfig | PopsPromptConfig | PopsConfirmConfig | PopsIframeConfig | PopsLoadingConfig | PopsPanelConfig | PopsFolderConfig, popsType: import("./types/main").PopsInstStoreType, instConfigList: import("./types/inst").PopsInstGeneralConfig[], guid: string, $anim: HTMLElement, $mask?: HTMLElement): Promise<void>;
242
+ show(config: PopsAlertConfig | PopsDrawerConfig | PopsPromptConfig | PopsConfirmConfig | PopsIframeConfig | PopsLoadingConfig | PopsPanelConfig | PopsFolderConfig, popsType: import("./types/main").PopsInstStoreType, instConfigList: import("./types/inst").PopsInstGeneralConfig[], guid: string, $anim: HTMLElement, $mask?: HTMLElement): Promise<void>;
243
+ close(config: PopsAlertConfig | PopsDrawerConfig | PopsPromptConfig | PopsConfirmConfig | PopsIframeConfig | PopsLoadingConfig | PopsPanelConfig | PopsFolderConfig, popsType: string, instConfigList: import("./types/inst").PopsInstGeneralConfig[], guid: string, $anim: HTMLElement): Promise<void>;
244
+ drag($move: HTMLElement, options: {
245
+ dragElement: HTMLElement;
246
+ limit: boolean;
247
+ emitClick?: boolean;
248
+ extraDistance: number;
249
+ container?: Window | typeof globalThis | HTMLElement;
250
+ startCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
251
+ moveCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
252
+ endCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
253
+ preventEvent?: (event: TouchEvent | PointerEvent) => boolean;
254
+ }): void;
255
+ };
238
256
  /** pops.panel中用于处理各个类型的工具 */
239
257
  PanelHandlerComponents: () => {
240
258
  asideULElement: HTMLUListElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "弹窗库,包含了alert、confirm、prompt、drawer、folder、loading、iframe、panel、tooltip、searchSuggestion、rightClickMenu组件",
5
5
  "keywords": [
6
6
  "ScriptCat",
package/src/Pops.ts CHANGED
@@ -24,6 +24,7 @@ import { PopsTooltip } from "./components/tooltip";
24
24
  import type { PopsToolTipConfig } from "./components/tooltip/types/index";
25
25
  import { GlobalConfig } from "./config/GlobalConfig";
26
26
  import { EventEmiter } from "./event/EventEmiter";
27
+ import { PopsInstHandler } from "./handler/PopsInstHandler";
27
28
  import { PopsAnimation } from "./PopsAnimation";
28
29
  import { PopsCore } from "./PopsCore";
29
30
  import { PopsCSS } from "./PopsCSS";
@@ -60,6 +61,8 @@ class Pops {
60
61
  InstanceUtils: PopsInstanceUtils,
61
62
  /** pops处理float类型使用的工具类 */
62
63
  MathFloatUtils: PopsMathFloatUtils,
64
+ /** 实例处理函数 */
65
+ PopsInstHandler,
63
66
  /** pops.panel中用于处理各个类型的工具 */
64
67
  PanelHandlerComponents,
65
68
  /** pops.panel中的动画 */