@mhmo91/schmancy 0.10.41 → 0.10.43

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 (764) hide show
  1. package/custom-elements.json +291 -179
  2. package/dist/SchmancyElement-CeKrBW2j.cjs +2 -0
  3. package/dist/SchmancyElement-CeKrBW2j.cjs.map +1 -0
  4. package/dist/SchmancyElement-Ob9yGkiG.js +286 -0
  5. package/dist/SchmancyElement-Ob9yGkiG.js.map +1 -0
  6. package/dist/agent/schmancy.agent.js +4057 -4082
  7. package/dist/agent/schmancy.agent.js.map +1 -1
  8. package/dist/agent/schmancy.manifest.json +225 -94
  9. package/dist/animation-CCOIW4wJ.cjs.map +1 -1
  10. package/dist/animation-DCznELuT.js.map +1 -1
  11. package/dist/area-CbajcnmJ.cjs +21 -0
  12. package/dist/area-CbajcnmJ.cjs.map +1 -0
  13. package/dist/{area-BiM7V2ns.js → area-MxLAyWgV.js} +22 -22
  14. package/dist/area-MxLAyWgV.js.map +1 -0
  15. package/dist/area.cjs +1 -1
  16. package/dist/area.js +1 -1
  17. package/dist/{audio-CxO_j__6.js → audio-B_0PGwYC.js} +1 -1
  18. package/dist/audio-B_0PGwYC.js.map +1 -0
  19. package/dist/{audio-xXFfMPCS.cjs → audio-CpwrIaw-.cjs} +1 -1
  20. package/dist/audio-CpwrIaw-.cjs.map +1 -0
  21. package/dist/audio.cjs +1 -1
  22. package/dist/audio.js +2 -2
  23. package/dist/autocomplete-CILzaDB7.cjs +115 -0
  24. package/dist/autocomplete-CILzaDB7.cjs.map +1 -0
  25. package/dist/{autocomplete-DUBY9RtH.js → autocomplete-DV9RxCun.js} +113 -113
  26. package/dist/autocomplete-DV9RxCun.js.map +1 -0
  27. package/dist/autocomplete.cjs +1 -1
  28. package/dist/autocomplete.js +1 -1
  29. package/dist/avatar.cjs +1 -1
  30. package/dist/avatar.cjs.map +1 -1
  31. package/dist/avatar.js +4 -4
  32. package/dist/avatar.js.map +1 -1
  33. package/dist/badge.cjs +1 -1
  34. package/dist/badge.js +1 -1
  35. package/dist/{boat-ScvAima3.js → boat-DoZGgQ0P.js} +6 -8
  36. package/dist/{boat-ScvAima3.js.map → boat-DoZGgQ0P.js.map} +1 -1
  37. package/dist/{boat-BIYaPAHp.cjs → boat-sg0cWO8a.cjs} +3 -5
  38. package/dist/{boat-BIYaPAHp.cjs.map → boat-sg0cWO8a.cjs.map} +1 -1
  39. package/dist/boat.cjs +1 -1
  40. package/dist/boat.js +1 -1
  41. package/dist/breadcrumb.cjs +32 -31
  42. package/dist/breadcrumb.cjs.map +1 -1
  43. package/dist/breadcrumb.js +33 -32
  44. package/dist/breadcrumb.js.map +1 -1
  45. package/dist/busy-Brs-TDh9.cjs +133 -0
  46. package/dist/busy-Brs-TDh9.cjs.map +1 -0
  47. package/dist/busy-g4LoQmhB.js +172 -0
  48. package/dist/busy-g4LoQmhB.js.map +1 -0
  49. package/dist/busy.cjs +1 -1
  50. package/dist/busy.js +1 -1
  51. package/dist/{button-BTpxQ1Kd.cjs → button-Cml67Y_d.cjs} +41 -32
  52. package/dist/button-Cml67Y_d.cjs.map +1 -0
  53. package/dist/{button-D7QHfYf4.js → button-DWANpZfD.js} +43 -34
  54. package/dist/button-DWANpZfD.js.map +1 -0
  55. package/dist/button.cjs +40 -33
  56. package/dist/button.cjs.map +1 -1
  57. package/dist/button.js +42 -35
  58. package/dist/button.js.map +1 -1
  59. package/dist/calendar-2dJrw9pR.cjs +58 -0
  60. package/dist/calendar-2dJrw9pR.cjs.map +1 -0
  61. package/dist/calendar-kCe5LaBa.js +434 -0
  62. package/dist/calendar-kCe5LaBa.js.map +1 -0
  63. package/dist/calendar.cjs +1 -0
  64. package/dist/calendar.js +2 -0
  65. package/dist/{card-DCdtJ5Dy.js → card-CS_hYJbz.js} +136 -136
  66. package/dist/card-CS_hYJbz.js.map +1 -0
  67. package/dist/card-d0KhTnx5.cjs +177 -0
  68. package/dist/card-d0KhTnx5.cjs.map +1 -0
  69. package/dist/card.cjs +1 -1
  70. package/dist/card.js +1 -1
  71. package/dist/{checkbox-DVtyPk7l.js → checkbox-Bjp7kWuE.js} +2 -2
  72. package/dist/{checkbox-DVtyPk7l.js.map → checkbox-Bjp7kWuE.js.map} +1 -1
  73. package/dist/{checkbox-CYGOVPP-.cjs → checkbox-DZ2Wrz7Y.cjs} +1 -1
  74. package/dist/{checkbox-CYGOVPP-.cjs.map → checkbox-DZ2Wrz7Y.cjs.map} +1 -1
  75. package/dist/checkbox.cjs +1 -1
  76. package/dist/checkbox.js +1 -1
  77. package/dist/{chips-DVes-BSz.cjs → chips-BHBVkxsa.cjs} +142 -153
  78. package/dist/chips-BHBVkxsa.cjs.map +1 -0
  79. package/dist/{chips-C5bpgWyf.js → chips-DACeW7YL.js} +127 -138
  80. package/dist/chips-DACeW7YL.js.map +1 -0
  81. package/dist/chips.cjs +1 -1
  82. package/dist/chips.js +2 -2
  83. package/dist/connectivity.cjs +54 -38
  84. package/dist/connectivity.cjs.map +1 -1
  85. package/dist/connectivity.js +56 -40
  86. package/dist/connectivity.js.map +1 -1
  87. package/dist/content-drawer.cjs +1 -1
  88. package/dist/content-drawer.js +1 -1
  89. package/dist/cursor-glow-Ah7VXSj7.js.map +1 -1
  90. package/dist/cursor-glow-Bulq-38P.cjs.map +1 -1
  91. package/dist/date-range-CVAWMdar.cjs +138 -0
  92. package/dist/date-range-CVAWMdar.cjs.map +1 -0
  93. package/dist/date-range-D2NZU5Yg.js +433 -0
  94. package/dist/date-range-D2NZU5Yg.js.map +1 -0
  95. package/dist/{date-range-inline-Dx4Reboo.cjs → date-range-inline-CGM0SPK9.cjs} +2 -4
  96. package/dist/date-range-inline-CGM0SPK9.cjs.map +1 -0
  97. package/dist/{date-range-inline-DPqY9YYf.js → date-range-inline-D6Ozerzw.js} +3 -5
  98. package/dist/date-range-inline-D6Ozerzw.js.map +1 -0
  99. package/dist/date-range-inline.cjs +1 -1
  100. package/dist/date-range-inline.js +1 -1
  101. package/dist/date-range.cjs +1 -1
  102. package/dist/date-range.js +2 -2
  103. package/dist/dayjs.min-CvRZTfam.cjs +1 -0
  104. package/dist/dayjs.min-CvRZTfam.cjs.map +1 -0
  105. package/dist/dayjs.min-DnELezPs.js +296 -0
  106. package/dist/dayjs.min-DnELezPs.js.map +1 -0
  107. package/dist/delay.cjs +1 -1
  108. package/dist/delay.js +3 -3
  109. package/dist/{details-BnleHmYe.js → details-Ct1_GwKr.js} +104 -92
  110. package/dist/details-Ct1_GwKr.js.map +1 -0
  111. package/dist/{details-Bx2jSJxG.cjs → details-D4fVOaj4.cjs} +109 -97
  112. package/dist/details-D4fVOaj4.cjs.map +1 -0
  113. package/dist/details.cjs +1 -1
  114. package/dist/details.js +1 -1
  115. package/dist/{directives-CYf2fAdA.cjs → directives-B2VxfwRL.cjs} +1 -1
  116. package/dist/directives-B2VxfwRL.cjs.map +1 -0
  117. package/dist/{directives-d1rEbW1A.js → directives-Dj8jlv-Q.js} +3 -3
  118. package/dist/directives-Dj8jlv-Q.js.map +1 -0
  119. package/dist/directives.cjs +1 -1
  120. package/dist/directives.js +2 -2
  121. package/dist/discovery.service-CIa3Eeuk.cjs.map +1 -1
  122. package/dist/discovery.service-DZFxtRwW.js.map +1 -1
  123. package/dist/divider-B3v33OnX.cjs +57 -0
  124. package/dist/divider-B3v33OnX.cjs.map +1 -0
  125. package/dist/divider-BJHW3q11.js +89 -0
  126. package/dist/divider-BJHW3q11.js.map +1 -0
  127. package/dist/divider.cjs +1 -1
  128. package/dist/divider.js +1 -1
  129. package/dist/dropdown.cjs +40 -40
  130. package/dist/dropdown.cjs.map +1 -1
  131. package/dist/dropdown.js +41 -41
  132. package/dist/dropdown.js.map +1 -1
  133. package/dist/{expand-DNrWuG_-.js → expand-BT8mOu8Q.js} +103 -97
  134. package/dist/expand-BT8mOu8Q.js.map +1 -0
  135. package/dist/expand-D0YdR9nR.cjs +147 -0
  136. package/dist/expand-D0YdR9nR.cjs.map +1 -0
  137. package/dist/expand.cjs +1 -1
  138. package/dist/expand.js +1 -1
  139. package/dist/fab.cjs +1 -1
  140. package/dist/fab.cjs.map +1 -1
  141. package/dist/fab.js +2 -2
  142. package/dist/fab.js.map +1 -1
  143. package/dist/{float-V7VQKTb8.cjs → float-BPQlDyai.cjs} +1 -1
  144. package/dist/{float-V7VQKTb8.cjs.map → float-BPQlDyai.cjs.map} +1 -1
  145. package/dist/{float-C_CMle0q.js → float-BQcxj3i_.js} +2 -2
  146. package/dist/{float-C_CMle0q.js.map → float-BQcxj3i_.js.map} +1 -1
  147. package/dist/float.cjs +1 -1
  148. package/dist/float.js +1 -1
  149. package/dist/{form-DaaAQd2A.cjs → form-CoWFnClb.cjs} +8 -13
  150. package/dist/form-CoWFnClb.cjs.map +1 -0
  151. package/dist/{form-CMgYSZ3y.js → form-hC2LvCHX.js} +10 -15
  152. package/dist/form-hC2LvCHX.js.map +1 -0
  153. package/dist/form.cjs +12 -13
  154. package/dist/form.cjs.map +1 -1
  155. package/dist/form.js +23 -24
  156. package/dist/form.js.map +1 -1
  157. package/dist/gravity-6pL6CfIr.cjs.map +1 -1
  158. package/dist/gravity-sVK3zGBF.js.map +1 -1
  159. package/dist/handover/agent-runtime-followups.md +1 -1
  160. package/dist/handover/agent-runtime-v1.md +3 -3
  161. package/dist/{hashContent-iRZJJWtE.cjs.map → hashContent--s09Ed_g.cjs.map} +1 -1
  162. package/dist/{hashContent-BqU6v1Xr.js.map → hashContent-CAvrQ56N.js.map} +1 -1
  163. package/dist/icons-BeGKDZ-k.cjs +22 -0
  164. package/dist/icons-BeGKDZ-k.cjs.map +1 -0
  165. package/dist/{icons-mbpHO_73.js → icons-DEJnIxml.js} +20 -22
  166. package/dist/icons-DEJnIxml.js.map +1 -0
  167. package/dist/icons.cjs +1 -1
  168. package/dist/icons.js +1 -1
  169. package/dist/{iframe-88SN5JPu.cjs → iframe-BkSukM9C.cjs} +9 -9
  170. package/dist/iframe-BkSukM9C.cjs.map +1 -0
  171. package/dist/{iframe-U3P1DnQv.js → iframe-V3S-bwEY.js} +10 -10
  172. package/dist/iframe-V3S-bwEY.js.map +1 -0
  173. package/dist/iframe.cjs +1 -1
  174. package/dist/iframe.js +1 -1
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.js +61 -60
  177. package/dist/{input-CPWvGjE4.js → input-CPFCSQld.js} +3 -10
  178. package/dist/input-CPFCSQld.js.map +1 -0
  179. package/dist/{input-BY4Korc5.cjs → input-DSfwfhhj.cjs} +2 -9
  180. package/dist/input-DSfwfhhj.cjs.map +1 -0
  181. package/dist/input-chip-BUuFJUky.cjs +129 -0
  182. package/dist/input-chip-BUuFJUky.cjs.map +1 -0
  183. package/dist/{input-chip-CCZ3i3Sf.js → input-chip-C3a1fwKB.js} +87 -104
  184. package/dist/input-chip-C3a1fwKB.js.map +1 -0
  185. package/dist/input.cjs +1 -1
  186. package/dist/input.js +1 -1
  187. package/dist/json.cjs +5 -1
  188. package/dist/json.cjs.map +1 -1
  189. package/dist/json.js +8 -4
  190. package/dist/json.js.map +1 -1
  191. package/dist/kbd.cjs +28 -28
  192. package/dist/kbd.cjs.map +1 -1
  193. package/dist/kbd.js +29 -29
  194. package/dist/kbd.js.map +1 -1
  195. package/dist/{layout-BhfC26Ks.cjs → layout-CdyHy_oX.cjs} +1 -1
  196. package/dist/layout-CdyHy_oX.cjs.map +1 -0
  197. package/dist/{layout-DC0Npqu7.js → layout-k6fOkpif.js} +1 -1
  198. package/dist/layout-k6fOkpif.js.map +1 -0
  199. package/dist/layout.cjs +26 -26
  200. package/dist/layout.cjs.map +1 -1
  201. package/dist/layout.js +27 -27
  202. package/dist/layout.js.map +1 -1
  203. package/dist/lazy-BaAiIUru.js.map +1 -1
  204. package/dist/lazy-C-7a4FAe.cjs.map +1 -1
  205. package/dist/{lightbox-BSwWvDQc.js → lightbox-DIG0VLOK.js} +8 -14
  206. package/dist/lightbox-DIG0VLOK.js.map +1 -0
  207. package/dist/{lightbox-KrZQH9w9.cjs → lightbox-E5rgd-hu.cjs} +7 -13
  208. package/dist/lightbox-E5rgd-hu.cjs.map +1 -0
  209. package/dist/lightbox.cjs +1 -1
  210. package/dist/lightbox.js +1 -1
  211. package/dist/list-BRz0rDSH.cjs +47 -0
  212. package/dist/list-BRz0rDSH.cjs.map +1 -0
  213. package/dist/{list-BwGtAAfi.js → list-NrOYDPBo.js} +48 -34
  214. package/dist/list-NrOYDPBo.js.map +1 -0
  215. package/dist/list.cjs +1 -1
  216. package/dist/list.js +1 -1
  217. package/dist/magnetic-DKtc4umC.cjs.map +1 -1
  218. package/dist/magnetic-DaOOv5Dz.js.map +1 -1
  219. package/dist/{menu-DX8d96x-.js → menu-B1Ei9SVj.js} +12 -12
  220. package/dist/menu-B1Ei9SVj.js.map +1 -0
  221. package/dist/{menu-jT_yAk5V.cjs → menu-Duvl66Nl.cjs} +10 -10
  222. package/dist/menu-Duvl66Nl.cjs.map +1 -0
  223. package/dist/menu.cjs +1 -1
  224. package/dist/menu.js +1 -1
  225. package/dist/{mixins-XGVIOvKt.cjs → mixins-Cjn20BQH.cjs} +42 -170
  226. package/dist/mixins-Cjn20BQH.cjs.map +1 -0
  227. package/dist/{mixins-COeG4DiX.js → mixins-q4KAL8Xr.js} +43 -177
  228. package/dist/mixins-q4KAL8Xr.js.map +1 -0
  229. package/dist/mixins.cjs +1 -1
  230. package/dist/mixins.js +2 -2
  231. package/dist/nav-drawer.cjs +1 -1
  232. package/dist/nav-drawer.js +1 -1
  233. package/dist/navigation-bar.cjs +1 -1
  234. package/dist/navigation-bar.js +1 -1
  235. package/dist/navigation-rail.cjs +2 -4
  236. package/dist/navigation-rail.cjs.map +1 -1
  237. package/dist/navigation-rail.js +3 -5
  238. package/dist/navigation-rail.js.map +1 -1
  239. package/dist/{notification-CAJVpLne.js → notification-COhUhUCr.js} +5 -7
  240. package/dist/notification-COhUhUCr.js.map +1 -0
  241. package/dist/{notification-DO3VXceY.cjs → notification-DsdA_MJe.cjs} +2 -4
  242. package/dist/notification-DsdA_MJe.cjs.map +1 -0
  243. package/dist/notification.cjs +1 -1
  244. package/dist/notification.js +1 -1
  245. package/dist/{option-JISY0wZJ.js → option-BIzgTbXz.js} +20 -20
  246. package/dist/option-BIzgTbXz.js.map +1 -0
  247. package/dist/option-C5hhqR2z.cjs +43 -0
  248. package/dist/option-C5hhqR2z.cjs.map +1 -0
  249. package/dist/option.cjs +1 -1
  250. package/dist/option.js +1 -1
  251. package/dist/{overlay-B1jVf-ge.cjs → overlay-BzgF8P7i.cjs} +48 -41
  252. package/dist/overlay-BzgF8P7i.cjs.map +1 -0
  253. package/dist/{overlay-CT-tMHDX.js → overlay-LoRRemny.js} +52 -45
  254. package/dist/overlay-LoRRemny.js.map +1 -0
  255. package/dist/overlay-stack-Bdr9lOqi.cjs.map +1 -1
  256. package/dist/overlay-stack-D2rgxQLh.js.map +1 -1
  257. package/dist/overlay.cjs +1 -1
  258. package/dist/{overlay.confirm-body-Dn-Zgogx.js → overlay.confirm-body-D0b1MoCw.js} +30 -45
  259. package/dist/overlay.confirm-body-D0b1MoCw.js.map +1 -0
  260. package/dist/{overlay.confirm-body-mYDYoJL8.cjs → overlay.confirm-body-DCneq73Z.cjs} +22 -37
  261. package/dist/overlay.confirm-body-DCneq73Z.cjs.map +1 -0
  262. package/dist/overlay.js +3 -3
  263. package/dist/{overlay.service-yqTOyLlr.js → overlay.service-BuUeti6X.js} +2 -2
  264. package/dist/overlay.service-BuUeti6X.js.map +1 -0
  265. package/dist/{overlay.service-BQmva9GY.cjs → overlay.service-MMTiW2T3.cjs} +1 -1
  266. package/dist/overlay.service-MMTiW2T3.cjs.map +1 -0
  267. package/dist/{progress-CGWozq_n.js → progress-D7n3SKAO.js} +50 -50
  268. package/dist/progress-D7n3SKAO.js.map +1 -0
  269. package/dist/progress-DsCnFsH5.cjs +51 -0
  270. package/dist/progress-DsCnFsH5.cjs.map +1 -0
  271. package/dist/progress.cjs +1 -1
  272. package/dist/progress.js +1 -1
  273. package/dist/{radio-group-DoSX5D2V.cjs → radio-group-CaAjg9UV.cjs} +1 -1
  274. package/dist/radio-group-CaAjg9UV.cjs.map +1 -0
  275. package/dist/{radio-group-CXkq6qAF.js → radio-group-Drpl6Pl8.js} +2 -2
  276. package/dist/radio-group-Drpl6Pl8.js.map +1 -0
  277. package/dist/radio-group.cjs +1 -1
  278. package/dist/radio-group.js +1 -1
  279. package/dist/range.cjs +4 -2
  280. package/dist/range.cjs.map +1 -1
  281. package/dist/range.js +5 -3
  282. package/dist/range.js.map +1 -1
  283. package/dist/reduced-motion-D-L12p7G.js.map +1 -1
  284. package/dist/reduced-motion-Ds-HjMzn.cjs.map +1 -1
  285. package/dist/{rxjs-utils-Csnks202.cjs.map → rxjs-utils-4P2v57ke.cjs.map} +1 -1
  286. package/dist/{rxjs-utils-d-ivVN84.js.map → rxjs-utils-JMFdgQSl.js.map} +1 -1
  287. package/dist/rxjs-utils.cjs +1 -1
  288. package/dist/rxjs-utils.js +1 -1
  289. package/dist/search-DPKoC-dT.cjs.map +1 -1
  290. package/dist/search-MvIBA93K.js.map +1 -1
  291. package/dist/{select-CU90i50_.js → select-CTXkrrVZ.js} +13 -13
  292. package/dist/select-CTXkrrVZ.js.map +1 -0
  293. package/dist/select-DcLcpPCh.cjs +56 -0
  294. package/dist/select-DcLcpPCh.cjs.map +1 -0
  295. package/dist/select.cjs +1 -1
  296. package/dist/select.js +1 -1
  297. package/dist/skeleton.cjs +37 -33
  298. package/dist/skeleton.cjs.map +1 -1
  299. package/dist/skeleton.js +38 -34
  300. package/dist/skeleton.js.map +1 -1
  301. package/dist/skills/schmancy/surface.md +79 -39
  302. package/dist/skills/surface.md +79 -39
  303. package/dist/slider.cjs +31 -31
  304. package/dist/slider.cjs.map +1 -1
  305. package/dist/slider.js +32 -32
  306. package/dist/slider.js.map +1 -1
  307. package/dist/{sound.service-m8WjOhjn.js → sound.service-AJwuk3yr.js} +1 -1
  308. package/dist/sound.service-AJwuk3yr.js.map +1 -0
  309. package/dist/{sound.service-Qhr8nCeG.cjs → sound.service-CVsxhQkX.cjs} +1 -1
  310. package/dist/sound.service-CVsxhQkX.cjs.map +1 -0
  311. package/dist/{splash-screen-Cs3dbPN3.js → splash-screen-DANfqvlo.js} +23 -26
  312. package/dist/splash-screen-DANfqvlo.js.map +1 -0
  313. package/dist/splash-screen-K74cgU6S.cjs +38 -0
  314. package/dist/splash-screen-K74cgU6S.cjs.map +1 -0
  315. package/dist/splash-screen.cjs +1 -1
  316. package/dist/splash-screen.js +1 -1
  317. package/dist/{src-CCVbLLgC.js → src-DAtcPmCb.js} +295 -389
  318. package/dist/src-DAtcPmCb.js.map +1 -0
  319. package/dist/src-DuRvYagm.cjs +237 -0
  320. package/dist/src-DuRvYagm.cjs.map +1 -0
  321. package/dist/{state--x58-AuK.cjs → state-BWQiqN6I.cjs} +1 -1
  322. package/dist/state-BWQiqN6I.cjs.map +1 -0
  323. package/dist/{state-QSwQ61sA.js → state-DBA_gzJO.js} +1 -1
  324. package/dist/state-DBA_gzJO.js.map +1 -0
  325. package/dist/state.cjs +1 -1
  326. package/dist/state.js +2 -2
  327. package/dist/steps.cjs +20 -12
  328. package/dist/steps.cjs.map +1 -1
  329. package/dist/steps.js +21 -13
  330. package/dist/steps.js.map +1 -1
  331. package/dist/surface-COBvWWFb.cjs +7 -0
  332. package/dist/surface-COBvWWFb.cjs.map +1 -0
  333. package/dist/{surface-cqMsHJHM.js → surface-DXk1X1tL.js} +9 -9
  334. package/dist/surface-DXk1X1tL.js.map +1 -0
  335. package/dist/surface.cjs +1 -1
  336. package/dist/surface.js +1 -1
  337. package/dist/switch.cjs +13 -4
  338. package/dist/switch.cjs.map +1 -1
  339. package/dist/switch.js +14 -5
  340. package/dist/switch.js.map +1 -1
  341. package/dist/table.cjs +4 -10
  342. package/dist/table.cjs.map +1 -1
  343. package/dist/table.js +5 -11
  344. package/dist/table.js.map +1 -1
  345. package/dist/{tabs-Ib0Mh__1.js → tabs-BYhFWnsx.js} +7 -7
  346. package/dist/tabs-BYhFWnsx.js.map +1 -0
  347. package/dist/{tabs-Dk9UDWpq.cjs → tabs-CJwB0fr0.cjs} +6 -6
  348. package/dist/tabs-CJwB0fr0.cjs.map +1 -0
  349. package/dist/tabs.cjs +1 -1
  350. package/dist/tabs.js +1 -1
  351. package/dist/teleport.cjs +1 -1
  352. package/dist/teleport.js +1 -1
  353. package/dist/{textarea-CcRsw08B.js → textarea-BjDx1w2g.js} +37 -41
  354. package/dist/textarea-BjDx1w2g.js.map +1 -0
  355. package/dist/{textarea-Cntd9tfV.cjs → textarea-CGgznhd6.cjs} +36 -40
  356. package/dist/textarea-CGgznhd6.cjs.map +1 -0
  357. package/dist/textarea.cjs +1 -1
  358. package/dist/textarea.js +1 -1
  359. package/dist/{theme-wwFbvp5e.cjs → theme-BVul7lHS.cjs} +6 -6
  360. package/dist/{theme-wwFbvp5e.cjs.map → theme-BVul7lHS.cjs.map} +1 -1
  361. package/dist/{theme-CKYXG0le.js → theme-Dvm5J8nh.js} +11 -11
  362. package/dist/{theme-CKYXG0le.js.map → theme-Dvm5J8nh.js.map} +1 -1
  363. package/dist/{theme-button-iLqT56KA.js → theme-button-Bko5ohFP.js} +2 -2
  364. package/dist/{theme-button-iLqT56KA.js.map → theme-button-Bko5ohFP.js.map} +1 -1
  365. package/dist/{theme-button-DE9Lrl7m.cjs → theme-button-YLY7zR1c.cjs} +1 -1
  366. package/dist/{theme-button-DE9Lrl7m.cjs.map → theme-button-YLY7zR1c.cjs.map} +1 -1
  367. package/dist/theme-button.cjs +1 -1
  368. package/dist/theme-button.js +1 -1
  369. package/dist/theme.cjs +1 -1
  370. package/dist/{theme.interface-CSt7JUBD.cjs.map → theme.interface-B-qxDsZQ.cjs.map} +1 -1
  371. package/dist/{theme.interface-odQEpZZH.js.map → theme.interface-B7caS5cg.js.map} +1 -1
  372. package/dist/theme.js +4 -4
  373. package/dist/{theme.service-5RjyR7Sy.js → theme.service-D94nm7Bf.js} +1 -1
  374. package/dist/theme.service-D94nm7Bf.js.map +1 -0
  375. package/dist/{theme.service-DA6KY52G.cjs → theme.service-h2fXQq7x.cjs} +1 -1
  376. package/dist/theme.service-h2fXQq7x.cjs.map +1 -0
  377. package/dist/tooltip.cjs.map +1 -1
  378. package/dist/tooltip.js.map +1 -1
  379. package/dist/tree.cjs +14 -14
  380. package/dist/tree.cjs.map +1 -1
  381. package/dist/tree.js +15 -15
  382. package/dist/tree.js.map +1 -1
  383. package/dist/types.cjs +1 -1
  384. package/dist/types.cjs.map +1 -1
  385. package/dist/types.js +19 -2
  386. package/dist/types.js.map +1 -1
  387. package/dist/typewriter.cjs.map +1 -1
  388. package/dist/typewriter.js.map +1 -1
  389. package/dist/typography-ByF2k5yW.js +358 -0
  390. package/dist/typography-ByF2k5yW.js.map +1 -0
  391. package/dist/typography-Cfav17it.cjs +282 -0
  392. package/dist/typography-Cfav17it.cjs.map +1 -0
  393. package/dist/typography.cjs +1 -1
  394. package/dist/typography.js +1 -1
  395. package/dist/utils-DIXndz6Q.cjs.map +1 -0
  396. package/dist/utils-dSPH7Oh9.js.map +1 -0
  397. package/dist/utils.cjs +1 -1
  398. package/dist/utils.js +1 -1
  399. package/dist/visually-hidden.cjs +13 -13
  400. package/dist/visually-hidden.cjs.map +1 -1
  401. package/dist/visually-hidden.js +14 -14
  402. package/dist/visually-hidden.js.map +1 -1
  403. package/dist/window-Br1OmpL-.cjs +67 -0
  404. package/dist/window-Br1OmpL-.cjs.map +1 -0
  405. package/dist/{window-Db5ZYY6t.js → window-CCmN4but.js} +28 -20
  406. package/dist/window-CCmN4but.js.map +1 -0
  407. package/dist/window.cjs +1 -1
  408. package/dist/window.js +1 -1
  409. package/package.json +1 -1
  410. package/skills/schmancy/surface.md +79 -39
  411. package/src/area/area.component.ts +249 -163
  412. package/src/area/area.service.test.ts +994 -1006
  413. package/src/area/area.service.ts +76 -72
  414. package/src/area/index.ts +7 -7
  415. package/src/area/lazy.ts +39 -42
  416. package/src/area/route.component.ts +54 -52
  417. package/src/area/router.types.ts +7 -7
  418. package/src/audio/emotional-sounds.ts +880 -801
  419. package/src/audio/sound.service.ts +26 -5
  420. package/src/avatar/avatar.ts +4 -4
  421. package/src/badge/badge.ts +60 -209
  422. package/src/badge/index.ts +1 -1
  423. package/src/boat/boat.ts +2 -4
  424. package/src/breadcrumb/breadcrumb.ts +37 -32
  425. package/src/busy/busy.ts +15 -12
  426. package/src/busy/index.ts +2 -2
  427. package/src/busy/spinner.ts +132 -119
  428. package/src/button/button.test.ts +5 -1
  429. package/src/button/button.ts +113 -72
  430. package/src/button/icon-button.ts +64 -46
  431. package/src/button/index.ts +2 -2
  432. package/src/calendar/calendar.test.ts +504 -0
  433. package/src/calendar/calendar.ts +587 -0
  434. package/src/calendar/index.ts +2 -0
  435. package/src/card/actions.ts +11 -9
  436. package/src/card/card.ts +79 -77
  437. package/src/card/content.ts +8 -6
  438. package/src/card/index.ts +4 -4
  439. package/src/card/media.ts +50 -50
  440. package/src/chips/assist-chip.ts +1 -1
  441. package/src/chips/chips.ts +1 -1
  442. package/src/chips/filter-chip.ts +1 -1
  443. package/src/chips/index.ts +1 -1
  444. package/src/chips/input-chip.ts +1 -1
  445. package/src/chips/suggestion-chip.ts +1 -1
  446. package/src/connectivity/connectivity-status.ts +91 -65
  447. package/src/content-drawer/drawer.service.ts +47 -36
  448. package/src/content-drawer/drawer.ts +31 -18
  449. package/src/content-drawer/index.ts +5 -5
  450. package/src/content-drawer/main.ts +9 -7
  451. package/src/content-drawer/sheet.ts +8 -6
  452. package/src/date-range-inline/date-range-inline.ts +523 -522
  453. package/src/date-range-inline/index.ts +2 -2
  454. package/src/delay/index.ts +1 -1
  455. package/src/details/details.ts +119 -105
  456. package/src/details/index.ts +1 -1
  457. package/src/directives/ai-badge.ts +1 -5
  458. package/src/directives/animate-text.ts +43 -31
  459. package/src/directives/art/effects/howl.ts +1 -4
  460. package/src/directives/art/effects/samwa.ts +11 -5
  461. package/src/directives/art/effects/snow.ts +1 -2
  462. package/src/directives/battery.ts +21 -12
  463. package/src/directives/confirm-click.ts +9 -17
  464. package/src/directives/cursor-glow.ts +1 -1
  465. package/src/directives/cycle-text.ts +7 -21
  466. package/src/directives/drag.ts +50 -45
  467. package/src/directives/fyi.ts +1 -6
  468. package/src/directives/gravity.ts +10 -8
  469. package/src/directives/hummingbird.ts +256 -107
  470. package/src/directives/index.ts +29 -29
  471. package/src/directives/intersect.ts +11 -11
  472. package/src/directives/layout.ts +25 -36
  473. package/src/directives/liquid.ts +4 -10
  474. package/src/directives/living-border.ts +7 -5
  475. package/src/directives/long-press.ts +2 -1
  476. package/src/directives/magnetic.ts +7 -6
  477. package/src/directives/nebula.ts +34 -28
  478. package/src/directives/overflow-within.ts +18 -20
  479. package/src/directives/reduced-motion.ts +9 -9
  480. package/src/directives/reveal.ts +193 -195
  481. package/src/directives/ripple.ts +9 -7
  482. package/src/directives/urgent.ts +3 -1
  483. package/src/directives/working-snake.ts +1 -1
  484. package/src/discovery/discovery.service.ts +198 -210
  485. package/src/discovery/index.ts +1 -1
  486. package/src/divider/divider.ts +49 -47
  487. package/src/divider/index.ts +1 -1
  488. package/src/dropdown/dropdown-content.ts +42 -40
  489. package/src/dropdown/index.ts +2 -2
  490. package/src/expand/expand-root.component.ts +70 -61
  491. package/src/expand/expand.component.ts +48 -43
  492. package/src/fab/fab.test.ts +1 -2
  493. package/src/fab/fab.ts +2 -4
  494. package/src/form/fields/autocomplete/autocomplete.scss +6 -2
  495. package/src/form/fields/autocomplete/autocomplete.ts +712 -724
  496. package/src/form/fields/autocomplete/index.ts +1 -1
  497. package/src/form/fields/checkbox/checkbox.ts +1 -4
  498. package/src/form/fields/chips/assist-chip.ts +69 -72
  499. package/src/form/fields/chips/chips.ts +14 -15
  500. package/src/form/fields/chips/filter-chip.ts +36 -32
  501. package/src/form/fields/chips/index.ts +5 -5
  502. package/src/form/fields/chips/input-chip.ts +130 -142
  503. package/src/form/fields/chips/suggestion-chip.ts +69 -72
  504. package/src/form/fields/date-range/date-range-dialog.ts +141 -194
  505. package/src/form/fields/date-range/date-range-helpers.ts +63 -64
  506. package/src/form/fields/date-range/date-range.test.ts +359 -122
  507. package/src/form/fields/date-range/date-range.ts +319 -395
  508. package/src/form/fields/date-range/index.ts +2 -2
  509. package/src/form/fields/input/index.ts +8 -8
  510. package/src/form/fields/input/input.scss +30 -26
  511. package/src/form/fields/input/input.test.ts +4 -1
  512. package/src/form/fields/input/input.ts +4 -20
  513. package/src/form/fields/radio-group/index.ts +2 -2
  514. package/src/form/fields/radio-group/radio-button.ts +8 -8
  515. package/src/form/fields/radio-group/radio-group.ts +4 -1
  516. package/src/form/fields/range/range.ts +3 -1
  517. package/src/form/fields/select/index.ts +2 -2
  518. package/src/form/fields/select/select.ts +51 -45
  519. package/src/form/fields/switch/switch.ts +13 -7
  520. package/src/form/fields/textarea/index.ts +1 -1
  521. package/src/form/fields/textarea/textarea.ts +44 -49
  522. package/src/form/form-summary.ts +15 -14
  523. package/src/form/form.test.ts +0 -1
  524. package/src/form/form.ts +11 -23
  525. package/src/icons/icon.ts +25 -25
  526. package/src/icons/index.ts +1 -1
  527. package/src/iframe/iframe.ts +11 -9
  528. package/src/index.ts +1 -0
  529. package/src/json/json.ts +9 -2
  530. package/src/kbd/kbd.ts +30 -28
  531. package/src/layout/scroll/index.ts +1 -1
  532. package/src/layout/scroll/scroll.ts +54 -54
  533. package/src/lightbox/lightbox-service.ts +27 -18
  534. package/src/lightbox/lightbox.directive.ts +2 -1
  535. package/src/lightbox/lightbox.ts +21 -38
  536. package/src/list/index.ts +3 -3
  537. package/src/list/list-item.ts +32 -26
  538. package/src/list/list.ts +13 -8
  539. package/src/menu/index.ts +2 -2
  540. package/src/menu/menu-item.ts +7 -5
  541. package/src/menu/menu.ts +8 -6
  542. package/src/nav-drawer/appbar.ts +9 -7
  543. package/src/nav-drawer/content.ts +10 -8
  544. package/src/nav-drawer/drawer.ts +29 -25
  545. package/src/nav-drawer/index.ts +6 -6
  546. package/src/navigation-bar/index.ts +2 -2
  547. package/src/navigation-bar/navigation-bar-item.ts +127 -118
  548. package/src/navigation-bar/navigation-bar.ts +103 -91
  549. package/src/navigation-rail/index.ts +2 -2
  550. package/src/navigation-rail/navigation-rail.ts +21 -22
  551. package/src/notification/index.ts +6 -6
  552. package/src/notification/notification-service.ts +1 -2
  553. package/src/notification/notification.scss +5 -1
  554. package/src/notification/notification.ts +1 -3
  555. package/src/notification/notify.ts +204 -207
  556. package/src/option/index.ts +1 -1
  557. package/src/option/option.ts +26 -25
  558. package/src/overlay/overlay.animations.ts +4 -14
  559. package/src/overlay/overlay.component.ts +110 -131
  560. package/src/overlay/overlay.confirm-body.ts +26 -48
  561. package/src/overlay/overlay.gestures.ts +8 -10
  562. package/src/overlay/overlay.layout.ts +1 -4
  563. package/src/overlay/overlay.positioning.ts +4 -15
  564. package/src/overlay/overlay.service.ts +9 -24
  565. package/src/overlay/overlay.stack.test.ts +4 -1
  566. package/src/overlay/overlay.stack.ts +4 -4
  567. package/src/overlay/overlay.types.ts +11 -20
  568. package/src/progress/index.ts +1 -1
  569. package/src/progress/progress.ts +135 -133
  570. package/src/rxjs-utils/index.ts +6 -6
  571. package/src/rxjs-utils/waitForElement.ts +20 -20
  572. package/src/rxjs-utils/waitForElementAll.ts +21 -21
  573. package/src/rxjs-utils/waitForElements.ts +27 -27
  574. package/src/rxjs-utils/waitForElementsAll.ts +27 -29
  575. package/src/rxjs-utils/waitUntil.ts +7 -12
  576. package/src/skeleton/skeleton.ts +39 -33
  577. package/src/slider/index.ts +2 -2
  578. package/src/slider/slide.ts +14 -12
  579. package/src/slider/slider.ts +24 -22
  580. package/src/splash-screen/index.ts +1 -1
  581. package/src/splash-screen/splash-screen.ts +26 -27
  582. package/src/state/active-host.ts +4 -5
  583. package/src/state/index.ts +34 -53
  584. package/src/state/persist.ts +14 -11
  585. package/src/state/schmancy-context.ts +88 -88
  586. package/src/state/state.test-d.ts +3 -13
  587. package/src/state/state.test.ts +1 -4
  588. package/src/steps/index.ts +3 -3
  589. package/src/steps/schmancy-step.ts +41 -31
  590. package/src/steps/schmancy-steps.ts +7 -5
  591. package/src/surface/index.ts +1 -1
  592. package/src/surface/surface.styles.ts +55 -191
  593. package/src/surface/surface.ts +18 -16
  594. package/src/table/index.ts +2 -2
  595. package/src/table/row.ts +1 -4
  596. package/src/table/table.ts +2 -5
  597. package/src/tabs/index.ts +2 -2
  598. package/src/tabs/tabs-group.ts +8 -6
  599. package/src/teleport/index.ts +2 -2
  600. package/src/test-utils/a11y.ts +1 -3
  601. package/src/theme/index.ts +17 -17
  602. package/src/theme/theme-audio-player.ts +18 -16
  603. package/src/theme/theme-controller-boat.ts +1 -1
  604. package/src/theme/theme-controller.ts +36 -32
  605. package/src/theme/theme.component.ts +5 -9
  606. package/src/theme/theme.events.ts +1 -1
  607. package/src/theme/theme.format.ts +7 -7
  608. package/src/theme/theme.service.ts +453 -468
  609. package/src/theme/theme.style.css +78 -23
  610. package/src/theme-button/index.ts +1 -1
  611. package/src/tooltip/tooltip.directive.ts +1 -1
  612. package/src/tree/index.ts +1 -1
  613. package/src/tree/tree.ts +24 -16
  614. package/src/types/surface.ts +38 -44
  615. package/src/typewriter/typewriter.directive.ts +30 -39
  616. package/src/typography/typography.ts +289 -269
  617. package/src/utils/animation.ts +2 -8
  618. package/src/utils/index.ts +6 -6
  619. package/src/utils/number.ts +480 -517
  620. package/src/utils/overlay-stack.ts +1 -3
  621. package/src/utils/search.ts +5 -9
  622. package/src/visually-hidden/visually-hidden.ts +15 -13
  623. package/src/window/window-manager.ts +6 -1
  624. package/src/window/window-position.ts +7 -5
  625. package/src/window/window.ts +146 -114
  626. package/types/mixins/surface.mixin.d.ts +8 -14
  627. package/types/src/badge/badge.d.ts +15 -48
  628. package/types/src/calendar/calendar.d.ts +108 -0
  629. package/types/src/calendar/calendar.test.d.ts +1 -0
  630. package/types/src/calendar/index.d.ts +2 -0
  631. package/types/src/directives/cursor-glow.d.ts +1 -1
  632. package/types/src/directives/hummingbird.d.ts +3 -3
  633. package/types/src/form/fields/date-range/date-range-dialog.d.ts +24 -28
  634. package/types/src/form/fields/date-range/date-range.d.ts +35 -66
  635. package/types/src/form/fields/date-range/date-range.test.d.ts +1 -0
  636. package/types/src/form/fields/date-range/index.d.ts +1 -1
  637. package/types/src/index.d.ts +1 -0
  638. package/types/src/surface/surface.d.ts +9 -7
  639. package/types/src/surface/surface.styles.d.ts +15 -20
  640. package/types/src/types/surface.d.ts +17 -22
  641. package/types/src/utils/number.d.ts +1 -1
  642. package/types/src/window/window.d.ts +0 -1
  643. package/dist/SchmancyElement-D9WA9FP9.cjs +0 -2
  644. package/dist/SchmancyElement-D9WA9FP9.cjs.map +0 -1
  645. package/dist/SchmancyElement-OWgz9ePG.js +0 -286
  646. package/dist/SchmancyElement-OWgz9ePG.js.map +0 -1
  647. package/dist/area-BiM7V2ns.js.map +0 -1
  648. package/dist/area-C7XjCoet.cjs +0 -21
  649. package/dist/area-C7XjCoet.cjs.map +0 -1
  650. package/dist/audio-CxO_j__6.js.map +0 -1
  651. package/dist/audio-xXFfMPCS.cjs.map +0 -1
  652. package/dist/autocomplete-DD7Hd59N.cjs +0 -115
  653. package/dist/autocomplete-DD7Hd59N.cjs.map +0 -1
  654. package/dist/autocomplete-DUBY9RtH.js.map +0 -1
  655. package/dist/busy-BjsO3y2A.js +0 -173
  656. package/dist/busy-BjsO3y2A.js.map +0 -1
  657. package/dist/busy-UbCGkTAi.cjs +0 -134
  658. package/dist/busy-UbCGkTAi.cjs.map +0 -1
  659. package/dist/button-BTpxQ1Kd.cjs.map +0 -1
  660. package/dist/button-D7QHfYf4.js.map +0 -1
  661. package/dist/card-DCdtJ5Dy.js.map +0 -1
  662. package/dist/card-rprhCYIC.cjs +0 -177
  663. package/dist/card-rprhCYIC.cjs.map +0 -1
  664. package/dist/chips-C5bpgWyf.js.map +0 -1
  665. package/dist/chips-DVes-BSz.cjs.map +0 -1
  666. package/dist/date-range-DDUuBlJ6.cjs +0 -142
  667. package/dist/date-range-DDUuBlJ6.cjs.map +0 -1
  668. package/dist/date-range-IPlbrhwW.js +0 -966
  669. package/dist/date-range-IPlbrhwW.js.map +0 -1
  670. package/dist/date-range-inline-DPqY9YYf.js.map +0 -1
  671. package/dist/date-range-inline-Dx4Reboo.cjs.map +0 -1
  672. package/dist/details-BnleHmYe.js.map +0 -1
  673. package/dist/details-Bx2jSJxG.cjs.map +0 -1
  674. package/dist/directives-CYf2fAdA.cjs.map +0 -1
  675. package/dist/directives-d1rEbW1A.js.map +0 -1
  676. package/dist/divider-CimQJVr3.cjs +0 -57
  677. package/dist/divider-CimQJVr3.cjs.map +0 -1
  678. package/dist/divider-Cr-rx3vA.js +0 -89
  679. package/dist/divider-Cr-rx3vA.js.map +0 -1
  680. package/dist/expand-DNrWuG_-.js.map +0 -1
  681. package/dist/expand-_cp8oBjp.cjs +0 -141
  682. package/dist/expand-_cp8oBjp.cjs.map +0 -1
  683. package/dist/form-CMgYSZ3y.js.map +0 -1
  684. package/dist/form-DaaAQd2A.cjs.map +0 -1
  685. package/dist/icons-C2RkSXjP.cjs +0 -24
  686. package/dist/icons-C2RkSXjP.cjs.map +0 -1
  687. package/dist/icons-mbpHO_73.js.map +0 -1
  688. package/dist/iframe-88SN5JPu.cjs.map +0 -1
  689. package/dist/iframe-U3P1DnQv.js.map +0 -1
  690. package/dist/input-BY4Korc5.cjs.map +0 -1
  691. package/dist/input-CPWvGjE4.js.map +0 -1
  692. package/dist/input-chip-CCZ3i3Sf.js.map +0 -1
  693. package/dist/input-chip-kytMdbaM.cjs +0 -146
  694. package/dist/input-chip-kytMdbaM.cjs.map +0 -1
  695. package/dist/layout-BhfC26Ks.cjs.map +0 -1
  696. package/dist/layout-DC0Npqu7.js.map +0 -1
  697. package/dist/lightbox-BSwWvDQc.js.map +0 -1
  698. package/dist/lightbox-KrZQH9w9.cjs.map +0 -1
  699. package/dist/list-BwGtAAfi.js.map +0 -1
  700. package/dist/list-DIs02A3d.cjs +0 -40
  701. package/dist/list-DIs02A3d.cjs.map +0 -1
  702. package/dist/menu-DX8d96x-.js.map +0 -1
  703. package/dist/menu-jT_yAk5V.cjs.map +0 -1
  704. package/dist/mixins-COeG4DiX.js.map +0 -1
  705. package/dist/mixins-XGVIOvKt.cjs.map +0 -1
  706. package/dist/notification-CAJVpLne.js.map +0 -1
  707. package/dist/notification-DO3VXceY.cjs.map +0 -1
  708. package/dist/option-BNo1Zs-l.cjs +0 -43
  709. package/dist/option-BNo1Zs-l.cjs.map +0 -1
  710. package/dist/option-JISY0wZJ.js.map +0 -1
  711. package/dist/overlay-B1jVf-ge.cjs.map +0 -1
  712. package/dist/overlay-CT-tMHDX.js.map +0 -1
  713. package/dist/overlay.confirm-body-Dn-Zgogx.js.map +0 -1
  714. package/dist/overlay.confirm-body-mYDYoJL8.cjs.map +0 -1
  715. package/dist/overlay.service-BQmva9GY.cjs.map +0 -1
  716. package/dist/overlay.service-yqTOyLlr.js.map +0 -1
  717. package/dist/progress-CGWozq_n.js.map +0 -1
  718. package/dist/progress-DOVJhsR0.cjs +0 -51
  719. package/dist/progress-DOVJhsR0.cjs.map +0 -1
  720. package/dist/radio-group-CXkq6qAF.js.map +0 -1
  721. package/dist/radio-group-DoSX5D2V.cjs.map +0 -1
  722. package/dist/select-CObZenqg.cjs +0 -56
  723. package/dist/select-CObZenqg.cjs.map +0 -1
  724. package/dist/select-CU90i50_.js.map +0 -1
  725. package/dist/sound.service-Qhr8nCeG.cjs.map +0 -1
  726. package/dist/sound.service-m8WjOhjn.js.map +0 -1
  727. package/dist/splash-screen-Ca6Ew8p6.cjs +0 -41
  728. package/dist/splash-screen-Ca6Ew8p6.cjs.map +0 -1
  729. package/dist/splash-screen-Cs3dbPN3.js.map +0 -1
  730. package/dist/src-CCVbLLgC.js.map +0 -1
  731. package/dist/src-CpftzdZV.cjs +0 -264
  732. package/dist/src-CpftzdZV.cjs.map +0 -1
  733. package/dist/state--x58-AuK.cjs.map +0 -1
  734. package/dist/state-QSwQ61sA.js.map +0 -1
  735. package/dist/surface-bTjOiq8n.cjs +0 -7
  736. package/dist/surface-bTjOiq8n.cjs.map +0 -1
  737. package/dist/surface-cqMsHJHM.js.map +0 -1
  738. package/dist/tabs-Dk9UDWpq.cjs.map +0 -1
  739. package/dist/tabs-Ib0Mh__1.js.map +0 -1
  740. package/dist/textarea-CcRsw08B.js.map +0 -1
  741. package/dist/textarea-Cntd9tfV.cjs.map +0 -1
  742. package/dist/theme.service-5RjyR7Sy.js.map +0 -1
  743. package/dist/theme.service-DA6KY52G.cjs.map +0 -1
  744. package/dist/typography-DeEYdMhW.js +0 -358
  745. package/dist/typography-DeEYdMhW.js.map +0 -1
  746. package/dist/typography-Tm7wSaB2.cjs +0 -282
  747. package/dist/typography-Tm7wSaB2.cjs.map +0 -1
  748. package/dist/utils-DTa3QHxk.cjs.map +0 -1
  749. package/dist/utils-H8wNknWC.js.map +0 -1
  750. package/dist/window-Db5ZYY6t.js.map +0 -1
  751. package/dist/window-oQqx5xqQ.cjs +0 -59
  752. package/dist/window-oQqx5xqQ.cjs.map +0 -1
  753. package/src/form/fields/date-range/date-range-presets.ts +0 -220
  754. package/src/form/fields/date-range/date-utils.ts +0 -58
  755. package/types/src/form/fields/date-range/date-range-presets.d.ts +0 -18
  756. package/types/src/form/fields/date-range/date-utils.d.ts +0 -15
  757. /package/dist/{hashContent-iRZJJWtE.cjs → hashContent--s09Ed_g.cjs} +0 -0
  758. /package/dist/{hashContent-BqU6v1Xr.js → hashContent-CAvrQ56N.js} +0 -0
  759. /package/dist/{rxjs-utils-Csnks202.cjs → rxjs-utils-4P2v57ke.cjs} +0 -0
  760. /package/dist/{rxjs-utils-d-ivVN84.js → rxjs-utils-JMFdgQSl.js} +0 -0
  761. /package/dist/{theme.interface-CSt7JUBD.cjs → theme.interface-B-qxDsZQ.cjs} +0 -0
  762. /package/dist/{theme.interface-odQEpZZH.js → theme.interface-B7caS5cg.js} +0 -0
  763. /package/dist/{utils-DTa3QHxk.cjs → utils-DIXndz6Q.cjs} +0 -0
  764. /package/dist/{utils-H8wNknWC.js → utils-dSPH7Oh9.js} +0 -0
