ranui 0.1.9 → 0.1.10-alpha.10

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 (198) hide show
  1. package/README.zh-CN.md +190 -0
  2. package/dist/_commonjs-dynamic-modules-DLbDWi6a.js +12 -0
  3. package/dist/arrow-down-B_hCY3Wt.js +662 -0
  4. package/dist/button.js +7 -0
  5. package/dist/checkbox.js +7 -0
  6. package/dist/colorpicker.js +11 -0
  7. package/dist/{colz-746223ab.js → colz-DJZvo_8B.js} +4 -13
  8. package/dist/docx-CHkPTdGU.js +3665 -0
  9. package/dist/drop-4j4abxje.js +36 -0
  10. package/dist/icon.js +6 -0
  11. package/dist/iconShadowless.js +6 -0
  12. package/dist/image.js +4 -0
  13. package/dist/{index-4443363f.js → index-15M0olqa.js} +40 -68
  14. package/dist/index-1v568_nq.js +140 -0
  15. package/dist/index-B897keW5.js +279 -0
  16. package/dist/{index-e03d23e7.js → index-BZR0HaP2.js} +2 -5
  17. package/dist/{index-e2e5d725.js → index-B_GuEcTd.js} +1280 -2146
  18. package/dist/index-Bc2Bcl8D.js +63701 -0
  19. package/dist/index-C4Sv0T51.js +495 -0
  20. package/dist/{index-2d16a084.js → index-C6RcMHoH.js} +12 -22
  21. package/dist/index-C9z10IgG.js +103 -0
  22. package/dist/{index-3cf72afd.js → index-CFjEuvBW.js} +23 -45
  23. package/dist/{index-7b8840f9.js → index-CGEx9VOA.js} +1086 -2670
  24. package/dist/index-CGYfjKUV.js +72 -0
  25. package/dist/index-CVtBLEpV.js +712 -0
  26. package/dist/index-CiWwvEMM.js +511 -0
  27. package/dist/index-CtVOgBDk.js +659 -0
  28. package/dist/index-D4qUro5V.js +279 -0
  29. package/dist/index-D4y9c1Dj.js +310 -0
  30. package/dist/{index-b7790662.js → index-DAxs7Dd2.js} +6 -13
  31. package/dist/index-DC5EA657.js +91 -0
  32. package/dist/index-DJZmDHz-.js +146 -0
  33. package/dist/{index-0d5b9435.js → index-D_CA5VDZ.js} +11 -15
  34. package/dist/{index-01b17e26.js → index-KS2nvVcO.js} +2 -5
  35. package/dist/{index-1048a998.js → index-WfFw4LJT.js} +105 -62
  36. package/dist/{index-458debf7.js → index-mhFL9MJp.js} +15 -49
  37. package/dist/index.d.ts +211 -14
  38. package/dist/index.js +24 -24
  39. package/dist/info-circle-fill-CFeVMdci.js +4 -0
  40. package/dist/input.js +6 -0
  41. package/dist/inputShadowless.js +6 -0
  42. package/dist/jszip.min-Dhs3nUkD.js +2346 -0
  43. package/dist/katex-es-B5r5vt3m.js +14628 -0
  44. package/dist/loading-scene-BMc2wqKm.js +4 -0
  45. package/dist/loading.js +8 -0
  46. package/dist/math.js +7 -0
  47. package/dist/message.js +6 -0
  48. package/dist/modal.js +4 -0
  49. package/dist/{pdf-bdb7818a.js → pdf-Cx0VWKFo.js} +13 -8
  50. package/dist/player.js +8 -0
  51. package/dist/popover.js +8 -0
  52. package/dist/preview.js +7 -0
  53. package/dist/progress.js +7 -0
  54. package/dist/radar.js +6 -0
  55. package/dist/select.js +10 -0
  56. package/dist/{index-1b73beee.js → selectShadowless.js} +161 -165
  57. package/dist/shadowless.js +8 -0
  58. package/dist/skeleton.js +4 -0
  59. package/dist/sprite-CH2zLtZy.js +141 -0
  60. package/dist/style.css +1 -1
  61. package/dist/tab.js +6 -0
  62. package/dist/tabpane.js +4 -0
  63. package/dist/tsconfig.json +31 -0
  64. package/dist/typings.d.ts +211 -0
  65. package/dist/umd/index.umd.cjs +21 -32
  66. package/dist/umd/shadowless/shadowless.umd.cjs +1 -0
  67. package/dist/umd/shadowless/style.css +1 -0
  68. package/dist/umd/style.css +1 -1
  69. package/package.json +113 -69
  70. package/readme.md +38 -56
  71. package/typings.d.ts +211 -0
  72. package/dist/build/config.d.ts +0 -3
  73. package/dist/build/config.es.d.ts +0 -2
  74. package/dist/build/config.umd.d.ts +0 -2
  75. package/dist/components/button/index.d.ts +0 -35
  76. package/dist/components/button/index.js +0 -8
  77. package/dist/components/form/index.d.ts +0 -2
  78. package/dist/components/icon/index.d.ts +0 -2
  79. package/dist/components/icon/index.js +0 -6
  80. package/dist/components/image/index.d.ts +0 -2
  81. package/dist/components/image/index.js +0 -4
  82. package/dist/components/input/index.d.ts +0 -185
  83. package/dist/components/input/index.js +0 -6
  84. package/dist/components/message/index.d.ts +0 -14
  85. package/dist/components/message/index.js +0 -4
  86. package/dist/components/modal/index.d.ts +0 -2
  87. package/dist/components/modal/index.js +0 -4
  88. package/dist/components/option/index.d.ts +0 -2
  89. package/dist/components/option/index.js +0 -95
  90. package/dist/components/player/index.d.ts +0 -213
  91. package/dist/components/player/index.js +0 -12
  92. package/dist/components/preview/colz.d.ts +0 -72
  93. package/dist/components/preview/docx.d.ts +0 -8
  94. package/dist/components/preview/excel/excel.d.ts +0 -2
  95. package/dist/components/preview/excel/index.d.ts +0 -1
  96. package/dist/components/preview/excel/media.d.ts +0 -37
  97. package/dist/components/preview/index.d.ts +0 -6
  98. package/dist/components/preview/index.js +0 -8
  99. package/dist/components/preview/pdf.d.ts +0 -1
  100. package/dist/components/preview/pptx/index.d.ts +0 -16
  101. package/dist/components/preview/pptx/process_pptx.d.ts +0 -23
  102. package/dist/components/preview/pptx/t_xml.d.ts +0 -1
  103. package/dist/components/preview/pptx/worker.d.ts +0 -1
  104. package/dist/components/progress/index.d.ts +0 -36
  105. package/dist/components/progress/index.js +0 -8
  106. package/dist/components/radar/index.d.ts +0 -2
  107. package/dist/components/radar/index.js +0 -7
  108. package/dist/components/scratch/index.d.ts +0 -19
  109. package/dist/components/select/index.d.ts +0 -105
  110. package/dist/components/select/index.js +0 -11
  111. package/dist/components/skeleton/index.d.ts +0 -2
  112. package/dist/components/skeleton/index.js +0 -4
  113. package/dist/components/tab/index.d.ts +0 -408
  114. package/dist/components/tab/index.js +0 -7
  115. package/dist/components/tabpane/index.d.ts +0 -352
  116. package/dist/components/tabpane/index.js +0 -4
  117. package/dist/docx-c5d02d8c.js +0 -21
  118. package/dist/index-57492b9b.js +0 -48
  119. package/dist/index-7216d6b0.js +0 -175
  120. package/dist/index-73ce455b.js +0 -264
  121. package/dist/index-7913ec46.js +0 -239
  122. package/dist/index-c14450a9.js +0 -662
  123. package/dist/info-circle-fill-90ec9aa9.js +0 -14
  124. package/dist/playwright.config.d.ts +0 -9
  125. package/dist/plugins/auto-import-file.d.ts +0 -0
  126. package/dist/plugins/load-style.d.ts +0 -6
  127. package/dist/plugins/load-svg.d.ts +0 -9
  128. package/dist/tests/button.spec.d.ts +0 -1
  129. package/dist/umd/build/config.d.ts +0 -3
  130. package/dist/umd/build/config.es.d.ts +0 -2
  131. package/dist/umd/build/config.umd.d.ts +0 -2
  132. package/dist/umd/components/button/index.d.ts +0 -35
  133. package/dist/umd/components/form/index.d.ts +0 -2
  134. package/dist/umd/components/icon/index.d.ts +0 -2
  135. package/dist/umd/components/image/index.d.ts +0 -2
  136. package/dist/umd/components/input/index.d.ts +0 -185
  137. package/dist/umd/components/message/index.d.ts +0 -14
  138. package/dist/umd/components/modal/index.d.ts +0 -2
  139. package/dist/umd/components/option/index.d.ts +0 -2
  140. package/dist/umd/components/player/index.d.ts +0 -213
  141. package/dist/umd/components/preview/colz.d.ts +0 -72
  142. package/dist/umd/components/preview/docx.d.ts +0 -8
  143. package/dist/umd/components/preview/excel/excel.d.ts +0 -2
  144. package/dist/umd/components/preview/excel/index.d.ts +0 -1
  145. package/dist/umd/components/preview/excel/media.d.ts +0 -37
  146. package/dist/umd/components/preview/index.d.ts +0 -6
  147. package/dist/umd/components/preview/pdf.d.ts +0 -1
  148. package/dist/umd/components/preview/pptx/index.d.ts +0 -16
  149. package/dist/umd/components/preview/pptx/process_pptx.d.ts +0 -23
  150. package/dist/umd/components/preview/pptx/t_xml.d.ts +0 -1
  151. package/dist/umd/components/preview/pptx/worker.d.ts +0 -1
  152. package/dist/umd/components/progress/index.d.ts +0 -36
  153. package/dist/umd/components/radar/index.d.ts +0 -2
  154. package/dist/umd/components/scratch/index.d.ts +0 -19
  155. package/dist/umd/components/select/index.d.ts +0 -105
  156. package/dist/umd/components/skeleton/index.d.ts +0 -2
  157. package/dist/umd/components/tab/index.d.ts +0 -408
  158. package/dist/umd/components/tabpane/index.d.ts +0 -352
  159. package/dist/umd/index.d.ts +0 -14
  160. package/dist/umd/playwright.config.d.ts +0 -9
  161. package/dist/umd/plugins/auto-import-file.d.ts +0 -0
  162. package/dist/umd/plugins/load-style.d.ts +0 -6
  163. package/dist/umd/plugins/load-svg.d.ts +0 -9
  164. package/dist/umd/tests/button.spec.d.ts +0 -1
  165. package/dist/umd/utils/image.d.ts +0 -32
  166. package/dist/umd/utils/index.d.ts +0 -64
  167. package/dist/umd/utils/math.d.ts +0 -26
  168. package/dist/umd/utils/tween.d.ts +0 -21
  169. package/dist/umd/vite.config.d.ts +0 -6
  170. package/dist/utils/image.d.ts +0 -32
  171. package/dist/utils/index.d.ts +0 -64
  172. package/dist/utils/math.d.ts +0 -26
  173. package/dist/utils/tween.d.ts +0 -21
  174. package/dist/vendor-f71e6f68.js +0 -92126
  175. package/dist/vite.config.d.ts +0 -6
  176. /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
  177. /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +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/{loading-09ca52df.js → loading-Dcc5RApI.js} +0 -0
  189. /package/dist/{lock-1d2487c9.js → lock-Cr7BnmWN.js} +0 -0
  190. /package/dist/{message-b2bfdea7.js → message-D36_Zo2l.js} +0 -0
  191. /package/dist/{power-off-6ade5a91.js → power-off-lQRbiBak.js} +0 -0
  192. /package/dist/{preview-b291aea8.js → preview-CJbz9GjO.js} +0 -0
  193. /package/dist/{setting-1e5ccb6d.js → setting-DemlgzVC.js} +0 -0
  194. /package/dist/{team-ca6a12e1.js → team-tl4NJXPC.js} +0 -0
  195. /package/dist/{unlock-f56086fd.js → unlock-CeU74z9n.js} +0 -0
  196. /package/dist/{user-5c01e665.js → user-B-eVXwuk.js} +0 -0
  197. /package/dist/{warning-circle-035e025c.js → warning-circle-DDUgEDIv.js} +0 -0
  198. /package/dist/{warning-circle-fill-d17c37c9.js → warning-circle-fill-lODUKz0i.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,14 +1,211 @@
1
- export * as button from './components/button';
2
- export * as icon from './components/icon';
3
- export * as image from './components/image';
4
- export * as input from './components/input';
5
- export * as message from './components/message';
6
- export * as preview from './components/preview';
7
- export * as skeleton from './components/skeleton';
8
- export * as tabpane from './components/tabpane';
9
- export * as tab from './components/tab';
10
- export * as radar from './components/radar';
11
- export * as player from './components/player';
12
- export * as modal from './components/modal';
13
- export * as select from './components/select';
14
- export * as progress from './components/progress';
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
+ type Hint = (options: Prompt | string) => void;
19
+
20
+ interface Message {
21
+ info: Hint;
22
+ success: Hint;
23
+ error: Hint;
24
+ warning: Hint;
25
+ toast: Hint;
26
+ }
27
+ }
28
+
29
+ interface Ranui {
30
+ message: Partial<Ran.Message>;
31
+ }
32
+
33
+ interface HlsPlayer {
34
+ off: (s: string, f: Function) => void;
35
+ on: (s: string, f: Function) => void;
36
+ loadSource: (s: string) => void;
37
+ attachMedia: (v: HTMLVideoElement) => void;
38
+ destroy: () => void;
39
+ startLoad(): () => void;
40
+ }
41
+
42
+ interface Hls {
43
+ Events: {
44
+ MANIFEST_LOADED: 'hlsManifestLoaded';
45
+ ERROR: 'error';
46
+ };
47
+ isSupported: () => boolean;
48
+ }
49
+
50
+ type HLS = Hls & (new () => HlsPlayer);
51
+
52
+ interface Viewport {
53
+ width: number;
54
+ height: number;
55
+ viewBox: Array<number>;
56
+ }
57
+ interface RenderContext {
58
+ canvasContext: CanvasRenderingContext2D | null;
59
+ transform: Array<number>;
60
+ viewport: Viewport;
61
+ }
62
+
63
+ interface PDFPageProxy {
64
+ pageNumber: number;
65
+ getViewport: () => Viewport;
66
+ render: (options: RenderContext) => void;
67
+ }
68
+
69
+ interface PDFDocumentProxy {
70
+ numPages: number;
71
+ getPage: (x: number) => Promise<PDFPageProxy>;
72
+ }
73
+
74
+ interface HTMLElement {
75
+ mozRequestFullScreen: (options?: FullscreenOptions) => Promise<void>;
76
+ msRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
77
+ oRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
78
+ webkitRequestFullscreen: (options?: FullscreenOptions) => Promise<void>;
79
+ webkitEnterFullscreen: (options?: FullscreenOptions) => Promise<void>;
80
+ }
81
+ declare interface Document {
82
+ msExitFullscreen: () => Promise<void>;
83
+ mozCancelFullScreen: () => Promise<void>;
84
+ oCancelFullScreen: () => Promise<void>;
85
+ webkitExitFullscreen: () => Promise<void>;
86
+ }
87
+
88
+ interface MathJax {
89
+ texReset: () => void;
90
+ getMetricsFor: (x: HTMLElement) => object;
91
+ tex2chtmlPromise: (x: string, y: object) => Promise<Element>;
92
+ }
93
+
94
+ declare interface Window {
95
+ ranui: Partial<Ranui>;
96
+ message: Partial<Ran.Message>;
97
+ MathJax: MathJax;
98
+ katex: {
99
+ render: (x: string, y: HTMLElement, z: object) => void;
100
+ };
101
+ pdfjsLib: {
102
+ GlobalWorkerOptions: {
103
+ workerSrc: string;
104
+ };
105
+ getDocument: (x: string | ArrayBuffer) => {
106
+ promise: Promise<PDFDocumentProxy>;
107
+ };
108
+ };
109
+ Hls: HLS;
110
+ }
111
+
112
+ namespace JSX {
113
+ interface IntrinsicElements {
114
+ 'r-loading': any & {
115
+ name: NAME_AMP;
116
+ };
117
+ 'r-math': any & {
118
+ latex: string;
119
+ };
120
+ 'r-button': any & {
121
+ sheet: string;
122
+ disabled: boolean | string;
123
+ iconSize: string;
124
+ icon: string;
125
+ effect: boolean | string;
126
+ };
127
+ 'r-checkbox': any & {
128
+ disabled: boolean | string;
129
+ checked: boolean | string;
130
+ };
131
+ 'r-img': any & {
132
+ fallback: string;
133
+ src: string;
134
+ };
135
+ 'r-input': any & {
136
+ value: string;
137
+ placeholder: string;
138
+ label: string;
139
+ status: string;
140
+ name: string;
141
+ icon: string;
142
+ prefix: string;
143
+ suffix: string;
144
+ type: string;
145
+ required: boolean | string;
146
+ disabled: boolean | string;
147
+ min: number | string;
148
+ max: number | string;
149
+ step: number | string;
150
+ };
151
+ 'r-player': any & {
152
+ src: string;
153
+ debug: boolean | string;
154
+ volume: number | string;
155
+ currentTime: number | string;
156
+ playbackRate: number | string;
157
+ };
158
+ 'r-popover': any & {
159
+ placement: string;
160
+ trigger: string;
161
+ getPopupContainerId: string;
162
+ arrow: boolean | string;
163
+ };
164
+ 'r-preview': any & {
165
+ src: string;
166
+ closeable: boolean | string;
167
+ };
168
+ 'r-progress': any & {
169
+ percent: number | string;
170
+ total: number | string;
171
+ type: string;
172
+ animation: string;
173
+ dot: boolean | string;
174
+ };
175
+ 'r-radar': any & {
176
+ abilitys: string;
177
+ colorPolygon?: string;
178
+ colorLine?: string;
179
+ fillColor?: string;
180
+ strokeColor?: string;
181
+ };
182
+ 'r-select': any & {
183
+ value: string;
184
+ defaultValue?: string;
185
+ showSearch?: boolean | string;
186
+ type?: string;
187
+ placement?: string;
188
+ sheet?: string;
189
+ getPopupContainerId?: string;
190
+ dropdownclass?: string;
191
+ trigger?: string;
192
+ trigger?: string;
193
+ disabled?: boolean | string;
194
+ };
195
+ 'r-skeleton': any;
196
+ 'r-tab': any & {
197
+ label: string;
198
+ icon: string;
199
+ iconSize: string;
200
+ key: string;
201
+ disabled: boolean | string;
202
+ effect: boolean | string;
203
+ };
204
+ 'r-tabs': any & {
205
+ align: string;
206
+ type: string;
207
+ active: string;
208
+ effect: string;
209
+ };
210
+ }
211
+ }