ranui 0.1.9 → 0.1.10-alpha-24

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 (199) hide show
  1. package/README.zh-CN.md +192 -0
  2. package/dist/assets/image/failImage.d.ts +2 -0
  3. package/dist/button.js +7 -0
  4. package/dist/checkbox.js +7 -0
  5. package/dist/colorpicker.js +11 -0
  6. package/dist/components/button/index.d.ts +8 -5
  7. package/dist/components/checkbox/index.d.ts +30 -0
  8. package/dist/components/colorpicker/index.d.ts +120 -0
  9. package/dist/components/dropdown/index.d.ts +34 -0
  10. package/dist/components/input/index.d.ts +66 -41
  11. package/dist/components/loading/index.d.ts +76 -0
  12. package/dist/components/math/index.d.ts +16 -0
  13. package/dist/components/message/index.d.ts +10 -7
  14. package/dist/components/player/index.d.ts +46 -9
  15. package/dist/components/popover/content/index.d.ts +16 -0
  16. package/dist/components/popover/index.d.ts +91 -0
  17. package/dist/components/preview/constant.d.ts +5 -0
  18. package/dist/components/preview/index.d.ts +1 -4
  19. package/dist/components/preview/pdf.d.ts +51 -1
  20. package/dist/components/preview/types.d.ts +11 -0
  21. package/dist/components/progress/index.d.ts +12 -7
  22. package/dist/components/radar/index.d.ts +1 -1
  23. package/dist/components/scratch/index.d.ts +7 -5
  24. package/dist/components/select/dropdown-item/index.d.ts +23 -0
  25. package/dist/components/select/index.d.ts +22 -13
  26. package/dist/components/select/option/index.d.ts +2 -0
  27. package/dist/components/tab/index.d.ts +80 -64
  28. package/dist/components/tabpane/index.d.ts +73 -57
  29. package/dist/icon.js +6 -0
  30. package/dist/iconShadowless.js +6 -0
  31. package/dist/image.js +4 -0
  32. package/dist/{index-01b17e26.js → index-BEm1a2pr.js} +3 -6
  33. package/dist/{index-e2e5d725.js → index-BSyn-jmY.js} +4734 -2976
  34. package/dist/index-BVD0qcjJ.js +656 -0
  35. package/dist/{index-e03d23e7.js → index-Bb55l8nf.js} +2 -11
  36. package/dist/{index-0d5b9435.js → index-BbW0dxzy.js} +12 -16
  37. package/dist/index-BgUpm4LA.js +103 -0
  38. package/dist/{index-458debf7.js → index-C841uRgZ.js} +16 -51
  39. package/dist/{index-4443363f.js → index-CUZna268.js} +41 -69
  40. package/dist/index-CiA5qRK3.js +381 -0
  41. package/dist/index-CoJMn8Jm.js +511 -0
  42. package/dist/{index-b7790662.js → index-DAxs7Dd2.js} +6 -13
  43. package/dist/index-D_cD4u43.js +70 -0
  44. package/dist/index-DgVgxN1s.js +309 -0
  45. package/dist/index-DghvN1MU.js +710 -0
  46. package/dist/index-DvSe_Ms7.js +494 -0
  47. package/dist/{index-7216d6b0.js → index-W52VzrXL.js} +20 -49
  48. package/dist/index-gBy2cXLV.js +140 -0
  49. package/dist/index-hdtEL8P_.js +101 -0
  50. package/dist/{index-1048a998.js → index-jVKJoKXA.js} +105 -62
  51. package/dist/{index-2d16a084.js → index-ltt3w4zP.js} +13 -23
  52. package/dist/index-n4X6wdwJ.js +156 -0
  53. package/dist/{index-3cf72afd.js → index-s0ioL3L2.js} +23 -45
  54. package/dist/index.d.ts +276 -14
  55. package/dist/index.js +24 -24
  56. package/dist/input.js +7 -0
  57. package/dist/inputShadowless.js +6 -0
  58. package/dist/katex-es-CGqSCDjs.js +14634 -0
  59. package/dist/loading-scene-BMc2wqKm.js +4 -0
  60. package/dist/loading.js +8 -0
  61. package/dist/math.js +7 -0
  62. package/dist/message.js +6 -0
  63. package/dist/modal.js +4 -0
  64. package/dist/more-2vsTDpcc.js +31 -0
  65. package/dist/pdf-Bis_tkvj.js +134 -0
  66. package/dist/player.js +8 -0
  67. package/dist/plus-DgJxWGlo.js +56799 -0
  68. package/dist/popover.js +9 -0
  69. package/dist/preview.js +7 -0
  70. package/dist/progress.js +7 -0
  71. package/dist/radar.js +6 -0
  72. package/dist/ranui.css +1 -0
  73. package/dist/search-BWdfjyP8.js +4 -0
  74. package/dist/select.js +10 -0
  75. package/dist/{index-1b73beee.js → selectShadowless.js} +159 -167
  76. package/dist/{umd/components → shadowless}/icon/index.d.ts +1 -0
  77. package/dist/{umd/components → shadowless}/input/index.d.ts +66 -41
  78. package/dist/{umd/components → shadowless}/select/index.d.ts +19 -16
  79. package/dist/shadowless/select/option/index.d.ts +2 -0
  80. package/dist/shadowless.d.ts +3 -0
  81. package/dist/shadowless.js +8 -0
  82. package/dist/skeleton.js +4 -0
  83. package/dist/sort-DWqiUONr.js +4 -0
  84. package/dist/sprite-CH2zLtZy.js +141 -0
  85. package/dist/tab.js +6 -0
  86. package/dist/tabpane.js +4 -0
  87. package/dist/tsconfig.json +31 -0
  88. package/dist/typings.d.ts +257 -0
  89. package/dist/umd/index.css +1 -0
  90. package/dist/umd/index.umd.cjs +1 -71
  91. package/dist/umd/shadowless/shadowless.css +1 -0
  92. package/dist/umd/shadowless/shadowless.umd.cjs +1 -0
  93. package/dist/utils/color.d.ts +52 -0
  94. package/dist/utils/image.d.ts +8 -1
  95. package/dist/utils/index.d.ts +20 -5
  96. package/dist/utils/math.d.ts +3 -3
  97. package/dist/vite.config.d.ts +1 -0
  98. package/dist/without-content-CdJw7vHM.js +4 -0
  99. package/package.json +115 -64
  100. package/readme.md +41 -57
  101. package/typings.d.ts +257 -0
  102. package/dist/colz-746223ab.js +0 -241
  103. package/dist/components/button/index.js +0 -8
  104. package/dist/components/icon/index.js +0 -6
  105. package/dist/components/image/index.js +0 -4
  106. package/dist/components/input/index.js +0 -6
  107. package/dist/components/message/index.js +0 -4
  108. package/dist/components/modal/index.js +0 -4
  109. package/dist/components/option/index.d.ts +0 -2
  110. package/dist/components/option/index.js +0 -95
  111. package/dist/components/player/index.js +0 -12
  112. package/dist/components/preview/colz.d.ts +0 -72
  113. package/dist/components/preview/docx.d.ts +0 -8
  114. package/dist/components/preview/excel/excel.d.ts +0 -2
  115. package/dist/components/preview/excel/index.d.ts +0 -1
  116. package/dist/components/preview/excel/media.d.ts +0 -37
  117. package/dist/components/preview/index.js +0 -8
  118. package/dist/components/preview/pptx/index.d.ts +0 -16
  119. package/dist/components/preview/pptx/process_pptx.d.ts +0 -23
  120. package/dist/components/preview/pptx/t_xml.d.ts +0 -1
  121. package/dist/components/preview/pptx/worker.d.ts +0 -1
  122. package/dist/components/progress/index.js +0 -8
  123. package/dist/components/radar/index.js +0 -7
  124. package/dist/components/select/index.js +0 -11
  125. package/dist/components/skeleton/index.js +0 -4
  126. package/dist/components/tab/index.js +0 -7
  127. package/dist/components/tabpane/index.js +0 -4
  128. package/dist/docx-c5d02d8c.js +0 -21
  129. package/dist/index-57492b9b.js +0 -48
  130. package/dist/index-73ce455b.js +0 -264
  131. package/dist/index-7913ec46.js +0 -239
  132. package/dist/index-7b8840f9.js +0 -18690
  133. package/dist/index-c14450a9.js +0 -662
  134. package/dist/pdf-bdb7818a.js +0 -113
  135. package/dist/style.css +0 -1
  136. package/dist/umd/build/config.d.ts +0 -3
  137. package/dist/umd/build/config.umd.d.ts +0 -2
  138. package/dist/umd/components/button/index.d.ts +0 -35
  139. package/dist/umd/components/form/index.d.ts +0 -2
  140. package/dist/umd/components/image/index.d.ts +0 -2
  141. package/dist/umd/components/message/index.d.ts +0 -14
  142. package/dist/umd/components/modal/index.d.ts +0 -2
  143. package/dist/umd/components/option/index.d.ts +0 -2
  144. package/dist/umd/components/player/index.d.ts +0 -213
  145. package/dist/umd/components/preview/colz.d.ts +0 -72
  146. package/dist/umd/components/preview/docx.d.ts +0 -8
  147. package/dist/umd/components/preview/excel/excel.d.ts +0 -2
  148. package/dist/umd/components/preview/excel/index.d.ts +0 -1
  149. package/dist/umd/components/preview/excel/media.d.ts +0 -37
  150. package/dist/umd/components/preview/index.d.ts +0 -6
  151. package/dist/umd/components/preview/pdf.d.ts +0 -1
  152. package/dist/umd/components/preview/pptx/index.d.ts +0 -16
  153. package/dist/umd/components/preview/pptx/process_pptx.d.ts +0 -23
  154. package/dist/umd/components/preview/pptx/t_xml.d.ts +0 -1
  155. package/dist/umd/components/preview/pptx/worker.d.ts +0 -1
  156. package/dist/umd/components/progress/index.d.ts +0 -36
  157. package/dist/umd/components/radar/index.d.ts +0 -2
  158. package/dist/umd/components/scratch/index.d.ts +0 -19
  159. package/dist/umd/components/skeleton/index.d.ts +0 -2
  160. package/dist/umd/components/tab/index.d.ts +0 -408
  161. package/dist/umd/components/tabpane/index.d.ts +0 -352
  162. package/dist/umd/index.d.ts +0 -14
  163. package/dist/umd/playwright.config.d.ts +0 -9
  164. package/dist/umd/plugins/auto-import-file.d.ts +0 -0
  165. package/dist/umd/plugins/load-style.d.ts +0 -6
  166. package/dist/umd/plugins/load-svg.d.ts +0 -9
  167. package/dist/umd/style.css +0 -1
  168. package/dist/umd/tests/button.spec.d.ts +0 -1
  169. package/dist/umd/utils/image.d.ts +0 -32
  170. package/dist/umd/utils/index.d.ts +0 -64
  171. package/dist/umd/utils/math.d.ts +0 -26
  172. package/dist/umd/utils/tween.d.ts +0 -21
  173. package/dist/umd/vite.config.d.ts +0 -6
  174. package/dist/vendor-f71e6f68.js +0 -92126
  175. /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
  176. /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +0 -0
  177. /package/dist/{umd/build/config.es.d.ts → build/config.sha.d.ts} +0 -0
  178. /package/dist/{check-circle-fill-dc284144.js → check-circle-fill-B_pd8ZSs.js} +0 -0
  179. /package/dist/{check-circle-74bd09c3.js → check-circle-szyAJiap.js} +0 -0
  180. /package/dist/{close-20925345.js → close-CFnkhudp.js} +0 -0
  181. /package/dist/{close-circle-720c18be.js → close-circle-CwmuN2C6.js} +0 -0
  182. /package/dist/{close-circle-fill-238a66b1.js → close-circle-fill-jSqPPw9i.js} +0 -0
  183. /package/dist/{eye-5e742329.js → eye-D_mEt17f.js} +0 -0
  184. /package/dist/{eye-close-3874f1ae.js → eye-close-BVr3NJtg.js} +0 -0
  185. /package/dist/{home-c4a05e8b.js → home-BUQ4USMk.js} +0 -0
  186. /package/dist/{index-8e1e2573.js → index-CQTJoWhb.js} +0 -0
  187. /package/dist/{info-circle-5826decc.js → info-circle-COnL5bTJ.js} +0 -0
  188. /package/dist/{info-circle-fill-90ec9aa9.js → info-circle-fill-DjI8gXS3.js} +0 -0
  189. /package/dist/{loading-09ca52df.js → loading-Dcc5RApI.js} +0 -0
  190. /package/dist/{lock-1d2487c9.js → lock-Cr7BnmWN.js} +0 -0
  191. /package/dist/{message-b2bfdea7.js → message-D36_Zo2l.js} +0 -0
  192. /package/dist/{power-off-6ade5a91.js → power-off-lQRbiBak.js} +0 -0
  193. /package/dist/{preview-b291aea8.js → preview-CJbz9GjO.js} +0 -0
  194. /package/dist/{setting-1e5ccb6d.js → setting-DemlgzVC.js} +0 -0
  195. /package/dist/{team-ca6a12e1.js → team-tl4NJXPC.js} +0 -0
  196. /package/dist/{unlock-f56086fd.js → unlock-CeU74z9n.js} +0 -0
  197. /package/dist/{user-5c01e665.js → user-B-eVXwuk.js} +0 -0
  198. /package/dist/{warning-circle-035e025c.js → warning-circle-DDUgEDIv.js} +0 -0
  199. /package/dist/{warning-circle-fill-d17c37c9.js → warning-circle-fill-lODUKz0i.js} +0 -0
