ranui 0.1.10-alpha.2 → 0.1.10-alpha.23

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 (149) hide show
  1. package/README.zh-CN.md +192 -0
  2. package/dist/{_commonjs-dynamic-modules-DLbDWi6a.js → _commonjs-dynamic-modules-HhqG7SJg.js} +2 -2
  3. package/dist/assets/image/failImage.d.ts +2 -0
  4. package/dist/build/config.d.ts +3 -0
  5. package/dist/build/config.es.d.ts +2 -0
  6. package/dist/build/config.sha.d.ts +2 -0
  7. package/dist/build/config.umd.d.ts +2 -0
  8. package/dist/button.js +3 -3
  9. package/dist/checkbox.js +3 -3
  10. package/dist/colorpicker.js +7 -9
  11. package/dist/{colz-CRDozfZA.js → colz-DJZvo_8B.js} +3 -8
  12. package/dist/components/button/index.d.ts +38 -0
  13. package/dist/components/checkbox/index.d.ts +31 -0
  14. package/dist/components/colorpicker/index.d.ts +120 -0
  15. package/dist/components/dropdown/index.d.ts +34 -0
  16. package/dist/components/form/index.d.ts +2 -0
  17. package/dist/components/icon/index.d.ts +2 -0
  18. package/dist/components/image/index.d.ts +2 -0
  19. package/dist/components/input/index.d.ts +210 -0
  20. package/dist/components/loading/index.d.ts +76 -0
  21. package/dist/components/math/index.d.ts +16 -0
  22. package/dist/components/message/index.d.ts +17 -0
  23. package/dist/components/modal/index.d.ts +2 -0
  24. package/dist/components/player/index.d.ts +250 -0
  25. package/dist/components/popover/content/index.d.ts +16 -0
  26. package/dist/components/popover/index.d.ts +91 -0
  27. package/dist/components/preview/colz.d.ts +72 -0
  28. package/dist/components/preview/constant.d.ts +5 -0
  29. package/dist/components/preview/docx.d.ts +8 -0
  30. package/dist/components/preview/excel/excel.d.ts +2 -0
  31. package/dist/components/preview/excel/index.d.ts +2 -0
  32. package/dist/components/preview/excel/media.d.ts +37 -0
  33. package/dist/components/preview/index.d.ts +3 -0
  34. package/dist/components/preview/pdf.d.ts +34 -0
  35. package/dist/components/preview/pptx/index.d.ts +19 -0
  36. package/dist/components/preview/pptx/process_pptx.d.ts +22 -0
  37. package/dist/components/preview/pptx/t_xml.d.ts +1 -0
  38. package/dist/components/preview/pptx/worker.d.ts +1 -0
  39. package/dist/components/preview/types.d.ts +10 -0
  40. package/dist/components/progress/index.d.ts +41 -0
  41. package/dist/components/radar/index.d.ts +2 -0
  42. package/dist/components/scratch/index.d.ts +21 -0
  43. package/dist/components/select/dropdown-item/index.d.ts +23 -0
  44. package/dist/components/select/index.d.ts +114 -0
  45. package/dist/components/select/option/index.d.ts +2 -0
  46. package/dist/components/skeleton/index.d.ts +2 -0
  47. package/dist/components/tab/index.d.ts +424 -0
  48. package/dist/components/tabpane/index.d.ts +368 -0
  49. package/dist/{docx-CChZ5Ycr.js → docx-D5t6JtVt.js} +332 -291
  50. package/dist/icon.js +3 -3
  51. package/dist/iconShadowless.js +3 -3
  52. package/dist/image.js +1 -1
  53. package/dist/{index-B2yRe66F.js → index-7MlTN57l.js} +11 -19
  54. package/dist/{index-Du-Biu-I.js → index-BEm1a2pr.js} +2 -5
  55. package/dist/{index-BpOERe9M.js → index-Bb55l8nf.js} +1 -10
  56. package/dist/index-Bc9aILQK.js +710 -0
  57. package/dist/index-BmnyRPna.js +550 -0
  58. package/dist/{index-DRWOSfdF.js → index-BpQdR7OI.js} +25 -35
  59. package/dist/index-C1GmV3sK.js +66910 -0
  60. package/dist/{index-DytfjwBV.js → index-CCeFXABq.js} +12 -16
  61. package/dist/{index-Cbp6LrE5.js → index-CNfwWf6v.js} +9 -16
  62. package/dist/{index-ByBbFhvo.js → index-CRwHr_Ni.js} +4619 -2661
  63. package/dist/{index-BHmWrPCW.js → index-CVkJ_Xlh.js} +1149 -2207
  64. package/dist/index-CaDng6Eh.js +156 -0
  65. package/dist/{index-DRi1ylHx.js → index-CfBxNU7C.js} +17 -24
  66. package/dist/{index-DqtzBqPN.js → index-D6jtmsDd.js} +12 -23
  67. package/dist/index-D7zBysHY.js +70 -0
  68. package/dist/{index-C1x9Popy.js → index-DAxs7Dd2.js} +5 -12
  69. package/dist/{index-CSnBqUsQ.js → index-DC5EA657.js} +2 -6
  70. package/dist/index-DWvhcjaL.js +656 -0
  71. package/dist/{index-BF8tJ6rR.js → index-DeWbkpnF.js} +12 -23
  72. package/dist/index-DpC9OSc5.js +140 -0
  73. package/dist/{index-B4bfIbdI.js → index-choegwoI.js} +17 -25
  74. package/dist/{index-CFnsLnrb.js → index-n4EhE9Y5.js} +42 -48
  75. package/dist/index-y4nNx1Bs.js +103 -0
  76. package/dist/index.d.ts +275 -0
  77. package/dist/index.js +31 -39
  78. package/dist/info-circle-fill-DjI8gXS3.js +14 -0
  79. package/dist/input.js +3 -2
  80. package/dist/inputShadowless.js +2 -2
  81. package/dist/jszip.min--o3_SgQz.js +2904 -0
  82. package/dist/katex-es-B7keY1LJ.js +14629 -0
  83. package/dist/loading-scene-BMc2wqKm.js +4 -0
  84. package/dist/loading.js +4 -2
  85. package/dist/math.js +7 -0
  86. package/dist/message.js +3 -2
  87. package/dist/more-DUNz_fmw.js +42 -0
  88. package/dist/{pdf-DpNqCylD.js → pdf-Cx0VWKFo.js} +2 -5
  89. package/dist/player.js +4 -4
  90. package/dist/playwright.config.d.ts +9 -0
  91. package/dist/plugins/auto-import-file.d.ts +0 -0
  92. package/dist/plugins/load-style.d.ts +6 -0
  93. package/dist/plugins/load-svg.d.ts +9 -0
  94. package/dist/plus-DD2f41KU.js +404 -0
  95. package/dist/popover.js +7 -4
  96. package/dist/preview.js +272 -5
  97. package/dist/progress.js +3 -3
  98. package/dist/radar.js +3 -3
  99. package/dist/ranui.css +1 -0
  100. package/dist/search-BWdfjyP8.js +4 -0
  101. package/dist/select.js +6 -6
  102. package/dist/selectShadowless.js +558 -8
  103. package/dist/shadowless/icon/index.d.ts +3 -0
  104. package/dist/shadowless/input/index.d.ts +210 -0
  105. package/dist/shadowless/select/index.d.ts +108 -0
  106. package/dist/shadowless/select/option/index.d.ts +2 -0
  107. package/dist/shadowless.d.ts +3 -0
  108. package/dist/shadowless.js +8 -0
  109. package/dist/skeleton.js +1 -1
  110. package/dist/sort-DWqiUONr.js +4 -0
  111. package/dist/tab.js +3 -3
  112. package/dist/tabpane.js +1 -1
  113. package/dist/tests/button.spec.d.ts +1 -0
  114. package/dist/tsconfig.json +5 -3
  115. package/dist/typings.d.ts +257 -0
  116. package/dist/umd/index.css +1 -0
  117. package/dist/umd/index.umd.cjs +1 -60
  118. package/dist/umd/shadowless/shadowless.css +1 -0
  119. package/dist/umd/shadowless/shadowless.umd.cjs +1 -1
  120. package/dist/utils/color.d.ts +52 -0
  121. package/dist/utils/image.d.ts +39 -0
  122. package/dist/utils/index.d.ts +72 -0
  123. package/dist/utils/math.d.ts +26 -0
  124. package/dist/utils/tween.d.ts +21 -0
  125. package/dist/vite.config.d.ts +7 -0
  126. package/dist/without-content-CdJw7vHM.js +4 -0
  127. package/package.json +91 -64
  128. package/readme.md +36 -56
  129. package/typings.d.ts +168 -12
  130. package/dist/arrow-down-D4qr4m33.js +0 -30
  131. package/dist/content.js +0 -6
  132. package/dist/global-DOOKQmNv.js +0 -4
  133. package/dist/index-01Qfd9QI.js +0 -207
  134. package/dist/index-C-p_Wpit.js +0 -103
  135. package/dist/index-C6wPL-2Y.js +0 -298
  136. package/dist/index-CWWI8SHO.js +0 -206
  137. package/dist/index-CbyMC6Yz.js +0 -59
  138. package/dist/index-Cr9AYoGT.js +0 -498
  139. package/dist/index-DLB8VOy7.js +0 -281
  140. package/dist/index-Dapt713u.js +0 -65624
  141. package/dist/index-DsIUhdNt.js +0 -533
  142. package/dist/info-circle-fill-CFeVMdci.js +0 -4
  143. package/dist/jszip.min-DD9Dc6z4.js +0 -2674
  144. package/dist/option.js +0 -92
  145. package/dist/shadowless/shadowless/index.js +0 -14
  146. package/dist/style.css +0 -1
  147. package/dist/umd/shadowless/style.css +0 -1
  148. package/dist/umd/style.css +0 -1
  149. package/dist/utils-74Icp-PI.js +0 -541
