ranui 0.3.1-alpha.1 → 0.4.2-alpha.2

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 (462) hide show
  1. package/README.md +4 -4
  2. package/README.zh-CN.md +3 -3
  3. package/dist/Temml-3BKyDWY9.js +4 -0
  4. package/dist/Temml-B3J22Yln.cjs +1 -0
  5. package/dist/{abnfDiagram-VRR7QNED-CTsqwzwi.js → abnfDiagram-VRR7QNED-C21Pc9Db.js} +4 -4
  6. package/dist/abnfDiagram-VRR7QNED-Do5oGbAb.cjs +1 -0
  7. package/dist/add-user-Dk1LIZtp.cjs +6 -0
  8. package/dist/add-user-WnpaBGEK.js +15 -0
  9. package/dist/arc-BTq35m9x.js +9 -0
  10. package/dist/arc-BjIU7MOi.cjs +1 -0
  11. package/dist/{arc-DRPGof21.js → arc-DJJx8BhF.js} +1 -1
  12. package/dist/architecture-TIHT7OUA-BJNZJd9x.cjs +1 -0
  13. package/dist/{architectureDiagram-ZJ3FMSHR-8mjyXr-w.js → architectureDiagram-ZJ3FMSHR-Dt0W9V1f.js} +7 -7
  14. package/dist/{architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs → architectureDiagram-ZJ3FMSHR-WH22GUwo.cjs} +2 -2
  15. package/dist/{arrow-down-Bi5kqUrX.js → arrow-down-DrjnnTe1.js} +4 -2
  16. package/dist/arrow-down-Dt-KyDFE.cjs +5 -0
  17. package/dist/{blockDiagram-677ZJIJ3-3F79MOSt.js → blockDiagram-677ZJIJ3-Cb0N9R3M.js} +8 -8
  18. package/dist/book-8PpGdTqf.cjs +1 -0
  19. package/dist/book-CkgJlJ4n.js +10 -0
  20. package/dist/build/config.d.ts +11 -2
  21. package/dist/builder-2HD21I6K.cjs +1 -0
  22. package/dist/builder.js +40 -40
  23. package/dist/{button-Dw6YKyNd.js → button-BgWXCj7-.js} +14 -12
  24. package/dist/button.js +1 -1
  25. package/dist/{c4Diagram-LMCZKHZV-Cxn_gqu_.js → c4Diagram-LMCZKHZV-CFLtikIe.js} +5 -5
  26. package/dist/{card-BHN9Xp4S.js → card-DzVv3ADA.js} +13 -13
  27. package/dist/card.js +1 -1
  28. package/dist/{channel-k5-UxdcV.js → channel-B9hm3LKF.js} +1 -1
  29. package/dist/check-63MT_RxH.cjs +1 -0
  30. package/dist/check-circle-Cbsw_Ffd.cjs +1 -0
  31. package/dist/check-circle-Dpkv0_9Z.js +10 -0
  32. package/dist/check-circle-fill-DVVjVyV6.cjs +1 -0
  33. package/dist/check-circle-fill-eBwMoYEo.js +10 -0
  34. package/dist/{checkbox-O_J_n1_W.js → checkbox-KOXDiwRr.js} +15 -14
  35. package/dist/checkbox.js +1 -1
  36. package/dist/{chunk-32BRIVSS-jAuAwMVV.js → chunk-32BRIVSS-DhXCFCbM.js} +3 -3
  37. package/dist/{chunk-52WLFC77-wpL7en7e.js → chunk-52WLFC77-CLS2Long.js} +8 -8
  38. package/dist/chunk-5FCAYU7R-M2ohMDGf.cjs +1 -0
  39. package/dist/chunk-5HE753X5-DkUtBcPF.cjs +1 -0
  40. package/dist/chunk-5JV3BV7I-BAn3GEjF.cjs +1 -0
  41. package/dist/chunk-5TONJI2A-Bk0HPVuY.cjs +2 -0
  42. package/dist/chunk-BIQX33UG-CaI4JSOY.cjs +1 -0
  43. package/dist/{chunk-C7G6YPKG-CA-DNpvI.js → chunk-C7G6YPKG-CuJexLt7.js} +1 -1
  44. package/dist/chunk-CQNSW5MT-DHm86rAm.cjs +1 -0
  45. package/dist/chunk-CYSBUYHQ-8HNynFK-.cjs +1 -0
  46. package/dist/chunk-EMLP6XTP-DESFjGc5.cjs +1 -0
  47. package/dist/{chunk-EX3LRPZG-BCmf0iDq.js → chunk-EX3LRPZG-C-g2gFWb.js} +7 -7
  48. package/dist/{chunk-FWX5IMBZ-DZ5VYvm5.js → chunk-FWX5IMBZ-Cpx1Lg-4.js} +8 -8
  49. package/dist/{chunk-HOUHSVGY-DRQcQeMT.js → chunk-HOUHSVGY-DpvP0Kt0.js} +2 -2
  50. package/dist/{chunk-ICXQ74PX-DR8rL-xF.js → chunk-ICXQ74PX-DPZfA3a8.js} +3 -3
  51. package/dist/chunk-JG7HCLWE-DJPVQhqh.cjs +2 -0
  52. package/dist/{chunk-MOJQB5TN-BC46HDyu.js → chunk-MOJQB5TN-BWgg4qSh.js} +3 -3
  53. package/dist/chunk-MOZMSUNE-BiirTonv.cjs +1 -0
  54. package/dist/{chunk-OGEWGWER-BV51ll2w.js → chunk-OGEWGWER-CYsD5SNd.js} +2 -2
  55. package/dist/chunk-OSBZ3O6U-BDLnzsCC.cjs +1 -0
  56. package/dist/{chunk-PUDLZKDR-NdMR0Ft5.js → chunk-PUDLZKDR-Dw2BOPG-.js} +9 -9
  57. package/dist/{chunk-Q4XR5HBZ-3BHjjc9u.js → chunk-Q4XR5HBZ-D_n2NzvL.js} +4 -4
  58. package/dist/chunk-QBLGF6JB-DgQIhta2.cjs +1 -0
  59. package/dist/chunk-R7FJI6CG-BjmGc1OU.cjs +1 -0
  60. package/dist/{chunk-RYQCIY6F-BER2T9t0.js → chunk-RYQCIY6F-CIHQ94xS.js} +1 -1
  61. package/dist/chunk-U6XO7XAA-Cxdku9z7.cjs +2 -0
  62. package/dist/{chunk-V7JOEXUC-Cr_hr02u.js → chunk-V7JOEXUC-DNMlt0_E.js} +7 -7
  63. package/dist/{chunk-VAUOI2AC-izt0o4id.js → chunk-VAUOI2AC-CrgGIUR-.js} +2 -2
  64. package/dist/{chunk-VR4S4FIN-CJi5okl4.js → chunk-VR4S4FIN-DQsfbArk.js} +2 -2
  65. package/dist/{chunk-WYO6CB5R-DDHkKowO.js → chunk-WYO6CB5R-DyGmS3I6.js} +1 -1
  66. package/dist/{chunk-XXDRQBXY-BB1i_53q.js → chunk-XXDRQBXY-BeVLa_G2.js} +1 -1
  67. package/dist/chunk-YOTPTUD7-BCQ2zMB7.cjs +1 -0
  68. package/dist/{chunk-ZGVPDNZ5-6uMbTJXy.js → chunk-ZGVPDNZ5-DlEsNy2g.js} +7 -7
  69. package/dist/circle-By7YwAJj.cjs +1 -0
  70. package/dist/circle-fold-BJWGLDa6.cjs +1 -0
  71. package/dist/circle-fold-DrwUHB-m.js +9 -0
  72. package/dist/circle-line-BsXpw2HA.cjs +1 -0
  73. package/dist/circle-line-DCUX3o9u.js +9 -0
  74. package/dist/circle-rotate-BK1tW3Jv.cjs +1 -0
  75. package/dist/circle-rotate-DeBqoVVp.js +9 -0
  76. package/dist/circle-spin-Crycoffl.js +9 -0
  77. package/dist/circle-spin-Ctoq0Wil.cjs +1 -0
  78. package/dist/circle-turn-DytKZEgU.js +9 -0
  79. package/dist/circle-turn-J9aToB75.cjs +1 -0
  80. package/dist/classDiagram-OUVF2IWQ-CkQt8O2B.js +30 -0
  81. package/dist/classDiagram-v2-EOCWNBFH-CkQt8O2B.js +30 -0
  82. package/dist/close-CDF9aHTU.js +10 -0
  83. package/dist/close-Ck_jxN7T.cjs +1 -0
  84. package/dist/close-circle-B3lBlRHE.cjs +1 -0
  85. package/dist/close-circle-DZZJhaf-.js +10 -0
  86. package/dist/close-circle-fill-Ds9W-XNo.cjs +1 -0
  87. package/dist/close-circle-fill-OiY9CVOv.js +10 -0
  88. package/dist/colorpicker-7adjGSuz.js +250 -0
  89. package/dist/colorpicker.js +1 -1
  90. package/dist/components/icon/index.d.ts +7 -0
  91. package/dist/components/loading/index.d.ts +6 -29
  92. package/dist/components/loading/types.d.ts +11 -0
  93. package/dist/components/loading/variants/arc/index.d.ts +6 -0
  94. package/dist/components/loading/variants/circle/index.d.ts +6 -0
  95. package/dist/components/loading/variants/circle-fold/index.d.ts +6 -0
  96. package/dist/components/loading/variants/circle-line/index.d.ts +6 -0
  97. package/dist/components/loading/variants/circle-rotate/index.d.ts +6 -0
  98. package/dist/components/loading/variants/circle-spin/index.d.ts +6 -0
  99. package/dist/components/loading/variants/circle-turn/index.d.ts +6 -0
  100. package/dist/components/loading/variants/cube/index.d.ts +6 -0
  101. package/dist/components/loading/variants/cube-dim/index.d.ts +6 -0
  102. package/dist/components/loading/variants/cube-fold/index.d.ts +6 -0
  103. package/dist/components/loading/variants/cube-grid/index.d.ts +6 -0
  104. package/dist/components/loading/variants/dot/index.d.ts +6 -0
  105. package/dist/components/loading/variants/dot-bar/index.d.ts +6 -0
  106. package/dist/components/loading/variants/dot-circle/index.d.ts +6 -0
  107. package/dist/components/loading/variants/dot-line/index.d.ts +6 -0
  108. package/dist/components/loading/variants/dot-pulse/index.d.ts +6 -0
  109. package/dist/components/loading/variants/double-bounce/index.d.ts +6 -0
  110. package/dist/components/loading/variants/drop/index.d.ts +6 -0
  111. package/dist/components/loading/variants/line/index.d.ts +6 -0
  112. package/dist/components/loading/variants/line-scale/index.d.ts +6 -0
  113. package/dist/components/loading/variants/pacman/index.d.ts +6 -0
  114. package/dist/components/loading/variants/pulse/index.d.ts +6 -0
  115. package/dist/components/loading/variants/rotate/index.d.ts +6 -0
  116. package/dist/components/loading/variants/scale-out/index.d.ts +6 -0
  117. package/dist/components/loading/variants/solar/index.d.ts +6 -0
  118. package/dist/components/loading/variants/square/index.d.ts +6 -0
  119. package/dist/components/loading/variants/stretch/index.d.ts +6 -0
  120. package/dist/components/loading/variants/text/index.d.ts +6 -0
  121. package/dist/components/loading/variants/triple-bounce/index.d.ts +6 -0
  122. package/dist/components/math/index.d.ts +37 -1
  123. package/dist/components/player/index.d.ts +0 -1
  124. package/dist/components/popover/index.d.ts +5 -5
  125. package/dist/components/select/index.d.ts +23 -0
  126. package/dist/{content-YOKzMoc7.js → content-BmwgR8WP.js} +7 -7
  127. package/dist/content.js +1 -1
  128. package/dist/copy-CMAYGCsm.cjs +1 -0
  129. package/dist/{cose-bilkent-JH36ORCC-DTwvJlGw.js → cose-bilkent-JH36ORCC-DCMxiO2H.js} +2 -2
  130. package/dist/cube-BB32JJuI.cjs +1 -0
  131. package/dist/cube-dim-DTcZAlcE.cjs +1 -0
  132. package/dist/cube-dim-DgfzlG3p.js +9 -0
  133. package/dist/cube-fold-CKVQ1IDZ.cjs +1 -0
  134. package/dist/cube-fold-Dp4-pf7P.js +9 -0
  135. package/dist/cube-grid-BrxyqSNh.cjs +1 -0
  136. package/dist/cube-grid-DprxkSoT.js +9 -0
  137. package/dist/cube-iOzgFQbc.js +9 -0
  138. package/dist/cynefin-VYW2F7L2-Yeua0tAa.cjs +1 -0
  139. package/dist/{cynefinDiagram-TSTJHNR4-Bjt4QTVh.js → cynefinDiagram-TSTJHNR4-B6dEjVBJ.js} +4 -4
  140. package/dist/{cynefinDiagram-TSTJHNR4-ISDORSxO.cjs → cynefinDiagram-TSTJHNR4-CAx-94I7.cjs} +1 -1
  141. package/dist/{dagre-VKFMJZFB-Dfku86Az.js → dagre-VKFMJZFB-CkNsP9vI.js} +10 -10
  142. package/dist/{diagram-FQU43EPY-BvQ5jmVn.js → diagram-FQU43EPY-Cefzg0En.js} +3 -3
  143. package/dist/{diagram-FQU43EPY-BAiRt5eL.cjs → diagram-FQU43EPY-Cn7-Jxoj.cjs} +2 -2
  144. package/dist/{diagram-G47NLZAW-DT2BBA0T.js → diagram-G47NLZAW-BsDJqCJu.js} +6 -6
  145. package/dist/{diagram-G47NLZAW-DGnmEa8u.cjs → diagram-G47NLZAW-Clm1JIiF.cjs} +1 -1
  146. package/dist/{diagram-NH7WQ7WH-DxgkStA3.cjs → diagram-NH7WQ7WH-BQWzEBKY.cjs} +1 -1
  147. package/dist/{diagram-NH7WQ7WH-W7jg4Vh8.js → diagram-NH7WQ7WH-DEGzjxf4.js} +4 -4
  148. package/dist/{diagram-OA4YK3LP-DkvFII73.cjs → diagram-OA4YK3LP-B90IV5Q-.cjs} +3 -3
  149. package/dist/{diagram-OA4YK3LP-jU--aqQl.js → diagram-OA4YK3LP-BZUB0lzT.js} +5 -5
  150. package/dist/{diagram-WEI45ONY-XvzRFmmY.cjs → diagram-WEI45ONY-B-8IP8vK.cjs} +1 -1
  151. package/dist/{diagram-WEI45ONY-C_Qhf4ny.js → diagram-WEI45ONY-BURO1A6S.js} +4 -4
  152. package/dist/{dist-C0Fwsvsq.js → dist-9Ly83Lo6.js} +1 -1
  153. package/dist/dot-bar-C2PcL7wc.cjs +1 -0
  154. package/dist/dot-bar-vHWpqnhw.js +9 -0
  155. package/dist/dot-circle-DQqpkRr_.js +9 -0
  156. package/dist/dot-circle-EInrpGOw.cjs +1 -0
  157. package/dist/dot-do6V9GYP.cjs +1 -0
  158. package/dist/dot-line-BEFriL91.cjs +1 -0
  159. package/dist/dot-line-CorWP6p2.js +9 -0
  160. package/dist/dot-pulse-BGidqqxA.cjs +1 -0
  161. package/dist/dot-pulse-OtjDlpwG.js +9 -0
  162. package/dist/double-bounce-CWAE4F5S.js +9 -0
  163. package/dist/double-bounce-DOehLE4X.cjs +1 -0
  164. package/dist/download-DiDwbZL3.cjs +1 -0
  165. package/dist/drop-BkBi0TEt.cjs +1 -0
  166. package/dist/drop-CTSvqyOb.js +9 -0
  167. package/dist/drop-DU-RgWR1.js +16 -0
  168. package/dist/drop-_Iz47Fmh.cjs +7 -0
  169. package/dist/{dropdown-CzGAVWYC.js → dropdown-DQy4YvVn.js} +22 -21
  170. package/dist/dropdown.js +1 -1
  171. package/dist/ebnfDiagram-CCIWWBDH-B5ZJxr_W.cjs +1 -0
  172. package/dist/{ebnfDiagram-CCIWWBDH-Gnr20Oc1.js → ebnfDiagram-CCIWWBDH-B6Gh-zq6.js} +4 -4
  173. package/dist/{erDiagram-Q63AITRT-D0Hh9b-W.js → erDiagram-Q63AITRT-B1iQoGRH.js} +13 -13
  174. package/dist/eventmodeling-45OFAUF4-_fgxNekW.cjs +1 -0
  175. package/dist/eye-BoGpexya.cjs +4 -0
  176. package/dist/eye-close-DdWDFgn0.cjs +4 -0
  177. package/dist/eye-close-pVr4NTjX.js +13 -0
  178. package/dist/eye-j7jzy-2Y.js +13 -0
  179. package/dist/factory-Bbul5tOL.js +653 -0
  180. package/dist/flowDiagram-23GEKE2U-BxyRR3qT.js +19 -0
  181. package/dist/{form-B8afuJlF.js → form-DwjKUNz4.js} +9 -9
  182. package/dist/form.js +1 -1
  183. package/dist/fullscreen-0HIdaZda.cjs +1 -0
  184. package/dist/{ganttDiagram-NO4QXBWP-B40Eabk0.js → ganttDiagram-NO4QXBWP-BE1v5yrp.js} +6 -6
  185. package/dist/gitGraph-TEB2WS4Q-BlIs9PSc.cjs +1 -0
  186. package/dist/{gitGraphDiagram-IHSO6WYX-BUJNSssA.js → gitGraphDiagram-IHSO6WYX-BVRc2mkM.js} +3 -3
  187. package/dist/{gitGraphDiagram-IHSO6WYX-DW06165m.cjs → gitGraphDiagram-IHSO6WYX-DODKoP1i.cjs} +1 -1
  188. package/dist/github-BjP57_Xw.js +11 -0
  189. package/dist/github-_spzUZUJ.cjs +2 -0
  190. package/dist/{glass-BniIptBE.js → glass-DKQAEAmc.js} +6 -6
  191. package/dist/glass.js +1 -1
  192. package/dist/globe-0D8896Sf.js +15 -0
  193. package/dist/globe-DOwlStJB.cjs +6 -0
  194. package/dist/home-C2_ARWjR.cjs +1 -0
  195. package/dist/home-COHVdQmi.js +10 -0
  196. package/dist/i18n-B3HBw6rL.js +1 -0
  197. package/dist/i18n-Cf5TtRb4-BeflTU82.js +175 -0
  198. package/dist/i18n.js +3 -2
  199. package/dist/icon-DSIyi1nQ.js +318 -0
  200. package/dist/icon.js +1 -1
  201. package/dist/icons.js +91 -3
  202. package/dist/iife/button.iife.js +1 -1
  203. package/dist/iife/card.iife.js +1 -1
  204. package/dist/iife/checkbox.iife.js +1 -1
  205. package/dist/iife/colorpicker.iife.js +235 -2
  206. package/dist/iife/content.iife.js +1 -1
  207. package/dist/iife/dropdown.iife.js +1 -1
  208. package/dist/iife/form.iife.js +1 -1
  209. package/dist/iife/glass.iife.js +1 -1
  210. package/dist/iife/icon.iife.js +238 -1
  211. package/dist/iife/image.iife.js +1 -1
  212. package/dist/iife/input.iife.js +238 -1
  213. package/dist/iife/link.iife.js +1 -1
  214. package/dist/iife/loading.iife.js +1 -1
  215. package/dist/iife/math.iife.js +332 -260
  216. package/dist/iife/mermaid.iife.js +489 -252
  217. package/dist/iife/message.iife.js +238 -1
  218. package/dist/iife/modal.iife.js +1 -1
  219. package/dist/iife/player.iife.js +243 -10
  220. package/dist/iife/popover.iife.js +1 -1
  221. package/dist/iife/progress.iife.js +1 -1
  222. package/dist/iife/radar.iife.js +1 -1
  223. package/dist/iife/route.iife.js +1 -1
  224. package/dist/iife/router.iife.js +1 -1
  225. package/dist/iife/scratch.iife.js +1 -1
  226. package/dist/iife/section.iife.js +1 -1
  227. package/dist/iife/select.iife.js +235 -2
  228. package/dist/iife/skeleton.iife.js +1 -1
  229. package/dist/iife/tab.iife.js +1 -1
  230. package/dist/iife/tabpane.iife.js +1 -1
  231. package/dist/iife/theme-switch.iife.js +1 -1
  232. package/dist/{image-CqoQfJoV.js → image-Bn0VuwO0.js} +8 -8
  233. package/dist/image.js +1 -1
  234. package/dist/index.cjs +26 -263
  235. package/dist/index.d.ts +9 -0
  236. package/dist/index.iife.js +617 -781
  237. package/dist/index.js +88 -87
  238. package/dist/info-DKCQHKI2-Chhdpnw0.cjs +1 -0
  239. package/dist/info-circle-Ciy6yKz-.js +14 -0
  240. package/dist/info-circle-fill-ChhhmoCU.cjs +1 -0
  241. package/dist/info-circle-fill-D5WjbRhd.js +10 -0
  242. package/dist/info-circle-xp0NNK4i.cjs +5 -0
  243. package/dist/infoDiagram-FWYZ7A6U-D_0rNuCQ.cjs +2 -0
  244. package/dist/{infoDiagram-FWYZ7A6U-Dc0m9qAx.js → infoDiagram-FWYZ7A6U-Z_GyAL7u.js} +3 -3
  245. package/dist/input-2Zz1gLzy.js +195 -0
  246. package/dist/input.js +1 -1
  247. package/dist/{ishikawaDiagram-FXEZZL3T-DuFtHOmf.js → ishikawaDiagram-FXEZZL3T-l087wv0C.js} +4 -4
  248. package/dist/issue-DF89eLmN.js +11 -0
  249. package/dist/issue-jx2d2kOG.cjs +2 -0
  250. package/dist/{journeyDiagram-5HDEW3XC-Bshelnhq.js → journeyDiagram-5HDEW3XC-DmNilMKR.js} +4 -4
  251. package/dist/{kanban-definition-HUTT4EX6-Dogv2paU.js → kanban-definition-HUTT4EX6-CmUdDowM.js} +9 -9
  252. package/dist/latinmodernmath-BNPh95x3.cjs +1 -0
  253. package/dist/latinmodernmath-BnpcbCAh.js +4 -0
  254. package/dist/line-BFm46PmI.cjs +1 -0
  255. package/dist/{line-BIPmUVxO.js → line-CteEpfCu.js} +1 -1
  256. package/dist/line-Dt7YMxyn.js +9 -0
  257. package/dist/line-scale-BNCCcLKl.js +9 -0
  258. package/dist/line-scale-Mzdq1fTx.cjs +1 -0
  259. package/dist/{linear-B2AM4ZBe.js → linear-C8AjwHWi.js} +1 -1
  260. package/dist/{link-BCrmHvXP.js → link-DcRMinJ9.js} +9 -9
  261. package/dist/link.js +1 -1
  262. package/dist/loading-BXZBOAbH.js +116 -0
  263. package/dist/loading-_bxcEaz0.js +10 -0
  264. package/dist/loading-fDM8Celd.cjs +1 -0
  265. package/dist/loading-scene-DTIgBHY7.cjs +53 -0
  266. package/dist/loading-scene-nEgp25AV.js +62 -0
  267. package/dist/loading.js +1 -1
  268. package/dist/lock-DSKjvWfl.cjs +4 -0
  269. package/dist/lock-Dw1hWtdP.js +13 -0
  270. package/dist/math-C6oaCrk-.js +223 -0
  271. package/dist/math.js +1 -1
  272. package/dist/menu-DQpdpBLB.js +11 -0
  273. package/dist/menu-DdHtbEk4.cjs +2 -0
  274. package/dist/{mermaid-C1oQyPE3.js → mermaid-Cmxzclzv.js} +11 -11
  275. package/dist/mermaid-parser.core-BgDzuhyE.cjs +3 -0
  276. package/dist/{mermaid.core-B2d5lQW2.js → mermaid.core-do05yX9X.js} +49 -49
  277. package/dist/{mermaid.core-a1hgpWfs.cjs → mermaid.core-r_D7CSaj.cjs} +2 -2
  278. package/dist/mermaid.js +1 -1
  279. package/dist/message-BFv9-X-4.js +10 -0
  280. package/dist/message-DHzOpb1d.cjs +1 -0
  281. package/dist/{message-CNdmbeLf.js → message-E92Vu7SO.js} +24 -21
  282. package/dist/message.js +1 -1
  283. package/dist/{mindmap-definition-LN4V7U3C-f7s5ZePP.js → mindmap-definition-LN4V7U3C-Mj5HCDww.js} +12 -12
  284. package/dist/modal-BQUM-5G3.cjs +2 -0
  285. package/dist/{modal-gRagDkTb.js → modal-TayIRDMV.js} +12 -12
  286. package/dist/modal.js +1 -1
  287. package/dist/more-l0-w-c99.js +11 -0
  288. package/dist/more-tqkE9a7G.cjs +2 -0
  289. package/dist/packet-7NZHBO7P-BIgRfmDy.cjs +1 -0
  290. package/dist/pacman-DqDqKzL4.js +9 -0
  291. package/dist/pacman-hB0Vx_ut.cjs +1 -0
  292. package/dist/pegDiagram-2B236MQR-CTcfU4SV.cjs +1 -0
  293. package/dist/{pegDiagram-2B236MQR-B-Xeh55J.js → pegDiagram-2B236MQR-Crdw8nmA.js} +4 -4
  294. package/dist/pie-RZYD4A2V-BJEu4CoQ.cjs +1 -0
  295. package/dist/{pieDiagram-ENE6RG2P-CVSE95zc.js → pieDiagram-ENE6RG2P-9GNsaY-6.js} +6 -6
  296. package/dist/{pieDiagram-ENE6RG2P-BkSiP4iu.cjs → pieDiagram-ENE6RG2P-D1QD_sOE.cjs} +2 -2
  297. package/dist/{player-BkkmkqR4.js → player-BZVIOmdS.js} +112 -113
  298. package/dist/player.js +1 -1
  299. package/dist/plugins/load-svg.d.ts +16 -3
  300. package/dist/plus-C91b38f6.js +11 -0
  301. package/dist/plus-DjDn222b.cjs +2 -0
  302. package/dist/{popover-BZKSLe3D.js → popover-Bimxdeql.js} +17 -15
  303. package/dist/popover.js +1 -1
  304. package/dist/power-off-CM1fKRrr.js +10 -0
  305. package/dist/power-off-C_Akq2D-.cjs +1 -0
  306. package/dist/preview-ByPt3tw_.cjs +1 -0
  307. package/dist/preview-CAEhg4Xl.js +10 -0
  308. package/dist/{progress-vk40tuhm.js → progress-CNUdc_VD.js} +13 -12
  309. package/dist/progress.js +1 -1
  310. package/dist/pulse-CPV8p0Lr.cjs +1 -0
  311. package/dist/pulse-IOuRzRUm.js +9 -0
  312. package/dist/{quadrantDiagram-ABIIQ3AL-TJ8FmqES.js → quadrantDiagram-ABIIQ3AL-rDltxRrQ.js} +3 -3
  313. package/dist/{radar-Bg0cexzU.js → radar-Dse0Dgma.js} +12 -10
  314. package/dist/radar-I7S5WNFK-DYV5_m9_.cjs +1 -0
  315. package/dist/radar.js +1 -1
  316. package/dist/railroad-3IZDKUUU-6oFUgWYG.cjs +1 -0
  317. package/dist/railroad-abnf-AHOZXSZD-DY3xJn9p.cjs +1 -0
  318. package/dist/railroad-ebnf-EBAXGLYW-DljDdad3.cjs +1 -0
  319. package/dist/railroad-peg-LSFZ7HO6-DNRdpVaC.cjs +1 -0
  320. package/dist/{railroadDiagram-RFXS5EU6-0lS5wYI7.js → railroadDiagram-RFXS5EU6-B6b0YncQ.js} +4 -4
  321. package/dist/railroadDiagram-RFXS5EU6-DCqD-VXV.cjs +1 -0
  322. package/dist/refresh-CjGodz5_.cjs +1 -0
  323. package/dist/{requirementDiagram-TGXJPOKE-viCQLyJd.js → requirementDiagram-TGXJPOKE-BVEkrDX1.js} +12 -12
  324. package/dist/rolldown-runtime-DkpYurw3.js +25 -0
  325. package/dist/rotate-O1KJozW0.cjs +1 -0
  326. package/dist/rotate-uZhtaw8R.js +9 -0
  327. package/dist/{route-CGwS0cd_.js → route-Dh5S2dSW.js} +10 -11
  328. package/dist/route.js +1 -1
  329. package/dist/{router-BK6DEkcN.js → router-DUxBSvIi.js} +11 -11
  330. package/dist/router.js +1 -1
  331. package/dist/{sankeyDiagram-HTMAVEWB-CV6_AuMF.js → sankeyDiagram-HTMAVEWB-C_G-oWGd.js} +2 -2
  332. package/dist/scale-out-CEERARri.cjs +1 -0
  333. package/dist/scale-out-mSsKNtie.js +9 -0
  334. package/dist/{scratch-ClF1awGi.js → scratch-4TCqNbat.js} +8 -8
  335. package/dist/scratch.js +1 -1
  336. package/dist/search-Bci4TKOK.js +11 -0
  337. package/dist/search-DewMt8lt.cjs +2 -0
  338. package/dist/{section-BL0V7Kjf.js → section-CMN7tQ-S.js} +10 -10
  339. package/dist/section.js +1 -1
  340. package/dist/{select-DRKYa3W2.js → select-D48kcwEy.js} +53 -47
  341. package/dist/select.js +1 -1
  342. package/dist/{sequenceDiagram-DBY2YBRQ-B9WNesh2.js → sequenceDiagram-DBY2YBRQ-B8lP53eo.js} +5 -5
  343. package/dist/setting-BlJhorAQ.cjs +1 -0
  344. package/dist/setting-RhW6oH2c.js +10 -0
  345. package/dist/{skeleton-D7JIbROq.js → skeleton-DbgMcQQ0.js} +9 -9
  346. package/dist/skeleton.js +1 -1
  347. package/dist/solar-CdvkRr5X.cjs +1 -0
  348. package/dist/solar-Ck7RIK09.js +9 -0
  349. package/dist/sort-CZTjWeHC.cjs +7 -0
  350. package/dist/sort-tAqAKb3x.js +16 -0
  351. package/dist/sprite-DHG11_c7.cjs +138 -0
  352. package/dist/sprite-ICuni2rO.js +147 -0
  353. package/dist/square-exSvykCu.cjs +1 -0
  354. package/dist/square-xGODzCyr.js +9 -0
  355. package/dist/{src-DtRLxcYO.js → src-CM-0IT-N.js} +1 -1
  356. package/dist/ssg.js +1 -1
  357. package/dist/{ssr-DSGwPtEd.js → ssr-BzHZ2bCe.js} +5 -5
  358. package/dist/ssr-stream.js +1 -1
  359. package/dist/ssr.js +1 -1
  360. package/dist/{stateDiagram-2N3HPSRC-DxH4BMSh.js → stateDiagram-2N3HPSRC-DzG4g-Br.js} +15 -15
  361. package/dist/stateDiagram-v2-6OUMAXLB-tbh4Ib6Z.js +30 -0
  362. package/dist/stretch-Bv60MZD_.js +9 -0
  363. package/dist/stretch-CTFwefaK.cjs +1 -0
  364. package/dist/{swimlanes-5IMT3BWC-DcADNGpg.js → swimlanes-5IMT3BWC-CQpI-vXu.js} +10 -10
  365. package/dist/swimlanesDiagram-G3AALYLV-C_mEClzT.js +31 -0
  366. package/dist/{tab-DFVtDJb2.js → tab-ADuziXeq.js} +12 -12
  367. package/dist/tab.js +1 -1
  368. package/dist/{tabpane-C3qZGN-D.js → tabpane-Bisq-qpc.js} +11 -11
  369. package/dist/tabpane.js +1 -1
  370. package/dist/team-DshvOQrF.cjs +1 -0
  371. package/dist/team-oJOYGlHy.js +10 -0
  372. package/dist/temml-DKTWcsY9.js +9934 -0
  373. package/dist/temml-qMLYhcAb.cjs +96 -0
  374. package/dist/test/e2e/helpers.d.ts +32 -0
  375. package/dist/test/unit/select-ssr-upgrade.test.d.ts +1 -0
  376. package/dist/text-BniFEEB5.cjs +1 -0
  377. package/dist/text-CX8UkbzB.js +17 -0
  378. package/dist/theme-DL6q_FZu.js +52 -0
  379. package/dist/{theme-switch-BXNH5uPD.js → theme-switch-GbuiPclm.js} +16 -17
  380. package/dist/theme-switch.js +1 -1
  381. package/dist/theme.js +1 -1
  382. package/dist/{timeline-definition-FHXFAJF6-C80VjPLh.js → timeline-definition-FHXFAJF6-JZu2t9NH.js} +5 -5
  383. package/dist/treeView-QDETBFTQ-JVYSN7d-.cjs +1 -0
  384. package/dist/treemap-6X3UGDF4-ChqvozdN.cjs +1 -0
  385. package/dist/triple-bounce-BwxTDpKz.js +9 -0
  386. package/dist/triple-bounce-BzAtF-TA.cjs +1 -0
  387. package/dist/typings.d.ts +9 -0
  388. package/dist/unlock-B6Kz8QUC.cjs +4 -0
  389. package/dist/unlock-DMG2IKZP.js +13 -0
  390. package/dist/user-BvjpVTOP.js +10 -0
  391. package/dist/user-CNTRFuXZ.cjs +1 -0
  392. package/dist/utils/builder/escape.d.ts +6 -1
  393. package/dist/utils/dom.d.ts +2 -15
  394. package/dist/utils/i18n/index.d.ts +2 -69
  395. package/dist/utils/i18n.js +5 -87
  396. package/dist/utils/index.d.ts +2 -1
  397. package/dist/utils/style.d.ts +7 -5
  398. package/dist/utils-X5_TIQTQ.js +48 -0
  399. package/dist/utils-xccQZnoa.js +650 -0
  400. package/dist/{vennDiagram-L72KCM5P-BYHB7OW8.js → vennDiagram-L72KCM5P-DM6fQj7p.js} +4 -4
  401. package/dist/wardley-OPB4EBWU-BI6su3co.cjs +1 -0
  402. package/dist/{wardleyDiagram-EHGQE667--ubmCaWM.js → wardleyDiagram-EHGQE667-CzH0l2vj.js} +4 -4
  403. package/dist/{wardleyDiagram-EHGQE667-K6ckkRZS.cjs → wardleyDiagram-EHGQE667-ZMxVQw17.cjs} +2 -2
  404. package/dist/warning-circle-2Ni7fSPp.js +10 -0
  405. package/dist/warning-circle-CxDUN_Pg.cjs +1 -0
  406. package/dist/warning-circle-fill-CNmn_n74.js +10 -0
  407. package/dist/warning-circle-fill-CRKQ8eDt.cjs +1 -0
  408. package/dist/without-content-BCQsfG1Q.cjs +1 -0
  409. package/dist/without-content-C7ATBu1N.js +10 -0
  410. package/dist/{xychartDiagram-FW5EYKEG-DLqWcTPt.js → xychartDiagram-FW5EYKEG-GL1uK3EN.js} +8 -8
  411. package/dist/zoom-in-BLTVwnRI.cjs +1 -0
  412. package/dist/zoom-out-BIXvVAC9.cjs +1 -0
  413. package/docs/COMPONENTS.md +5 -5
  414. package/package.json +119 -35
  415. package/typings.d.ts +9 -0
  416. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +0 -1
  417. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +0 -1
  418. package/dist/builtin-1lUEp_ro.js +0 -416
  419. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +0 -30
  420. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +0 -30
  421. package/dist/colorpicker-CKA4xN-g.js +0 -314
  422. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +0 -1
  423. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +0 -1
  424. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +0 -1
  425. package/dist/factory-ZNhcQ4tf.js +0 -482
  426. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +0 -19
  427. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +0 -1
  428. package/dist/icon-GZrfSeon.js +0 -256
  429. package/dist/info-DKCQHKI2-DNOtUIin.cjs +0 -1
  430. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +0 -2
  431. package/dist/input-ZY2Wumze.js +0 -195
  432. package/dist/katex-es-BTpuCxxV.cjs +0 -261
  433. package/dist/katex-es-CKRwcaiU.js +0 -23682
  434. package/dist/loading-M6gWxLbm.js +0 -206
  435. package/dist/math-8E-45Y8e.js +0 -52
  436. package/dist/mermaid-parser.core-DYumW1vq.cjs +0 -6
  437. package/dist/mocks-CMGoftIc.js +0 -179
  438. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +0 -1
  439. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +0 -1
  440. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +0 -1
  441. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +0 -1
  442. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +0 -1
  443. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +0 -1
  444. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +0 -1
  445. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +0 -1
  446. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +0 -1
  447. package/dist/rolldown-runtime-9ZSF5uba.js +0 -16
  448. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +0 -30
  449. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +0 -31
  450. package/dist/test/unit/colorpicker.color.utils.test.d.ts +0 -1
  451. package/dist/test/unit/utils.math.test.d.ts +0 -1
  452. package/dist/test/unit/utils.tween.test.d.ts +0 -1
  453. package/dist/theme-kOWZbKCq.js +0 -70
  454. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +0 -1
  455. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +0 -1
  456. package/dist/utils/color.d.ts +0 -52
  457. package/dist/utils/image.d.ts +0 -39
  458. package/dist/utils/math.d.ts +0 -26
  459. package/dist/utils/tween.d.ts +0 -21
  460. package/dist/utils-D1iZnChu.js +0 -614
  461. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +0 -1
  462. package/dist/warning-circle-fill-Cz0qu7AH.js +0 -23
