@whitesev/pops 2.5.1 → 2.5.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.
@@ -34,16 +34,16 @@ declare class Pops {
34
34
  };
35
35
  /** icon图标的svg代码 */
36
36
  iconSVG: {
37
+ loading: string;
37
38
  min: string;
38
- mise: string;
39
39
  max: string;
40
+ mise: string;
40
41
  close: string;
41
42
  edit: string;
42
43
  share: string;
43
44
  delete: string;
44
45
  search: string;
45
46
  upload: string;
46
- loading: string;
47
47
  next: string;
48
48
  prev: string;
49
49
  eleme: string;
@@ -69,14 +69,14 @@ declare class Pops {
69
69
  };
70
70
  /** 存储已创建的元素 */
71
71
  instData: {
72
+ iframe: import("./types/inst").PopsInstCommonConfig[];
72
73
  loading: import("./types/inst").PopsInstCommonConfig[];
74
+ folder: import("./types/inst").PopsInstCommonConfig[];
73
75
  alert: import("./types/inst").PopsInstCommonConfig[];
74
76
  confirm: import("./types/inst").PopsInstCommonConfig[];
75
77
  prompt: import("./types/inst").PopsInstCommonConfig[];
76
- iframe: import("./types/inst").PopsInstCommonConfig[];
77
78
  tooltip: import("./types/inst").PopsInstCommonConfig[];
78
79
  drawer: import("./types/inst").PopsInstCommonConfig[];
79
- folder: import("./types/inst").PopsInstCommonConfig[];
80
80
  panel: import("./types/inst").PopsInstCommonConfig[];
81
81
  rightClickMenu: import("./types/inst").PopsInstCommonConfig[];
82
82
  };
@@ -393,14 +393,14 @@ declare class Pops {
393
393
  showArrow: boolean;
394
394
  arrowDistance: number;
395
395
  otherDistance: number;
396
- zIndex: number | (() => number);
397
- style: string | null;
398
396
  useShadowRoot: boolean;
399
397
  only: boolean;
398
+ zIndex: number | (() => number);
399
+ style: string | null;
400
400
  beforeAppendToPageCallBack: ($shadowRoot: ShadowRoot | HTMLElement, $shadowContainer: HTMLDivElement) => void;
401
401
  };
402
402
  $shadowContainer: HTMLDivElement;
403
- $shadowRoot: ShadowRoot | HTMLDivElement;
403
+ $shadowRoot: HTMLDivElement | ShadowRoot;
404
404
  toolTip: import("./components/tooltip").ToolTip;
405
405
  };
406
406
  /**
@@ -423,6 +423,7 @@ declare class Pops {
423
423
  close: () => Promise<void>;
424
424
  hide: () => Promise<void>;
425
425
  show: () => Promise<void>;
426
+ guid: string;
426
427
  $shadowContainer: HTMLDivElement;
427
428
  $shadowRoot: ShadowRoot | HTMLElement;
428
429
  element: HTMLDivElement;
@@ -430,7 +431,6 @@ declare class Pops {
430
431
  popsElement: HTMLDivElement;
431
432
  maskElement?: HTMLDivElement | undefined;
432
433
  mode: import("./types/main").PopsType;
433
- guid: string;
434
434
  };
435
435
  /**
436
436
  * 右键菜单
@@ -439,7 +439,7 @@ declare class Pops {
439
439
  rightClickMenu: (details: PopsRightClickMenuDetails) => {
440
440
  guid: string;
441
441
  config: {
442
- target: Node | HTMLElement | {
442
+ target: HTMLElement | Node | {
443
443
  addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void;
444
444
  dispatchEvent: (event: Event) => boolean;
445
445
  removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void;
@@ -21384,10 +21384,10 @@ declare class Pops {
21384
21384
  isAnimation: boolean;
21385
21385
  useScaleAnimation: boolean;
21386
21386
  preventDefault: boolean;
21387
- zIndex: number | (() => number);
21388
- style: string | null;
21389
21387
  useShadowRoot: boolean;
21390
21388
  only: boolean;
21389
+ zIndex: number | (() => number);
21390
+ style: string | null;
21391
21391
  beforeAppendToPageCallBack: ($shadowRoot: ShadowRoot | HTMLElement, $shadowContainer: HTMLDivElement) => void;
21392
21392
  };
21393
21393
  removeWindowCheckClickListener: () => void;
@@ -21413,7 +21413,7 @@ declare class Pops {
21413
21413
  * searchSuggestion.setAllEvent();
21414
21414
  */
