ranui 0.1.10-alpha.7 → 0.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/README.md +397 -0
  2. package/README.zh-CN.md +369 -0
  3. package/dist/assets/image/failImage.d.ts +2 -0
  4. package/dist/bin/generate-component-api.d.ts +1 -0
  5. package/dist/bin/generate-style-docs.d.ts +1 -0
  6. package/dist/build/config.bundle.d.ts +2 -0
  7. package/dist/build/config.d.ts +3 -0
  8. package/dist/build/config.es.d.ts +2 -0
  9. package/dist/build/config.umd.d.ts +1 -0
  10. package/dist/builder.d.ts +11 -0
  11. package/dist/builder.js +39 -0
  12. package/dist/button-DukaD6uL.js +117 -0
  13. package/dist/button.js +3 -5
  14. package/dist/card-DQUJoDUQ.js +60 -0
  15. package/dist/card.js +5 -0
  16. package/dist/checkbox-iHZQb-yQ.js +94 -0
  17. package/dist/checkbox.js +3 -5
  18. package/dist/colorpicker-Ch67dWa_.js +302 -0
  19. package/dist/colorpicker.js +3 -9
  20. package/dist/components/button/index.d.ts +44 -0
  21. package/dist/components/card/index.d.ts +21 -0
  22. package/dist/components/checkbox/index.d.ts +35 -0
  23. package/dist/components/colorpicker/index.d.ts +88 -0
  24. package/dist/components/dropdown/index.d.ts +32 -0
  25. package/dist/components/form/index.d.ts +15 -0
  26. package/dist/components/icon/index.d.ts +58 -0
  27. package/dist/components/image/index.d.ts +25 -0
  28. package/dist/components/input/index.d.ts +229 -0
  29. package/dist/components/link/index.d.ts +21 -0
  30. package/dist/components/loading/index.d.ts +76 -0
  31. package/dist/components/math/index.d.ts +16 -0
  32. package/dist/components/message/container.d.ts +8 -0
  33. package/dist/components/message/index.d.ts +32 -0
  34. package/dist/components/modal/index.d.ts +100 -0
  35. package/dist/components/player/core/constants.d.ts +5 -0
  36. package/dist/components/player/core/controller.d.ts +33 -0
  37. package/dist/components/player/core/events.d.ts +10 -0
  38. package/dist/components/player/core/fullscreen.d.ts +5 -0
  39. package/dist/components/player/core/levels.d.ts +20 -0
  40. package/dist/components/player/core/media.d.ts +50 -0
  41. package/dist/components/player/core/playback.d.ts +14 -0
  42. package/dist/components/player/core/progress.d.ts +2 -0
  43. package/dist/components/player/core/state.d.ts +27 -0
  44. package/dist/components/player/core/view.d.ts +39 -0
  45. package/dist/components/player/index.d.ts +277 -0
  46. package/dist/components/popover/content/index.d.ts +12 -0
  47. package/dist/components/popover/index.d.ts +95 -0
  48. package/dist/components/progress/index.d.ts +40 -0
  49. package/dist/components/radar/index.d.ts +52 -0
  50. package/dist/components/route/index.d.ts +26 -0
  51. package/dist/components/router/index.d.ts +24 -0
  52. package/dist/components/scratch/index.d.ts +19 -0
  53. package/dist/components/section/index.d.ts +23 -0
  54. package/dist/components/select/dropdown-item/index.d.ts +21 -0
  55. package/dist/components/select/index.d.ts +135 -0
  56. package/dist/components/select/option/index.d.ts +19 -0
  57. package/dist/components/skeleton/index.d.ts +13 -0
  58. package/dist/components/tab/index.d.ts +58 -0
  59. package/dist/components/tabpane/index.d.ts +33 -0
  60. package/dist/demo/i18n.d.ts +4 -0
  61. package/dist/demo/index.d.ts +3 -0
  62. package/dist/demo/register-icons.d.ts +1 -0
  63. package/dist/dropdown-C5362qTy.js +82 -0
  64. package/dist/dropdown.js +6 -0
  65. package/dist/events-C59wGdni.js +30 -0
  66. package/dist/factory-BdsO0dEW.js +165 -0
  67. package/dist/form-05Lxxl3D.js +44 -0
  68. package/dist/form.js +5 -0
  69. package/dist/icon-DmoEnao5.js +165 -0
  70. package/dist/icon.js +4 -4
  71. package/dist/{index-KS2nvVcO.js → image-6GayFDqX.js} +58 -71
  72. package/dist/image.js +3 -2
  73. package/dist/index.cjs +35 -0
  74. package/dist/index.d.ts +277 -116
  75. package/dist/index.iife.js +306 -0
  76. package/dist/index.js +78 -38
  77. package/dist/input-DoraIb3x.js +198 -0
  78. package/dist/input.js +2 -3
  79. package/dist/katex-es-Bpesphgp.js +23682 -0
  80. package/dist/katex-es-Cnq5Pk8K.cjs +261 -0
  81. package/dist/link-BW-gvrpN.js +77 -0
  82. package/dist/link.js +6 -0
  83. package/dist/loading-Mko22ncl.js +206 -0
  84. package/dist/loading.js +4 -6
  85. package/dist/math-B5PpSnFR.js +52 -0
  86. package/dist/math.js +2 -4
  87. package/dist/message-CQENvkoi.js +137 -0
  88. package/dist/message.js +3 -4
  89. package/dist/mocks-CMGoftIc.js +179 -0
  90. package/dist/modal-DruDj3AB.js +350 -0
  91. package/dist/modal.js +3 -2
  92. package/dist/player-CvfmwWUa.js +13536 -0
  93. package/dist/player.js +3 -6
  94. package/dist/playwright.config.d.ts +2 -0
  95. package/dist/plugins/load-svg.d.ts +9 -0
  96. package/dist/popover-BCvHwLZb.js +213 -0
  97. package/dist/popover.js +3 -5
  98. package/dist/progress-BWkNf2J5.js +123 -0
  99. package/dist/progress.js +3 -5
  100. package/dist/radar-CWsawt2g.js +181 -0
  101. package/dist/radar.js +3 -4
  102. package/dist/ranui.css +1 -0
  103. package/dist/route-BY_E6-2C.js +88 -0
  104. package/dist/route.js +6 -0
  105. package/dist/router-BDcv4F-2.js +79 -0
  106. package/dist/router.js +6 -0
  107. package/dist/scratch-Dbd9G6Q6.js +60 -0
  108. package/dist/scratch.js +4 -0
  109. package/dist/section-CNTvgdQ-.js +63 -0
  110. package/dist/section.js +5 -0
  111. package/dist/select-BmhCUTLb.js +433 -0
  112. package/dist/select.js +3 -8
  113. package/dist/signal-XHfNsQNW.js +57 -0
  114. package/dist/skeleton-DPv9nFhL.js +32 -0
  115. package/dist/skeleton.js +3 -2
  116. package/dist/ssg.js +21 -0
  117. package/dist/ssr-DSGwPtEd.js +34 -0
  118. package/dist/ssr-stream.d.ts +1 -0
  119. package/dist/ssr-stream.js +87 -0
  120. package/dist/ssr.d.ts +1 -0
  121. package/dist/ssr.js +7 -0
  122. package/dist/style.d.ts +1 -0
  123. package/dist/style.js +0 -0
  124. package/dist/tab-C9swK-hm.js +185 -0
  125. package/dist/tab.js +3 -4
  126. package/dist/tabpane-B_M-Jokw.js +87 -0
  127. package/dist/tabpane.js +3 -2
  128. package/dist/test/e2e/button.spec.d.ts +1 -0
  129. package/dist/test/e2e/checkbox.spec.d.ts +1 -0
  130. package/dist/test/e2e/helpers.d.ts +13 -0
  131. package/dist/test/e2e/icon.spec.d.ts +1 -0
  132. package/dist/test/e2e/image.spec.d.ts +1 -0
  133. package/dist/test/e2e/input.spec.d.ts +1 -0
  134. package/dist/test/e2e/loading.spec.d.ts +1 -0
  135. package/dist/test/e2e/message.spec.d.ts +1 -0
  136. package/dist/test/e2e/modal.spec.d.ts +1 -0
  137. package/dist/test/e2e/popover.spec.d.ts +1 -0
  138. package/dist/test/e2e/progress.spec.d.ts +1 -0
  139. package/dist/test/e2e/radar.spec.d.ts +1 -0
  140. package/dist/test/e2e/select.spec.d.ts +1 -0
  141. package/dist/test/e2e/skeleton.spec.d.ts +1 -0
  142. package/dist/test/e2e/tab.spec.d.ts +1 -0
  143. package/dist/test/e2e/visual/colorpicker.spec.d.ts +1 -0
  144. package/dist/test/e2e/visual/components.spec.d.ts +1 -0
  145. package/dist/test/e2e/visual/player.spec.d.ts +1 -0
  146. package/dist/test/integration/composition.test.d.ts +23 -0
  147. package/dist/test/setup.d.ts +0 -0
  148. package/dist/test/ssr/builder.core.ssr.test.d.ts +1 -0
  149. package/dist/test/ssr/builder.factory.ssr.test.d.ts +1 -0
  150. package/dist/test/ssr/builder.mocks.test.d.ts +1 -0
  151. package/dist/test/ssr/components/button.test.d.ts +1 -0
  152. package/dist/test/ssr/css-vars.test.d.ts +1 -0
  153. package/dist/test/ssr/registry.test.d.ts +1 -0
  154. package/dist/test/ssr/router.ssg.test.d.ts +2 -0
  155. package/dist/test/ssr/snapshots/button.test.d.ts +1 -0
  156. package/dist/test/ssr/stream.test.d.ts +2 -0
  157. package/dist/test/ssr/theme.tokens.ssr.test.d.ts +1 -0
  158. package/dist/test/unit/builder.core.browser.test.d.ts +1 -0
  159. package/dist/test/unit/builder.escape.test.d.ts +1 -0
  160. package/dist/test/unit/builder.selectors.test.d.ts +1 -0
  161. package/dist/test/unit/button.contract.test.d.ts +1 -0
  162. package/dist/test/unit/card.contract.test.d.ts +1 -0
  163. package/dist/test/unit/checkbox.contract.test.d.ts +1 -0
  164. package/dist/test/unit/colorpicker.color.utils.test.d.ts +1 -0
  165. package/dist/test/unit/colorpicker.contract.test.d.ts +1 -0
  166. package/dist/test/unit/colorpicker.methods.test.d.ts +1 -0
  167. package/dist/test/unit/component.helpers.test.d.ts +1 -0
  168. package/dist/test/unit/dropdown-item.contract.test.d.ts +1 -0
  169. package/dist/test/unit/dropdown.contract.test.d.ts +1 -0
  170. package/dist/test/unit/form.contract.test.d.ts +1 -0
  171. package/dist/test/unit/helpers/component.d.ts +3 -0
  172. package/dist/test/unit/helpers/dom.d.ts +2 -0
  173. package/dist/test/unit/icon.contract.test.d.ts +1 -0
  174. package/dist/test/unit/image.contract.test.d.ts +1 -0
  175. package/dist/test/unit/input.contract.test.d.ts +1 -0
  176. package/dist/test/unit/link.contract.test.d.ts +1 -0
  177. package/dist/test/unit/loading.contract.test.d.ts +1 -0
  178. package/dist/test/unit/math.contract.test.d.ts +1 -0
  179. package/dist/test/unit/message.component.test.d.ts +1 -0
  180. package/dist/test/unit/message.container.test.d.ts +1 -0
  181. package/dist/test/unit/modal.contract.test.d.ts +1 -0
  182. package/dist/test/unit/option.contract.test.d.ts +1 -0
  183. package/dist/test/unit/package-exports.source.test.d.ts +1 -0
  184. package/dist/test/unit/player-controls.test.d.ts +1 -0
  185. package/dist/test/unit/player-core.test.d.ts +1 -0
  186. package/dist/test/unit/player-event-handlers.test.d.ts +1 -0
  187. package/dist/test/unit/player-events.test.d.ts +1 -0
  188. package/dist/test/unit/player-fullscreen.test.d.ts +1 -0
  189. package/dist/test/unit/player-interactions.test.d.ts +1 -0
  190. package/dist/test/unit/player-levels.test.d.ts +1 -0
  191. package/dist/test/unit/player-media.test.d.ts +1 -0
  192. package/dist/test/unit/player-playback.test.d.ts +1 -0
  193. package/dist/test/unit/player.contract.test.d.ts +1 -0
  194. package/dist/test/unit/popover-accessibility.test.d.ts +1 -0
  195. package/dist/test/unit/popover.contract.test.d.ts +2 -0
  196. package/dist/test/unit/progress.contract.test.d.ts +1 -0
  197. package/dist/test/unit/radar.contract.test.d.ts +1 -0
  198. package/dist/test/unit/route.contract.test.d.ts +1 -0
  199. package/dist/test/unit/router.contract.test.d.ts +2 -0
  200. package/dist/test/unit/scratch.contract.test.d.ts +1 -0
  201. package/dist/test/unit/select-accessibility.test.d.ts +1 -0
  202. package/dist/test/unit/select-option.contract.test.d.ts +1 -0
  203. package/dist/test/unit/select.contract.test.d.ts +1 -0
  204. package/dist/test/unit/skeleton.contract.test.d.ts +1 -0
  205. package/dist/test/unit/ssr.test.d.ts +1 -0
  206. package/dist/test/unit/tab.contract.test.d.ts +2 -0
  207. package/dist/test/unit/theme.semantic-tokens.test.d.ts +1 -0
  208. package/dist/test/unit/theme.skin-tokens.test.d.ts +1 -0
  209. package/dist/test/unit/utils.dom.test.d.ts +1 -0
  210. package/dist/test/unit/utils.error.test.d.ts +1 -0
  211. package/dist/test/unit/utils.i18n.test.d.ts +1 -0
  212. package/dist/test/unit/utils.image.test.d.ts +1 -0
  213. package/dist/test/unit/utils.math.test.d.ts +1 -0
  214. package/dist/test/unit/utils.router.test.d.ts +1 -0
  215. package/dist/test/unit/utils.signal.test.d.ts +1 -0
  216. package/dist/test/unit/utils.ssr-stream.test.d.ts +1 -0
  217. package/dist/test/unit/utils.style.test.d.ts +1 -0
  218. package/dist/test/unit/utils.theme.test.d.ts +1 -0
  219. package/dist/test/unit/utils.tween.test.d.ts +1 -0
  220. package/dist/tsconfig.json +9 -9
  221. package/dist/typings.d.ts +163 -116
  222. package/dist/utils/builder/core.d.ts +70 -0
  223. package/dist/utils/builder/env.d.ts +1 -0
  224. package/dist/utils/builder/escape.d.ts +2 -0
  225. package/dist/utils/builder/events.d.ts +55 -0
  226. package/dist/utils/builder/factory.d.ts +18 -0
  227. package/dist/utils/builder/index.d.ts +9 -0
  228. package/dist/utils/builder/mocks.d.ts +62 -0
  229. package/dist/utils/builder/selectors.d.ts +4 -0
  230. package/dist/utils/builder/signal.d.ts +87 -0
  231. package/dist/utils/color.d.ts +52 -0
  232. package/dist/utils/component.d.ts +16 -0
  233. package/dist/utils/dom.d.ts +39 -0
  234. package/dist/utils/error.d.ts +6 -0
  235. package/dist/utils/i18n/index.d.ts +53 -0
  236. package/dist/utils/i18n.js +88 -0
  237. package/dist/utils/image.d.ts +39 -0
  238. package/dist/utils/index.d.ts +8 -0
  239. package/dist/utils/math.d.ts +26 -0
  240. package/dist/utils/router/index.d.ts +128 -0
  241. package/dist/utils/router.js +197 -0
  242. package/dist/utils/ssg.d.ts +49 -0
  243. package/dist/utils/ssr-registry.d.ts +8 -0
  244. package/dist/utils/ssr-stream.d.ts +23 -0
  245. package/dist/utils/ssr.d.ts +17 -0
  246. package/dist/utils/style.d.ts +12 -0
  247. package/dist/utils/theme.d.ts +9 -0
  248. package/dist/utils/tween.d.ts +21 -0
  249. package/dist/utils/video.d.ts +40 -0
  250. package/dist/utils-D4pPF77E.js +689 -0
  251. package/dist/vite.config.d.ts +6 -0
  252. package/dist/vitest.config.d.ts +2 -0
  253. package/dist/vitest.config.ssr.d.ts +2 -0
  254. package/docs/COMPONENTS.md +326 -0
  255. package/docs/DESIGN.md +182 -0
  256. package/docs/style-tokens-public.md +880 -0
  257. package/package.json +138 -74
  258. package/typings.d.ts +163 -116
  259. package/dist/_commonjs-dynamic-modules-DLbDWi6a.js +0 -12
  260. package/dist/add-user-BN1JlY7e.js +0 -4
  261. package/dist/arrow-down-Beig7FXI.js +0 -652
  262. package/dist/book-nTEFXU2x.js +0 -4
  263. package/dist/check-circle-fill-B_pd8ZSs.js +0 -4
  264. package/dist/check-circle-szyAJiap.js +0 -4
  265. package/dist/close-CFnkhudp.js +0 -4
  266. package/dist/close-circle-CwmuN2C6.js +0 -4
  267. package/dist/close-circle-fill-jSqPPw9i.js +0 -4
  268. package/dist/colz-DJZvo_8B.js +0 -232
  269. package/dist/docx-CHkPTdGU.js +0 -3665
  270. package/dist/drop-4j4abxje.js +0 -36
  271. package/dist/eye-D_mEt17f.js +0 -4
  272. package/dist/eye-close-BVr3NJtg.js +0 -4
  273. package/dist/home-BUQ4USMk.js +0 -4
  274. package/dist/iconShadowless.js +0 -6
  275. package/dist/index-BZR0HaP2.js +0 -40
  276. package/dist/index-Bl6-5Hp8.js +0 -63701
  277. package/dist/index-C0Xh8vJ3.js +0 -146
  278. package/dist/index-C4Sv0T51.js +0 -495
  279. package/dist/index-CGEx9VOA.js +0 -17106
  280. package/dist/index-CILRcFIV.js +0 -100
  281. package/dist/index-CQTJoWhb.js +0 -19
  282. package/dist/index-CWNtaUwu.js +0 -308
  283. package/dist/index-CjSKJE6S.js +0 -158
  284. package/dist/index-Ck9TOxFh.js +0 -279
  285. package/dist/index-CryFK9u4.js +0 -320
  286. package/dist/index-D4twPONc.js +0 -187
  287. package/dist/index-D83djTVa.js +0 -659
  288. package/dist/index-DAxs7Dd2.js +0 -119
  289. package/dist/index-DBecKjmY.js +0 -279
  290. package/dist/index-DC5EA657.js +0 -91
  291. package/dist/index-DHTzB_6b.js +0 -9575
  292. package/dist/index-DL-1C2RQ.js +0 -496
  293. package/dist/index-DN-kAx-A.js +0 -72
  294. package/dist/index-TlwIh-o2.js +0 -306
  295. package/dist/index-WfFw4LJT.js +0 -490
  296. package/dist/index-lLO-8KJ1.js +0 -204
  297. package/dist/index-oD-_YELB.js +0 -511
  298. package/dist/index-qvcQTV5_.js +0 -105
  299. package/dist/info-circle-COnL5bTJ.js +0 -4
  300. package/dist/info-circle-fill-CFeVMdci.js +0 -4
  301. package/dist/inputShadowless.js +0 -6
  302. package/dist/jszip.min-Dhs3nUkD.js +0 -2346
  303. package/dist/katex-es-B5r5vt3m.js +0 -14628
  304. package/dist/loading-Dcc5RApI.js +0 -4
  305. package/dist/loading-scene-BMc2wqKm.js +0 -4
  306. package/dist/lock-Cr7BnmWN.js +0 -4
  307. package/dist/message-D36_Zo2l.js +0 -4
  308. package/dist/pdf-Cx0VWKFo.js +0 -118
  309. package/dist/power-off-lQRbiBak.js +0 -4
  310. package/dist/preview-CJbz9GjO.js +0 -4
  311. package/dist/preview.js +0 -7
  312. package/dist/selectShadowless.js +0 -564
  313. package/dist/setting-DemlgzVC.js +0 -4
  314. package/dist/shadowless.js +0 -8
  315. package/dist/sprite-CH2zLtZy.js +0 -141
  316. package/dist/style.css +0 -1
  317. package/dist/team-tl4NJXPC.js +0 -4
  318. package/dist/umd/index.umd.cjs +0 -60
  319. package/dist/umd/shadowless/shadowless.umd.cjs +0 -1
  320. package/dist/umd/shadowless/style.css +0 -1
  321. package/dist/umd/style.css +0 -1
  322. package/dist/unlock-CeU74z9n.js +0 -4
  323. package/dist/user-B-eVXwuk.js +0 -4
  324. package/dist/warning-circle-DDUgEDIv.js +0 -4
  325. package/dist/warning-circle-fill-lODUKz0i.js +0 -4
  326. package/readme.md +0 -176