@@ -1,10 +1,42 @@
1
1
  import type { Page } from '@playwright/test';
2
+ /**
3
+ * Freezes animations in the **light DOM** only — page chrome, demo scaffolding, anything the
4
+ * specs mount directly into `<body>`.
5
+ *
6
+ * It cannot reach inside a component: this is injected as a document-level `<style>`, and
7
+ * document stylesheets do not cascade into a shadow tree. Components are frozen instead by
8
+ * `reducedMotion: 'reduce'` in `playwright.config.ts`, which triggers the `REDUCED_MOTION_CSS`
9
+ * that `ensureShadowRoot` adopts into every shadow root. Don't add component animation
10
+ * overrides here — they will silently do nothing.
11
+ */
2
12
  export declare const FREEZE_ANIMATIONS = "\n *, *::before, *::after {\n animation-duration: 0.001ms !important;\n animation-delay: 0ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.001ms !important;\n transition-delay: 0ms !important;\n }\n";
3
13
  /**
4
14
  * Navigate to the dev server, wait for a custom element tag to register,
5
15
  * freeze all animations, and clear the body for isolated component mounting.
6
16
  */
7
17
  export declare function isolatedSetup(page: Page, url: string, waitForTag: string): Promise<void>;
18
+ /**
19
+ * Setup for the specs under `test/e2e/visual/`, which screenshot the demo's `/components`
20
+ * route in place rather than mounting isolated markup.
21
+ *
22
+ * Same determinism guarantees as `isolatedSetup` — in particular `document.fonts.ready`,
23
+ * which these specs used to skip. `r-math` lazy-loads Temml plus two font faces, so without
24
+ * it the formula is measured against fallback metrics and the screenshot lands a hundred-odd
25
+ * pixels off, differently each run.
26
+ */
27
+ export declare function demoSetup(page: Page, waitForTag: string): Promise<void>;
28
+ /**
29
+ * Wait until every matching element has finished rendering its lazily-loaded variant.
30
+ *
31
+ * Components that resolve `name` at runtime (`r-loading`, `r-icon`) fetch the variant with a
32
+ * dynamic `import()` and expose the in-flight promise as `_pending`. A fixed `waitForTimeout`
33
+ * races that fetch — on a cold module graph the chunk lands *after* the screenshot starts, and
34
+ * `toHaveScreenshot` then fails with "Failed to take two consecutive stable screenshots"
35
+ * because the element is still swapping its children between the two captures.
36
+ *
37
+ * Awaiting `_pending` is deterministic regardless of how slow the chunk is.
38
+ */
39
+ export declare function settlePending(page: Page, selector: string): Promise<void>;
8
40
  /**
9
41
  * Replace body content with arbitrary HTML.
10
42
  * Custom elements are already registered from the dev server boot,
@@ -0,0 +1 @@
1
+ import '@/components/select/index';
@@ -0,0 +1 @@
1
+ const t=require("./builder-2HD21I6K.cjs");var e='.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-loading .text{text-align:var(--loading-text-text-align, center);text-transform:var(--loading-text-text-transform, uppercase);font-family:var(--loading-text-font-family, "Nunito", sans-serif);font-size:var(--loading-text-font-size, 4em);color:var(--loading-text-color, transparent);letter-spacing:var(--loading-text-letter-spacing, .4em)}@keyframes letters{to{text-shadow:var(--loading-text-keyframes-to-text-shadow, 0 0 2px rgba(204, 208, 212, .2), 0 0 3px rgba(0, 0, 0, .02), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(255, 255, 255, 0), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(255, 255, 255, 0), 0 0 0 rgba(255, 255, 255, 0))}}.ran-loading .text-item{text-shadow:var(--loading-text-item-text-shadow, 0 0 2px rgba(22, 22, 22, .9), 0 15px 25px rgba(0, 0, 0, .3), 0 -2px 3px rgba(0, 0, 0, .1), 0 -5px 10px rgba(22, 22, 22, .5), 0 5px 10px rgba(0, 0, 0, .3), 0 3px 4px rgba(22, 22, 22, .2), 0 0 20px rgba(22, 22, 22, .45));animation:var(--loading-text-item-animation, letters .85s ease-in-out infinite alternate);animation-play-state:var(--loading-text-item-animation-play-state, running);animation-delay:var(--loading-text-item-animation-delay, 0)}.ran-loading .text-item:nth-child(2){animation-delay:var(--loading-text-item-nth-child-2-animation-delay, .15s)}.ran-loading .text-item:nth-child(3){animation-delay:var(--loading-text-item-nth-child-3-animation-delay, .3s)}.ran-loading .text-item:nth-child(4){animation-delay:var(--loading-text-item-nth-child-4-animation-delay, .45s)}.ran-loading .text-item:nth-child(5){animation-delay:var(--loading-text-item-nth-child-5-animation-delay, .6s)}.ran-loading .text-item:nth-child(6){animation-delay:var(--loading-text-item-nth-child-6-animation-delay, .75s)}.ran-loading .text-item:nth-child(7){animation-delay:var(--loading-text-item-nth-child-7-animation-delay, .9s)}',i=()=>t.Div().class("text").part("text").children(...["L","o","a","d","i","n","g"].map(a=>t.Span().class("text-item").text(a))).build(),n={css:e,render:i};exports.default=n;
@@ -0,0 +1,17 @@
1
+ import { i as a, m as i } from "./factory-Bbul5tOL.js";
2
+ import "./ssr-BzHZ2bCe.js";
3
+ var e = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-loading .text{text-align:var(--loading-text-text-align, center);text-transform:var(--loading-text-text-transform, uppercase);font-family:var(--loading-text-font-family, "Nunito", sans-serif);font-size:var(--loading-text-font-size, 4em);color:var(--loading-text-color, transparent);letter-spacing:var(--loading-text-letter-spacing, .4em)}@keyframes letters{to{text-shadow:var(--loading-text-keyframes-to-text-shadow, 0 0 2px rgba(204, 208, 212, .2), 0 0 3px rgba(0, 0, 0, .02), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(255, 255, 255, 0), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(255, 255, 255, 0), 0 0 0 rgba(255, 255, 255, 0))}}.ran-loading .text-item{text-shadow:var(--loading-text-item-text-shadow, 0 0 2px rgba(22, 22, 22, .9), 0 15px 25px rgba(0, 0, 0, .3), 0 -2px 3px rgba(0, 0, 0, .1), 0 -5px 10px rgba(22, 22, 22, .5), 0 5px 10px rgba(0, 0, 0, .3), 0 3px 4px rgba(22, 22, 22, .2), 0 0 20px rgba(22, 22, 22, .45));animation:var(--loading-text-item-animation, letters .85s ease-in-out infinite alternate);animation-play-state:var(--loading-text-item-animation-play-state, running);animation-delay:var(--loading-text-item-animation-delay, 0)}.ran-loading .text-item:nth-child(2){animation-delay:var(--loading-text-item-nth-child-2-animation-delay, .15s)}.ran-loading .text-item:nth-child(3){animation-delay:var(--loading-text-item-nth-child-3-animation-delay, .3s)}.ran-loading .text-item:nth-child(4){animation-delay:var(--loading-text-item-nth-child-4-animation-delay, .45s)}.ran-loading .text-item:nth-child(5){animation-delay:var(--loading-text-item-nth-child-5-animation-delay, .6s)}.ran-loading .text-item:nth-child(6){animation-delay:var(--loading-text-item-nth-child-6-animation-delay, .75s)}.ran-loading .text-item:nth-child(7){animation-delay:var(--loading-text-item-nth-child-7-animation-delay, .9s)}', n = () => a().class("text").part("text").children(...[
4
+ "L",
5
+ "o",
6
+ "a",
7
+ "d",
8
+ "i",
9
+ "n",
10
+ "g"
11
+ ].map((t) => i().class("text-item").text(t))).build(), l = {
12
+ css: e,
13
+ render: n
14
+ };
15
+ export {
16
+ l as default
17
+ };
@@ -0,0 +1,52 @@
1
+ import "./utils-xccQZnoa.js";
2
+ import { a as o, c as u, i as a } from "./i18n-Cf5TtRb4-BeflTU82.js";
3
+ var s = "ran-theme", h = "(prefers-color-scheme: dark)", m = null, i = (e) => {
4
+ if (e && "style" in e) return e;
5
+ if (e && "documentElement" in e) return e.documentElement;
6
+ if (!(typeof document > "u"))
7
+ return document.documentElement;
8
+ }, l = (e, t) => {
9
+ e.setAttribute("data-ran-theme", t ? "dark" : "light"), e.setAttribute("theme", t ? "dark" : "light");
10
+ }, d = () => {
11
+ m?.(), m = null;
12
+ }, c = (e, t) => {
13
+ const r = i(t);
14
+ if (r) {
15
+ if (d(), e === "system") {
16
+ if (typeof window > "u") return;
17
+ m = u(h, (n) => l(r, n)), a(s, "system");
18
+ return;
19
+ }
20
+ r.setAttribute("data-ran-theme", e), r.setAttribute("theme", e), a(s, e);
21
+ }
22
+ }, E = (e) => {
23
+ const t = i(e);
24
+ if (!t) return "";
25
+ const r = t.getAttribute("data-ran-theme") || t.getAttribute("theme") || "";
26
+ return r === "light" || r === "dark" ? o(s) === "system" ? "system" : r : "";
27
+ }, f = (e, t, r) => {
28
+ const n = i(r);
29
+ n && n.style.setProperty(e, String(t));
30
+ }, y = (e, t) => {
31
+ const r = i(t);
32
+ r && r.style.removeProperty(e);
33
+ }, p = (e, t) => {
34
+ Object.entries(e).forEach(([r, n]) => {
35
+ if (n == null) {
36
+ y(r, t);
37
+ return;
38
+ }
39
+ f(r, n, t);
40
+ });
41
+ }, A = (e) => {
42
+ const t = o(s);
43
+ (t === "light" || t === "dark" || t === "system") && c(t, e);
44
+ };
45
+ export {
46
+ f as a,
47
+ c as i,
48
+ E as n,
49
+ p as o,
50
+ A as r,
51
+ y as t
52
+ };
@@ -1,9 +1,8 @@
1
- import { a as i, n as o, o as h, r as l, t as c } from "./utils-D1iZnChu.js";
2
- import { c as d } from "./mocks-CMGoftIc.js";
3
- import { t as u } from "./events-C59wGdni.js";
4
- import { i as m, n as b } from "./factory-ZNhcQ4tf.js";
5
- import { a as v, n as p } from "./ssr-DSGwPtEd.js";
6
- import { i as g, n as w } from "./theme-kOWZbKCq.js";
1
+ import { V as i, i as o, n as h } from "./factory-Bbul5tOL.js";
2
+ import { t as l } from "./events-C59wGdni.js";
3
+ import { a as c, n as d } from "./ssr-BzHZ2bCe.js";
4
+ import { a as u, n as m, o as b, r as v, t as g } from "./utils-X5_TIQTQ.js";
5
+ import { i as p, n as w } from "./theme-DL6q_FZu.js";
7
6
  var f = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{display:var(--ran-theme-switch-display, inline-flex);box-sizing:border-box}.ran-theme-switch{display:inline-flex;align-items:center;gap:var(--ran-theme-switch-gap, 2px);padding:var(--ran-theme-switch-padding, 2px);border-width:var(--ran-skin-border-width, 1px);border-style:var(--ran-skin-border-style, solid);border-color:var(--ran-theme-switch-border-color, var(--ran-color-border, #eaeaea));border-radius:var(--ran-theme-switch-radius, var(--ran-radius-full, 9999px));background:var(--ran-theme-switch-background, transparent);box-sizing:border-box}.ran-theme-switch button{width:var(--ran-theme-switch-button-size, 28px);height:var(--ran-theme-switch-button-size, 28px);display:grid;place-items:center;border:none;border-radius:var(--ran-theme-switch-radius, var(--ran-radius-full, 9999px));background:transparent;color:var(--ran-theme-switch-color, var(--ran-color-text-secondary, #4d4d4d));cursor:pointer;padding:0}.ran-theme-switch button:hover{color:var(--ran-theme-switch-hover-color, var(--ran-color-text, #171717))}.ran-theme-switch button[aria-pressed=true]{background:var(--ran-theme-switch-active-background, var(--ran-color-bg-hover, #ebebeb));color:var(--ran-theme-switch-active-color, var(--ran-color-text, #171717))}.ran-theme-switch button:focus-visible{outline:var(--ran-theme-switch-focus-outline, 2px solid var(--ran-color-primary, #006bff));outline-offset:2px}.ran-theme-switch svg{width:var(--ran-theme-switch-icon-size, 16px);height:var(--ran-theme-switch-icon-size, 16px)}", a = [
8
7
  "system",
9
8
  "light",
@@ -12,7 +11,7 @@ var f = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
12
11
  system: '<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="1.5" y="2.5" width="13" height="9" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M5.5 14h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
13
12
  light: '<svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="3" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 1v1.8M8 13.2V15M15 8h-1.8M2.8 8H1m11.4-4.4-1.3 1.3M4.9 11.1l-1.3 1.3m9.8 0-1.3-1.3M4.9 4.9 3.6 3.6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
14
13
  dark: '<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M13.5 9.5A6 6 0 0 1 6.5 2.5a6 6 0 1 0 7 7z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>'
15
- }, s = "ran-theme-switch-sync", _ = class extends p {
14
+ }, s = "ran-theme-switch-sync", _ = class extends d {
16
15
  static get observedAttributes() {
17
16
  return [
18
17
  "label-system",
@@ -21,23 +20,23 @@ var f = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
21
20
  "sheet"
22
21
  ];
23
22
  }
24
- _events = new u();
23
+ _events = new l();
25
24
  _shadowDom;
26
25
  _group;
27
26
  constructor() {
28
- super(), this._shadowDom = o(this, f), this._group = c(this._shadowDom, ".ran-theme-switch", () => {
27
+ super(), this._shadowDom = m(this, f), this._group = g(this._shadowDom, ".ran-theme-switch", () => {
29
28
  const t = a.map((e) => {
30
- const r = b().attr("type", "button").data("choice", e).attr("part", `button ${e}`).aria("pressed", "false").build();
31
- return d || (r.innerHTML = y[e]), r;
29
+ const r = h().attr("type", "button").data("choice", e).attr("part", `button ${e}`).aria("pressed", "false").build();
30
+ return i || (r.innerHTML = y[e]), r;
32
31
  });
33
- return m().class("ran-theme-switch").attr("part", "switch").role("group").children(t).build();
32
+ return o().class("ran-theme-switch").attr("part", "switch").role("group").children(t).build();
34
33
  });
35
34
  }
36
35
  get sheet() {
37
- return l(this, "sheet");
36
+ return v(this, "sheet");
38
37
  }
39
38
  set sheet(t) {
40
- i(this, "sheet", t);
39
+ u(this, "sheet", t);
41
40
  }
42
41
  get value() {
43
42
  return w() || "system";
@@ -62,7 +61,7 @@ var f = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
62
61
  for (const e of this._group.querySelectorAll("button")) e.setAttribute("aria-pressed", e.dataset.choice === t ? "true" : "false");
63
62
  }
64
63
  _select(t) {
65
- g(t), this._reflect(), this._syncMeta(t), document.dispatchEvent(new CustomEvent(s)), this.dispatchEvent(new CustomEvent("change", {
64
+ p(t), this._reflect(), this._syncMeta(t), document.dispatchEvent(new CustomEvent(s)), this.dispatchEvent(new CustomEvent("change", {
66
65
  detail: { theme: t },
67
66
  bubbles: !0,
68
67
  composed: !0
@@ -86,7 +85,7 @@ var f = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
86
85
  };
87
86
  _handleSync = () => this._reflect();
88
87
  handlerExternalCss = () => {
89
- h(this, this._shadowDom, "sheet", null, this.sheet);
88
+ b(this, this._shadowDom, "sheet", null, this.sheet);
90
89
  };
91
90
  connectedCallback() {
92
91
  this.handlerExternalCss(), this._syncLabels(), this._reflect(), this._events.on(this._group, "click", this._handleClick), document.addEventListener(s, this._handleSync), typeof window < "u" && window.addEventListener("storage", this._handleSync);
@@ -98,7 +97,7 @@ var f = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transpar
98
97
  e !== r && (t === "sheet" && this.handlerExternalCss(), t.startsWith("label") && this._syncLabels());
99
98
  }
100
99
  };
101
- v("r-theme-switch", _);
100
+ c("r-theme-switch", _);
102
101
  export {
103
102
  _ as t
104
103
  };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./theme-switch-BXNH5uPD.js";
1
+ import { t as e } from "./theme-switch-GbuiPclm.js";
2
2
  export {
3
3
  e as ThemeSwitch,
4
4
  e as default
package/dist/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as s, i as T, n as a, o as m, r as t, t as o } from "./theme-kOWZbKCq.js";
1
+ import { a as s, i as T, n as a, o as m, r as t, t as o } from "./theme-DL6q_FZu.js";
2
2
  export {
3
3
  o as clearThemeToken,
4
4
  a as getTheme,
@@ -1,9 +1,9 @@
1
1
  import { n as o, t as Ct } from "./chunk-Y2CYZVJY-0JxdZxki.js";
2
- import { m as b, p as Z } from "./src-DtRLxcYO.js";
3
- import { J as gt, a as Wt, b as ft, et as Pt, o as Bt, rt as Vt, tt as Ft, x as yt } from "./chunk-WYO6CB5R-DDHkKowO.js";
4
- import { t as lt } from "./arc-DRPGof21.js";
5
- import { p as zt } from "./chunk-ICXQ74PX-DR8rL-xF.js";
6
- import { t as Ot } from "./chunk-VAUOI2AC-izt0o4id.js";
2
+ import { m as b, p as Z } from "./src-CM-0IT-N.js";
3
+ import { J as gt, a as Wt, b as ft, et as Pt, o as Bt, rt as Vt, tt as Ft, x as yt } from "./chunk-WYO6CB5R-DyGmS3I6.js";
4
+ import { t as lt } from "./arc-DJJx8BhF.js";
5
+ import { p as zt } from "./chunk-ICXQ74PX-DPZfA3a8.js";
6
+ import { t as Ot } from "./chunk-VAUOI2AC-CrgGIUR-.js";
7
7
  var tt = (function() {
8
8
  var e = /* @__PURE__ */ o(function(i, l, u, d) {
9
9
  for (u = u || {}, d = i.length; d--; u[i[d]] = l) ;
@@ -0,0 +1 @@
1
+ require("./chunk-KEIR6QF5-C4fcHpY0.cjs");const e=require("./chunk-CQNSW5MT-DHm86rAm.cjs");exports.createTreeViewServices=e.createTreeViewServices;
@@ -0,0 +1 @@
1
+ require("./chunk-KEIR6QF5-C4fcHpY0.cjs");const e=require("./chunk-R7FJI6CG-BjmGc1OU.cjs");exports.createTreemapServices=e.createTreemapServices;
@@ -0,0 +1,9 @@
1
+ import { i } from "./factory-Bbul5tOL.js";
2
+ import "./ssr-BzHZ2bCe.js";
3
+ var e = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-loading .triple-bounce{width:var(--loading-triple-bounce-width, 10em);text-align:var(--loading-triple-bounce-text-align, center)}.ran-loading .triple-bounce div{width:var(--loading-triple-bounce-div-width, 2em);height:var(--loading-triple-bounce-div-height, 2em);background:var(--loading-triple-bounce-div-background, var(--ran-color-primary, #4096ff));border-radius:var(--loading-triple-bounce-div-border-radius, 100%);display:var(--loading-triple-bounce-div-display, inline-block);animation:var(--loading-triple-bounce-div-animation, ran-loading-triple-bounce 1.4s infinite ease-in-out);animation-play-state:var(--loading-triple-bounce-div-animation-play-state, running);animation-fill-mode:var(--loading-triple-bounce-div-animation-fill-mode, both)}.ran-loading .triple-bounce .triple-bounce1{animation-delay:var(--loading-triple-bounce1-animation-delay, -.32s)}.ran-loading .triple-bounce .triple-bounce2{animation-delay:var(--loading-triple-bounce2-animation-delay, -.16s)}@keyframes ran-loading-triple-bounce{0%,80%,to{transform:var(--loading-triple-bounce-keyframes-0, scale(0))}40%{transform:var(--loading-triple-bounce-keyframes-40, scale(1))}}", n = () => i().class("triple-bounce").part("triple-bounce").children(...Array(3).fill(1).map((r, a) => i().class(`triple-bounce${a + 1}`))).build(), l = {
4
+ css: e,
5
+ render: n
6
+ };
7
+ export {
8
+ l as default
9
+ };
@@ -0,0 +1 @@
1
+ const i=require("./builder-2HD21I6K.cjs");var a=".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-loading .triple-bounce{width:var(--loading-triple-bounce-width, 10em);text-align:var(--loading-triple-bounce-text-align, center)}.ran-loading .triple-bounce div{width:var(--loading-triple-bounce-div-width, 2em);height:var(--loading-triple-bounce-div-height, 2em);background:var(--loading-triple-bounce-div-background, var(--ran-color-primary, #4096ff));border-radius:var(--loading-triple-bounce-div-border-radius, 100%);display:var(--loading-triple-bounce-div-display, inline-block);animation:var(--loading-triple-bounce-div-animation, ran-loading-triple-bounce 1.4s infinite ease-in-out);animation-play-state:var(--loading-triple-bounce-div-animation-play-state, running);animation-fill-mode:var(--loading-triple-bounce-div-animation-fill-mode, both)}.ran-loading .triple-bounce .triple-bounce1{animation-delay:var(--loading-triple-bounce1-animation-delay, -.32s)}.ran-loading .triple-bounce .triple-bounce2{animation-delay:var(--loading-triple-bounce2-animation-delay, -.16s)}@keyframes ran-loading-triple-bounce{0%,80%,to{transform:var(--loading-triple-bounce-keyframes-0, scale(0))}40%{transform:var(--loading-triple-bounce-keyframes-40, scale(1))}}",n=()=>i.Div().class("triple-bounce").part("triple-bounce").children(...Array(3).fill(1).map((o,e)=>i.Div().class(`triple-bounce${e+1}`))).build(),r={css:a,render:n};exports.default=r;
package/dist/typings.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  /// <reference types="vite/client" />
2
2
  declare module '*.less';
3
3
  declare module '*.less?inline';
4
+ declare module '*.css?inline';
5
+ declare module '*.woff2?inline';
4
6
  declare module '*.ts';
5
7
  declare module '*.svg';
6
8
  declare module '*.svg?raw';
@@ -151,6 +153,13 @@ interface BaseIntrinsicElements {
151
153
  };
152
154
  'r-math': any & {
153
155
  latex: string;
156
+ display: 'inline' | 'block';
157
+ font: 'system' | string;
158
+ macros: string;
159
+ wrap: 'none' | 'tex' | '=';
160
+ copy: boolean | 'source' | 'mathml';
161
+ download: boolean | string;
162
+ sheet: string;
154
163
  };
155
164
  'r-button': any & {
156
165
  sheet: string;
@@ -0,0 +1,4 @@
1
+ const t=require("./rolldown-runtime-CAnuVJ4g.cjs");var c=t.__exportAll({default:()=>e}),e={success:!0,_identification:!0,data:`<svg t="1665313601302" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8185" width="200" height="200">
2
+ <path d="M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32z m-40 376H232V536h560v304z" p-id="8186"></path>
3
+ <path d="M484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53c12.1-8.7 20-22.9 20-39 0-26.5-21.5-48-48-48s-48 21.5-48 48c0 16.1 7.9 30.3 20 39z" p-id="8187"></path>
4
+ </svg>`};Object.defineProperty(exports,"unlock_default",{enumerable:!0,get:function(){return e}});Object.defineProperty(exports,"unlock_exports",{enumerable:!0,get:function(){return c}});
@@ -0,0 +1,13 @@
1
+ import { n as c } from "./rolldown-runtime-DkpYurw3.js";
2
+ var s = /* @__PURE__ */ c({ default: () => t }), t = {
3
+ success: !0,
4
+ _identification: !0,
5
+ data: `<svg t="1665313601302" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8185" width="200" height="200">
6
+ <path d="M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32z m-40 376H232V536h560v304z" p-id="8186"></path>
7
+ <path d="M484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53c12.1-8.7 20-22.9 20-39 0-26.5-21.5-48-48-48s-48 21.5-48 48c0 16.1 7.9 30.3 20 39z" p-id="8187"></path>
8
+ </svg>`
9
+ };
10
+ export {
11
+ s as n,
12
+ t
13
+ };
@@ -0,0 +1,10 @@
1
+ import { n as t } from "./rolldown-runtime-DkpYurw3.js";
2
+ var e = /* @__PURE__ */ t({ default: () => s }), s = {
3
+ success: !0,
4
+ _identification: !0,
5
+ data: '<svg t="1667483498347" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8544" width="200" height="200"><path d="M858.5 763.6c-18.9-44.8-46.1-85-80.6-119.5-34.5-34.5-74.7-61.6-119.5-80.6-0.4-0.2-0.8-0.3-1.2-0.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.8 18.9-85 46-119.5 80.6-34.5 34.5-61.6 74.7-80.6 119.5C146.9 807.5 137 854 136 901.8c-0.1 4.5 3.5 8.2 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c0.1 4.4 3.6 7.8 8 7.8h60c4.5 0 8.1-3.7 8-8.2-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z" p-id="8545"></path></svg>'
6
+ };
7
+ export {
8
+ e as n,
9
+ s as t
10
+ };
@@ -0,0 +1 @@
1
+ const t=require("./rolldown-runtime-CAnuVJ4g.cjs");var r=t.__exportAll({default:()=>e}),e={success:!0,_identification:!0,data:'<svg t="1667483498347" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8544" width="200" height="200"><path d="M858.5 763.6c-18.9-44.8-46.1-85-80.6-119.5-34.5-34.5-74.7-61.6-119.5-80.6-0.4-0.2-0.8-0.3-1.2-0.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.8 18.9-85 46-119.5 80.6-34.5 34.5-61.6 74.7-80.6 119.5C146.9 807.5 137 854 136 901.8c-0.1 4.5 3.5 8.2 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c0.1 4.4 3.6 7.8 8 7.8h60c4.5 0 8.1-3.7 8-8.2-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z" p-id="8545"></path></svg>'};Object.defineProperty(exports,"user_default",{enumerable:!0,get:function(){return e}});Object.defineProperty(exports,"user_exports",{enumerable:!0,get:function(){return r}});
@@ -1,2 +1,7 @@
1
- export declare function escapeHtml(unsafe: string): string;
1
+ import { escapeHtml } from 'ranuts/utils';
2
+ export { escapeHtml };
3
+ /**
4
+ * 属性值转义。当前与 `escapeHtml` 完全一致:单双引号都会被转义,所以带引号、
5
+ * 不带引号的属性值都安全。保留独立的名字是为了在调用点标出意图。
6
+ */
2
7
  export declare function escapeHtmlAttribute(unsafe: string): string;
@@ -15,25 +15,12 @@ export declare const removeClassToElementChild: (parent: Element, deleteClass: s
15
15
  * @description: 创建 icon 的文档示例
16
16
  */
17
17
  export declare const createIconList: () => void;
18
- /**
19
- * @description: 动态加载脚本
20
- */
21
- export declare const loadScript: ({ type, content }: {
22
- type: string;
23
- content: string;
24
- }) => Promise<{
25
- success: boolean;
26
- }>;
27
- /**
28
- * 转义 HTML 特殊字符,防止 XSS
29
- */
30
- export declare const escapeHtml: (unsafe: any) => string;
31
18
  /**
32
19
  * 极简的声明式模板实现
33
20
  * 将模板字符串解析为 DocumentFragment,并对动态部分进行转义防止 XSS
34
21
  */
35
- export declare const html: (strings: TemplateStringsArray, ...values: any[]) => DocumentFragment;
22
+ export declare const html: (strings: TemplateStringsArray, ...values: unknown[]) => DocumentFragment;
36
23
  /**
37
- * 根据文件扩展名获取 MIME 类型
24
+ * 根据文件扩展名获取 MIME 类型,未知扩展名回落到 `application/octet-stream`。
38
25
  */
39
26
  export declare function getMimeTypeFromExtension(fileName: string): string;
@@ -1,69 +1,2 @@
1
- export type MessageDict = Record<string, string>;
2
- export type LocaleMessages = Record<string, MessageDict>;
3
- export type TranslateParams = Record<string, string | number>;
4
- export type LocaleChangeHandler = (locale: string) => void;
5
- export interface I18nConfig {
6
- /** Initial locale. Overridden by a persisted choice when `persist` is on. */
7
- locale?: string;
8
- /** Locale used when a key is missing in the active locale. Defaults to 'en'. */
9
- fallbackLocale?: string;
10
- /** Locale → key → string. */
11
- messages?: LocaleMessages;
12
- /** Persist the active locale to localStorage. Defaults to false. */
13
- persist?: boolean;
14
- /** localStorage key used when `persist` is on. Defaults to 'ran-locale'. */
15
- storageKey?: string;
16
- /** Seed the initial locale from `navigator.language` when nothing else applies. */
17
- detectNavigator?: boolean;
18
- }
19
- export declare class I18nCore {
20
- private _locale;
21
- private _fallback;
22
- private _messages;
23
- private _persist;
24
- private _storageKey;
25
- private _handlers;
26
- constructor(config?: I18nConfig);
27
- private _resolveInitialLocale;
28
- /** The active locale. */
29
- get locale(): string;
30
- getLocale(): string;
31
- /** Switch locale; persists (when enabled) and notifies subscribers. No-op if unchanged. */
32
- setLocale(locale: string): void;
33
- /** Merge a dictionary into a locale (creating it if needed). */
34
- addMessages(locale: string, dict: MessageDict): void;
35
- getMessages(locale?: string): MessageDict;
36
- /** Locales that have a dictionary registered. */
37
- get availableLocales(): string[];
38
- /**
39
- * Translate a key against the active locale, falling back to the fallback
40
- * locale and finally the key itself. `{param}` placeholders are interpolated;
41
- * `{{` / `}}` are escapes for literal `{` / `}` (see {@link I18nCore._interpolate}).
42
- */
43
- t(key: string, params?: TranslateParams): string;
44
- /**
45
- * Substitute `{param}` placeholders and unescape literal braces.
46
- *
47
- * Grammar (a single left-to-right pass, so escapes and placeholders never
48
- * fight each other), matching the format-string convention used by Rust
49
- * `format!`, Python `str.format`, and .NET `String.Format`:
50
- * - `{{` → literal `{`
51
- * - `}}` → literal `}`
52
- * - `{name}` → `params.name` (stringified), or left untouched when the param
53
- * is absent, so a stray placeholder is visible rather than silently blank.
54
- *
55
- * A lone `{`/`}` or a `{ spaced }` group is not a placeholder and is emitted
56
- * verbatim, so CSS/JSON/code fragments in a message pass through unharmed.
57
- * To wrap a value in literal braces, double the outer pair: `{{{name}}}`.
58
- */
59
- private _interpolate;
60
- /** Subscribe to locale changes. Returns an unsubscribe function. */
61
- onChange(handler: LocaleChangeHandler): () => void;
62
- private _notify;
63
- /** Remove all subscribers. */
64
- destroy(): void;
65
- }
66
- /** Create and register the global i18n singleton. */
67
- export declare function createI18n(config?: I18nConfig): I18nCore;
68
- /** Return the active global i18n instance, or null if none was created. */
69
- export declare function useI18n(): I18nCore | null;
1
+ export { I18nCore, createI18n, useI18n } from 'ranuts/i18n';
2
+ export type { I18nConfig, MessageDict, LocaleMessages, TranslateParams, LocaleChangeHandler } from 'ranuts/i18n';
@@ -1,89 +1,7 @@
1
- var n = "ran-locale", i = Object.freeze({}), o = (e) => {
2
- if (typeof localStorage > "u") return null;
3
- try {
4
- return localStorage.getItem(e);
5
- } catch {
6
- return null;
7
- }
8
- }, _ = (e, t) => {
9
- if (!(typeof localStorage > "u"))
10
- try {
11
- localStorage.setItem(e, t);
12
- } catch {
13
- }
14
- }, c = (e) => {
15
- if (typeof navigator > "u" || !navigator.language) return null;
16
- const t = navigator.language.toLowerCase();
17
- return e.find((s) => s.toLowerCase() === t) ?? e.find((s) => t.startsWith(s.toLowerCase())) ?? e.find((s) => t.startsWith(`${s.toLowerCase()}-`)) ?? null;
18
- }, h = class {
19
- _locale;
20
- _fallback;
21
- _messages;
22
- _persist;
23
- _storageKey;
24
- _handlers = /* @__PURE__ */ new Set();
25
- constructor(e = {}) {
26
- this._messages = { ...e.messages }, this._fallback = e.fallbackLocale ?? "en", this._persist = e.persist ?? !1, this._storageKey = e.storageKey ?? n, this._locale = this._resolveInitialLocale(e);
27
- }
28
- _resolveInitialLocale(e) {
29
- const t = Object.keys(this._messages), s = this._persist ? o(this._storageKey) : null;
30
- if (s && (this._messages[s] || t.length === 0)) return s;
31
- if (e.locale) return e.locale;
32
- if (e.detectNavigator) {
33
- const r = c(t);
34
- if (r) return r;
35
- }
36
- return this._fallback;
37
- }
38
- get locale() {
39
- return this._locale;
40
- }
41
- getLocale() {
42
- return this._locale;
43
- }
44
- setLocale(e) {
45
- e !== this._locale && (this._locale = e, this._persist && _(this._storageKey, e), this._notify());
46
- }
47
- addMessages(e, t) {
48
- this._messages[e] = {
49
- ...this._messages[e],
50
- ...t
51
- };
52
- }
53
- getMessages(e = this._locale) {
54
- return this._messages[e] ?? {};
55
- }
56
- get availableLocales() {
57
- return Object.keys(this._messages);
58
- }
59
- t(e, t) {
60
- const s = this._messages[this._locale]?.[e] ?? this._messages[this._fallback]?.[e] ?? e;
61
- return this._interpolate(s, t);
62
- }
63
- _interpolate(e, t) {
64
- const s = t ?? i;
65
- return e.replace(/\{\{|\}\}|\{(\w+)\}/g, (r, l) => r === "{{" ? "{" : r === "}}" ? "}" : s[l] != null ? String(s[l]) : r);
66
- }
67
- onChange(e) {
68
- return this._handlers.add(e), () => {
69
- this._handlers.delete(e);
70
- };
71
- }
72
- _notify() {
73
- for (const e of this._handlers) e(this._locale);
74
- }
75
- destroy() {
76
- this._handlers.clear();
77
- }
78
- }, a = null;
79
- function u(e = {}) {
80
- return a = new h(e), a;
81
- }
82
- function g() {
83
- return a;
84
- }
1
+ import { n as r, o as s, r as o } from "../i18n-Cf5TtRb4-BeflTU82.js";
2
+ import "../i18n-B3HBw6rL.js";
85
3
  export {
86
- h as I18nCore,
87
- u as createI18n,
88
- g as useI18n
4
+ r as I18nCore,
5
+ o as createI18n,
6
+ s as useI18n
89
7
  };
@@ -1,5 +1,6 @@
1
1
  export * from './builder';
2
- export { falseList, isDisabled, removeClassToElementChild, createIconList, loadScript, html, getMimeTypeFromExtension, } from './dom';
2
+ export { falseList, isDisabled, removeClassToElementChild, createIconList, html, getMimeTypeFromExtension, } from './dom';
3
+ export { loadScript } from 'ranuts/utils';
3
4
  export * from './error';
4
5
  export { signal, createEffect, computed, batch } from './builder/signal';
5
6
  export * from './ssr';
@@ -1,12 +1,14 @@
1
+ /** ranui 静态组件样式在降级 <style> 上的标记 */
2
+ export declare const RANUI_STYLE_MARKER = "data-ranui";
3
+ /** ranui 动态 `sheet` 属性样式在降级 <style> 上的标记 */
4
+ export declare const RANUI_SHEET_MARKER = "data-ranui-sheet";
1
5
  /**
2
- * CSS 字符串注入到指定的 Shadow DOM。
3
- * - SSR 环境安全(自动跳过)
4
- * - 幂等:同一 shadowRoot 不会重复注入
5
- * - 优先使用 Constructable Stylesheets 提升性能
6
+ * 把组件的静态样式注入到指定的 Shadow DOM。
7
+ * 优先 Constructable Stylesheets,不支持时降级为一个带 `data-ranui` 标记的 <style>。
6
8
  */
7
9
  export declare const adoptStyles: (shadowRoot: ShadowRoot, cssText: string) => void;
8
10
  /**
9
11
  * 注入通过组件 `sheet` 属性传入的动态样式。
10
- * 幂等策略:同一 shadowRoot 内相同 cssText 只注入一次。
12
+ * 同一个 shadowRoot 内相同 cssText 只注入一次。
11
13
  */
12
14
  export declare const adoptSheetText: (shadowRoot: ShadowRoot, cssText: string) => void;
@@ -0,0 +1,48 @@
1
+ import { a as u, l as d } from "./utils-xccQZnoa.js";
2
+ import "./ssr-BzHZ2bCe.js";
3
+ import "./theme-DL6q_FZu.js";
4
+ var v = [
5
+ !1,
6
+ "false",
7
+ null,
8
+ void 0
9
+ ], S = (t) => {
10
+ const r = t.hasAttribute("disabled"), e = t.getAttribute("disabled");
11
+ return !!(r && !v.includes(e));
12
+ }, b = "data-ranui", A = "data-ranui-sheet", c = (t, r) => u(t, r, b), f = (t, r) => d(t, r, A), o = /* @__PURE__ */ new WeakMap(), n = "@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}", p = (t, r = "", e = { mode: "closed" }) => {
13
+ const a = t.shadowRoot || o.get(t) || t.attachShadow(e);
14
+ return o.set(t, a), c(a, r ? `${r}
15
+ ${n}` : n), a;
16
+ }, R = (t, r, e) => {
17
+ const a = t.querySelector(r);
18
+ if (a) return a;
19
+ const i = e();
20
+ return t.appendChild(i), i;
21
+ }, E = (t, r, e = "") => t.getAttribute(r) ?? e, g = (t, r, e, a = {}) => {
22
+ if (a.removeEmpty && !e) {
23
+ t.removeAttribute(r);
24
+ return;
25
+ }
26
+ t.setAttribute(r, e ?? "");
27
+ }, w = (t, r, e, a = {}) => {
28
+ if (e) {
29
+ t.setAttribute(r, ""), a.aria && t.setAttribute(`aria-${a.aria}`, "true");
30
+ return;
31
+ }
32
+ t.removeAttribute(r), a.aria && t.removeAttribute(`aria-${a.aria}`);
33
+ }, _ = (t, r, e, a, i) => {
34
+ if (e !== "sheet" || a === i) return;
35
+ const s = t.getAttribute("sheet") || "";
36
+ s && f(r, s);
37
+ };
38
+ export {
39
+ g as a,
40
+ v as c,
41
+ w as i,
42
+ S as l,
43
+ p as n,
44
+ _ as o,
45
+ E as r,
46
+ c as s,
47
+ R as t
48
+ };