21415
21415
  searchSuggestion: <T = any>(details: PopsSearchSuggestionDetails<T>) => {
21416
- selfDocument: ShadowRoot | Document | (ShadowRoot | Document)[];
21416
+ selfDocument: Document | ShadowRoot | (Document | ShadowRoot)[];
21417
21417
  $el: {
21418
21418
  root: HTMLElement;
21419
21419
  $hintULContainer: HTMLUListElement;
@@ -7,6 +7,7 @@ export declare const PopsPanel: {
7
7
  close: () => Promise<void>;
8
8
  hide: () => Promise<void>;
9
9
  show: () => Promise<void>;
10
+ guid: string;
10
11
  $shadowContainer: HTMLDivElement;
11
12
  $shadowRoot: ShadowRoot | HTMLElement;
12
13
  element: HTMLDivElement;
@@ -14,6 +15,5 @@ export declare const PopsPanel: {
14
15
  popsElement: HTMLDivElement;
15
16
  maskElement?: HTMLDivElement | undefined;
16
17
  mode: PopsType;
17
- guid: string;
18
18
  };
19
19
  };
@@ -138,9 +138,7 @@ export interface PopsPanelBottomContentConfig {
138
138
  */
139
139
  attributes?: {
140
140
  [key: string]: any;
141
- } | {
142
- [key: string]: any;
143
- }[];
141
+ };
144
142
  /**
145
143
  * (可选)自定义元素内部的属性值
146
144
  * @default {}
@@ -3,7 +3,7 @@ export declare const PopsRightClickMenu: {
3
3
  init(details: PopsRightClickMenuDetails): {
4
4
  guid: string;
5
5
  config: {
6
- target: Node | HTMLElement | {
6
+ target: HTMLElement | Node | {
7
7
  addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void;
8
8
  dispatchEvent: (event: Event) => boolean;
9
9
  removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void;
@@ -20948,10 +20948,10 @@ export declare const PopsRightClickMenu: {
20948
20948
  isAnimation: boolean;
20949
20949
  useScaleAnimation: boolean;
20950
20950
  preventDefault: boolean;
20951
- zIndex: number | (() => number);
20952
- style: string | null;
20953
20951
  useShadowRoot: boolean;
20954
20952
  only: boolean;
20953
+ zIndex: number | (() => number);
20954
+ style: string | null;
20955
20955
  beforeAppendToPageCallBack: ($shadowRoot: ShadowRoot | HTMLElement, $shadowContainer: HTMLDivElement) => void;
20956
20956
  };
20957
20957
  removeWindowCheckClickListener: () => void;
@@ -4,7 +4,7 @@ export declare const PopsSearchSuggestion: {
4
4
  /**
5
5
  * 当前的环境,可以是document,可以是shadowroot,默认是document
6
6
  */
7
- selfDocument: ShadowRoot | Document | (ShadowRoot | Document)[];
7
+ selfDocument: Document | ShadowRoot | (Document | ShadowRoot)[];
8
8
  $el: {
9
9
  /** 根元素 */
10
10
  root: HTMLElement;
@@ -219,14 +219,14 @@ export declare const PopsTooltip: {
219
219
  showArrow: boolean;
220
220
  arrowDistance: number;
221
221
  otherDistance: number;
222
- zIndex: number | (() => number);
223
- style: string | null;
224
222
  useShadowRoot: boolean;
225
223
  only: boolean;
224
+ zIndex: number | (() => number);
225
+ style: string | null;
226
226
  beforeAppendToPageCallBack: ($shadowRoot: ShadowRoot | HTMLElement, $shadowContainer: HTMLDivElement) => void;
227
227
  };
228
228
  $shadowContainer: HTMLDivElement;
229
- $shadowRoot: ShadowRoot | HTMLDivElement;
229
+ $shadowRoot: HTMLDivElement | ShadowRoot;
230
230
  toolTip: ToolTip;
231
231
  };
232
232
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "弹窗库",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/WhiteSevs/TamperMonkeyScript/tree/master/lib/pops#readme",
@@ -158,13 +158,9 @@ export interface PopsPanelBottomContentConfig {
158
158
  * (可选)自定义元素属性.setAttribute、.getAttribute
159
159
  * @default {}
160
160
  */
161
- attributes?:
162
- | {
163
- [key: string]: any;
164
- }
165
- | {
166
- [key: string]: any;
167
- }[];
161
+ attributes?: {
162
+ [key: string]: any;
163
+ };
168
164
  /**
169
165
  * (可选)自定义元素内部的属性值
170
166
  * @default {}