@@ -3,527 +3,490 @@
3
3
  * Falls back to 'de-DE' if not available (e.g., in Node.js environment).
4
4
  */
5
5
  const getSystemLocale = (): string => {
6
- if (typeof navigator !== 'undefined' && navigator.language) {
7
- return navigator.language
8
- }
9
- return 'de-DE'
6
+ if (typeof navigator !== 'undefined' && navigator.language) {
7
+ return navigator.language
8
+ }
9
+ return 'de-DE'
10
10
  }
11
11
 
12
12
  export class Numbers {
13
- /**
14
- * The system locale detected from user's browser/OS settings.
15
- * Use this for display formatting. For exports, use explicit locale like 'de-DE'.
16
- */
17
- readonly systemLocale = getSystemLocale()
18
-
19
- /**
20
- * Rounds a number to the specified number of decimal places.
21
- * @param {number} number - The number to round.
22
- * @param {number} [decimalPlaces=2] - The number of decimal places to round to.
23
- * @returns {number} - The rounded number.
24
- */
25
- roundNumber(number: number, decimalPlaces: number = 2): number {
26
- const factor = Math.pow(10, decimalPlaces);
27
- return Math.round(number * factor) / factor;
28
- }
29
-
30
- /**
31
- * Formats a number according to the specified locale and options.
32
- * Uses the user's system locale by default for display formatting.
33
- *
34
- * @param {number} number - The number to format.
35
- * @param {string} [locale] - The locale string (e.g., 'de-DE'). Defaults to system locale.
36
- * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.
37
- * @returns {string} - The formatted number as a string.
38
- *
39
- * @example
40
- * // Uses system locale (e.g., user's browser setting)
41
- * numbers.formatNumber(1234.56)
42
- *
43
- * // Explicit locale for exports (bank systems expect German format)
44
- * numbers.formatNumber(1234.56, 'de-DE', { useGrouping: false })
45
- */
46
- formatNumber(
47
- number: number,
48
- locale: string = this.systemLocale,
49
- options: Intl.NumberFormatOptions = {},
50
- ): string {
51
- return new Intl.NumberFormat(locale, options).format(number);
52
- }
53
-
54
- /**
55
- * Parses a string with a specified decimal separator into a number.
56
- * @param {string} numberString - The string to parse.
57
- * @param {string} [decimalSeparator=','] - The decimal separator used in the string.
58
- * @returns {number} - The parsed number.
59
- */
60
- parseToPureNumber(
61
- numberString: string,
62
- decimalSeparator: string = ",",
63
- ): number {
64
- const normalizedString = numberString.replace(decimalSeparator, ".");
65
- return parseFloat(normalizedString);
66
- }
67
-
68
- /**
69
- * Rounds a number to the specified decimal places and formats it according to the specified locale and options.
70
- * Uses the user's system locale by default.
71
- *
72
- * @param {number} number - The number to process.
73
- * @param {number} [decimalPlaces=2] - The number of decimal places to round to.
74
- * @param {string} [locale] - The locale string. Defaults to system locale.
75
- * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.
76
- * @returns {string} - The formatted number as a string.
77
- */
78
- doIt(
79
- number: number,
80
- decimalPlaces: number = 2,
81
- locale: string = this.systemLocale,
82
- options: Intl.NumberFormatOptions = {},
83
- ): string {
84
- const roundedNumber = this.roundNumber(number, decimalPlaces);
85
- return this.formatNumber(roundedNumber, locale, options);
86
- }
87
-
88
- /**
89
- * Format a currency amount consistently across the application
90
- *
91
- * @param amount The amount to format
92
- * @param currency The currency symbol to display (default: '€')
93
- * @returns Formatted amount with currency symbol
94
- */
95
- formatCurrency(amount: number, currency: string = "€"): string {
96
- return `${currency}${this.doIt(amount)}`;
97
- }
98
-
99
- /**
100
- * Format a delta value with appropriate directional indicator
101
- *
102
- * @param delta The delta amount to format
103
- * @param currency The currency symbol to display (default: '€')
104
- * @returns Formatted delta with direction indicator and currency symbol
105
- */
106
- formatDelta(delta: number, currency: string = "€"): string {
107
- const symbol = delta > 0 ? "↑" : delta < 0 ? "↓" : "→";
108
- return `${symbol} ${currency}${this.doIt(Math.abs(delta))}`;
109
- }
110
-
111
- /**
112
- * Get CSS class for delta value
113
- *
114
- * @param delta The delta amount
115
- * @returns CSS class based on delta direction
116
- */
117
- getDeltaClass(delta: number): string {
118
- return delta > 0
119
- ? "text-error-default"
120
- : delta < 0
121
- ? "text-primary-default"
122
- : "text-neutral";
123
- }
124
-
125
- /**
126
- * Converts a decimal number to a mixed fraction string
127
- * For example: 1.5 becomes "1 1/2", 2.25 becomes "2 1/4"
128
- *
129
- * @param number The decimal number to convert
130
- * @param precision The precision level for fraction approximation (default: 16)
131
- * @param maxDenominator The maximum allowed denominator (default: 4)
132
- * @returns A string representing the mixed fraction
133
- */
134
- toMixedFraction(
135
- number: number,
136
- precision: number = 16,
137
- maxDenominator: number = 4,
138
- ): string {
139
- // Handle negative numbers
140
- const isNegative = number < 0;
141
- number = Math.abs(number);
142
-
143
- // Extract whole number part
144
- const wholePart = Math.floor(number);
145
-
146
- // Extract decimal part and convert to fraction
147
- let decimalPart = number - wholePart;
148
-
149
- // If the decimal part is very small or zero, just return the whole number
150
- if (decimalPart < 1 / Math.pow(10, precision)) {
151
- return isNegative ? `-${wholePart}` : `${wholePart}`;
152
- }
153
-
154
- // Find the best fraction approximation using precision and max denominator
155
- const { numerator, denominator } = this.decimalToFraction(
156
- decimalPart,
157
- precision,
158
- maxDenominator,
159
- );
160
-
161
- // Format based on whether there's a whole part
162
- if (wholePart === 0) {
163
- return isNegative
164
- ? `-${numerator}/${denominator}`
165
- : `${numerator}/${denominator}`;
166
- } else {
167
- return isNegative
168
- ? `-${wholePart} ${numerator}/${denominator}`
169
- : `${wholePart} ${numerator}/${denominator}`;
170
- }
171
- }
172
-
173
- /**
174
- * Converts a decimal to a simplified fraction with a maximum denominator
175
- *
176
- * @param decimal The decimal part to convert (0 <= decimal < 1)
177
- * @param precision The precision level for approximation
178
- * @param maxDenominator The maximum allowed denominator (default: 4)
179
- * @returns Object containing numerator and denominator
180
- */
181
- private decimalToFraction(
182
- decimal: number,
183
- precision: number,
184
- maxDenominator: number = 4,
185
- ): { numerator: number; denominator: number } {
186
- if (decimal === 0) {
187
- return { numerator: 0, denominator: 1 };
188
- }
189
-
190
- // Initialize best approximation
191
- let bestError = Infinity;
192
- let bestNumerator = 0;
193
- let bestDenominator = 1;
194
-
195
- // Check common fractions first for better user experience
196
- // Filter to only include fractions with denominators <= maxDenominator
197
- const commonFractions = [
198
- { n: 1, d: 2 }, // 1/2
199
- { n: 1, d: 3 }, // 1/3
200
- { n: 2, d: 3 }, // 2/3
201
- { n: 1, d: 4 }, // 1/4
202
- { n: 3, d: 4 }, // 3/4
203
- ];
204
-
205
- // Add additional fractions only if maxDenominator allows
206
- const additionalFractions = [];
207
- if (maxDenominator >= 5) {
208
- additionalFractions.push(
209
- { n: 1, d: 5 }, // 1/5
210
- { n: 2, d: 5 }, // 2/5
211
- { n: 3, d: 5 }, // 3/5
212
- { n: 4, d: 5 }, // 4/5
213
- );
214
- }
215
- if (maxDenominator >= 6) {
216
- additionalFractions.push(
217
- { n: 1, d: 6 }, // 1/6
218
- { n: 5, d: 6 }, // 5/6
219
- );
220
- }
221
- if (maxDenominator >= 8) {
222
- additionalFractions.push(
223
- { n: 1, d: 8 }, // 1/8
224
- { n: 3, d: 8 }, // 3/8
225
- { n: 5, d: 8 }, // 5/8
226
- { n: 7, d: 8 }, // 7/8
227
- );
228
- }
229
- if (maxDenominator >= 10) {
230
- additionalFractions.push(
231
- { n: 1, d: 10 }, // 1/10
232
- { n: 3, d: 10 }, // 3/10
233
- { n: 7, d: 10 }, // 7/10
234
- { n: 9, d: 10 }, // 9/10
235
- );
236
- }
237
- if (maxDenominator >= 12) {
238
- additionalFractions.push(
239
- { n: 1, d: 12 }, // 1/12
240
- { n: 5, d: 12 }, // 5/12
241
- { n: 7, d: 12 }, // 7/12
242
- { n: 11, d: 12 }, // 11/12
243
- );
244
- }
245
- if (maxDenominator >= 16) {
246
- additionalFractions.push(
247
- { n: 1, d: 16 }, // 1/16
248
- { n: 3, d: 16 }, // 3/16
249
- { n: 5, d: 16 }, // 5/16
250
- { n: 7, d: 16 }, // 7/16
251
- { n: 9, d: 16 }, // 9/16
252
- { n: 11, d: 16 }, // 11/16
253
- { n: 13, d: 16 }, // 13/16
254
- { n: 15, d: 16 }, // 15/16
255
- );
256
- }
257
-
258
- // Combine all applicable fractions
259
- const allFractions = [...commonFractions, ...additionalFractions];
260
-
261
- // Check common fractions first
262
- for (const frac of allFractions) {
263
- if (frac.d <= maxDenominator) {
264
- const error = Math.abs(decimal - frac.n / frac.d);
265
- if (error < bestError) {
266
- bestError = error;
267
- bestNumerator = frac.n;
268
- bestDenominator = frac.d;
269
-
270
- // If we're very close to a common fraction, just use it
271
- if (error < 1 / Math.pow(10, precision)) {
272
- return { numerator: frac.n, denominator: frac.d };
273
- }
274
- }
275
- }
276
- }
277
-
278
- // If no suitable common fraction found, use a more sophisticated approach
279
- // for denominators up to maxDenominator
280
-
281
- // Find the best approximation with denominator <= maxDenominator
282
- for (let d = 1; d <= maxDenominator; d++) {
283
- // Find best numerator for this denominator
284
- const n = Math.round(decimal * d);
285
- const error = Math.abs(decimal - n / d);
286
-
287
- if (error < bestError) {
288
- bestError = error;
289
- bestNumerator = n;
290
- bestDenominator = d;
291
- }
292
- }
293
-
294
- // Only use continued fraction expansion if we're significantly off
295
- // and maxDenominator allows for larger denominators
296
- if (bestError > 1 / Math.pow(10, precision / 2) && maxDenominator > 4) {
297
- // Implementation of continued fraction expansion
298
- let n1 = 1,
299
- n2 = 0;
300
- let d1 = 0,
301
- d2 = 1;
302
- let b = decimal;
303
-
304
- do {
305
- let a = Math.floor(b);
306
- let aux = n1;
307
- n1 = a * n1 + n2;
308
- n2 = aux;
309
-
310
- aux = d1;
311
- d1 = a * d1 + d2;
312
- d2 = aux;
313
-
314
- b = 1 / (b - a);
315
-
316
- // Calculate the current approximation
317
- const currentError = Math.abs(decimal - n1 / d1);
318
-
319
- // If we hit the precision limit or if the denominator gets too large, use this approximation
320
- if (currentError < 1 / Math.pow(10, precision) || d1 > maxDenominator) {
321
- // If d1 exceeds maxDenominator, return the previous best result
322
- if (d1 > maxDenominator) {
323
- return { numerator: bestNumerator, denominator: bestDenominator };
324
- }
325
-
326
- // Otherwise return this result
327
- return { numerator: n1, denominator: d1 };
328
- }
329
- } while (b !== Infinity);
330
-
331
- bestNumerator = n1;
332
- bestDenominator = d1;
333
- }
334
-
335
- // Simplify the fraction
336
- const gcd = this.findGCD(bestNumerator, bestDenominator);
337
- return {
338
- numerator: bestNumerator / gcd,
339
- denominator: bestDenominator / gcd,
340
- };
341
- }
342
-
343
- /**
344
- * Calculates the greatest common divisor of two numbers
345
- */
346
- private findGCD(a: number, b: number): number {
347
- return b === 0 ? a : this.findGCD(b, a % b);
348
- }
349
-
350
- /**
351
- * Alternative method to get a formatted mixed fraction with a specified format
352
- *
353
- * @param number The decimal number to convert
354
- * @param format The format specification ('unicode', 'ascii', 'superscript')
355
- * @param precision The precision level for fraction approximation
356
- * @param maxDenominator The maximum allowed denominator (default: 4)
357
- * @returns A formatted string representing the mixed fraction
358
- */
359
- formatMixedFraction(
360
- number: number,
361
- format: "unicode" | "ascii" | "superscript" = "ascii",
362
- precision: number = 16,
363
- maxDenominator: number = 4,
364
- ): string {
365
- // Get the basic mixed fraction
366
- const basicFraction = this.toMixedFraction(
367
- number,
368
- precision,
369
- maxDenominator,
370
- );
371
-
372
- // If the format is ascii, just return the basic fraction
373
- if (format === "ascii") {
374
- return basicFraction;
375
- }
376
-
377
- // For unicode and superscript formats, we need to parse the basic fraction
378
- const isNegative = basicFraction.startsWith("-");
379
- const withoutSign = isNegative ? basicFraction.substring(1) : basicFraction;
380
-
381
- // Check if it's a pure fraction or mixed fraction
382
- const hasMixedPart = withoutSign.includes(" ");
383
-
384
- if (!withoutSign.includes("/")) {
385
- // If there's no fraction part, just return the number
386
- return basicFraction;
387
- }
388
-
389
- let wholePart = "";
390
- let fractionPart = withoutSign;
391
-
392
- if (hasMixedPart) {
393
- // Split the whole and fraction parts
394
- const parts = withoutSign.split(" ");
395
- wholePart = parts[0];
396
- fractionPart = parts[1];
397
- }
398
-
399
- // Split the fraction part into numerator and denominator
400
- const [numerator, denominator] = fractionPart.split("/");
401
-
402
- if (format === "unicode") {
403
- // Try to find a unicode fraction character
404
- const unicodeFraction = this.getUnicodeFraction(
405
- parseInt(numerator),
406
- parseInt(denominator),
407
- );
408
-
409
- if (unicodeFraction) {
410
- return isNegative
411
- ? `-${wholePart}${hasMixedPart ? " " : ""}${unicodeFraction}`
412
- : `${wholePart}${hasMixedPart ? " " : ""}${unicodeFraction}`;
413
- }
414
-
415
- // Fallback to basic format if no unicode fraction is available
416
- return basicFraction;
417
- }
418
-
419
- // Handle superscript format
420
- if (format === "superscript") {
421
- const superNumerator = this.toSuperscript(numerator);
422
- const subDenominator = this.toSubscript(denominator);
423
-
424
- if (hasMixedPart) {
425
- return isNegative
426
- ? `-${wholePart} ${superNumerator}⁄${subDenominator}`
427
- : `${wholePart} ${superNumerator}⁄${subDenominator}`;
428
- } else {
429
- return isNegative
430
- ? `-${superNumerator}⁄${subDenominator}`
431
- : `${superNumerator}⁄${subDenominator}`;
432
- }
433
- }
434
-
435
- // Fallback to basic format
436
- return basicFraction;
437
- }
438
-
439
- /**
440
- * Gets the Unicode fraction character if available
441
- *
442
- * @param numerator The numerator
443
- * @param denominator The denominator
444
- * @returns Unicode fraction character or null if not available
445
- */
446
- private getUnicodeFraction(
447
- numerator: number,
448
- denominator: number,
449
- ): string | null {
450
- // Map common fractions to their Unicode characters
451
- const fractionMap: Record<string, string> = {
452
- "1/4": "¼",
453
- "1/2": "½",
454
- "3/4": "¾",
455
- "1/3": "⅓",
456
- "2/3": "⅔",
457
- "1/5": "⅕",
458
- "2/5": "⅖",
459
- "3/5": "⅗",
460
- "4/5": "⅘",
461
- "1/6": "⅙",
462
- "5/6": "⅚",
463
- "1/7": "⅐",
464
- "1/8": "⅛",
465
- "3/8": "⅜",
466
- "5/8": "⅝",
467
- "7/8": "⅞",
468
- "1/9": "⅑",
469
- "1/10": "⅒",
470
- };
471
-
472
- const key = `${numerator}/${denominator}`;
473
- return fractionMap[key] || null;
474
- }
475
-
476
- /**
477
- * Converts digits to superscript
478
- */
479
- private toSuperscript(str: string): string {
480
- const superscriptMap: Record<string, string> = {
481
- "0": "⁰",
482
- "1": "¹",
483
- "2": "²",
484
- "3": "³",
485
- "4": "⁴",
486
- "5": "⁵",
487
- "6": "⁶",
488
- "7": "⁷",
489
- "8": "⁸",
490
- "9": "⁹",
491
- "-": "⁻",
492
- };
493
-
494
- return str
495
- .split("")
496
- .map((char) => superscriptMap[char] || char)
497
- .join("");
498
- }
499
-
500
- /**
501
- * Converts digits to subscript
502
- */
503
- private toSubscript(str: string): string {
504
- const subscriptMap: Record<string, string> = {
505
- "0": "₀",
506
- "1": "₁",
507
- "2": "₂",
508
- "3": "₃",
509
- "4": "₄",
510
- "5": "₅",
511
- "6": "₆",
512
- "7": "₇",
513
- "8": "₈",
514
- "9": "₉",
515
- "-": "₋",
516
- };
517
-
518
- return str
519
- .split("")
520
- .map((char) => subscriptMap[char] || char)
521
- .join("");
522
- }
13
+ /**
14
+ * The system locale detected from user's browser/OS settings.
15
+ * Use this for display formatting. For exports, use explicit locale like 'de-DE'.
16
+ */
17
+ readonly systemLocale = getSystemLocale()
18
+
19
+ /**
20
+ * Rounds a number to the specified number of decimal places.
21
+ * @param {number} number - The number to round.
22
+ * @param {number} [decimalPlaces=2] - The number of decimal places to round to.
23
+ * @returns {number} - The rounded number.
24
+ */
25
+ roundNumber(number: number, decimalPlaces: number = 2): number {
26
+ const factor = Math.pow(10, decimalPlaces)
27
+ return Math.round(number * factor) / factor
28
+ }
29
+
30
+ /**
31
+ * Formats a number according to the specified locale and options.
32
+ * Uses the user's system locale by default for display formatting.
33
+ *
34
+ * @param {number} number - The number to format.
35
+ * @param {string} [locale] - The locale string (e.g., 'de-DE'). Defaults to system locale.
36
+ * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.
37
+ * @returns {string} - The formatted number as a string.
38
+ *
39
+ * @example
40
+ * // Uses system locale (e.g., user's browser setting)
41
+ * numbers.formatNumber(1234.56)
42
+ *
43
+ * // Explicit locale for exports (bank systems expect German format)
44
+ * numbers.formatNumber(1234.56, 'de-DE', { useGrouping: false })
45
+ */
46
+ formatNumber(number: number, locale: string = this.systemLocale, options: Intl.NumberFormatOptions = {}): string {
47
+ return new Intl.NumberFormat(locale, options).format(number)
48
+ }
49
+
50
+ /**
51
+ * Parses a string with a specified decimal separator into a number.
52
+ * @param {string} numberString - The string to parse.
53
+ * @param {string} [decimalSeparator=','] - The decimal separator used in the string.
54
+ * @returns {number} - The parsed number.
55
+ */
56
+ parseToPureNumber(numberString: string, decimalSeparator: string = ','): number {
57
+ const normalizedString = numberString.replace(decimalSeparator, '.')
58
+ return parseFloat(normalizedString)
59
+ }
60
+
61
+ /**
62
+ * Rounds a number to the specified decimal places and formats it according to the specified locale and options.
63
+ * Uses the user's system locale by default.
64
+ *
65
+ * @param {number} number - The number to process.
66
+ * @param {number} [decimalPlaces=2] - The number of decimal places to round to.
67
+ * @param {string} [locale] - The locale string. Defaults to system locale.
68
+ * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.
69
+ * @returns {string} - The formatted number as a string.
70
+ */
71
+ doIt(
72
+ number: number,
73
+ decimalPlaces: number = 2,
74
+ locale: string = this.systemLocale,
75
+ options: Intl.NumberFormatOptions = {},
76
+ ): string {
77
+ const roundedNumber = this.roundNumber(number, decimalPlaces)
78
+ return this.formatNumber(roundedNumber, locale, options)
79
+ }
80
+
81
+ /**
82
+ * Format a currency amount consistently across the application
83
+ *
84
+ * @param amount The amount to format
85
+ * @param currency The currency symbol to display (default: '€')
86
+ * @returns Formatted amount with currency symbol
87
+ */
88
+ formatCurrency(amount: number, currency: string = '€'): string {
89
+ return `${currency}${this.doIt(amount)}`
90
+ }
91
+
92
+ /**
93
+ * Format a delta value with appropriate directional indicator
94
+ *
95
+ * @param delta The delta amount to format
96
+ * @param currency The currency symbol to display (default: '€')
97
+ * @returns Formatted delta with direction indicator and currency symbol
98
+ */
99
+ formatDelta(delta: number, currency: string = '€'): string {
100
+ const symbol = delta > 0 ? '↑' : delta < 0 ? '↓' : '→'
101
+ return `${symbol} ${currency}${this.doIt(Math.abs(delta))}`
102
+ }
103
+
104
+ /**
105
+ * Get CSS class for delta value
106
+ *
107
+ * @param delta The delta amount
108
+ * @returns CSS class based on delta direction
109
+ */
110
+ getDeltaClass(delta: number): string {
111
+ return delta > 0 ? 'text-error-default' : delta < 0 ? 'text-primary-default' : 'text-neutral'
112
+ }
113
+
114
+ /**
115
+ * Converts a decimal number to a mixed fraction string
116
+ * For example: 1.5 becomes "1 1/2", 2.25 becomes "2 1/4"
117
+ *
118
+ * @param number The decimal number to convert
119
+ * @param precision The precision level for fraction approximation (default: 16)
120
+ * @param maxDenominator The maximum allowed denominator (default: 4)
121
+ * @returns A string representing the mixed fraction
122
+ */
123
+ toMixedFraction(number: number, precision: number = 16, maxDenominator: number = 4): string {
124
+ // Handle negative numbers
125
+ const isNegative = number < 0
126
+ number = Math.abs(number)
127
+
128
+ // Extract whole number part
129
+ const wholePart = Math.floor(number)
130
+
131
+ // Extract decimal part and convert to fraction
132
+ let decimalPart = number - wholePart
133
+
134
+ // If the decimal part is very small or zero, just return the whole number
135
+ if (decimalPart < 1 / Math.pow(10, precision)) {
136
+ return isNegative ? `-${wholePart}` : `${wholePart}`
137
+ }
138
+
139
+ // Find the best fraction approximation using precision and max denominator
140
+ const { numerator, denominator } = this.decimalToFraction(decimalPart, precision, maxDenominator)
141
+
142
+ // Format based on whether there's a whole part
143
+ if (wholePart === 0) {
144
+ return isNegative ? `-${numerator}/${denominator}` : `${numerator}/${denominator}`
145
+ } else {
146
+ return isNegative ? `-${wholePart} ${numerator}/${denominator}` : `${wholePart} ${numerator}/${denominator}`
147
+ }
148
+ }
149
+
150
+ /**
151
+ * Converts a decimal to a simplified fraction with a maximum denominator
152
+ *
153
+ * @param decimal The decimal part to convert (0 <= decimal < 1)
154
+ * @param precision The precision level for approximation
155
+ * @param maxDenominator The maximum allowed denominator (default: 4)
156
+ * @returns Object containing numerator and denominator
157
+ */
158
+ private decimalToFraction(
159
+ decimal: number,
160
+ precision: number,
161
+ maxDenominator: number = 4,
162
+ ): { numerator: number; denominator: number } {
163
+ if (decimal === 0) {
164
+ return { numerator: 0, denominator: 1 }
165
+ }
166
+
167
+ // Initialize best approximation
168
+ let bestError = Infinity
169
+ let bestNumerator = 0
170
+ let bestDenominator = 1
171
+
172
+ // Check common fractions first for better user experience
173
+ // Filter to only include fractions with denominators <= maxDenominator
174
+ const commonFractions = [
175
+ { n: 1, d: 2 }, // 1/2
176
+ { n: 1, d: 3 }, // 1/3
177
+ { n: 2, d: 3 }, // 2/3
178
+ { n: 1, d: 4 }, // 1/4
179
+ { n: 3, d: 4 }, // 3/4
180
+ ]
181
+
182
+ // Add additional fractions only if maxDenominator allows
183
+ const additionalFractions = []
184
+ if (maxDenominator >= 5) {
185
+ additionalFractions.push(
186
+ { n: 1, d: 5 }, // 1/5
187
+ { n: 2, d: 5 }, // 2/5
188
+ { n: 3, d: 5 }, // 3/5
189
+ { n: 4, d: 5 }, // 4/5
190
+ )
191
+ }
192
+ if (maxDenominator >= 6) {
193
+ additionalFractions.push(
194
+ { n: 1, d: 6 }, // 1/6
195
+ { n: 5, d: 6 }, // 5/6
196
+ )
197
+ }
198
+ if (maxDenominator >= 8) {
199
+ additionalFractions.push(
200
+ { n: 1, d: 8 }, // 1/8
201
+ { n: 3, d: 8 }, // 3/8
202
+ { n: 5, d: 8 }, // 5/8
203
+ { n: 7, d: 8 }, // 7/8
204
+ )
205
+ }
206
+ if (maxDenominator >= 10) {
207
+ additionalFractions.push(
208
+ { n: 1, d: 10 }, // 1/10
209
+ { n: 3, d: 10 }, // 3/10
210
+ { n: 7, d: 10 }, // 7/10
211
+ { n: 9, d: 10 }, // 9/10
212
+ )
213
+ }
214
+ if (maxDenominator >= 12) {
215
+ additionalFractions.push(
216
+ { n: 1, d: 12 }, // 1/12
217
+ { n: 5, d: 12 }, // 5/12
218
+ { n: 7, d: 12 }, // 7/12
219
+ { n: 11, d: 12 }, // 11/12
220
+ )
221
+ }
222
+ if (maxDenominator >= 16) {
223
+ additionalFractions.push(
224
+ { n: 1, d: 16 }, // 1/16
225
+ { n: 3, d: 16 }, // 3/16
226
+ { n: 5, d: 16 }, // 5/16
227
+ { n: 7, d: 16 }, // 7/16
228
+ { n: 9, d: 16 }, // 9/16
229
+ { n: 11, d: 16 }, // 11/16
230
+ { n: 13, d: 16 }, // 13/16
231
+ { n: 15, d: 16 }, // 15/16
232
+ )
233
+ }
234
+
235
+ // Combine all applicable fractions
236
+ const allFractions = [...commonFractions, ...additionalFractions]
237
+
238
+ // Check common fractions first
239
+ for (const frac of allFractions) {
240
+ if (frac.d <= maxDenominator) {
241
+ const error = Math.abs(decimal - frac.n / frac.d)
242
+ if (error < bestError) {
243
+ bestError = error
244
+ bestNumerator = frac.n
245
+ bestDenominator = frac.d
246
+
247
+ // If we're very close to a common fraction, just use it
248
+ if (error < 1 / Math.pow(10, precision)) {
249
+ return { numerator: frac.n, denominator: frac.d }
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ // If no suitable common fraction found, use a more sophisticated approach
256
+ // for denominators up to maxDenominator
257
+
258
+ // Find the best approximation with denominator <= maxDenominator
259
+ for (let d = 1; d <= maxDenominator; d++) {
260
+ // Find best numerator for this denominator
261
+ const n = Math.round(decimal * d)
262
+ const error = Math.abs(decimal - n / d)
263
+
264
+ if (error < bestError) {
265
+ bestError = error
266
+ bestNumerator = n
267
+ bestDenominator = d
268
+ }
269
+ }
270
+
271
+ // Only use continued fraction expansion if we're significantly off
272
+ // and maxDenominator allows for larger denominators
273
+ if (bestError > 1 / Math.pow(10, precision / 2) && maxDenominator > 4) {
274
+ // Implementation of continued fraction expansion
275
+ let n1 = 1,
276
+ n2 = 0
277
+ let d1 = 0,
278
+ d2 = 1
279
+ let b = decimal
280
+
281
+ do {
282
+ let a = Math.floor(b)
283
+ let aux = n1
284
+ n1 = a * n1 + n2
285
+ n2 = aux
286
+
287
+ aux = d1
288
+ d1 = a * d1 + d2
289
+ d2 = aux
290
+
291
+ b = 1 / (b - a)
292
+
293
+ // Calculate the current approximation
294
+ const currentError = Math.abs(decimal - n1 / d1)
295
+
296
+ // If we hit the precision limit or if the denominator gets too large, use this approximation
297
+ if (currentError < 1 / Math.pow(10, precision) || d1 > maxDenominator) {
298
+ // If d1 exceeds maxDenominator, return the previous best result
299
+ if (d1 > maxDenominator) {
300
+ return { numerator: bestNumerator, denominator: bestDenominator }
301
+ }
302
+
303
+ // Otherwise return this result
304
+ return { numerator: n1, denominator: d1 }
305
+ }
306
+ } while (b !== Infinity)
307
+
308
+ bestNumerator = n1
309
+ bestDenominator = d1
310
+ }
311
+
312
+ // Simplify the fraction
313
+ const gcd = this.findGCD(bestNumerator, bestDenominator)
314
+ return {
315
+ numerator: bestNumerator / gcd,
316
+ denominator: bestDenominator / gcd,
317
+ }
318
+ }
319
+
320
+ /**
321
+ * Calculates the greatest common divisor of two numbers
322
+ */
323
+ private findGCD(a: number, b: number): number {
324
+ return b === 0 ? a : this.findGCD(b, a % b)
325
+ }
326
+
327
+ /**
328
+ * Alternative method to get a formatted mixed fraction with a specified format
329
+ *
330
+ * @param number The decimal number to convert
331
+ * @param format The format specification ('unicode', 'ascii', 'superscript')
332
+ * @param precision The precision level for fraction approximation
333
+ * @param maxDenominator The maximum allowed denominator (default: 4)
334
+ * @returns A formatted string representing the mixed fraction
335
+ */
336
+ formatMixedFraction(
337
+ number: number,
338
+ format: 'unicode' | 'ascii' | 'superscript' = 'ascii',
339
+ precision: number = 16,
340
+ maxDenominator: number = 4,
341
+ ): string {
342
+ // Get the basic mixed fraction
343
+ const basicFraction = this.toMixedFraction(number, precision, maxDenominator)
344
+
345
+ // If the format is ascii, just return the basic fraction
346
+ if (format === 'ascii') {
347
+ return basicFraction
348
+ }
349
+
350
+ // For unicode and superscript formats, we need to parse the basic fraction
351
+ const isNegative = basicFraction.startsWith('-')
352
+ const withoutSign = isNegative ? basicFraction.substring(1) : basicFraction
353
+
354
+ // Check if it's a pure fraction or mixed fraction
355
+ const hasMixedPart = withoutSign.includes(' ')
356
+
357
+ if (!withoutSign.includes('/')) {
358
+ // If there's no fraction part, just return the number
359
+ return basicFraction
360
+ }
361
+
362
+ let wholePart = ''
363
+ let fractionPart = withoutSign
364
+
365
+ if (hasMixedPart) {
366
+ // Split the whole and fraction parts
367
+ const parts = withoutSign.split(' ')
368
+ wholePart = parts[0]
369
+ fractionPart = parts[1]
370
+ }
371
+
372
+ // Split the fraction part into numerator and denominator
373
+ const [numerator, denominator] = fractionPart.split('/')
374
+
375
+ if (format === 'unicode') {
376
+ // Try to find a unicode fraction character
377
+ const unicodeFraction = this.getUnicodeFraction(parseInt(numerator), parseInt(denominator))
378
+
379
+ if (unicodeFraction) {
380
+ return isNegative
381
+ ? `-${wholePart}${hasMixedPart ? ' ' : ''}${unicodeFraction}`
382
+ : `${wholePart}${hasMixedPart ? ' ' : ''}${unicodeFraction}`
383
+ }
384
+
385
+ // Fallback to basic format if no unicode fraction is available
386
+ return basicFraction
387
+ }
388
+
389
+ // Handle superscript format
390
+ if (format === 'superscript') {
391
+ const superNumerator = this.toSuperscript(numerator)
392
+ const subDenominator = this.toSubscript(denominator)
393
+
394
+ if (hasMixedPart) {
395
+ return isNegative
396
+ ? `-${wholePart} ${superNumerator}⁄${subDenominator}`
397
+ : `${wholePart} ${superNumerator}⁄${subDenominator}`
398
+ } else {
399
+ return isNegative ? `-${superNumerator}⁄${subDenominator}` : `${superNumerator}⁄${subDenominator}`
400
+ }
401
+ }
402
+
403
+ // Fallback to basic format
404
+ return basicFraction
405
+ }
406
+
407
+ /**
408
+ * Gets the Unicode fraction character if available
409
+ *
410
+ * @param numerator The numerator
411
+ * @param denominator The denominator
412
+ * @returns Unicode fraction character or null if not available
413
+ */
414
+ private getUnicodeFraction(numerator: number, denominator: number): string | null {
415
+ // Map common fractions to their Unicode characters
416
+ const fractionMap: Record<string, string> = {
417
+ '1/4': '¼',
418
+ '1/2': '½',
419
+ '3/4': '¾',
420
+ '1/3': '⅓',
421
+ '2/3': '⅔',
422
+ '1/5': '⅕',
423
+ '2/5': '⅖',
424
+ '3/5': '⅗',
425
+ '4/5': '⅘',
426
+ '1/6': '⅙',
427
+ '5/6': '⅚',
428
+ '1/7': '⅐',
429
+ '1/8': '⅛',
430
+ '3/8': '⅜',
431
+ '5/8': '⅝',
432
+ '7/8': '⅞',
433
+ '1/9': '⅑',
434
+ '1/10': '⅒',
435
+ }
436
+
437
+ const key = `${numerator}/${denominator}`
438
+ return fractionMap[key] || null
439
+ }
440
+
441
+ /**
442
+ * Converts digits to superscript
443
+ */
444
+ private toSuperscript(str: string): string {
445
+ const superscriptMap: Record<string, string> = {
446
+ '0': '⁰',
447
+ '1': '¹',
448
+ '2': '²',
449
+ '3': '³',
450
+ '4': '⁴',
451
+ '5': '⁵',
452
+ '6': '⁶',
453
+ '7': '⁷',
454
+ '8': '⁸',
455
+ '9': '⁹',
456
+ '-': '⁻',
457
+ }
458
+
459
+ return str
460
+ .split('')
461
+ .map(char => superscriptMap[char] || char)
462
+ .join('')
463
+ }
464
+
465
+ /**
466
+ * Converts digits to subscript
467
+ */
468
+ private toSubscript(str: string): string {
469
+ const subscriptMap: Record<string, string> = {
470
+ '0': '₀',
471
+ '1': '₁',
472
+ '2': '₂',
473
+ '3': '₃',
474
+ '4': '₄',
475
+ '5': '₅',
476
+ '6': '₆',
477
+ '7': '₇',
478
+ '8': '₈',
479
+ '9': '₉',
480
+ '-': '₋',
481
+ }
482
+
483
+ return str
484
+ .split('')
485
+ .map(char => subscriptMap[char] || char)
486
+ .join('')
487
+ }
523
488
  }
524
489
 
525
-
526
-
527
490
  const numbers = new Numbers()
528
491
 
529
- export default numbers
492
+ export default numbers