@whitesev/pops 2.2.8 → 2.3.0

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.
Files changed (146) hide show
  1. package/dist/index.amd.js +2817 -3012
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +2817 -3012
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +2817 -3012
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +2817 -3012
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +2817 -3012
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +2817 -3012
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +497 -192
  14. package/dist/types/src/PopsIcon.d.ts +2 -2
  15. package/dist/types/src/components/panel/index.d.ts +1 -1
  16. package/dist/types/src/components/rightClickMenu/index.d.ts +487 -182
  17. package/dist/types/src/components/tooltip/index.d.ts +2 -2
  18. package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +256 -259
  19. package/dist/types/src/types/animation.d.ts +19 -19
  20. package/dist/types/src/types/button.d.ts +187 -196
  21. package/dist/types/src/types/components.d.ts +213 -229
  22. package/dist/types/src/types/event.d.ts +63 -63
  23. package/dist/types/src/types/global.d.ts +20 -20
  24. package/dist/types/src/types/icon.d.ts +32 -32
  25. package/dist/types/src/types/inst.d.ts +24 -24
  26. package/dist/types/src/types/main.d.ts +114 -122
  27. package/dist/types/src/types/mask.d.ts +49 -49
  28. package/dist/types/src/types/position.d.ts +60 -60
  29. package/package.json +13 -8
  30. package/src/Pops.ts +0 -209
  31. package/src/PopsAnimation.ts +0 -32
  32. package/src/PopsCSS.ts +0 -51
  33. package/src/PopsCore.ts +0 -44
  34. package/src/PopsIcon.ts +0 -95
  35. package/src/PopsInst.ts +0 -21
  36. package/src/components/alert/config.ts +0 -62
  37. package/src/components/alert/index.css +0 -0
  38. package/src/components/alert/index.ts +0 -181
  39. package/src/components/alert/types/index.ts +0 -30
  40. package/src/components/confirm/config.ts +0 -90
  41. package/src/components/confirm/index.css +0 -0
  42. package/src/components/confirm/index.ts +0 -192
  43. package/src/components/confirm/types/index.ts +0 -17
  44. package/src/components/drawer/config.ts +0 -89
  45. package/src/components/drawer/index.css +0 -35
  46. package/src/components/drawer/index.ts +0 -260
  47. package/src/components/drawer/types/index.ts +0 -61
  48. package/src/components/folder/config.ts +0 -147
  49. package/src/components/folder/folderIcon.ts +0 -28
  50. package/src/components/folder/index.css +0 -314
  51. package/src/components/folder/index.ts +0 -1050
  52. package/src/components/folder/types/index.ts +0 -101
  53. package/src/components/iframe/config.ts +0 -60
  54. package/src/components/iframe/index.css +0 -75
  55. package/src/components/iframe/index.ts +0 -351
  56. package/src/components/iframe/types/index.ts +0 -146
  57. package/src/components/loading/config.ts +0 -29
  58. package/src/components/loading/index.css +0 -66
  59. package/src/components/loading/index.ts +0 -114
  60. package/src/components/loading/types/index.ts +0 -40
  61. package/src/components/panel/config.ts +0 -550
  62. package/src/components/panel/handlerComponents.ts +0 -3277
  63. package/src/components/panel/index.css +0 -1292
  64. package/src/components/panel/index.ts +0 -213
  65. package/src/components/panel/types/components-button.ts +0 -69
  66. package/src/components/panel/types/components-common.ts +0 -55
  67. package/src/components/panel/types/components-deepMenu.ts +0 -85
  68. package/src/components/panel/types/components-forms.ts +0 -45
  69. package/src/components/panel/types/components-input.ts +0 -82
  70. package/src/components/panel/types/components-own.ts +0 -31
  71. package/src/components/panel/types/components-select.ts +0 -101
  72. package/src/components/panel/types/components-selectMultiple.ts +0 -133
  73. package/src/components/panel/types/components-slider.ts +0 -78
  74. package/src/components/panel/types/components-switch.ts +0 -57
  75. package/src/components/panel/types/components-textarea.ts +0 -69
  76. package/src/components/panel/types/index.ts +0 -177
  77. package/src/components/prompt/config.ts +0 -94
  78. package/src/components/prompt/index.css +0 -34
  79. package/src/components/prompt/index.ts +0 -222
  80. package/src/components/prompt/types/index.ts +0 -55
  81. package/src/components/rightClickMenu/config.ts +0 -130
  82. package/src/components/rightClickMenu/index.css +0 -88
  83. package/src/components/rightClickMenu/index.ts +0 -689
  84. package/src/components/rightClickMenu/types/index.ts +0 -91
  85. package/src/components/searchSuggestion/config.ts +0 -59
  86. package/src/components/searchSuggestion/index.ts +0 -708
  87. package/src/components/searchSuggestion/types/index.ts +0 -147
  88. package/src/components/tooltip/config.ts +0 -34
  89. package/src/components/tooltip/index.css +0 -196
  90. package/src/components/tooltip/index.ts +0 -655
  91. package/src/components/tooltip/types/index.ts +0 -125
  92. package/src/config/CommonCSSClassName.ts +0 -17
  93. package/src/config/GlobalConfig.ts +0 -80
  94. package/src/css/animation.css +0 -2245
  95. package/src/css/button.css +0 -542
  96. package/src/css/common.css +0 -52
  97. package/src/css/index.css +0 -254
  98. package/src/css/ninePalaceGridPosition.css +0 -50
  99. package/src/css/scrollbar.css +0 -22
  100. package/src/handler/PopsElementHandler.ts +0 -325
  101. package/src/handler/PopsHandler.ts +0 -719
  102. package/src/svg/arrowLeft.svg +0 -4
  103. package/src/svg/arrowRight.svg +0 -4
  104. package/src/svg/chromeFilled.svg +0 -14
  105. package/src/svg/circleClose.svg +0 -8
  106. package/src/svg/close.svg +0 -5
  107. package/src/svg/cpu.svg +0 -8
  108. package/src/svg/delete.svg +0 -5
  109. package/src/svg/documentCopy.svg +0 -5
  110. package/src/svg/edit.svg +0 -8
  111. package/src/svg/eleme.svg +0 -5
  112. package/src/svg/elemePlus.svg +0 -5
  113. package/src/svg/headset.svg +0 -5
  114. package/src/svg/hide.svg +0 -8
  115. package/src/svg/keyboard.svg +0 -8
  116. package/src/svg/loading.svg +0 -5
  117. package/src/svg/max.svg +0 -5
  118. package/src/svg/min.svg +0 -5
  119. package/src/svg/mise.svg +0 -5
  120. package/src/svg/monitor.svg +0 -5
  121. package/src/svg/next.svg +0 -5
  122. package/src/svg/picture.svg +0 -8
  123. package/src/svg/prev.svg +0 -5
  124. package/src/svg/search.svg +0 -5
  125. package/src/svg/share.svg +0 -5
  126. package/src/svg/upload.svg +0 -5
  127. package/src/svg/videoPause.svg +0 -5
  128. package/src/svg/videoPlay.svg +0 -5
  129. package/src/svg/view.svg +0 -5
  130. package/src/types/PopsDOMUtilsEventType.d.ts +0 -259
  131. package/src/types/animation.d.ts +0 -19
  132. package/src/types/button.d.ts +0 -196
  133. package/src/types/components.d.ts +0 -229
  134. package/src/types/event.d.ts +0 -63
  135. package/src/types/global.d.ts +0 -20
  136. package/src/types/icon.d.ts +0 -32
  137. package/src/types/inst.d.ts +0 -24
  138. package/src/types/main.d.ts +0 -122
  139. package/src/types/mask.d.ts +0 -49
  140. package/src/types/position.d.ts +0 -60
  141. package/src/utils/PopsDOMUtils.ts +0 -2649
  142. package/src/utils/PopsDOMUtilsEventsConfig.ts +0 -6
  143. package/src/utils/PopsInstanceUtils.ts +0 -801
  144. package/src/utils/PopsMathUtils.ts +0 -77
  145. package/src/utils/PopsSafeUtils.ts +0 -24
  146. package/src/utils/PopsUtils.ts +0 -430