@@ -1,4 +1,9 @@
1
- export declare class Input extends HTMLElement {
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 {
2
7
  static get observedAttributes(): string[];
3
8
  _input: HTMLDivElement;
4
9
  _label: HTMLLabelElement | undefined;
@@ -6,168 +11,188 @@ export declare class Input extends HTMLElement {
6
11
  _icon: HTMLElement | undefined;
7
12
  constructor();
8
13
  /**
9
- * @description: 获取input的值
14
+ * @description: 获取 input 的值
10
15
  * @return {String}
11
16
  */
12
- get value(): string | null;
17
+ get value(): string;
13
18
  /**
14
- * @description: 设置input的值
19
+ * @description: 设置 input 的值
15
20
  * @param {String} value
16
21
  */
17
22
  set value(value: string);
18
23
  /**
19
- * @description: 获取input的占位字符
24
+ * @description: 获取 input 的占位字符
20
25
  * @return {String}
21
26
  */
22
- get placeholder(): string | null;
27
+ get placeholder(): string;
23
28
  /**
24
- * @description: 设置input的占位字符
29
+ * @description: 设置 input 的占位字符
25
30
  * @param {String} value
26
31
  */
27
32
  set placeholder(value: string);
28
33
  /**
29
- * @description: input是否为必选
34
+ * @description: input 是否为必选
30
35
  * @return {String}
31
36
  */
32
- get required(): string | null;
37
+ get required(): string;
33
38
  /**
34
- * @description: 设置input是否为必选,除非设置成false,否则都是必填
39
+ * @description: 设置 input 是否为必选,除非设置成 false,否则都是必填
35
40
  * @param {*} value
36
41
  */
37
42
  set required(value: string);
38
43
  /**
39
- * @description: 获取input上disabled属性
44
+ * @description: 获取 input disabled 属性
40
45
  * @return {String | null}
41
46
  */
42
- get disabled(): boolean;
47
+ get disabled(): string;
43
48
  /**
44
- * @description: 设置input的disabled属性
49
+ * @description: 设置 input disabled 属性
45
50
  * @param {String} value
46
51
  */
47
52
  set disabled(value: string);
48
53
  /**
49
- * @description: 获取类似于Metiral Design的输入体验。
54
+ * @description: 获取类似于 Metiral Design 的输入体验。
50
55
  */
51
56
  get label(): string;
52
57
  /**
53
- * @description: 设置类似于Metiral Design的输入体验。
58
+ * @description: 设置类似于 Metiral Design 的输入体验。
54
59
  */
55
60
  set label(value: string);
56
61
  /**
57
- * @description: 获取input框的状态
62
+ * @description: 获取 input 框的状态
58
63
  */
59
64
  get status(): string;
60
65
  /**
61
- * @description: 设置input框的状态
66
+ * @description: 设置 input 框的状态
62
67
  */
63
68
  set status(value: string);
64
69
  /**
65
- * @description: 与form组件联动时,收集的属性名
70
+ * @description: 与 form 组件联动时,收集的属性名
66
71
  * @return {String}
67
72
  */
68
73
  get name(): string;
69
74
  /**
70
- * @description: 设置name属性
75
+ * @description: 设置 name 属性
71
76
  * @param {string} value
72
77
  */
73
78
  set name(value: string);
74
79
  /**
75
- * @description: 当input类型为number类型时,可以获取min属性
80
+ * @description: 当 input 类型为 number 类型时,可以获取 min 属性
76
81
  * @return {String}
77
82
  */
78
83
  get min(): string;
79
84
  /**
80
- * @description: 当input类型为number类型时,设置min属性
85
+ * @description: 当 input 类型为 number 类型时,设置 min 属性
81
86
  * @param {string} value
82
87
  */
83
88
  set min(value: string);
84
89
  /**
85
- * @description: 当input类型为number类型时,可以获取max属性
90
+ * @description: 当 input 类型为 number 类型时,可以获取 max 属性
86
91
  * @return {String}
87
92
  */
88
93
  get max(): string;
89
94
  /**
90
- * @description: 当input类型为number类型时,设置max属性
95
+ * @description: 当 input 类型为 number 类型时,设置 max 属性
91
96
  * @param {string} value
92
97
  */
93
98
  set max(value: string);
94
99
  /**
95
- * @description: 当input类型为number类型时,可以获取step属性
100
+ * @description: 当 input 类型为 number 类型时,可以获取 step 属性
96
101
  * @return {String}
97
102
  */
98
103
  get step(): string;
99
104
  /**
100
- * @description: 当input类型为number类型时,设置step属性
105
+ * @description: 当 input 类型为 number 类型时,设置 step 属性
101
106
  * @param {string} value
102
107
  */
103
108
  set step(value: string);
104
109
  /**
105
- * @description: 获取一个icon
110
+ * @description: 获取一个 icon
106
111
  * @return {String}
107
112
  */
108
- get icon(): string | null;
113
+ get icon(): string;
109
114
  /**
110
- * @description: 设置icon来表示标识
115
+ * @description: 设置 icon 来表示标识
111
116
  * @param {string|null} value
112
117
  */
113
118
  set icon(value: string);
114
119
  /**
115
- * @description: 获取input的类型
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 的类型
116
141
  * @return {string|null}
117
142
  */
118
- get type(): string | null;
143
+ get type(): string;
119
144
  /**
120
- * @description: 设置input的类型
145
+ * @description: 设置 input 的类型
121
146
  * @param {string|null} value
122
147
  */
123
148
  set type(value: string);
124
149
  /**
125
- * @description: 原生的input方法
150
+ * @description: 原生的 input 方法
126
151
  * @param {Event} event
127
152
  */
128
153
  customInput: (event: Event) => void;
129
154
  /**
130
- * @description: 增加change方法,同时兼容大小写的情况
155
+ * @description: 增加 change 方法,同时兼容大小写的情况
131
156
  */
132
157
  customChange: () => void;
133
158
  /**
134
- * @description: 监听placeholder属性函数
159
+ * @description: 监听 placeholder 属性函数
135
160
  * @param {string} name
136
161
  * @param {string} value
137
162
  */
138
163
  listenPlaceholder: (name: string, value: string) => void;
139
164
  /**
140
- * @description: 监听label属性函数
165
+ * @description: 监听 label 属性函数
141
166
  * @param {string} name
142
167
  * @param {string} value
143
168
  */
144
169
  listenLabel: (name: string, value: string) => void;
145
170
  /**
146
- * @description: 监听type属性
171
+ * @description: 监听 type 属性
147
172
  * @param {string} name
148
173
  * @param {string} value
149
174
  */
150
175
  listenType: (name: string, value: string) => void;
151
176
  /**
152
- * @description: 监听status属性
177
+ * @description: 监听 status 属性
153
178
  * @param {string} name
154
179
  * @param {string} value
155
180
  */
156
181
  listenStatus: (name: string, value: string) => void;
157
182
  /**
158
- * @description: 监听disabled属性
183
+ * @description: 监听 disabled 属性
159
184
  * @param {string} name
160
185
  * @param {string} value
161
186
  */
162
187
  listenDisabled: (name: string, value: string) => void;
163
188
  /**
164
- * @description: 监听icon属性
189
+ * @description: 监听 icon 属性
165
190
  * @param {string} name
166
191
  * @param {string} value
167
192
  */
168
193
  listenIcon: (name: string, value: string, oldValue: string) => void;
169
194
  /**
170
- * @description: 处理icon属性的问题
195
+ * @description: 处理 icon 属性的问题
171
196
  */
172
197
  dealIcon: () => void;
173
198
  /**
@@ -181,5 +206,5 @@ export declare class Input extends HTMLElement {
181
206
  disconnectCallback(): void;
182
207
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
183
208
  }
184
- declare const _default: import('../../utils/index').CustomErrorType;
209
+ declare const _default: import("@/utils/index").CustomErrorType;
185
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: HTMLElement;
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;
@@ -1,14 +1,17 @@
1
+ import '@/components/icon';
1
2
  declare const message: {
2
3
  info: (options: Ran.Prompt | string | undefined | null) => void;
3
4
  success: (options: Ran.Prompt | string | undefined | null) => void;
4
5
  error: (options: Ran.Prompt | string | undefined | null) => void;
5
6
  warning: (options: Ran.Prompt | string | undefined | null) => void;
6
7
  toast: (options: Ran.Prompt | string | undefined | null) => void;
7
- } | {
8
- info?: undefined;
9
- success?: undefined;
10
- error?: undefined;
11
- warning?: undefined;
12
- toast?: undefined;
13
- };
8
+ } | null;
9
+ declare global {
10
+ interface Window {
11
+ message: Ran.Message;
12
+ ranui: {
13
+ message?: Ran.Message;
14
+ };
15
+ }
16
+ }
14
17
  export default message;
@@ -1,6 +1,24 @@
1
- /// <reference types="node" />
2
- import { SyncHook } from 'ranuts';
3
- import type { Progress } from '../progress';
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
+ }
4
22
  export interface HlsPlayer {
5
23
  startLoad(): () => void;
6
24
  off: (s: string, f: Function) => void;
@@ -31,7 +49,24 @@ export interface Context {
31
49
  levelMap: Map<string, string>;
32
50
  clarity: string;
33
51
  }
34
- export declare class RanPlayer extends HTMLElement {
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 {
35
70
  ctx: Context;
36
71
  _player: HTMLDivElement;
37
72
  _container: HTMLDivElement;
@@ -70,12 +105,14 @@ export declare class RanPlayer extends HTMLElement {
70
105
  _hls?: HlsPlayer;
71
106
  static get observedAttributes(): string[];
72
107
  /**
73
- * @description: 初始化view和video的全局上下文
108
+ * @description: 初始化 view video 的全局上下文
74
109
  * @return {*}
75
110
  */
76
111
  constructor();
77
112
  get src(): string;
78
113
  set src(value: string);
114
+ get debug(): string;
115
+ set debug(value: string);
79
116
  get volume(): string;
80
117
  set volume(value: string);
81
118
  get currentTime(): string;
@@ -94,6 +131,7 @@ export declare class RanPlayer extends HTMLElement {
94
131
  * @return {*}
95
132
  */
96
133
  updatePlayer: () => void;
134
+ hlsError: (event: unknown, data: unknown) => void;
97
135
  change: (name: string, value: unknown) => void;
98
136
  onCanplay: (e: Event) => void;
99
137
  onCanplaythrough: (e: Event) => void;
@@ -135,7 +173,7 @@ export declare class RanPlayer extends HTMLElement {
135
173
  * @param {MouseEvent} e
136
174
  * @return {*}
137
175
  */
138
- progressDotMouseDown: (e: MouseEvent) => void;
176
+ progressDotMouseDown: () => void;
139
177
  /**
140
178
  * @description: 进度条鼠标移动事件
141
179
  * @param {MouseEvent} e
@@ -180,13 +218,13 @@ export declare class RanPlayer extends HTMLElement {
180
218
  */
181
219
  SpaceKeyDown: (e: KeyboardEvent) => void;
182
220
  /**
183
- * @description: 点击player-btn,触发的事件
221
+ * @description: 点击 player-btn,触发的事件
184
222
  * @param {*} void
185
223
  * @return {*}
186
224
  */
187
225
  dispatchClickPlayerBtnAction: (e: Event) => void;
188
226
  changeVolumeProgress: (e: Event) => void;
189
- customRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
227
+ customRequestFullscreen: () => Promise<void>;
190
228
  customExitFullscreen: () => Promise<void>;
191
229
  openFullScreen: () => void;
192
230
  changeSpeed: (e: Event) => void;
@@ -207,7 +245,6 @@ export declare class RanPlayer extends HTMLElement {
207
245
  pause: () => void;
208
246
  connectedCallback(): void;
209
247
  disconnectCallback(): void;
210
- attributeChangedCallback(k: string, o: string, n: string): void;
211
248
  }
212
249
  declare const _default: typeof RanPlayer | undefined;
213
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: HTMLElement;
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: any;
53
+ /**
54
+ * @description: 移除下拉框
55
+ * @return {*}
56
+ */
57
+ removeDropDownTimeId: any;
58
+ /**
59
+ * @description: 添加 dropdown
60
+ * @return {*}
61
+ */
62
+ setDropdownDisplayBlock: any;
63
+ /**
64
+ * @description: 移除 select dropdown
65
+ * @return {*}
66
+ */
67
+ setDropdownDisplayNone: any;
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: any;
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;
@@ -0,0 +1,5 @@
1
+ export declare const PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
2
+ export declare const PDF = "application/pdf";
3
+ export declare const DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
4
+ export declare const XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
5
+ export declare const XLS = "application/vnd.ms-excel";
@@ -1,6 +1,3 @@
1
- export interface BaseReturn {
2
- success: boolean;
3
- message?: string;
4
- }
1
+ import '@/components/icon';
5
2
  declare const _default: Promise<void>;
6
3
  export default _default;
@@ -1 +1,51 @@
1
- export declare const renderPdf: (file: File, dom?: HTMLElement) => Promise<void>;
1
+ import type { BaseReturn, RenderOptions } from '@/components/preview/types';
2
+ export interface Viewport {
3
+ width: number;
4
+ height: number;
5
+ viewBox: Array<number>;
6
+ }
7
+ export interface RenderContext {
8
+ canvasContext: CanvasRenderingContext2D | null;
9
+ transform: Array<number>;
10
+ viewport: Viewport;
11
+ }
12
+ export interface PDFPageProxy {
13
+ pageNumber: number;
14
+ getViewport: ({ scale }: {
15
+ scale: number;
16
+ }) => Viewport;
17
+ render: (options: RenderContext) => void;
18
+ }
19
+ export interface PDFDocumentProxy {
20
+ numPages: number;
21
+ getPage: (x: number) => Promise<PDFPageProxy>;
22
+ }
23
+ declare global {
24
+ interface Window {
25
+ pdfjsLib: {
26
+ GlobalWorkerOptions: {
27
+ workerSrc: string;
28
+ };
29
+ getDocument: (x: string | ArrayBuffer) => {
30
+ promise: Promise<PDFDocumentProxy>;
31
+ };
32
+ };
33
+ }
34
+ }
35
+ export declare class PdfPreview {
36
+ private pdfDoc;
37
+ pageNumber: number;
38
+ total: number;
39
+ dom: HTMLElement;
40
+ pdf: string | ArrayBuffer;
41
+ onError: ((msg: BaseReturn) => void) | undefined;
42
+ onLoad: ((msg: BaseReturn) => void) | undefined;
43
+ constructor(pdf: string | ArrayBuffer, options: RenderOptions);
44
+ private getPdfPage;
45
+ pdfPreview: () => Promise<BaseReturn>;
46
+ showTotalPage: () => Promise<void>;
47
+ changePage: (num: number) => number;
48
+ prevPage: () => Promise<number>;
49
+ nextPage: () => Promise<number>;
50
+ }
51
+ export declare const renderPdf: (file: File, options: RenderOptions) => Promise<void>;
@@ -0,0 +1,11 @@
1
+ export interface BaseReturn<T = unknown> {
2
+ success: boolean;
3
+ data?: T;
4
+ message?: string;
5
+ }
6
+ export interface RenderOptions {
7
+ dom?: HTMLElement;
8
+ onError?: (msg?: BaseReturn) => void;
9
+ onLoad?: (msg?: BaseReturn) => void;
10
+ iframe?: HTMLIFrameElement;
11
+ }