ranui 0.1.8 → 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 (201) 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 +37 -1
  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 +209 -1
  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 +218 -492
  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 +21 -0
  24. package/dist/components/select/dropdown-item/index.d.ts +23 -0
  25. package/dist/components/select/index.d.ts +25 -12
  26. package/dist/components/select/option/index.d.ts +2 -0
  27. package/dist/components/tab/index.d.ts +80 -59
  28. package/dist/components/tabpane/index.d.ts +73 -52
  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-aea75a9f.js → index-BEm1a2pr.js} +3 -6
  33. package/dist/{index-b2be6bef.js → index-BSyn-jmY.js} +5492 -3716
  34. package/dist/index-BVD0qcjJ.js +656 -0
  35. package/dist/{index-b90299ca.js → index-Bb55l8nf.js} +2 -11
  36. package/dist/{index-48653b79.js → index-BbW0dxzy.js} +12 -16
  37. package/dist/index-BgUpm4LA.js +103 -0
  38. package/dist/{index-a1a53af6.js → index-C841uRgZ.js} +16 -51
  39. package/dist/{index-a43b144f.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-5975bbc0.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-7f513a14.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-jVKJoKXA.js +490 -0
  51. package/dist/index-ltt3w4zP.js +187 -0
  52. package/dist/index-n4X6wdwJ.js +156 -0
  53. package/dist/{index-0e7229ea.js → index-s0ioL3L2.js} +23 -43
  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-f6d6982d.js → selectShadowless.js} +203 -159
  76. package/dist/{umd/components/form → shadowless/icon}/index.d.ts +1 -0
  77. package/dist/shadowless/input/index.d.ts +210 -0
  78. package/dist/{umd/components → shadowless}/select/index.d.ts +22 -15
  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 -67
  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 -7
  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 -5
  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 -11
  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-183517e7.js +0 -265
  130. package/dist/index-4d873a42.js +0 -195
  131. package/dist/index-57492b9b.js +0 -48
  132. package/dist/index-7b8840f9.js +0 -18690
  133. package/dist/index-a216f328.js +0 -662
  134. package/dist/index-d2d69b06.js +0 -225
  135. package/dist/index-ecaed5cc.js +0 -439
  136. package/dist/pdf-bdb7818a.js +0 -113
  137. package/dist/style.css +0 -1
  138. package/dist/umd/build/config.d.ts +0 -3
  139. package/dist/umd/build/config.umd.d.ts +0 -2
  140. package/dist/umd/components/button/index.d.ts +0 -2
  141. package/dist/umd/components/icon/index.d.ts +0 -2
  142. package/dist/umd/components/image/index.d.ts +0 -2
  143. package/dist/umd/components/input/index.d.ts +0 -2
  144. package/dist/umd/components/message/index.d.ts +0 -14
  145. package/dist/umd/components/modal/index.d.ts +0 -2
  146. package/dist/umd/components/option/index.d.ts +0 -2
  147. package/dist/umd/components/player/index.d.ts +0 -524
  148. package/dist/umd/components/preview/colz.d.ts +0 -72
  149. package/dist/umd/components/preview/docx.d.ts +0 -8
  150. package/dist/umd/components/preview/excel/excel.d.ts +0 -2
  151. package/dist/umd/components/preview/excel/index.d.ts +0 -1
  152. package/dist/umd/components/preview/excel/media.d.ts +0 -37
  153. package/dist/umd/components/preview/index.d.ts +0 -6
  154. package/dist/umd/components/preview/pdf.d.ts +0 -1
  155. package/dist/umd/components/preview/pptx/index.d.ts +0 -16
  156. package/dist/umd/components/preview/pptx/process_pptx.d.ts +0 -23
  157. package/dist/umd/components/preview/pptx/t_xml.d.ts +0 -1
  158. package/dist/umd/components/preview/pptx/worker.d.ts +0 -1
  159. package/dist/umd/components/progress/index.d.ts +0 -36
  160. package/dist/umd/components/radar/index.d.ts +0 -2
  161. package/dist/umd/components/skeleton/index.d.ts +0 -2
  162. package/dist/umd/components/tab/index.d.ts +0 -403
  163. package/dist/umd/components/tabpane/index.d.ts +0 -347
  164. package/dist/umd/index.d.ts +0 -14
  165. package/dist/umd/playwright.config.d.ts +0 -9
  166. package/dist/umd/plugins/auto-import-file.d.ts +0 -0
  167. package/dist/umd/plugins/load-style.d.ts +0 -6
  168. package/dist/umd/plugins/load-svg.d.ts +0 -9
  169. package/dist/umd/style.css +0 -1
  170. package/dist/umd/tests/button.spec.d.ts +0 -1
  171. package/dist/umd/utils/image.d.ts +0 -32
  172. package/dist/umd/utils/index.d.ts +0 -64
  173. package/dist/umd/utils/math.d.ts +0 -26
  174. package/dist/umd/utils/tween.d.ts +0 -21
  175. package/dist/umd/vite.config.d.ts +0 -6
  176. package/dist/vendor-f71e6f68.js +0 -92126
  177. /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
  178. /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +0 -0
  179. /package/dist/{umd/build/config.es.d.ts → build/config.sha.d.ts} +0 -0
  180. /package/dist/{check-circle-fill-dc284144.js → check-circle-fill-B_pd8ZSs.js} +0 -0
  181. /package/dist/{check-circle-74bd09c3.js → check-circle-szyAJiap.js} +0 -0
  182. /package/dist/{close-20925345.js → close-CFnkhudp.js} +0 -0
  183. /package/dist/{close-circle-720c18be.js → close-circle-CwmuN2C6.js} +0 -0
  184. /package/dist/{close-circle-fill-238a66b1.js → close-circle-fill-jSqPPw9i.js} +0 -0
  185. /package/dist/{eye-5e742329.js → eye-D_mEt17f.js} +0 -0
  186. /package/dist/{eye-close-3874f1ae.js → eye-close-BVr3NJtg.js} +0 -0
  187. /package/dist/{home-c4a05e8b.js → home-BUQ4USMk.js} +0 -0
  188. /package/dist/{index-8e1e2573.js → index-CQTJoWhb.js} +0 -0
  189. /package/dist/{info-circle-5826decc.js → info-circle-COnL5bTJ.js} +0 -0
  190. /package/dist/{info-circle-fill-90ec9aa9.js → info-circle-fill-DjI8gXS3.js} +0 -0
  191. /package/dist/{loading-09ca52df.js → loading-Dcc5RApI.js} +0 -0
  192. /package/dist/{lock-1d2487c9.js → lock-Cr7BnmWN.js} +0 -0
  193. /package/dist/{message-b2bfdea7.js → message-D36_Zo2l.js} +0 -0
  194. /package/dist/{power-off-6ade5a91.js → power-off-lQRbiBak.js} +0 -0
  195. /package/dist/{preview-b291aea8.js → preview-CJbz9GjO.js} +0 -0
  196. /package/dist/{setting-1e5ccb6d.js → setting-DemlgzVC.js} +0 -0
  197. /package/dist/{team-ca6a12e1.js → team-tl4NJXPC.js} +0 -0
  198. /package/dist/{unlock-f56086fd.js → unlock-CeU74z9n.js} +0 -0
  199. /package/dist/{user-5c01e665.js → user-B-eVXwuk.js} +0 -0
  200. /package/dist/{warning-circle-035e025c.js → warning-circle-DDUgEDIv.js} +0 -0
  201. /package/dist/{warning-circle-fill-d17c37c9.js → warning-circle-fill-lODUKz0i.js} +0 -0