@@ -1,24 +1,24 @@
1
- /**
2
- * config实例配置
3
- */
4
- export interface PopsInstConfig {
5
- /** 固定id */
6
- guid: string;
7
- /** 动画元素 */
8
- animElement: HTMLDivElement;
9
- /** 主元素 */
10
- popsElement: HTMLDivElement;
11
- /** 遮罩层元素 */
12
- maskElement?: HTMLDivElement;
13
- }
14
- /**
15
- * config实例通用配置
16
- */
17
- export interface PopsInstCommonConfig extends PopsInstConfig {
18
- /** shadow容器 */
19
- $shadowContainer: HTMLDivElement;
20
- /** shadow容器的shandowRoot */
21
- $shadowRoot: ShadowRoot | HTMLElement;
22
- /** 移除实例前的回调函数 */
23
- beforeRemoveCallBack?: (instCommonConfig: PopsInstCommonConfig) => void;
24
- }
1
+ /**
2
+ * config实例配置
3
+ */
4
+ export interface PopsInstConfig {
5
+ /** 固定id */
6
+ guid: string;
7
+ /** 动画元素 */
8
+ animElement: HTMLDivElement;
9
+ /** 主元素 */
10
+ popsElement: HTMLDivElement;
11
+ /** 遮罩层元素 */
12
+ maskElement?: HTMLDivElement;
13
+ }
14
+ /**
15
+ * config实例通用配置
16
+ */
17
+ export interface PopsInstCommonConfig extends PopsInstConfig {
18
+ /** shadow容器 */
19
+ $shadowContainer: HTMLDivElement;
20
+ /** shadow容器的shandowRoot */
21
+ $shadowRoot: ShadowRoot | HTMLElement;
22
+ /** 移除实例前的回调函数 */
23
+ beforeRemoveCallBack?: (instCommonConfig: PopsInstCommonConfig) => void;
24
+ }
@@ -1,122 +1,114 @@
1
- import type { PopsAlertDetails } from "../components/alert/types";
2
- import type { PopsConfirmDetails } from "../components/confirm/types";
3
- import type { PopsDrawerDetails } from "../components/drawer/types";
4
- import type { PopsFolderDetails } from "../components/folder/types";
5
- import type { PopsIframeDetails } from "../components/iframe/types";
6
- import type { PopsLoadingDetails } from "../components/loading/types";
7
- import type { PopsPanelButtonDetails } from "../components/panel/types/components-button";
8
- import type { PopsPanelDeepMenuDetails } from "../components/panel/types/components-deepMenu";
9
- import type { PopsPanelDetails } from "../components/panel/types";
10
- import type { PopsPanelInputDetails } from "../components/panel/types/components-input";
11
- import type { PopsPanelOwnDetails } from "../components/panel/types/components-own";
12
- import type { PopsPanelSelectDetails } from "../components/panel/types/components-select";
13
- import type { PopsPanelSliderDetails } from "../components/panel/types/components-slider";
14
- import type { PopsPanelSwitchDetails } from "../components/panel/types/components-switch";
15
- import type { PopsPanelTextAreaDetails } from "../components/panel/types/components-textarea";
16
- import type { PopsPromptDetails } from "../components/prompt/types/index";
17
- import { PopsRightClickMenuDetails } from "../components/rightClickMenu/types";
18
- import { PopsToolTipDetails } from "../components/tooltip/types/index";
19
- import type { PopsSearchSuggestionDetails } from "../components/searchSuggestion/types";
20
-
21
- export interface PopsUtilsOwnObject<V extends any> {
22
- [key: string]: V | PopsUtilsOwnObject<V>;
23
- }
24
-
25
- /** pops所有的类型配置 11个*/
26
- export interface PopsDetails {
27
- alert: PopsAlertDetails;
28
- confirm: PopsConfirmDetails;
29
- prompt: PopsPromptDetails;
30
- loading: PopsLoadingDetails;
31
- iframe: PopsIframeDetails;
32
- tooltip: PopsToolTipDetails;
33
- drawer: PopsDrawerDetails;
34
- folder: PopsFolderDetails;
35
- panel: PopsPanelDetails;
36
- rightClickMenu: PopsRightClickMenuDetails;
37
- searchSuggestion: PopsSearchSuggestionDetails;
38
- }
39
-
40
- /** pops的类型 */
41
- export type PopsType = keyof PopsDetails;
42
-
43
- /** pops中支持only的配置 */
44
- export type PopsSupportOnlyDetails = Omit<PopsDetails, "searchSuggestion">;
45
-
46
- /** 存储实例的类型 */
47
- export type PopsInstStoreType = keyof Omit<PopsDetails, "searchSuggestion">;
48
-
49
- /** pops弹窗支持动画元素的配置 8个 */
50
- export type PopsSupportAnimDetails = Omit<
51
- PopsDetails,
52
- "tooltip" | "rightClickMenu" | "searchSuggestion"
53
- >;
54
-
55
- /** pops弹窗支持动画元素的类型 */
56
- export type PopsSupportAnimDetailsType = keyof PopsSupportAnimDetails;
57
-
58
- /** pops弹窗支持标题栏的配置 */
59
- export type PopsSupportHeaderTitleDetails = Pick<
60
- PopsDetails,
61
- "alert" | "confirm" | "prompt" | "iframe" | "drawer" | "folder" | "panel"
62
- >;
63
-
64
- /** pops弹窗支持标题栏的类型 */
65
- export type PopsSupportHeaderTitleDetailsType =
66
- keyof PopsSupportHeaderTitleDetails;
67
-
68
- /** pops支持底部按钮的配置 */
69
- export type PopsSupportBottomBtnDetails = Pick<
70
- PopsDetails,
71
- "alert" | "confirm" | "prompt" | "drawer"
72
- >;
73
-
74
- /** pops支持底部按钮的类型 */
75
- export type PopsSupportBottomBtnDetailsType =
76
- keyof PopsSupportHeaderTitleDetails;
77
-
78
- /** pops支持中间内容的配置 */
79
- export type PopsSupportContentDetails = Pick<
80
- PopsDetails,
81
- "alert" | "confirm" | "prompt" | "drawer" | "loading"
82
- >;
83
-
84
- /** pops支持中间内容的类型 */
85
- export type PopsSupportContentDetailsType = keyof PopsSupportContentDetails;
86
-
87
- /** panel的各种类型的配置项 */
88
- export type PopsPanelFormsTotalDetails =
89
- | PopsPanelSwitchDetails
90
- | PopsPanelSliderDetails
91
- | PopsPanelInputDetails
92
- | PopsPanelTextAreaDetails
93
- | PopsPanelSelectDetails<any>
94
- | PopsPanelButtonDetails
95
- | PopsPanelDeepMenuDetails
96
- | PopsPanelOwnDetails;
97
-
98
- /**
99
- * pops.xxx的调用返回值
100
- */
101
- export interface PopsCallResult {
102
- /** 唯一标识id */
103
- guid: string;
104
- /** 影子元素 */
105
- $shadowContainer: HTMLDivElement;
106
- /** 影子元素的根节点 */
107
- $shadowRoot: ShadowRoot | HTMLElement;
108
- /** 元素 */
109
- element: HTMLDivElement;
110
- /** 动画层元素 */
111
- animElement: HTMLDivElement;
112
- /** pops元素 */
113
- popsElement: HTMLDivElement;
114
- /** 遮罩层元素 */
115
- maskElement?: HTMLDivElement;
116
- /** 关闭弹窗 */
117
- close(): void;
118
- /** 隐藏弹窗 */
119
- hide(): void;
120
- /** 显示弹窗 */
121
- show(): void;
122
- }
1
+ import type { PopsAlertDetails } from "../components/alert/types";
2
+ import type { PopsConfirmDetails } from "../components/confirm/types";
3
+ import type { PopsDrawerDetails } from "../components/drawer/types";
4
+ import type { PopsFolderDetails } from "../components/folder/types";
5
+ import type { PopsIframeDetails } from "../components/iframe/types";
6
+ import type { PopsLoadingDetails } from "../components/loading/types";
7
+ import type { PopsPanelButtonDetails } from "../components/panel/types/components-button";
8
+ import type { PopsPanelDeepMenuDetails } from "../components/panel/types/components-deepMenu";
9
+ import type { PopsPanelDetails } from "../components/panel/types";
10
+ import type { PopsPanelInputDetails } from "../components/panel/types/components-input";
11
+ import type { PopsPanelOwnDetails } from "../components/panel/types/components-own";
12
+ import type { PopsPanelSelectDetails } from "../components/panel/types/components-select";
13
+ import type { PopsPanelSliderDetails } from "../components/panel/types/components-slider";
14
+ import type { PopsPanelSwitchDetails } from "../components/panel/types/components-switch";
15
+ import type { PopsPanelTextAreaDetails } from "../components/panel/types/components-textarea";
16
+ import type { PopsPromptDetails } from "../components/prompt/types/index";
17
+ import { PopsRightClickMenuDetails } from "../components/rightClickMenu/types";
18
+ import { PopsToolTipDetails } from "../components/tooltip/types/index";
19
+ import type { PopsSearchSuggestionDetails } from "../components/searchSuggestion/types";
20
+
21
+ export interface PopsUtilsOwnObject<V extends any> {
22
+ [key: string]: V | PopsUtilsOwnObject<V>;
23
+ }
24
+
25
+ /** pops所有的类型配置 11个*/
26
+ export interface PopsDetails {
27
+ alert: PopsAlertDetails;
28
+ confirm: PopsConfirmDetails;
29
+ prompt: PopsPromptDetails;
30
+ loading: PopsLoadingDetails;
31
+ iframe: PopsIframeDetails;
32
+ tooltip: PopsToolTipDetails;
33
+ drawer: PopsDrawerDetails;
34
+ folder: PopsFolderDetails;
35
+ panel: PopsPanelDetails;
36
+ rightClickMenu: PopsRightClickMenuDetails;
37
+ searchSuggestion: PopsSearchSuggestionDetails;
38
+ }
39
+
40
+ /** pops的类型 */
41
+ export type PopsType = keyof PopsDetails;
42
+
43
+ /** pops中支持only的配置 */
44
+ export type PopsSupportOnlyDetails = Omit<PopsDetails, "searchSuggestion">;
45
+
46
+ /** 存储实例的类型 */
47
+ export type PopsInstStoreType = keyof Omit<PopsDetails, "searchSuggestion">;
48
+
49
+ /** pops弹窗支持动画元素的配置 8个 */
50
+ export type PopsSupportAnimDetails = Omit<PopsDetails, "tooltip" | "rightClickMenu" | "searchSuggestion">;
51
+
52
+ /** pops弹窗支持动画元素的类型 */
53
+ export type PopsSupportAnimDetailsType = keyof PopsSupportAnimDetails;
54
+
55
+ /** pops弹窗支持标题栏的配置 */
56
+ export type PopsSupportHeaderTitleDetails = Pick<
57
+ PopsDetails,
58
+ "alert" | "confirm" | "prompt" | "iframe" | "drawer" | "folder" | "panel"
59
+ >;
60
+
61
+ /** pops弹窗支持标题栏的类型 */
62
+ export type PopsSupportHeaderTitleDetailsType = keyof PopsSupportHeaderTitleDetails;
63
+
64
+ /** pops支持底部按钮的配置 */
65
+ export type PopsSupportBottomBtnDetails = Pick<PopsDetails, "alert" | "confirm" | "prompt" | "drawer">;
66
+
67
+ /** pops支持底部按钮的类型 */
68
+ export type PopsSupportBottomBtnDetailsType = keyof PopsSupportHeaderTitleDetails;
69
+
70
+ /** pops支持中间内容的配置 */
71
+ export type PopsSupportContentDetails = Pick<
72
+ PopsDetails,
73
+ "alert" | "confirm" | "prompt" | "drawer" | "loading"
74
+ >;
75
+
76
+ /** pops支持中间内容的类型 */
77
+ export type PopsSupportContentDetailsType = keyof PopsSupportContentDetails;
78
+
79
+ /** panel的各种类型的配置项 */
80
+ export type PopsPanelFormsTotalDetails =
81
+ | PopsPanelSwitchDetails
82
+ | PopsPanelSliderDetails
83
+ | PopsPanelInputDetails
84
+ | PopsPanelTextAreaDetails
85
+ | PopsPanelSelectDetails<any>
86
+ | PopsPanelButtonDetails
87
+ | PopsPanelDeepMenuDetails
88
+ | PopsPanelOwnDetails;
89
+
90
+ /**
91
+ * pops.xxx的调用返回值
92
+ */
93
+ export interface PopsCallResult {
94
+ /** 唯一标识id */
95
+ guid: string;
96
+ /** 影子元素 */
97
+ $shadowContainer: HTMLDivElement;
98
+ /** 影子元素的根节点 */
99
+ $shadowRoot: ShadowRoot | HTMLElement;
100
+ /** 元素 */
101
+ element: HTMLDivElement;
102
+ /** 动画层元素 */
103
+ animElement: HTMLDivElement;
104
+ /** pops元素 */
105
+ popsElement: HTMLDivElement;
106
+ /** 遮罩层元素 */
107
+ maskElement?: HTMLDivElement;
108
+ /** 关闭弹窗 */
109
+ close(): void;
110
+ /** 隐藏弹窗 */
111
+ hide(): void;
112
+ /** 显示弹窗 */
113
+ show(): void;
114
+ }
@@ -1,49 +1,49 @@
1
- import type { PopsAlertDetails } from "../components/alert/types";
2
- import type { PopsDrawerDetails } from "../components/drawer/types";
3
- import type { PopsFolderDetails } from "../components/folder/types";
4
- import type { PopsIframeDetails } from "../components/iframe/types";
5
- import type { PopsLoadingDetails } from "../components/loading/types";
6
- import type { PopsPanelDetails } from "../components/panel/types";
7
- import type { PopsPromptDetails } from "../components/prompt/types/index";
8
-
9
- /**
10
- * 遮罩层配置
11
- */
12
- export interface PopsMaskDetails {
13
- /**
14
- * 是否启用遮罩层,默认false
15
- * @default false
16
- */
17
- enable?: boolean;
18
- clickEvent?: {
19
- /**
20
- * 点击遮罩层是否触发关闭事件
21
- * @default false
22
- */
23
- toClose?: boolean;
24
- /**
25
- * 点击遮罩层是否触发隐藏事件
26
- * @default false
27
- */
28
- toHide?: boolean;
29
- };
30
- /**
31
- * 遮罩层自定义的点击事件
32
- * @param originalRun 当toClose为true,它是关闭弹窗,当toHide为true,它是隐藏弹窗
33
- * @param config 配置信息
34
- */
35
- clickCallBack?:
36
- | ((
37
- originalRun: () => void | Promise<void>,
38
- config:
39
- | PopsAlertDetails
40
- | PopsDrawerDetails
41
- | PopsIframeDetails
42
- | PopsPromptDetails
43
- | PopsFolderDetails
44
- | PopsLoadingDetails
45
- | PopsPanelDetails
46
- ) => void)
47
- | undefined
48
- | null;
49
- }
1
+ import type { PopsAlertDetails } from "../components/alert/types";
2
+ import type { PopsDrawerDetails } from "../components/drawer/types";
3
+ import type { PopsFolderDetails } from "../components/folder/types";
4
+ import type { PopsIframeDetails } from "../components/iframe/types";
5
+ import type { PopsLoadingDetails } from "../components/loading/types";
6
+ import type { PopsPanelDetails } from "../components/panel/types";
7
+ import type { PopsPromptDetails } from "../components/prompt/types/index";
8
+
9
+ /**
10
+ * 遮罩层配置
11
+ */
12
+ export interface PopsMaskDetails {
13
+ /**
14
+ * 是否启用遮罩层,默认false
15
+ * @default false
16
+ */
17
+ enable?: boolean;
18
+ clickEvent?: {
19
+ /**
20
+ * 点击遮罩层是否触发关闭事件
21
+ * @default false
22
+ */
23
+ toClose?: boolean;
24
+ /**
25
+ * 点击遮罩层是否触发隐藏事件
26
+ * @default false
27
+ */
28
+ toHide?: boolean;
29
+ };
30
+ /**
31
+ * 遮罩层自定义的点击事件
32
+ * @param originalRun 当toClose为true,它是关闭弹窗,当toHide为true,它是隐藏弹窗
33
+ * @param config 配置信息
34
+ */
35
+ clickCallBack?:
36
+ | ((
37
+ originalRun: () => void | Promise<void>,
38
+ config:
39
+ | PopsAlertDetails
40
+ | PopsDrawerDetails
41
+ | PopsIframeDetails
42
+ | PopsPromptDetails
43
+ | PopsFolderDetails
44
+ | PopsLoadingDetails
45
+ | PopsPanelDetails
46
+ ) => void)
47
+ | undefined
48
+ | null;
49
+ }
@@ -1,60 +1,60 @@
1
- /**
2
- * 弹窗位置
3
- */
4
- export type PopsPosition =
5
- | "top_left"
6
- | "top"
7
- | "top_right"
8
- | "center_left"
9
- | "center"
10
- | "center_right"
11
- | "bottom_left"
12
- | "bottom"
13
- | "bottom_right";
14
-
15
- /**
16
- * 按钮位置
17
- */
18
- export type PopsJustifyContent =
19
- | "center"
20
- | "end"
21
- | "flex-end"
22
- | "flex-start"
23
- | "left"
24
- | "normal"
25
- | "right"
26
- | "space-around"
27
- | "space-between"
28
- | "space-evenly"
29
- | "start"
30
- | "stretch"
31
- | "inherit"
32
- | "initial"
33
- | "revert"
34
- | "revert-layer"
35
- | "unset";
36
-
37
- /**
38
- * text-align
39
- */
40
- export type PopsTextAlign =
41
- | "center"
42
- | "end"
43
- | "justify"
44
- | "left"
45
- | "right"
46
- | "start"
47
- | "-webkit-auto"
48
- | "-moz-center-or-inherit"
49
- | "-webkit-center"
50
- | "-moz-center"
51
- | "-webkit-left"
52
- | "-moz-left"
53
- | "-webkit-match-parent"
54
- | "-webkit-right"
55
- | "-moz-right"
56
- | "inherit"
57
- | "initial"
58
- | "revert"
59
- | "revert-layer"
60
- | "unset";
1
+ /**
2
+ * 弹窗位置
3
+ */
4
+ export type PopsPosition =
5
+ | "top_left"
6
+ | "top"
7
+ | "top_right"
8
+ | "center_left"
9
+ | "center"
10
+ | "center_right"
11
+ | "bottom_left"
12
+ | "bottom"
13
+ | "bottom_right";
14
+
15
+ /**
16
+ * 按钮位置
17
+ */
18
+ export type PopsJustifyContent =
19
+ | "center"
20
+ | "end"
21
+ | "flex-end"
22
+ | "flex-start"
23
+ | "left"
24
+ | "normal"
25
+ | "right"
26
+ | "space-around"
27
+ | "space-between"
28
+ | "space-evenly"
29
+ | "start"
30
+ | "stretch"
31
+ | "inherit"
32
+ | "initial"
33
+ | "revert"
34
+ | "revert-layer"
35
+ | "unset";
36
+
37
+ /**
38
+ * text-align
39
+ */
40
+ export type PopsTextAlign =
41
+ | "center"
42
+ | "end"
43
+ | "justify"
44
+ | "left"
45
+ | "right"
46
+ | "start"
47
+ | "-webkit-auto"
48
+ | "-moz-center-or-inherit"
49
+ | "-webkit-center"
50
+ | "-moz-center"
51
+ | "-webkit-left"
52
+ | "-moz-left"
53
+ | "-webkit-match-parent"
54
+ | "-webkit-right"
55
+ | "-moz-right"
56
+ | "inherit"
57
+ | "initial"
58
+ | "revert"
59
+ | "revert-layer"
60
+ | "unset";
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "2.2.8",
4
- "type": "module",
3
+ "version": "2.3.0",
5
4
  "description": "弹窗库",