package/package.json CHANGED
@@ -1,11 +1,30 @@
1
1
  {
2
2
  "name": "ranui",
3
- "version": "0.1.10-alpha.7",
3
+ "version": "0.2.0-alpha.0",
4
4
  "description": "UI Component library based on `Web Component`",
5
- "main": "dist/umd/index.umd.cjs",
5
+ "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
7
7
  "type": "module",
8
8
  "types": "./dist/index.d.ts",
9
+ "typesVersions": {
10
+ "*": {
11
+ "builder": [
12
+ "./dist/builder.d.ts"
13
+ ],
14
+ "ssr": [
15
+ "./dist/ssr.d.ts"
16
+ ],
17
+ "ssr-stream": [
18
+ "./dist/ssr-stream.d.ts"
19
+ ],
20
+ "typings": [
21
+ "./dist/typings.d.ts"
22
+ ],
23
+ "*": [
24
+ "./dist/index.d.ts"
25
+ ]
26
+ }
27
+ },
9
28
  "homepage": "https://chaxus.github.io/ran/src/ranui/",
10
29
  "repository": {
11
30
  "type": "git",
@@ -18,22 +37,14 @@
18
37
  "author": "chaxus",
19
38
  "license": "MIT",
20
39
  "engines": {
21
- "node": "^16.20.2 || >=18.0.0"
22
- },
23
- "scripts": {
24
- "dev": "vite --host",
25
- "build": "sh ./bin/build.sh",
26
- "build:es": "vite build -c ./build/config.es.ts",
27
- "build:umd": "vite build -c ./build/config.umd.ts",
28
- "prepublish": "npm run build",
29
- "test": "sh ./bin/test.sh",
30
- "test:report": "playwright show-report",
31
- "test:ui": "playwright test --ui",
32
- "test:update": "playwright test --update-snapshots"
40
+ "node": ">=20.19.0"
33
41
  },
34
42
  "files": [
35
43
  "dist",
36
- "typings.d.ts"
44
+ "typings.d.ts",
45
+ "docs/DESIGN.md",
46
+ "docs/COMPONENTS.md",
47
+ "docs/style-tokens-public.md"
37
48
  ],
38
49
  "keywords": [
39
50
  "ran",
@@ -45,152 +56,205 @@
45
56
  "web components",
46
57
  "webComponents",
47
58
  "ranui",
48
- "@ranui/react"
59
+ "lib"
49
60
  ],
50
61
  "exports": {
51
62
  ".": {
52
63
  "types": "./dist/index.d.ts",
53
64
  "import": "./dist/index.js",
54
- "require": "./dist/umd/index.umd.cjs"
65
+ "require": "./dist/index.cjs"
55
66
  },
56
- "./shadowless": {
57
- "types": "./dist/index.d.ts",
58
- "import": "./dist/shadowless.js",
59
- "require": "./dist/umd/shadowless/shadowless.umd.cjs"
67
+ "./style": "./dist/ranui.css",
68
+ "./builder": {
69
+ "types": "./dist/builder.d.ts",
70
+ "import": "./dist/builder.js",
71
+ "require": "./dist/index.cjs"
72
+ },
73
+ "./ssr": {
74
+ "types": "./dist/ssr.d.ts",
75
+ "import": "./dist/ssr.js",
76
+ "require": "./dist/index.cjs"
77
+ },
78
+ "./ssr-stream": {
79
+ "types": "./dist/ssr-stream.d.ts",
80
+ "import": "./dist/ssr-stream.js",
81
+ "require": "./dist/index.cjs"
60
82
  },
61
83
  "./button": {
62
84
  "types": "./dist/index.d.ts",
63
85
  "import": "./dist/button.js",
64
- "require": "./dist/umd/index.umd.cjs"
86
+ "require": "./dist/index.cjs"
65
87
  },
66
88
  "./icon": {
67
89
  "types": "./dist/index.d.ts",
68
90
  "import": "./dist/icon.js",
69
- "require": "./dist/umd/index.umd.cjs"
91
+ "require": "./dist/index.cjs"
70
92
  },
71
93
  "./image": {
72
94
  "types": "./dist/index.d.ts",
73
95
  "import": "./dist/image.js",
74
- "require": "./dist/umd/index.umd.cjs"
96
+ "require": "./dist/index.cjs"
75
97
  },
76
98
  "./input": {
77
99
  "types": "./dist/index.d.ts",
78
100
  "import": "./dist/input.js",
79
- "require": "./dist/umd/index.umd.cjs"
101
+ "require": "./dist/index.cjs"
80
102
  },
81
103
  "./message": {
82
104
  "types": "./dist/index.d.ts",
83
105
  "import": "./dist/message.js",
84
- "require": "./dist/umd/index.umd.cjs"
85
- },
86
- "./preview": {
87
- "types": "./dist/index.d.ts",
88
- "import": "./dist/preview.js",
89
- "require": "./dist/umd/index.umd.cjs"
106
+ "require": "./dist/index.cjs"
90
107
  },
91
108
  "./skeleton": {
92
109
  "types": "./dist/index.d.ts",
93
110
  "import": "./dist/skeleton.js",
94
- "require": "./dist/umd/index.umd.cjs"
111
+ "require": "./dist/index.cjs"
95
112
  },
96
113
  "./tab": {
97
114
  "types": "./dist/index.d.ts",
98
115
  "import": "./dist/tab.js",
99
- "require": "./dist/umd/index.umd.cjs"
116
+ "require": "./dist/index.cjs"
100
117
  },
101
118
  "./tabpane": {
102
119
  "types": "./dist/index.d.ts",
103
120
  "import": "./dist/tabpane.js",
104
- "require": "./dist/umd/index.umd.cjs"
121
+ "require": "./dist/index.cjs"
105
122
  },
106
123
  "./radar": {
107
124
  "types": "./dist/index.d.ts",
108
125
  "import": "./dist/radar.js",
109
- "require": "./dist/umd/index.umd.cjs"
126
+ "require": "./dist/index.cjs"
110
127
  },
111
128
  "./modal": {
112
129
  "types": "./dist/index.d.ts",
113
130
  "import": "./dist/modal.js",
114
- "require": "./dist/umd/index.umd.cjs"
131
+ "require": "./dist/index.cjs"
115
132
  },
116
133
  "./select": {
117
134
  "types": "./dist/index.d.ts",
118
135
  "import": "./dist/select.js",
119
- "require": "./dist/umd/index.umd.cjs"
136
+ "require": "./dist/index.cjs"
120
137
  },
121
138
  "./progress": {
122
139
  "types": "./dist/index.d.ts",
123
140
  "import": "./dist/progress.js",
124
- "require": "./dist/umd/index.umd.cjs"
141
+ "require": "./dist/index.cjs"
125
142
  },
126
143
  "./player": {
127
144
  "types": "./dist/index.d.ts",
128
145
  "import": "./dist/player.js",
129
- "require": "./dist/umd/index.umd.cjs"
146
+ "require": "./dist/index.cjs"
130
147
  },
131
148
  "./popover": {
132
149
  "types": "./dist/index.d.ts",
133
150
  "import": "./dist/popover.js",
134
- "require": "./dist/umd/index.umd.cjs"
151
+ "require": "./dist/index.cjs"
152
+ },
153
+ "./dropdown": {
154
+ "types": "./dist/index.d.ts",
155
+ "import": "./dist/dropdown.js",
156
+ "require": "./dist/index.cjs"
135
157
  },
136
158
  "./content": {
137
159
  "types": "./dist/index.d.ts",
138
160
  "import": "./dist/content.js",
139
- "require": "./dist/umd/index.umd.cjs"
161
+ "require": "./dist/index.cjs"
140
162
  },
141
163
  "./loading": {
142
164
  "types": "./dist/index.d.ts",
143
165
  "import": "./dist/loading.js",
144
- "require": "./dist/umd/index.umd.cjs"
166
+ "require": "./dist/index.cjs"
145
167
  },
146
168
  "./colorpicker": {
147
169
  "types": "./dist/index.d.ts",
148
170
  "import": "./dist/colorpicker.js",
149
- "require": "./dist/umd/index.umd.cjs"
171
+ "require": "./dist/index.cjs"
150
172
  },
151
173
  "./math": {
152
174
  "types": "./dist/index.d.ts",
153
175
  "import": "./dist/math.js",
154
- "require": "./dist/umd/index.umd.cjs"
176
+ "require": "./dist/index.cjs"
155
177
  },
156
178
  "./checkbox": {
157
179
  "types": "./dist/index.d.ts",
158
180
  "import": "./dist/checkbox.js",
159
- "require": "./dist/umd/index.umd.cjs"
181
+ "require": "./dist/index.cjs"
182
+ },
183
+ "./card": {
184
+ "types": "./dist/index.d.ts",
185
+ "import": "./dist/card.js",
186
+ "require": "./dist/index.cjs"
187
+ },
188
+ "./router": {
189
+ "types": "./dist/index.d.ts",
190
+ "import": "./dist/router.js",
191
+ "require": "./dist/index.cjs"
192
+ },
193
+ "./route": {
194
+ "types": "./dist/index.d.ts",
195
+ "import": "./dist/route.js",
196
+ "require": "./dist/index.cjs"
160
197
  },
161
- "./style": {
198
+ "./link": {
162
199
  "types": "./dist/index.d.ts",
163
- "import": "./dist/style.css",
164
- "require": "./dist/umd/index.umd.cjs"
200
+ "import": "./dist/link.js",
201
+ "require": "./dist/index.cjs"
202
+ },
203
+ "./type": {
204
+ "types": "./dist/index.d.ts",
205
+ "import": "./dist/index.js",
206
+ "require": "./dist/index.js"
207
+ },
208
+ "./typings": {
209
+ "types": "./dist/typings.d.ts",
210
+ "import": "./dist/typings.d.ts",
211
+ "require": "./dist/index.js"
212
+ },
213
+ "./dist/*": {
214
+ "types": "./dist/*",
215
+ "import": "./dist/*",
216
+ "require": "./dist/*"
165
217
  }
166
218
  },
167
219
  "devDependencies": {
168
- "@babel/core": "^7.24.5",
169
- "@babel/preset-env": "^7.24.5",
170
- "@babel/preset-typescript": "^7.24.1",
171
- "@playwright/test": "^1.44.0",
172
- "@types/imagemin-svgo": "^10.0.5",
173
- "@types/lodash": "^4.17.1",
174
- "@types/react": "^18.3.1",
175
- "@types/tinycolor2": "^1.4.6",
176
- "@vheemstra/vite-plugin-imagemin": "^1.2.1",
177
- "imagemin-svgo": "^10.0.1",
178
- "less": "^4.2.0",
179
- "prettier": "^2.8.8",
180
- "react": "^18.3.1",
181
- "react-dom": "^18.3.1",
182
- "rollup-plugin-visualizer": "^5.12.0",
183
- "svgo": "^3.3.0",
184
- "tsx": "^3.14.0",
185
- "typescript": "^5.4.5",
186
- "vite": "^5.2.11"
220
+ "@argos-ci/playwright": "^7.1.1",
221
+ "@playwright/test": "^1.61.1",
222
+ "@types/node": "^26.0.1",
223
+ "@vitest/coverage-v8": "^4.1.9",
224
+ "jsdom": "^29.1.1",
225
+ "less": "^4.6.7",
226
+ "prettier": "^3.8.5",
227
+ "rollup-plugin-visualizer": "^7.0.1",
228
+ "svgo": "^4.0.1",
229
+ "tsx": "^4.22.4",
230
+ "typescript": "^6.0.3",
231
+ "vite": "^8.1.0",
232
+ "vitest": "^4.1.9"
187
233
  },
188
234
  "dependencies": {
189
- "dayjs": "^1.11.11",
190
- "exceljs": "^4.4.0",
191
- "jszip": "^3.10.1",
192
- "lodash": "^4.17.21",
193
- "ranuts": "workspace:^",
194
- "tinycolor2": "^1.6.0"
235
+ "ranuts": "^0.2.0-alpha.0"
236
+ },
237
+ "scripts": {
238
+ "dev": "vite --host",
239
+ "build": "sh ./bin/build.sh",
240
+ "build:release": "sh -c \"RANUI_MINIFY=terser RANUI_CSS_MINIFY=esbuild sh ./bin/build.sh\"",
241
+ "build:analyze": "sh -c \"RANUI_ANALYZE=true RANUI_MINIFY=esbuild RANUI_CSS_MINIFY=esbuild sh ./bin/build.sh\"",
242
+ "build:es": "vite build -c ./build/config.es.ts",
243
+ "build:bundle": "vite build -c ./build/config.bundle.ts",
244
+ "prepublish": "npm run build",
245
+ "test": "sh ./bin/test.sh",
246
+ "test:unit": "NODE_OPTIONS=--max-old-space-size=4096 vitest run",
247
+ "test:unit:watch": "NODE_OPTIONS=--max-old-space-size=4096 vitest",
248
+ "test:unit:coverage": "NODE_OPTIONS=--max-old-space-size=4096 vitest run --coverage",
249
+ "test:ssr": "vitest run --config vitest.config.ssr.ts",
250
+ "test:ssr:watch": "vitest --config vitest.config.ssr.ts",
251
+ "test:all": "pnpm -F ranuts build && npm run tsc && npm run test:unit && npm run test:ssr",
252
+ "test:e2e": "playwright test",
253
+ "test:report": "playwright show-report",
254
+ "test:ui": "playwright test --ui",
255
+ "test:update": "playwright test --update-snapshots",
256
+ "tsc": "tsc --noEmit",
257
+ "doc:style": "tsx ./bin/generate-style-docs.ts",
258
+ "doc:api": "tsx ./bin/generate-component-api.ts"
195
259
  }
196
- }
260
+ }
package/typings.d.ts CHANGED
@@ -1,9 +1,9 @@
1
+ /// <reference types="vite/client" />
1
2
  declare module '*.less';
2
3
  declare module '*.less?inline';
3
4
  declare module '*.ts';
4
5
  declare module '*.svg';
5
- declare module 'docx-preview';
6
- declare module 'exceljs/*';
6
+ declare module '*.svg?raw';
7
7
  declare module '@/assets/*';
8
8
  declare module '@/public/*';
9
9
  declare module '@/components/*';
@@ -14,8 +14,12 @@ declare namespace Ran {
14
14
  content: string;
15
15
  duration?: number;
16
16
  close?: () => void;
17
+ top?: number | string;
18
+ zIndex?: number | string;
19
+ getContainer?: () => HTMLElement | null;
17
20
  }
18
- type Hint = (options: Prompt | string) => void;
21
+
22
+ type Hint = (options: Prompt | string | undefined | null) => void;
19
23
 
20
24
  interface Message {
21
25
  info: Hint;
@@ -91,123 +95,166 @@ interface MathJax {
91
95
  tex2chtmlPromise: (x: string, y: object) => Promise<Element>;
92
96
  }
93
97
 
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;
98
+ declare global {
99
+ interface Window {
100
+ ranui: Partial<Ranui>;
101
+ message: Partial<Ran.Message>;
102
+ MathJax: MathJax;
103
+ katex: {
104
+ render: (x: string, y: HTMLElement, z: object) => void;
104
105
  };
105
- getDocument: (x: string | ArrayBuffer) => {
106
- promise: Promise<PDFDocumentProxy>;
106
+ pdfjsLib: {
107
+ GlobalWorkerOptions: {
108
+ workerSrc: string;
109
+ };
110
+ getDocument: (x: string | ArrayBuffer) => {
111
+ promise: Promise<PDFDocumentProxy>;
112
+ };
107
113
  };
108
- };
109
- Hls: HLS;
114
+ }
110
115
  }
111
116
 
112
-
113
-
117
+ enum ICON_NAME_AMP {
118
+ DOUBLE_BOUNCE = 'double-bounce',
119
+ ROTATE = 'rotate',
120
+ STRETCH = 'stretch',
121
+ CUBE = 'cube',
122
+ DOT = 'dot',
123
+ TRIPLE_BOUNCE = 'triple-bounce',
124
+ SCALE_OUT = 'scale-out',
125
+ CIRCLE = 'circle',
126
+ CIRCLE_LINE = 'circle-line',
127
+ SQUARE = 'square',
128
+ PULSE = 'pulse',
129
+ SOLAR = 'solar',
130
+ CUBE_FOLD = 'cube-fold',
131
+ CIRCLE_FOLD = 'circle-fold',
132
+ CUBE_GRID = 'cube-grid',
133
+ CIRCLE_TURN = 'circle-turn',
134
+ CIRCLE_ROTATE = 'circle-rotate',
135
+ CIRCLE_SPIN = 'circle-spin',
136
+ DOT_BAR = 'dot-bar',
137
+ DOT_CIRCLE = 'dot-circle',
138
+ LINE = 'line',
139
+ DOT_PULSE = 'dot-pulse',
140
+ LINE_SCALE = 'line-scale',
141
+ TEXT = 'text',
142
+ CUBE_DIM = 'cube-dim',
143
+ DOT_LINE = 'dot-line',
144
+ ARC = 'arc',
145
+ DROP = 'drop',
146
+ PACMAN = 'pacman',
147
+ }
148
+ interface BaseIntrinsicElements {
149
+ 'r-loading': any & {
150
+ name: ICON_NAME_AMP;
151
+ };
152
+ 'r-math': any & {
153
+ latex: string;
154
+ };
155
+ 'r-button': any & {
156
+ sheet: string;
157
+ disabled: boolean | string;
158
+ iconSize: string;
159
+ icon: string;
160
+ effect: boolean | string;
161
+ };
162
+ 'r-checkbox': any & {
163
+ disabled: boolean | string;
164
+ checked: boolean | string;
165
+ };
166
+ 'r-img': any & {
167
+ fallback: string;
168
+ src: string;
169
+ };
170
+ 'r-input': any & {
171
+ value: string;
172
+ placeholder: string;
173
+ label: string;
174
+ status: string;
175
+ name: string;
176
+ icon: string;
177
+ prefix: string;
178
+ suffix: string;
179
+ type: string;
180
+ required: boolean | string;
181
+ disabled: boolean | string;
182
+ min: number | string;
183
+ max: number | string;
184
+ step: number | string;
185
+ };
186
+ 'r-player': any & {
187
+ src: string;
188
+ debug: boolean | string;
189
+ volume: number | string;
190
+ currentTime: number | string;
191
+ playbackRate: number | string;
192
+ };
193
+ 'r-popover': any & {
194
+ placement: string;
195
+ trigger: string;
196
+ getPopupContainerId: string;
197
+ arrow: boolean | string;
198
+ closePopover: () => void;
199
+ };
200
+ 'r-content': any;
201
+ 'r-preview': any & {
202
+ src: string;
203
+ closeable: boolean | string;
204
+ };
205
+ 'r-progress': any & {
206
+ percent: number | string;
207
+ total: number | string;
208
+ type: string;
209
+ animation: string;
210
+ dot: boolean | string;
211
+ };
212
+ 'r-radar': any & {
213
+ abilitys: string;
214
+ colorPolygon?: string;
215
+ colorLine?: string;
216
+ fillColor?: string;
217
+ strokeColor?: string;
218
+ };
219
+ 'r-select': any & {
220
+ value: string;
221
+ defaultValue?: string;
222
+ showSearch?: boolean | string;
223
+ type?: string;
224
+ placement?: string;
225
+ sheet?: string;
226
+ getPopupContainerId?: string;
227
+ dropdownclass?: string;
228
+ trigger?: string;
229
+ disabled?: boolean | string;
230
+ };
231
+ 'r-skeleton': any;
232
+ 'r-tab': any & {
233
+ label: string;
234
+ icon: string;
235
+ iconSize: string;
236
+ key: string;
237
+ disabled: boolean | string;
238
+ effect: boolean | string;
239
+ };
240
+ 'r-tabs': any & {
241
+ align: string;
242
+ type: string;
243
+ active: string;
244
+ effect: string;
245
+ };
246
+ 'r-icon': any & {
247
+ name?: string;
248
+ size?: string;
249
+ color?: string;
250
+ };
251
+ }
114
252
  namespace JSX {
115
- interface IntrinsicElements {
116
- 'r-loading': any & {
117
- name: NAME_AMP;
118
- };
119
- 'r-math': any & {
120
- latex: string;
121
- };
122
- 'r-button': any & {
123
- sheet: string;
124
- disabled: boolean | string;
125
- iconSize: string;
126
- icon: string;
127
- effect: boolean | string;
128
- };
129
- 'r-checkbox': any & {
130
- disabled: boolean | string;
131
- checked: boolean | string;
132
- };
133
- 'r-img': any & {
134
- fallback: string;
135
- src: string;
136
- };
137
- 'r-input': any & {
138
- value: string;
139
- placeholder: string;
140
- label: string;
141
- status: string;
142
- name: string;
143
- icon: string;
144
- prefix: string;
145
- suffix: string;
146
- type: string;
147
- required: boolean | string;
148
- disabled: boolean | string;
149
- min: number | string;
150
- max: number | string;
151
- step: number | string;
152
- };
153
- 'r-player': any & {
154
- src: string;
155
- debug: boolean | string;
156
- volume: number | string;
157
- currentTime: number | string;
158
- playbackRate: number | string;
159
- };
160
- 'r-popover': any & {
161
- placement: string;
162
- trigger: string;
163
- getPopupContainerId: string;
164
- arrow: boolean | string;
165
- };
166
- 'r-preview': any & {
167
- src: string;
168
- closeable: boolean | string;
169
- };
170
- 'r-progress': any & {
171
- percent: number | string;
172
- total: number | string;
173
- type: string;
174
- animation: string;
175
- dot: boolean | string;
176
- };
177
- 'r-radar': any & {
178
- abilitys: string;
179
- colorPolygon?: string;
180
- colorLine?: string;
181
- fillColor?: string;
182
- strokeColor?: string;
183
- };
184
- 'r-select': any & {
185
- value: string;
186
- defaultValue?: string;
187
- showSearch?: boolean | string;
188
- type?: string;
189
- placement?: string;
190
- sheet?: string;
191
- getPopupContainerId?: string;
192
- dropdownclass?: string;
193
- trigger?: string;
194
- trigger?: string;
195
- disabled?: boolean | string;
196
- };
197
- 'r-skeleton': any;
198
- 'r-tab': any & {
199
- label: string;
200
- icon: string;
201
- iconSize: string;
202
- key: string;
203
- disabled: boolean | string;
204
- effect: boolean | string;
205
- };
206
- 'r-tabs': any & {
207
- align: string;
208
- type: string;
209
- active: string;
210
- effect: string;
211
- };
253
+ interface IntrinsicElements extends BaseIntrinsicElements {}
254
+ }
255
+
256
+ namespace React {
257
+ namespace JSX {
258
+ interface IntrinsicElements extends BaseIntrinsicElements {}
212
259
  }
213
260
  }
@@ -1,12 +0,0 @@
1
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
2
- function getDefaultExportFromCjs(x) {
3
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
- }
5
- function commonjsRequire(path) {
6
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
7
- }
8
- export {
9
- commonjsRequire as a,
10
- commonjsGlobal as c,
11
- getDefaultExportFromCjs as g
12
- };
@@ -1,4 +0,0 @@
1
- const addUser = { "success": true, "_identification": true, "data": '<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"\n xmlns="http://www.w3.org/2000/svg" p-id="8046" width="200" height="200">\n <path\n d="M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h0.1c3 0 4.4-3.6 2.2-5.6-30.8-27.6-65.6-49.7-103.7-65.8-0.4-0.2-0.8-0.3-1.2-0.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.7 18.9-84.8 46-119.3 80.6-34.5 34.5-61.5 74.7-80.4 119.5C147.9 794.5 138 841 137 888.8c-0.1 4.5 3.5 8.2 8 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1 2.5 1.5 5.5 1.7 8.1 0.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4-32.4-32.5-50.3-75.7-50.3-121.6 0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4c32.4 32.5 50.3 75.7 50.3 121.6 0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"\n p-id="8047"></path>\n</svg>' };
2
- export {
3
- addUser as default
4
- };