@@ -0,0 +1,210 @@
1
+ import '@/components/icon/index';
2
+ declare const Input_base: {
3
+ new (): HTMLElement;
4
+ prototype: HTMLElement;
5
+ };
6
+ export declare class Input extends Input_base {
7
+ static get observedAttributes(): string[];
8
+ _input: HTMLDivElement;
9
+ _label: HTMLLabelElement | undefined;
10
+ _inputContent: HTMLInputElement;
11
+ _icon: HTMLElement | undefined;
12
+ constructor();
13
+ /**
14
+ * @description: 获取 input 的值
15
+ * @return {String}
16
+ */
17
+ get value(): string;
18
+ /**
19
+ * @description: 设置 input 的值
20
+ * @param {String} value
21
+ */
22
+ set value(value: string);
23
+ /**
24
+ * @description: 获取 input 的占位字符
25
+ * @return {String}
26
+ */
27
+ get placeholder(): string;
28
+ /**
29
+ * @description: 设置 input 的占位字符
30
+ * @param {String} value
31
+ */
32
+ set placeholder(value: string);
33
+ /**
34
+ * @description: input 是否为必选
35
+ * @return {String}
36
+ */
37
+ get required(): string;
38
+ /**
39
+ * @description: 设置 input 是否为必选,除非设置成 false,否则都是必填
40
+ * @param {*} value
41
+ */
42
+ set required(value: string);
43
+ /**
44
+ * @description: 获取 input 上 disabled 属性
45
+ * @return {String | null}
46
+ */
47
+ get disabled(): string;
48
+ /**
49
+ * @description: 设置 input 的 disabled 属性
50
+ * @param {String} value
51
+ */
52
+ set disabled(value: string);
53
+ /**
54
+ * @description: 获取类似于 Metiral Design 的输入体验。
55
+ */
56
+ get label(): string;
57
+ /**
58
+ * @description: 设置类似于 Metiral Design 的输入体验。
59
+ */
60
+ set label(value: string);
61
+ /**
62
+ * @description: 获取 input 框的状态
63
+ */
64
+ get status(): string;
65
+ /**
66
+ * @description: 设置 input 框的状态
67
+ */
68
+ set status(value: string);
69
+ /**
70
+ * @description: 与 form 组件联动时,收集的属性名
71
+ * @return {String}
72
+ */
73
+ get name(): string;
74
+ /**
75
+ * @description: 设置 name 属性
76
+ * @param {string} value
77
+ */
78
+ set name(value: string);
79
+ /**
80
+ * @description: 当 input 类型为 number 类型时,可以获取 min 属性
81
+ * @return {String}
82
+ */
83
+ get min(): string;
84
+ /**
85
+ * @description: 当 input 类型为 number 类型时,设置 min 属性
86
+ * @param {string} value
87
+ */
88
+ set min(value: string);
89
+ /**
90
+ * @description: 当 input 类型为 number 类型时,可以获取 max 属性
91
+ * @return {String}
92
+ */
93
+ get max(): string;
94
+ /**
95
+ * @description: 当 input 类型为 number 类型时,设置 max 属性
96
+ * @param {string} value
97
+ */
98
+ set max(value: string);
99
+ /**
100
+ * @description: 当 input 类型为 number 类型时,可以获取 step 属性
101
+ * @return {String}
102
+ */
103
+ get step(): string;
104
+ /**
105
+ * @description: 当 input 类型为 number 类型时,设置 step 属性
106
+ * @param {string} value
107
+ */
108
+ set step(value: string);
109
+ /**
110
+ * @description: 获取一个 icon
111
+ * @return {String}
112
+ */
113
+ get icon(): string;
114
+ /**
115
+ * @description: 设置 icon 来表示标识
116
+ * @param {string|null} value
117
+ */
118
+ set icon(value: string);
119
+ /**
120
+ * @description: 获取前面的 icon
121
+ * @return {String}
122
+ */
123
+ get prefix(): string;
124
+ /**
125
+ * @description: 设置前面的 icon 来表示标识
126
+ * @param {string|null} value
127
+ */
128
+ set prefix(value: string);
129
+ /**
130
+ * @description: 获取后面的 icon
131
+ * @return {String}
132
+ */
133
+ get suffix(): string;
134
+ /**
135
+ * @description: 设置后面的 icon 来表示标识
136
+ * @param {string|null} value
137
+ */
138
+ set suffix(value: string);
139
+ /**
140
+ * @description: 获取 input 的类型
141
+ * @return {string|null}
142
+ */
143
+ get type(): string;
144
+ /**
145
+ * @description: 设置 input 的类型
146
+ * @param {string|null} value
147
+ */
148
+ set type(value: string);
149
+ /**
150
+ * @description: 原生的 input 方法
151
+ * @param {Event} event
152
+ */
153
+ customInput: (event: Event) => void;
154
+ /**
155
+ * @description: 增加 change 方法,同时兼容大小写的情况
156
+ */
157
+ customChange: () => void;
158
+ /**
159
+ * @description: 监听 placeholder 属性函数
160
+ * @param {string} name
161
+ * @param {string} value
162
+ */
163
+ listenPlaceholder: (name: string, value: string) => void;
164
+ /**
165
+ * @description: 监听 label 属性函数
166
+ * @param {string} name
167
+ * @param {string} value
168
+ */
169
+ listenLabel: (name: string, value: string) => void;
170
+ /**
171
+ * @description: 监听 type 属性
172
+ * @param {string} name
173
+ * @param {string} value
174
+ */
175
+ listenType: (name: string, value: string) => void;
176
+ /**
177
+ * @description: 监听 status 属性
178
+ * @param {string} name
179
+ * @param {string} value
180
+ */
181
+ listenStatus: (name: string, value: string) => void;
182
+ /**
183
+ * @description: 监听 disabled 属性
184
+ * @param {string} name
185
+ * @param {string} value
186
+ */
187
+ listenDisabled: (name: string, value: string) => void;
188
+ /**
189
+ * @description: 监听 icon 属性
190
+ * @param {string} name
191
+ * @param {string} value
192
+ */
193
+ listenIcon: (name: string, value: string, oldValue: string) => void;
194
+ /**
195
+ * @description: 处理 icon 属性的问题
196
+ */
197
+ dealIcon: () => void;
198
+ /**
199
+ * @description: 聚合监听事件
200
+ * @param {string} name
201
+ * @param {string} oldValue
202
+ * @param {string} newValue
203
+ */
204
+ listenEvent: (name: string, oldValue: string, newValue: string) => void;
205
+ connectedCallback(): void;
206
+ disconnectCallback(): void;
207
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
208
+ }
209
+ declare const _default: import("@/utils/index").CustomErrorType;
210
+ export default _default;
@@ -0,0 +1,76 @@
1
+ export declare enum ICON_NAME_AMP {
2
+ DOUBLE_BOUNCE = "double-bounce",
3
+ ROTATE = "rotate",
4
+ STRETCH = "stretch",
5
+ CUBE = "cube",
6
+ DOT = "dot",
7
+ TRIPLE_BOUNCE = "triple-bounce",
8
+ SCALE_OUT = "scale-out",
9
+ CIRCLE = "circle",
10
+ CIRCLE_LINE = "circle-line",
11
+ SQUARE = "square",
12
+ PULSE = "pulse",
13
+ SOLAR = "solar",
14
+ CUBE_FOLD = "cube-fold",
15
+ CIRCLE_FOLD = "circle-fold",
16
+ CUBE_GRID = "cube-grid",
17
+ CIRCLE_TURN = "circle-turn",
18
+ CIRCLE_ROTATE = "circle-rotate",
19
+ CIRCLE_SPIN = "circle-spin",
20
+ DOT_BAR = "dot-bar",
21
+ DOT_CIRCLE = "dot-circle",
22
+ LINE = "line",
23
+ DOT_PULSE = "dot-pulse",
24
+ LINE_SCALE = "line-scale",
25
+ TEXT = "text",
26
+ CUBE_DIM = "cube-dim",
27
+ DOT_LINE = "dot-line",
28
+ ARC = "arc",
29
+ DROP = "drop",
30
+ PACMAN = "pacman"
31
+ }
32
+ declare const Loading_base: {
33
+ new (): HTMLElement;
34
+ prototype: HTMLElement;
35
+ };
36
+ export declare class Loading extends Loading_base {
37
+ contain: HTMLDivElement;
38
+ static get observedAttributes(): string[];
39
+ constructor();
40
+ get name(): ICON_NAME_AMP;
41
+ set name(value: string);
42
+ rotateLoading: () => void;
43
+ stretchLoading: () => void;
44
+ doubleBounceLoading: () => void;
45
+ cubeLoading: () => void;
46
+ dotLoading: () => void;
47
+ tripleBounceLoading: () => void;
48
+ scaleOutLoading: () => void;
49
+ circleLoading: () => void;
50
+ circleLineLoading: () => void;
51
+ squareLoading: () => void;
52
+ pulseLoading: () => void;
53
+ solarLoading: () => void;
54
+ cubeFoldLoading: () => void;
55
+ circleFoldLoading: () => void;
56
+ cubeGridLoading: () => void;
57
+ circleTurnLoading: () => void;
58
+ circleRotateLoading: () => void;
59
+ circleSpinLoading: () => void;
60
+ dotBarLoading: () => void;
61
+ dotCircleLoading: () => void;
62
+ lineLoading: () => void;
63
+ dotPulseLoading: () => void;
64
+ lineScaleLoading: () => void;
65
+ textLoading: () => void;
66
+ cubeDimLoading: () => void;
67
+ dotLineLoading: () => void;
68
+ arcLoading: () => void;
69
+ dropLoading: () => void;
70
+ pacmanLoading: () => void;
71
+ createLoading: () => void;
72
+ connectedCallback(): void;
73
+ attributeChangedCallback(k: string, o: string, n: string): void;
74
+ }
75
+ declare const _default: import("@/utils/index").CustomErrorType;
76
+ export default _default;
@@ -0,0 +1,16 @@
1
+ declare const Math_base: {
2
+ new (): HTMLElement;
3
+ prototype: HTMLElement;
4
+ };
5
+ export declare class Math extends Math_base {
6
+ contain: HTMLDivElement;
7
+ static get observedAttributes(): string[];
8
+ constructor();
9
+ get latex(): string;
10
+ set latex(value: string);
11
+ render(): void;
12
+ connectedCallback(): void;
13
+ attributeChangedCallback(k: string, o: string, n: string): void;
14
+ }
15
+ declare const _default: Promise<import("@/utils/index").CustomErrorType>;
16
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import '@/components/icon';
2
+ declare const message: {
3
+ info: (options: Ran.Prompt | string | undefined | null) => void;
4
+ success: (options: Ran.Prompt | string | undefined | null) => void;
5
+ error: (options: Ran.Prompt | string | undefined | null) => void;
6
+ warning: (options: Ran.Prompt | string | undefined | null) => void;
7
+ toast: (options: Ran.Prompt | string | undefined | null) => void;
8
+ } | null;
9
+ declare global {
10
+ interface Window {
11
+ message: Ran.Message;
12
+ ranui: {
13
+ message?: Ran.Message;
14
+ };
15
+ }
16
+ }
17
+ export default message;
@@ -0,0 +1,2 @@
1
+ declare const _default: void;
2
+ export default _default;
@@ -0,0 +1,250 @@
1
+ import { SyncHook } from 'ranuts/utils';
2
+ import '@/assets/js/hls.js';
3
+ import type { Progress } from '@/components/progress';
4
+ import '@/components/select';
5
+ import './index.less';
6
+ type Callback = (...args: unknown[]) => unknown;
7
+ type EventName = string | symbol;
8
+ type EventItem = {
9
+ name?: string | symbol;
10
+ callback: Callback;
11
+ initialCallback?: Callback;
12
+ };
13
+ export declare class SHook {
14
+ private _events;
15
+ constructor();
16
+ tap: (eventName: EventName, eventItem: EventItem | Callback) => void;
17
+ call: (eventName: EventName, ...args: Array<unknown>) => void;
18
+ callSync: (eventName: EventName, ...args: Array<unknown>) => Promise<void>;
19
+ once: (eventName: EventName, eventItem: EventItem | Callback) => void;
20
+ off: (eventName: EventName, eventItem: EventItem | Callback) => void;
21
+ }
22
+ export interface HlsPlayer {
23
+ startLoad(): () => void;
24
+ off: (s: string, f: Function) => void;
25
+ on: (s: string, f: Function) => void;
26
+ loadSource: (s: string) => void;
27
+ attachMedia: (v: HTMLVideoElement) => void;
28
+ destroy: () => void;
29
+ }
30
+ export interface Level {
31
+ audioCodec: string;
32
+ bitrate: number;
33
+ height: number;
34
+ width: number;
35
+ name: string;
36
+ url: string;
37
+ videoCodec: string;
38
+ }
39
+ export interface Context {
40
+ action: SyncHook;
41
+ currentState: string;
42
+ duration: number;
43
+ currentTime: number;
44
+ volume: number;
45
+ playbackRate: number;
46
+ fullScreen: boolean;
47
+ levels: Partial<Level>[];
48
+ url: string;
49
+ levelMap: Map<string, string>;
50
+ clarity: string;
51
+ }
52
+ interface Hls {
53
+ Events: {
54
+ MANIFEST_LOADED: 'hlsManifestLoaded';
55
+ ERROR: 'error';
56
+ };
57
+ isSupported: () => boolean;
58
+ }
59
+ type HLS = Hls & (new () => HlsPlayer);
60
+ declare global {
61
+ interface Window {
62
+ Hls: HLS;
63
+ }
64
+ }
65
+ declare const RanPlayer_base: {
66
+ new (): HTMLElement;
67
+ prototype: HTMLElement;
68
+ };
69
+ export declare class RanPlayer extends RanPlayer_base {
70
+ ctx: Context;
71
+ _player: HTMLDivElement;
72
+ _container: HTMLDivElement;
73
+ _slot: HTMLSlotElement;
74
+ _playerController: HTMLDivElement;
75
+ _playerBtn: HTMLDivElement;
76
+ _progress: HTMLDivElement;
77
+ _progressDot: HTMLDivElement;
78
+ _progressWrap: HTMLDivElement;
79
+ _progressWrapValue: HTMLDivElement;
80
+ requestAnimationFrameId?: number;
81
+ moveProgress: {
82
+ percentage: number;
83
+ mouseDown: boolean;
84
+ };
85
+ _playerControllerBottom: HTMLDivElement;
86
+ _playerControllerBottomRight: HTMLDivElement;
87
+ _playerControllerBottomLeft: HTMLDivElement;
88
+ _playerControllerBottomPlayBtn: HTMLDivElement;
89
+ _playerControllerBottomTimeCurrent: HTMLDivElement;
90
+ _playerControllerBottomTimeDuration: HTMLDivElement;
91
+ _playerControllerBottomTimeDivide: HTMLDivElement;
92
+ _playControllerBottomClarity: HTMLElement;
93
+ _playControllerBottomSpeed: HTMLDivElement;
94
+ _playControllerBottomSpeedIcon: HTMLDivElement;
95
+ _playControllerBottomVolumeProgress: Progress;
96
+ _playControllerBottomRightFullScreen: HTMLDivElement;
97
+ _playControllerBottomVolume: HTMLDivElement;
98
+ _playControllerBottomSpeedPopover: HTMLElement;
99
+ controllerBarTimeId?: NodeJS.Timeout;
100
+ _playerTip: HTMLDivElement;
101
+ _playerTipTime: HTMLDivElement;
102
+ _playerTipText: HTMLDivElement;
103
+ _volume?: number;
104
+ _video?: HTMLVideoElement;
105
+ _hls?: HlsPlayer;
106
+ static get observedAttributes(): string[];
107
+ /**
108
+ * @description: 初始化 view 和 video 的全局上下文
109
+ * @return {*}
110
+ */
111
+ constructor();
112
+ get src(): string;
113
+ set src(value: string);
114
+ get debug(): string;
115
+ set debug(value: string);
116
+ get volume(): string;
117
+ set volume(value: string);
118
+ get currentTime(): string;
119
+ set currentTime(value: string);
120
+ get playbackRate(): string;
121
+ set playbackRate(value: string);
122
+ changeClarityToSetVideo: () => void;
123
+ changeClarity: (e: Event) => void;
124
+ createClaritySelect: () => void;
125
+ manifestLoaded: (type: string, data: {
126
+ levels: Level[];
127
+ url: string;
128
+ }) => void;
129
+ /**
130
+ * @description: 初始化 video 和更新 video 方法
131
+ * @return {*}
132
+ */
133
+ updatePlayer: () => void;
134
+ hlsError: (event: unknown, data: unknown) => void;
135
+ change: (name: string, value: unknown) => void;
136
+ onCanplay: (e: Event) => void;
137
+ onCanplaythrough: (e: Event) => void;
138
+ onComplete: (e: Event) => void;
139
+ onDurationchange: (e: Event) => void;
140
+ onEmptied: (e: Event) => void;
141
+ onEnded: (e: Event) => void;
142
+ onError: (e: Event) => void;
143
+ onLoadedmetadata: (e: Event) => void;
144
+ onLoadstart: (e: Event) => void;
145
+ onProgress: (e: Event) => void;
146
+ onRatechange: (e: Event) => void;
147
+ onSeeked: (e: Event) => void;
148
+ onSeeking: (e: Event) => void;
149
+ onStalled: (e: Event) => void;
150
+ onSuspend: (e: Event) => void;
151
+ onLoadeddata: (e: Event) => void;
152
+ onTimeupdate: (e: Event) => void;
153
+ onVolumechange: (e: Event) => void;
154
+ onWaiting: (e: Event) => void;
155
+ onPlay: (e: Event) => void;
156
+ onPlaying: (e: Event) => void;
157
+ onPause: (e: Event) => void;
158
+ clearListenerEvent: () => void;
159
+ /**
160
+ * @description: 用户行为和 video 之间的交互
161
+ * @return {*}
162
+ */
163
+ listenEvent: () => void;
164
+ showControllerBar: (e?: MouseEvent) => void;
165
+ /**
166
+ * @description: 进度条点击事件
167
+ * @param {MouseEvent} e
168
+ * @return {*}
169
+ */
170
+ progressClick: (e: MouseEvent) => void;
171
+ /**
172
+ * @description: 进度条鼠标按下事件
173
+ * @param {MouseEvent} e
174
+ * @return {*}
175
+ */
176
+ progressDotMouseDown: () => void;
177
+ /**
178
+ * @description: 进度条鼠标移动事件
179
+ * @param {MouseEvent} e
180
+ * @return {*}
181
+ */
182
+ progressDotMouseMove: (e: MouseEvent) => void;
183
+ /**
184
+ * @description: 进度条鼠标松开事件
185
+ * @param {MouseEvent} e
186
+ * @return {*}
187
+ */
188
+ progressDotMouseUp: () => void;
189
+ /**
190
+ * @description: 更新页面样式
191
+ * @param {Function} fn
192
+ * @return {*}
193
+ */
194
+ requestAnimationFrame: (fn: Function) => void;
195
+ /**
196
+ * @description: 取消页面动画
197
+ * @param {Function} fn
198
+ * @return {*}
199
+ */
200
+ cancelAnimationFrame: () => void;
201
+ /**
202
+ * @description: 更新进度条
203
+ * @param {*} void
204
+ * @return {*}
205
+ */
206
+ updateCurrentProgress: () => void;
207
+ changeAttribute: (k: string, o: string, n: string, attribute: string, callback: Function) => void;
208
+ /**
209
+ * @description: 点击整个视频时,触发的事件
210
+ * @param {*} void
211
+ * @return {*}
212
+ */
213
+ dispatchClickPlayerContainerAction: (e: Event) => void;
214
+ /**
215
+ * @description: 空格事件
216
+ * @param {KeyboardEvent} e
217
+ * @return {*}
218
+ */
219
+ SpaceKeyDown: (e: KeyboardEvent) => void;
220
+ /**
221
+ * @description: 点击 player-btn,触发的事件
222
+ * @param {*} void
223
+ * @return {*}
224
+ */
225
+ dispatchClickPlayerBtnAction: (e: Event) => void;
226
+ changeVolumeProgress: (e: Event) => void;
227
+ customRequestFullscreen: () => Promise<void>;
228
+ customExitFullscreen: () => Promise<void>;
229
+ openFullScreen: () => void;
230
+ changeSpeed: (e: Event) => void;
231
+ progressMouseEnter: (e: MouseEvent) => void;
232
+ progressMouseLeave: (e: MouseEvent) => void;
233
+ progressMouseMove: (e: MouseEvent) => void;
234
+ changePlayerVolume: () => void;
235
+ resize: () => void;
236
+ fullScreenChange: () => void;
237
+ getPlaybackRate: () => number;
238
+ setPlaybackRate: (n: number) => number;
239
+ setVolume: (n: number) => number;
240
+ getVolume: () => number;
241
+ setCurrentTime: (n: number) => number;
242
+ getCurrentTime: () => number;
243
+ getTotalTime: () => number;
244
+ play: (n?: number) => void;
245
+ pause: () => void;
246
+ connectedCallback(): void;
247
+ disconnectCallback(): void;
248
+ }
249
+ declare const _default: typeof RanPlayer | undefined;
250
+ export default _default;
@@ -0,0 +1,16 @@
1
+ declare const Content_base: {
2
+ new (): HTMLElement;
3
+ prototype: HTMLElement;
4
+ };
5
+ export declare class Content extends Content_base {
6
+ observer: MutationObserver;
7
+ _shadowDom: ShadowRoot;
8
+ _slot: HTMLSlotElement;
9
+ constructor();
10
+ callback: (mutations: MutationRecord[]) => void;
11
+ onChange: (mutation: MutationRecord) => void;
12
+ connectedCallback(): void;
13
+ disconnectCallback(): void;
14
+ }
15
+ declare const _default: import("@/utils/index").CustomErrorType;
16
+ export default _default;
@@ -0,0 +1,91 @@
1
+ import '@/components/popover/content';
2
+ import '@/components/dropdown';
3
+ export type PlacementDirection = Record<string, Record<string, string>>;
4
+ export declare enum PLACEMENT_TYPE {
5
+ TOP = "top",
6
+ BOTTOM = "bottom",
7
+ LEFT = "left",
8
+ RIGHT = "right"
9
+ }
10
+ declare const Popover_base: {
11
+ new (): HTMLElement;
12
+ prototype: HTMLElement;
13
+ };
14
+ export declare class Popover extends Popover_base {
15
+ _slot: HTMLSlotElement;
16
+ popoverBlock: HTMLDivElement;
17
+ popoverContent?: HTMLElement;
18
+ popoverInner?: HTMLDivElement;
19
+ popoverInnerBlock?: HTMLDivElement;
20
+ _shadowDom: ShadowRoot;
21
+ dropDownInTimeId?: NodeJS.Timeout;
22
+ dropDownOutTimeId?: NodeJS.Timeout;
23
+ removeTimeId?: NodeJS.Timeout;
24
+ static get observedAttributes(): string[];
25
+ readonly closePopover: () => void;
26
+ constructor();
27
+ get placement(): string;
28
+ set placement(value: string);
29
+ get arrow(): string;
30
+ set arrow(value: string);
31
+ get trigger(): string;
32
+ set trigger(value: string);
33
+ get getPopupContainerId(): string;
34
+ set getPopupContainerId(value: string);
35
+ stopPropagation: (e: Event) => void;
36
+ /**
37
+ * @description: 创建下拉框
38
+ * @param {HTMLCollection} content
39
+ * @return {*}
40
+ */
41
+ createContent: (content: HTMLCollection) => void;
42
+ /**
43
+ * @description: 观察内容变化
44
+ * @param {Event} e
45
+ * @return {*}
46
+ */
47
+ watchContent: (e: Event) => void;
48
+ /**
49
+ * @description: 焦点移除的情况,需要移除下拉框
50
+ * @return {*}
51
+ */
52
+ blur: import("lodash").DebouncedFunc<() => void>;
53
+ /**
54
+ * @description: 移除下拉框
55
+ * @return {*}
56
+ */
57
+ removeDropDownTimeId: import("lodash").DebouncedFunc<() => void>;
58
+ /**
59
+ * @description: 添加 dropdown
60
+ * @return {*}
61
+ */
62
+ setDropdownDisplayBlock: import("lodash").DebouncedFunc<() => void>;
63
+ /**
64
+ * @description: 移除 select dropdown
65
+ * @return {*}
66
+ */
67
+ setDropdownDisplayNone: import("lodash").DebouncedFunc<() => void>;
68
+ /**
69
+ * @description: 设置 popover 位置
70
+ * @param {*} void
71
+ * @return {*}
72
+ */
73
+ placementPosition: () => void;
74
+ /**
75
+ * @description: 鼠标移入
76
+ * @param {Event} e
77
+ * @return {*}
78
+ */
79
+ hoverPopover: (e: Event) => void;
80
+ clickContent: (e: Event) => void;
81
+ clickPopover: (e: Event) => void;
82
+ clickRemovePopover: (e: Event) => void;
83
+ popoverTrigger: () => void;
84
+ hoverRemovePopover: (e: Event) => void;
85
+ changePlacement: import("lodash").DebouncedFunc<() => void>;
86
+ connectedCallback(): void;
87
+ disconnectCallback(): void;
88
+ attributeChangedCallback(n: string, o: string, v: string): void;
89
+ }
90
+ declare const _default: import("@/utils/index").CustomErrorType;
91
+ export default _default;