5
+ "type": "module",
6
+ "homepage": "https://github.com/WhiteSevs/TamperMonkeyScript/tree/master/lib/pops#readme",
7
+ "bugs": {
8
+ "url": "https://github.com/WhiteSevs/TamperMonkeyScript/issues"
9
+ },
6
10
  "main": "dist/index.cjs.js",
7
11
  "module": "dist/index.esm.js",
8
12
  "types": "dist/types/index.d.ts",
@@ -17,8 +21,7 @@
17
21
  }
18
22
  },
19
23
  "files": [
20
- "dist",
21
- "src"
24
+ "dist"
22
25
  ],
23
26
  "publishConfig": {
24
27
  "registry": "https://registry.npmjs.org/"
@@ -49,9 +52,11 @@
49
52
  "typescript": "^5.8.3"
50
53
  },
51
54
  "scripts": {
52
- "dev": "npx rollup -c -w",
53
- "build": "npx rollup -c",
54
- "build:all": "npx rollup -c",
55
- "build:all-new": "npx rollup -c"
55
+ "dev": "pnpm run format & npx rollup -c -w",
56
+ "build": "pnpm run format & npx rollup -c",
57
+ "build:all": "pnpm run format & npx rollup -c",
58
+ "build:all-new": "pnpm run format & npx rollup -c",
59
+ "format": "npx prettier -w src/**/*.ts src/**/*.css",
60
+ "release": "npm publish"
56
61
  }
57
62
  }