@@ -0,0 +1,257 @@
1
+ declare module '*.less';
2
+ declare module '*.less?inline';
3
+ declare module '*.ts';
4
+ declare module '*.svg';
5
+ declare module 'docx-preview';
6
+ declare module 'exceljs/*';
7
+ declare module '@/assets/*';
8
+ declare module '@/public/*';
9
+ declare module '@/components/*';
10
+ declare module '@/plugins/*';
11
+
12
+ declare namespace Ran {
13
+ interface Prompt {
14
+ content: string;
15
+ duration?: number;
16
+ close?: () => void;
17
+ }
18
+
19
+ type Hint = (options: Prompt | string | undefined | null) => void;
20
+
21
+ interface Message {
22
+ info: Hint;
23
+ success: Hint;
24
+ error: Hint;
25
+ warning: Hint;
26
+ toast: Hint;
27
+ }
28
+ }
29
+
30
+ interface Ranui {
31
+ message: Partial<Ran.Message>;
32
+ }
33
+
34
+ interface HlsPlayer {
35
+ off: (s: string, f: Function) => void;
36
+ on: (s: string, f: Function) => void;
37
+ loadSource: (s: string) => void;
38
+ attachMedia: (v: HTMLVideoElement) => void;
39
+ destroy: () => void;
40
+ startLoad(): () => void;
41
+ }
42
+
43
+ interface Hls {
44
+ Events: {
45
+ MANIFEST_LOADED: 'hlsManifestLoaded';
46
+ ERROR: 'error';
47
+ };
48
+ isSupported: () => boolean;
49
+ }
50
+
51
+ type HLS = Hls & (new () => HlsPlayer);
52
+
53
+ interface Viewport {
54
+ width: number;
55
+ height: number;
56
+ viewBox: Array<number>;
57
+ }
58
+ interface RenderContext {
59
+ canvasContext: CanvasRenderingContext2D | null;
60
+ transform: Array<number>;
61
+ viewport: Viewport;
62
+ }
63
+
64
+ interface PDFPageProxy {
65
+ pageNumber: number;
66
+ getViewport: () => Viewport;
67
+ render: (options: RenderContext) => void;
68
+ }
69
+
70
+ interface PDFDocumentProxy {
71
+ numPages: number;
72
+ getPage: (x: number) => Promise<PDFPageProxy>;
73
+ }
74
+
75
+ interface HTMLElement {
76
+ mozRequestFullScreen: (options?: FullscreenOptions) => Promise<void>;
77
+ msRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
78
+ oRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
79
+ webkitRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
80
+ webkitEnterFullscreen: (options?: FullscreenOptions) => Promise<void>;
81
+ }
82
+ declare interface Document {
83
+ msExitFullscreen: () => Promise<void>;
84
+ mozCancelFullScreen: () => Promise<void>;
85
+ oCancelFullScreen: () => Promise<void>;
86
+ webkitExitFullscreen: () => Promise<void>;
87
+ }
88
+
89
+ interface MathJax {
90
+ texReset: () => void;
91
+ getMetricsFor: (x: HTMLElement) => object;
92
+ tex2chtmlPromise: (x: string, y: object) => Promise<Element>;
93
+ }
94
+
95
+ declare global {
96
+ interface Window {
97
+ ranui: Partial<Ranui>;
98
+ message: Partial<Ran.Message>;
99
+ MathJax: MathJax;
100
+ katex: {
101
+ render: (x: string, y: HTMLElement, z: object) => void;
102
+ };
103
+ pdfjsLib: {
104
+ GlobalWorkerOptions: {
105
+ workerSrc: string;
106
+ };
107
+ getDocument: (x: string | ArrayBuffer) => {
108
+ promise: Promise<PDFDocumentProxy>;
109
+ };
110
+ };
111
+ }
112
+ }
113
+
114
+ enum ICON_NAME_AMP {
115
+ DOUBLE_BOUNCE = 'double-bounce',
116
+ ROTATE = 'rotate',
117
+ STRETCH = 'stretch',
118
+ CUBE = 'cube',
119
+ DOT = 'dot',
120
+ TRIPLE_BOUNCE = 'triple-bounce',
121
+ SCALE_OUT = 'scale-out',
122
+ CIRCLE = 'circle',
123
+ CIRCLE_LINE = 'circle-line',
124
+ SQUARE = 'square',
125
+ PULSE = 'pulse',
126
+ SOLAR = 'solar',
127
+ CUBE_FOLD = 'cube-fold',
128
+ CIRCLE_FOLD = 'circle-fold',
129
+ CUBE_GRID = 'cube-grid',
130
+ CIRCLE_TURN = 'circle-turn',
131
+ CIRCLE_ROTATE = 'circle-rotate',
132
+ CIRCLE_SPIN = 'circle-spin',
133
+ DOT_BAR = 'dot-bar',
134
+ DOT_CIRCLE = 'dot-circle',
135
+ LINE = 'line',
136
+ DOT_PULSE = 'dot-pulse',
137
+ LINE_SCALE = 'line-scale',
138
+ TEXT = 'text',
139
+ CUBE_DIM = 'cube-dim',
140
+ DOT_LINE = 'dot-line',
141
+ ARC = 'arc',
142
+ DROP = 'drop',
143
+ PACMAN = 'pacman',
144
+ }
145
+ interface BaseIntrinsicElements {
146
+ 'r-loading': any & {
147
+ name: ICON_NAME_AMP;
148
+ };
149
+ 'r-math': any & {
150
+ latex: string;
151
+ };
152
+ 'r-button': any & {
153
+ sheet: string;
154
+ disabled: boolean | string;
155
+ iconSize: string;
156
+ icon: string;
157
+ effect: boolean | string;
158
+ };
159
+ 'r-checkbox': any & {
160
+ disabled: boolean | string;
161
+ checked: boolean | string;
162
+ };
163
+ 'r-img': any & {
164
+ fallback: string;
165
+ src: string;
166
+ };
167
+ 'r-input': any & {
168
+ value: string;
169
+ placeholder: string;
170
+ label: string;
171
+ status: string;
172
+ name: string;
173
+ icon: string;
174
+ prefix: string;
175
+ suffix: string;
176
+ type: string;
177
+ required: boolean | string;
178
+ disabled: boolean | string;
179
+ min: number | string;
180
+ max: number | string;
181
+ step: number | string;
182
+ };
183
+ 'r-player': any & {
184
+ src: string;
185
+ debug: boolean | string;
186
+ volume: number | string;
187
+ currentTime: number | string;
188
+ playbackRate: number | string;
189
+ };
190
+ 'r-popover': any & {
191
+ placement: string;
192
+ trigger: string;
193
+ getPopupContainerId: string;
194
+ arrow: boolean | string;
195
+ closePopover: () => void;
196
+ };
197
+ 'r-content': any;
198
+ 'r-preview': any & {
199
+ src: string;
200
+ closeable: boolean | string;
201
+ };
202
+ 'r-progress': any & {
203
+ percent: number | string;
204
+ total: number | string;
205
+ type: string;
206
+ animation: string;
207
+ dot: boolean | string;
208
+ };
209
+ 'r-radar': any & {
210
+ abilitys: string;
211
+ colorPolygon?: string;
212
+ colorLine?: string;
213
+ fillColor?: string;
214
+ strokeColor?: string;
215
+ };
216
+ 'r-select': any & {
217
+ value: string;
218
+ defaultValue?: string;
219
+ showSearch?: boolean | string;
220
+ type?: string;
221
+ placement?: string;
222
+ sheet?: string;
223
+ getPopupContainerId?: string;
224
+ dropdownclass?: string;
225
+ trigger?: string;
226
+ disabled?: boolean | string;
227
+ };
228
+ 'r-skeleton': any;
229
+ 'r-tab': any & {
230
+ label: string;
231
+ icon: string;
232
+ iconSize: string;
233
+ key: string;
234
+ disabled: boolean | string;
235
+ effect: boolean | string;
236
+ };
237
+ 'r-tabs': any & {
238
+ align: string;
239
+ type: string;
240
+ active: string;
241
+ effect: string;
242
+ };
243
+ 'r-icon': any & {
244
+ name?: string;
245
+ size?: string;
246
+ color?: string;
247
+ };
248
+ }
249
+ namespace JSX {
250
+ interface IntrinsicElements extends BaseIntrinsicElements {}
251
+ }
252
+
253
+ namespace React {
254
+ namespace JSX {
255
+ interface IntrinsicElements extends BaseIntrinsicElements {}
256
+ }
257
+ }