@aithe/aithe-ui 26.2.3 → 26.3.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 (620) hide show
  1. package/README.md +19 -11
  2. package/dist/apps/admin/app.js +12 -0
  3. package/dist/apps/admin/components/admin-app.js +83 -0
  4. package/dist/apps/admin/components/admin-layout.d.ts +0 -1
  5. package/dist/apps/admin/components/admin-layout.d.ts.map +1 -1
  6. package/dist/apps/admin/components/admin-layout.js +250 -0
  7. package/dist/apps/admin/datahub/auth.js +24 -0
  8. package/dist/apps/admin/datahub/dashboard.js +16 -0
  9. package/dist/apps/admin/datahub/index.js +42 -0
  10. package/dist/apps/admin/datahub/menu.js +16 -0
  11. package/dist/apps/admin/datahub/mock/auth.js +11 -0
  12. package/dist/apps/admin/datahub/mock/dashboard.js +10 -0
  13. package/dist/apps/admin/datahub/mock/menu.js +42 -0
  14. package/dist/apps/admin/i18n/de-DE.js +37 -0
  15. package/dist/apps/admin/i18n/en-US.js +37 -0
  16. package/dist/apps/admin/i18n/es-ES.js +38 -0
  17. package/dist/apps/admin/i18n/fr-FR.js +37 -0
  18. package/dist/apps/admin/i18n/index.js +27 -0
  19. package/dist/apps/admin/i18n/ja-JP.js +38 -0
  20. package/dist/apps/admin/i18n/ko-KR.js +37 -0
  21. package/dist/apps/admin/i18n/pt-BR.js +37 -0
  22. package/dist/apps/admin/i18n/zh-CN.js +37 -0
  23. package/dist/apps/admin/i18n/zh-HK.js +37 -0
  24. package/dist/apps/admin/i18n/zh-TW.js +37 -0
  25. package/dist/apps/admin/pages/dashboard-page.d.ts +1 -0
  26. package/dist/apps/admin/pages/dashboard-page.d.ts.map +1 -1
  27. package/dist/apps/admin/pages/dashboard-page.js +199 -0
  28. package/dist/apps/admin/pages/login-page.js +278 -0
  29. package/dist/apps/admin/pages/not-found-page.js +57 -0
  30. package/dist/apps/admin/pages/role-page.js +76 -0
  31. package/dist/apps/admin/pages/settings-page.js +95 -0
  32. package/dist/apps/admin/pages/user-page.js +76 -0
  33. package/dist/apps/admin/router/index.js +43 -0
  34. package/dist/apps/admin/standalone.js +1 -0
  35. package/dist/apps/admin/store/auth.js +42 -0
  36. package/dist/apps/api/app.js +82 -0
  37. package/dist/apps/api/demo-data.d.ts.map +1 -1
  38. package/dist/apps/api/demo-data.js +965 -0
  39. package/dist/apps/api/docs-viewer.js +684 -0
  40. package/dist/apps/api/i18n/de-DE.d.ts.map +1 -1
  41. package/dist/apps/api/i18n/de-DE.js +131 -0
  42. package/dist/apps/api/i18n/en-US.d.ts.map +1 -1
  43. package/dist/apps/api/i18n/en-US.js +141 -0
  44. package/dist/apps/api/i18n/es-ES.d.ts.map +1 -1
  45. package/dist/apps/api/i18n/es-ES.js +131 -0
  46. package/dist/apps/api/i18n/fr-FR.d.ts.map +1 -1
  47. package/dist/apps/api/i18n/fr-FR.js +131 -0
  48. package/dist/apps/api/i18n/index.js +27 -0
  49. package/dist/apps/api/i18n/ja-JP.d.ts.map +1 -1
  50. package/dist/apps/api/i18n/ja-JP.js +131 -0
  51. package/dist/apps/api/i18n/ko-KR.d.ts.map +1 -1
  52. package/dist/apps/api/i18n/ko-KR.js +131 -0
  53. package/dist/apps/api/i18n/pt-BR.d.ts.map +1 -1
  54. package/dist/apps/api/i18n/pt-BR.js +131 -0
  55. package/dist/apps/api/i18n/zh-CN.d.ts.map +1 -1
  56. package/dist/apps/api/i18n/zh-CN.js +141 -0
  57. package/dist/apps/api/i18n/zh-HK.d.ts.map +1 -1
  58. package/dist/apps/api/i18n/zh-HK.js +131 -0
  59. package/dist/apps/api/i18n/zh-TW.d.ts.map +1 -1
  60. package/dist/apps/api/i18n/zh-TW.js +131 -0
  61. package/dist/apps/api/pages/docs.d.ts.map +1 -1
  62. package/dist/apps/api/pages/docs.js +369 -0
  63. package/dist/apps/api/standalone.js +1 -0
  64. package/dist/apps/demo/app.d.ts.map +1 -1
  65. package/dist/apps/demo/app.js +275 -0
  66. package/dist/apps/demo/editor.d.ts.map +1 -1
  67. package/dist/apps/demo/editor.js +270 -0
  68. package/dist/apps/demo/helpers.js +7 -0
  69. package/dist/apps/demo/i18n/de-DE.d.ts.map +1 -1
  70. package/dist/apps/demo/i18n/de-DE.js +289 -0
  71. package/dist/apps/demo/i18n/en-US.d.ts.map +1 -1
  72. package/dist/apps/demo/i18n/en-US.js +301 -0
  73. package/dist/apps/demo/i18n/es-ES.d.ts.map +1 -1
  74. package/dist/apps/demo/i18n/es-ES.js +289 -0
  75. package/dist/apps/demo/i18n/fr-FR.d.ts.map +1 -1
  76. package/dist/apps/demo/i18n/fr-FR.js +289 -0
  77. package/dist/apps/demo/i18n/index.js +27 -0
  78. package/dist/apps/demo/i18n/ja-JP.d.ts.map +1 -1
  79. package/dist/apps/demo/i18n/ja-JP.js +289 -0
  80. package/dist/apps/demo/i18n/ko-KR.d.ts.map +1 -1
  81. package/dist/apps/demo/i18n/ko-KR.js +289 -0
  82. package/dist/apps/demo/i18n/pt-BR.d.ts.map +1 -1
  83. package/dist/apps/demo/i18n/pt-BR.js +289 -0
  84. package/dist/apps/demo/i18n/zh-CN.d.ts.map +1 -1
  85. package/dist/apps/demo/i18n/zh-CN.js +301 -0
  86. package/dist/apps/demo/i18n/zh-HK.d.ts.map +1 -1
  87. package/dist/apps/demo/i18n/zh-HK.js +289 -0
  88. package/dist/apps/demo/i18n/zh-TW.d.ts.map +1 -1
  89. package/dist/apps/demo/i18n/zh-TW.js +289 -0
  90. package/dist/apps/demo/pages/autoform.d.ts.map +1 -1
  91. package/dist/apps/demo/pages/autoform.js +422 -0
  92. package/dist/apps/demo/pages/autoview.d.ts +3 -0
  93. package/dist/apps/demo/pages/autoview.d.ts.map +1 -0
  94. package/dist/apps/demo/pages/autoview.js +310 -0
  95. package/dist/apps/demo/pages/basic.js +157 -0
  96. package/dist/apps/demo/pages/code.js +1088 -0
  97. package/dist/apps/demo/pages/container.js +42 -0
  98. package/dist/apps/demo/pages/dashboard.js +159 -0
  99. package/dist/apps/demo/pages/data.d.ts.map +1 -1
  100. package/dist/apps/demo/pages/data.js +327 -0
  101. package/dist/apps/demo/pages/display.d.ts.map +1 -1
  102. package/dist/apps/demo/pages/display.js +295 -0
  103. package/dist/apps/demo/pages/feedback.js +94 -0
  104. package/dist/apps/demo/pages/form.d.ts.map +1 -1
  105. package/dist/apps/demo/pages/form.js +119 -0
  106. package/dist/apps/demo/pages/layout.js +74 -0
  107. package/dist/apps/demo/pages/navigation.js +54 -0
  108. package/dist/apps/demo/pages/progress.js +42 -0
  109. package/dist/apps/demo/pages/theme.js +126 -0
  110. package/dist/apps/demo/standalone.js +1 -0
  111. package/dist/components/basic/AGENTS.md +1 -0
  112. package/dist/components/basic/avatar.js +168 -0
  113. package/dist/components/basic/badge.js +157 -0
  114. package/dist/components/basic/button-group.js +70 -0
  115. package/dist/components/basic/button.d.ts +2 -4
  116. package/dist/components/basic/button.d.ts.map +1 -1
  117. package/dist/components/basic/button.js +315 -0
  118. package/dist/components/basic/card.js +186 -0
  119. package/dist/components/basic/chip.js +103 -0
  120. package/dist/components/basic/divider.js +127 -0
  121. package/dist/components/basic/empty.js +72 -0
  122. package/dist/components/basic/icon.js +129 -0
  123. package/dist/components/basic/input.d.ts.map +1 -1
  124. package/dist/components/basic/input.js +314 -0
  125. package/dist/components/basic/tag.d.ts +7 -2
  126. package/dist/components/basic/tag.d.ts.map +1 -1
  127. package/dist/components/basic/tag.js +248 -0
  128. package/dist/components/basic/textarea.d.ts +0 -1
  129. package/dist/components/basic/textarea.d.ts.map +1 -1
  130. package/dist/components/basic/textarea.js +130 -0
  131. package/dist/components/container/callout.js +108 -0
  132. package/dist/components/container/details.js +117 -0
  133. package/dist/components/container/scroller.js +144 -0
  134. package/dist/components/container/split-panel.js +150 -0
  135. package/dist/components/data/AGENTS.md +1 -1
  136. package/dist/components/data/box-table.d.ts +53 -0
  137. package/dist/components/data/box-table.d.ts.map +1 -0
  138. package/dist/components/data/box-table.js +220 -0
  139. package/dist/components/data/dropdown.d.ts +8 -5
  140. package/dist/components/data/dropdown.d.ts.map +1 -1
  141. package/dist/components/data/dropdown.js +219 -0
  142. package/dist/components/data/metrics-group.js +180 -0
  143. package/dist/components/data/metrics.d.ts +11 -0
  144. package/dist/components/data/metrics.d.ts.map +1 -1
  145. package/dist/components/data/metrics.js +309 -0
  146. package/dist/components/data/pagination.js +119 -0
  147. package/dist/components/data/tab-pane.d.ts +58 -12
  148. package/dist/components/data/tab-pane.d.ts.map +1 -1
  149. package/dist/components/data/tab-pane.js +130 -0
  150. package/dist/components/data/table-column.d.ts +29 -5
  151. package/dist/components/data/table-column.d.ts.map +1 -1
  152. package/dist/components/data/table-column.js +123 -0
  153. package/dist/components/data/table.d.ts +134 -54
  154. package/dist/components/data/table.d.ts.map +1 -1
  155. package/dist/components/data/table.js +1210 -0
  156. package/dist/components/data/tabs.d.ts +60 -3
  157. package/dist/components/data/tabs.d.ts.map +1 -1
  158. package/dist/components/data/tabs.js +416 -0
  159. package/dist/components/data/timeline-item.js +127 -0
  160. package/dist/components/data/timeline.js +204 -0
  161. package/dist/components/data/tree-menu.d.ts +12 -2
  162. package/dist/components/data/tree-menu.d.ts.map +1 -1
  163. package/dist/components/data/tree-menu.js +482 -0
  164. package/dist/components/data/tree.js +269 -0
  165. package/dist/components/display/AGENTS.md +5 -2
  166. package/dist/components/display/animated-image.js +98 -0
  167. package/dist/components/display/autoview.d.ts +139 -0
  168. package/dist/components/display/autoview.d.ts.map +1 -0
  169. package/dist/components/display/autoview.js +460 -0
  170. package/dist/components/display/brief-box.d.ts +42 -0
  171. package/dist/components/display/brief-box.d.ts.map +1 -0
  172. package/dist/components/display/brief-box.js +117 -0
  173. package/dist/components/display/carousel.js +223 -0
  174. package/dist/components/display/code-editor.d.ts.map +1 -1
  175. package/dist/components/display/code-editor.js +976 -0
  176. package/dist/components/display/comparison.js +132 -0
  177. package/dist/components/display/desc-item.d.ts +48 -0
  178. package/dist/components/display/desc-item.d.ts.map +1 -0
  179. package/dist/components/display/desc-item.js +150 -0
  180. package/dist/components/display/desc.d.ts +68 -0
  181. package/dist/components/display/desc.d.ts.map +1 -0
  182. package/dist/components/display/desc.js +405 -0
  183. package/dist/components/display/detail-box.d.ts +51 -0
  184. package/dist/components/display/detail-box.d.ts.map +1 -0
  185. package/dist/components/display/detail-box.js +157 -0
  186. package/dist/components/display/label.js +166 -0
  187. package/dist/components/display/markdown-editor.js +319 -0
  188. package/dist/components/display/markdown.d.ts.map +1 -1
  189. package/dist/components/display/markdown.js +193 -0
  190. package/dist/components/display/mini-box.d.ts +31 -0
  191. package/dist/components/display/mini-box.d.ts.map +1 -0
  192. package/dist/components/display/mini-box.js +137 -0
  193. package/dist/components/display/profile.d.ts +18 -0
  194. package/dist/components/display/profile.d.ts.map +1 -0
  195. package/dist/components/display/profile.js +164 -0
  196. package/dist/components/feedback/AGENTS.md +1 -0
  197. package/dist/components/feedback/alert.js +150 -0
  198. package/dist/components/feedback/dialog.js +228 -0
  199. package/dist/components/feedback/drawer.d.ts.map +1 -1
  200. package/dist/components/feedback/drawer.js +338 -0
  201. package/dist/components/feedback/loading.js +130 -0
  202. package/dist/components/feedback/modal.d.ts.map +1 -1
  203. package/dist/components/feedback/modal.js +303 -0
  204. package/dist/components/feedback/notification.js +170 -0
  205. package/dist/components/feedback/popover.d.ts +1 -1
  206. package/dist/components/feedback/popover.js +124 -0
  207. package/dist/components/feedback/toast.js +142 -0
  208. package/dist/components/feedback/tooltip.d.ts +1 -1
  209. package/dist/components/feedback/tooltip.js +153 -0
  210. package/dist/components/form/AGENTS.md +4 -0
  211. package/dist/components/form/autoform-item.d.ts +6 -0
  212. package/dist/components/form/autoform-item.d.ts.map +1 -1
  213. package/dist/components/form/autoform-item.js +791 -0
  214. package/dist/components/form/autoform.d.ts +15 -5
  215. package/dist/components/form/autoform.d.ts.map +1 -1
  216. package/dist/components/form/autoform.js +303 -0
  217. package/dist/components/form/checkbox-group.js +118 -0
  218. package/dist/components/form/checkbox.js +123 -0
  219. package/dist/components/form/color-picker.js +148 -0
  220. package/dist/components/form/combobox.d.ts +4 -0
  221. package/dist/components/form/combobox.d.ts.map +1 -1
  222. package/dist/components/form/combobox.js +325 -0
  223. package/dist/components/form/date-picker.js +123 -0
  224. package/dist/components/form/form-item.d.ts.map +1 -1
  225. package/dist/components/form/form-item.js +141 -0
  226. package/dist/components/form/form.js +94 -0
  227. package/dist/components/form/radio-group.js +106 -0
  228. package/dist/components/form/radio.js +110 -0
  229. package/dist/components/form/rate.js +116 -0
  230. package/dist/components/form/select.d.ts +5 -1
  231. package/dist/components/form/select.d.ts.map +1 -1
  232. package/dist/components/form/select.js +539 -0
  233. package/dist/components/form/slider.js +134 -0
  234. package/dist/components/form/switch.js +146 -0
  235. package/dist/components/form/time-picker.js +92 -0
  236. package/dist/components/form/transfer.js +273 -0
  237. package/dist/components/form/upload.js +138 -0
  238. package/dist/components/framework/body.js +333 -0
  239. package/dist/components/framework/dashboard-panel.js +519 -0
  240. package/dist/components/framework/dashboard.d.ts.map +1 -1
  241. package/dist/components/framework/dashboard.js +1084 -0
  242. package/dist/components/framework/header.js +237 -0
  243. package/dist/components/framework/log-panel.js +637 -0
  244. package/dist/components/framework/page.js +151 -0
  245. package/dist/components/framework/sidebar.d.ts +4 -10
  246. package/dist/components/framework/sidebar.d.ts.map +1 -1
  247. package/dist/components/framework/sidebar.js +477 -0
  248. package/dist/components/layout/affix.js +137 -0
  249. package/dist/components/layout/col.js +103 -0
  250. package/dist/components/layout/collapse-item.js +165 -0
  251. package/dist/components/layout/collapse.js +108 -0
  252. package/dist/components/layout/container.js +92 -0
  253. package/dist/components/layout/flex.js +100 -0
  254. package/dist/components/layout/row.js +103 -0
  255. package/dist/components/layout/space.js +85 -0
  256. package/dist/components/navigation/back-top.js +127 -0
  257. package/dist/components/navigation/breadcrumb-item.js +108 -0
  258. package/dist/components/navigation/breadcrumb.js +70 -0
  259. package/dist/components/navigation/menu-item.js +181 -0
  260. package/dist/components/navigation/menu.js +126 -0
  261. package/dist/components/navigation/steps.js +183 -0
  262. package/dist/components/navigation/sub-menu.d.ts.map +1 -1
  263. package/dist/components/navigation/sub-menu.js +252 -0
  264. package/dist/components/progress/progress-bar.js +97 -0
  265. package/dist/components/progress/progress-ring.js +111 -0
  266. package/dist/components/progress/skeleton.js +108 -0
  267. package/dist/components/progress/spinner.js +129 -0
  268. package/dist/components/theme/locale-switch.js +241 -0
  269. package/dist/components/theme/shadow-picker.js +233 -0
  270. package/dist/components/theme/shape-picker.js +232 -0
  271. package/dist/components/theme/theme-picker.js +236 -0
  272. package/dist/components/theme/theme-preview.d.ts +1 -2
  273. package/dist/components/theme/theme-preview.d.ts.map +1 -1
  274. package/dist/components/theme/theme-preview.js +376 -0
  275. package/dist/components/theme/theme-switch.d.ts.map +1 -1
  276. package/dist/components/theme/theme-switch.js +318 -0
  277. package/dist/components/theme/typo-picker.js +219 -0
  278. package/dist/core/AGENTS.md +6 -1
  279. package/dist/core/aithe-element.d.ts +2 -2
  280. package/dist/core/aithe-element.js +135 -0
  281. package/dist/core/aithe-widget.js +30 -0
  282. package/dist/core/anchored-overlay.d.ts +3 -0
  283. package/dist/core/anchored-overlay.d.ts.map +1 -1
  284. package/dist/core/anchored-overlay.js +111 -0
  285. package/dist/core/autoform/autoform.js +79 -0
  286. package/dist/core/autoform/autoview.d.ts +86 -0
  287. package/dist/core/autoform/autoview.d.ts.map +1 -0
  288. package/dist/core/autoform/autoview.js +37 -0
  289. package/dist/core/autoform/condition.js +170 -0
  290. package/dist/core/autoform/index.d.ts +2 -0
  291. package/dist/core/autoform/index.d.ts.map +1 -1
  292. package/dist/core/autoform/index.js +9 -0
  293. package/dist/core/autoform/types.js +7 -0
  294. package/dist/core/datahub/__tests__/force-options.test.d.ts +8 -0
  295. package/dist/core/datahub/__tests__/force-options.test.d.ts.map +1 -0
  296. package/dist/core/datahub/__tests__/force-options.test.js +161 -0
  297. package/dist/core/datahub/config/strategy.d.ts +1 -1
  298. package/dist/core/datahub/config/strategy.d.ts.map +1 -1
  299. package/dist/core/datahub/config/strategy.js +50 -0
  300. package/dist/core/datahub/core/adapter/fetch-adapter.d.ts +1 -1
  301. package/dist/core/datahub/core/adapter/fetch-adapter.d.ts.map +1 -1
  302. package/dist/core/datahub/core/adapter/fetch-adapter.js +118 -0
  303. package/dist/core/datahub/core/adapter/index.js +7 -0
  304. package/dist/core/datahub/core/adapter/mock-adapter.d.ts +1 -1
  305. package/dist/core/datahub/core/adapter/mock-adapter.d.ts.map +1 -1
  306. package/dist/core/datahub/core/adapter/mock-adapter.js +58 -0
  307. package/dist/core/datahub/core/api-styles.d.ts +1 -1
  308. package/dist/core/datahub/core/api-styles.d.ts.map +1 -1
  309. package/dist/core/datahub/core/api-styles.js +136 -0
  310. package/dist/core/datahub/core/datahub-core.d.ts +53 -3
  311. package/dist/core/datahub/core/datahub-core.d.ts.map +1 -1
  312. package/dist/core/datahub/core/datahub-core.js +520 -0
  313. package/dist/core/datahub/core/index.js +7 -0
  314. package/dist/core/datahub/index.js +50 -0
  315. package/dist/core/datahub/types.d.ts +24 -0
  316. package/dist/core/datahub/types.d.ts.map +1 -1
  317. package/dist/core/datahub/types.js +31 -0
  318. package/dist/core/datahub/utils/cache.js +55 -0
  319. package/dist/core/datahub/utils/common.js +23 -0
  320. package/dist/core/datahub/utils/dedup.d.ts +1 -1
  321. package/dist/core/datahub/utils/dedup.d.ts.map +1 -1
  322. package/dist/core/datahub/utils/dedup.js +52 -0
  323. package/dist/core/datahub/utils/idempotent.js +61 -0
  324. package/dist/core/datahub/utils/is-query.js +53 -0
  325. package/dist/core/datahub/utils/loading.js +78 -0
  326. package/dist/core/filter/__tests__/index.test.d.ts +2 -0
  327. package/dist/core/filter/__tests__/index.test.d.ts.map +1 -0
  328. package/dist/core/filter/__tests__/index.test.js +230 -0
  329. package/dist/core/filter/builtins.d.ts +60 -0
  330. package/dist/core/filter/builtins.d.ts.map +1 -0
  331. package/dist/core/filter/builtins.js +172 -0
  332. package/dist/core/filter/factory.d.ts +54 -0
  333. package/dist/core/filter/factory.d.ts.map +1 -0
  334. package/dist/core/filter/factory.js +96 -0
  335. package/dist/core/filter/index.d.ts +11 -0
  336. package/dist/core/filter/index.d.ts.map +1 -0
  337. package/dist/core/filter/index.js +9 -0
  338. package/dist/core/filter/types.d.ts +12 -0
  339. package/dist/core/filter/types.d.ts.map +1 -0
  340. package/dist/core/filter/types.js +1 -0
  341. package/dist/core/floating.js +132 -0
  342. package/dist/core/highlight/index.js +43 -0
  343. package/dist/core/highlight/lang-bash.js +27 -0
  344. package/dist/core/highlight/lang-c.js +27 -0
  345. package/dist/core/highlight/lang-cmake.js +27 -0
  346. package/dist/core/highlight/lang-cpp.js +27 -0
  347. package/dist/core/highlight/lang-css.js +24 -0
  348. package/dist/core/highlight/lang-dart.js +27 -0
  349. package/dist/core/highlight/lang-dockerfile.js +16 -0
  350. package/dist/core/highlight/lang-fsharp.js +23 -0
  351. package/dist/core/highlight/lang-go.js +22 -0
  352. package/dist/core/highlight/lang-html.js +12 -0
  353. package/dist/core/highlight/lang-java.js +22 -0
  354. package/dist/core/highlight/lang-javascript.js +26 -0
  355. package/dist/core/highlight/lang-json.js +13 -0
  356. package/dist/core/highlight/lang-jsonline.js +13 -0
  357. package/dist/core/highlight/lang-jsx.js +30 -0
  358. package/dist/core/highlight/lang-kotlin.js +27 -0
  359. package/dist/core/highlight/lang-latex.js +22 -0
  360. package/dist/core/highlight/lang-lua.js +26 -0
  361. package/dist/core/highlight/lang-makefile.js +22 -0
  362. package/dist/core/highlight/lang-markdown.js +18 -0
  363. package/dist/core/highlight/lang-objectivec.js +24 -0
  364. package/dist/core/highlight/lang-perl.js +30 -0
  365. package/dist/core/highlight/lang-powershell.js +23 -0
  366. package/dist/core/highlight/lang-python.js +27 -0
  367. package/dist/core/highlight/lang-r.js +21 -0
  368. package/dist/core/highlight/lang-ruby.js +29 -0
  369. package/dist/core/highlight/lang-rust.js +24 -0
  370. package/dist/core/highlight/lang-scala.js +26 -0
  371. package/dist/core/highlight/lang-sql.js +21 -0
  372. package/dist/core/highlight/lang-svelte.js +27 -0
  373. package/dist/core/highlight/lang-swift.js +28 -0
  374. package/dist/core/highlight/lang-tsx.js +35 -0
  375. package/dist/core/highlight/lang-typescript.js +31 -0
  376. package/dist/core/highlight/lang-vue.js +29 -0
  377. package/dist/core/highlight/lang-wasm.js +22 -0
  378. package/dist/core/highlight/lang-xml.js +12 -0
  379. package/dist/core/highlight/lang-yaml.js +14 -0
  380. package/dist/core/highlight/registry.js +99 -0
  381. package/dist/core/logger/LoggerCore.js +626 -0
  382. package/dist/core/logger/index.js +10 -0
  383. package/dist/core/logger/types.js +29 -0
  384. package/dist/core/markdown/index.js +20 -0
  385. package/dist/core/markdown/parser.d.ts +2 -0
  386. package/dist/core/markdown/parser.d.ts.map +1 -1
  387. package/dist/core/markdown/parser.js +376 -0
  388. package/dist/core/markdown/plugins.d.ts +2 -1
  389. package/dist/core/markdown/plugins.d.ts.map +1 -1
  390. package/dist/core/markdown/plugins.js +755 -0
  391. package/dist/core/markdown/types.d.ts +5 -0
  392. package/dist/core/markdown/types.d.ts.map +1 -1
  393. package/dist/core/markdown/types.js +7 -0
  394. package/dist/core/router/index.js +244 -0
  395. package/dist/core/styles.js +44 -0
  396. package/dist/core/types.d.ts +52 -3
  397. package/dist/core/types.d.ts.map +1 -1
  398. package/dist/core/types.js +1 -0
  399. package/dist/index.d.ts +9 -0
  400. package/dist/index.d.ts.map +1 -1
  401. package/dist/index.js +3695 -1622
  402. package/dist/index.js.map +1 -1
  403. package/dist/index.umd.js +1844 -758
  404. package/dist/index.umd.js.map +1 -1
  405. package/dist/styles/aithe-ui.d.ts +23 -0
  406. package/dist/styles/aithe-ui.d.ts.map +1 -1
  407. package/dist/styles/aithe-ui.js +185 -0
  408. package/dist/styles/global.css.d.ts +1 -1
  409. package/dist/styles/global.css.d.ts.map +1 -1
  410. package/dist/styles/global.css.js +119 -0
  411. package/dist/styles/i18n/index.js +206 -0
  412. package/dist/styles/i18n/locales/de-DE.d.ts.map +1 -1
  413. package/dist/styles/i18n/locales/de-DE.js +151 -0
  414. package/dist/styles/i18n/locales/en-US.d.ts.map +1 -1
  415. package/dist/styles/i18n/locales/en-US.js +160 -0
  416. package/dist/styles/i18n/locales/es-ES.d.ts.map +1 -1
  417. package/dist/styles/i18n/locales/es-ES.js +151 -0
  418. package/dist/styles/i18n/locales/fr-FR.d.ts.map +1 -1
  419. package/dist/styles/i18n/locales/fr-FR.js +151 -0
  420. package/dist/styles/i18n/locales/index.js +14 -0
  421. package/dist/styles/i18n/locales/ja-JP.d.ts.map +1 -1
  422. package/dist/styles/i18n/locales/ja-JP.js +151 -0
  423. package/dist/styles/i18n/locales/ko-KR.d.ts.map +1 -1
  424. package/dist/styles/i18n/locales/ko-KR.js +151 -0
  425. package/dist/styles/i18n/locales/pt-BR.d.ts.map +1 -1
  426. package/dist/styles/i18n/locales/pt-BR.js +151 -0
  427. package/dist/styles/i18n/locales/zh-CN.d.ts.map +1 -1
  428. package/dist/styles/i18n/locales/zh-CN.js +160 -0
  429. package/dist/styles/i18n/locales/zh-HK.d.ts.map +1 -1
  430. package/dist/styles/i18n/locales/zh-HK.js +151 -0
  431. package/dist/styles/i18n/locales/zh-TW.d.ts.map +1 -1
  432. package/dist/styles/i18n/locales/zh-TW.js +151 -0
  433. package/dist/styles/layout/index.js +88 -0
  434. package/dist/styles/mixins.js +43 -0
  435. package/dist/styles/shadow/cyber.js +19 -0
  436. package/dist/styles/shadow/deep.js +19 -0
  437. package/dist/styles/shadow/diffuse.js +19 -0
  438. package/dist/styles/shadow/flat.js +19 -0
  439. package/dist/styles/shadow/glassmorphism.js +19 -0
  440. package/dist/styles/shadow/index.js +129 -0
  441. package/dist/styles/shadow/neumorphism.js +21 -0
  442. package/dist/styles/shadow/retro.js +19 -0
  443. package/dist/styles/shadow/sharp-business.js +19 -0
  444. package/dist/styles/shadow/skeuomorphic.js +21 -0
  445. package/dist/styles/shape/chamfer.js +19 -0
  446. package/dist/styles/shape/circle.js +19 -0
  447. package/dist/styles/shape/index.js +174 -0
  448. package/dist/styles/shape/organic.js +19 -0
  449. package/dist/styles/shape/pill.js +19 -0
  450. package/dist/styles/shape/rounded.js +21 -0
  451. package/dist/styles/shape/rounder.js +19 -0
  452. package/dist/styles/shape/sharp.js +19 -0
  453. package/dist/styles/shape/smooth.js +19 -0
  454. package/dist/styles/theme/aliyun.d.ts +1 -1
  455. package/dist/styles/theme/aliyun.d.ts.map +1 -1
  456. package/dist/styles/theme/aliyun.js +102 -0
  457. package/dist/styles/theme/amber.d.ts +1 -1
  458. package/dist/styles/theme/amber.d.ts.map +1 -1
  459. package/dist/styles/theme/amber.js +101 -0
  460. package/dist/styles/theme/blue.d.ts +1 -1
  461. package/dist/styles/theme/blue.d.ts.map +1 -1
  462. package/dist/styles/theme/blue.js +101 -0
  463. package/dist/styles/theme/charcoal.d.ts +1 -1
  464. package/dist/styles/theme/charcoal.d.ts.map +1 -1
  465. package/dist/styles/theme/charcoal.js +106 -0
  466. package/dist/styles/theme/cyan.d.ts +1 -1
  467. package/dist/styles/theme/cyan.d.ts.map +1 -1
  468. package/dist/styles/theme/cyan.js +96 -0
  469. package/dist/styles/theme/dark.d.ts +1 -1
  470. package/dist/styles/theme/dark.d.ts.map +1 -1
  471. package/dist/styles/theme/dark.js +106 -0
  472. package/dist/styles/theme/ebony.d.ts +1 -1
  473. package/dist/styles/theme/ebony.d.ts.map +1 -1
  474. package/dist/styles/theme/ebony.js +106 -0
  475. package/dist/styles/theme/festive.d.ts +1 -1
  476. package/dist/styles/theme/festive.d.ts.map +1 -1
  477. package/dist/styles/theme/festive.js +101 -0
  478. package/dist/styles/theme/graphite.d.ts +1 -1
  479. package/dist/styles/theme/graphite.d.ts.map +1 -1
  480. package/dist/styles/theme/graphite.js +106 -0
  481. package/dist/styles/theme/gray.d.ts +1 -1
  482. package/dist/styles/theme/gray.d.ts.map +1 -1
  483. package/dist/styles/theme/gray.js +101 -0
  484. package/dist/styles/theme/huawei.d.ts +1 -1
  485. package/dist/styles/theme/huawei.d.ts.map +1 -1
  486. package/dist/styles/theme/huawei.js +102 -0
  487. package/dist/styles/theme/index.d.ts +1 -1
  488. package/dist/styles/theme/index.d.ts.map +1 -1
  489. package/dist/styles/theme/index.js +276 -0
  490. package/dist/styles/theme/indigo.d.ts +1 -1
  491. package/dist/styles/theme/indigo.d.ts.map +1 -1
  492. package/dist/styles/theme/indigo.js +101 -0
  493. package/dist/styles/theme/ink.d.ts +1 -1
  494. package/dist/styles/theme/ink.d.ts.map +1 -1
  495. package/dist/styles/theme/ink.js +106 -0
  496. package/dist/styles/theme/light.d.ts +1 -1
  497. package/dist/styles/theme/light.d.ts.map +1 -1
  498. package/dist/styles/theme/light.js +102 -0
  499. package/dist/styles/theme/midnight.d.ts +1 -1
  500. package/dist/styles/theme/midnight.d.ts.map +1 -1
  501. package/dist/styles/theme/midnight.js +106 -0
  502. package/dist/styles/theme/navy.d.ts +1 -1
  503. package/dist/styles/theme/navy.d.ts.map +1 -1
  504. package/dist/styles/theme/navy.js +106 -0
  505. package/dist/styles/theme/obsidian.d.ts +1 -1
  506. package/dist/styles/theme/obsidian.d.ts.map +1 -1
  507. package/dist/styles/theme/obsidian.js +106 -0
  508. package/dist/styles/theme/onyx.d.ts +1 -1
  509. package/dist/styles/theme/onyx.d.ts.map +1 -1
  510. package/dist/styles/theme/onyx.js +106 -0
  511. package/dist/styles/theme/orange.d.ts +1 -1
  512. package/dist/styles/theme/orange.d.ts.map +1 -1
  513. package/dist/styles/theme/orange.js +101 -0
  514. package/dist/styles/theme/pink.d.ts +1 -1
  515. package/dist/styles/theme/pink.d.ts.map +1 -1
  516. package/dist/styles/theme/pink.js +101 -0
  517. package/dist/styles/theme/purple.d.ts +1 -1
  518. package/dist/styles/theme/purple.d.ts.map +1 -1
  519. package/dist/styles/theme/purple.js +101 -0
  520. package/dist/styles/theme/raisin.d.ts +1 -1
  521. package/dist/styles/theme/raisin.d.ts.map +1 -1
  522. package/dist/styles/theme/raisin.js +106 -0
  523. package/dist/styles/theme/slate.d.ts +1 -1
  524. package/dist/styles/theme/slate.d.ts.map +1 -1
  525. package/dist/styles/theme/slate.js +106 -0
  526. package/dist/styles/theme/teal.d.ts +1 -1
  527. package/dist/styles/theme/teal.d.ts.map +1 -1
  528. package/dist/styles/theme/teal.js +101 -0
  529. package/dist/styles/theme/tianyi.d.ts +1 -1
  530. package/dist/styles/theme/tianyi.d.ts.map +1 -1
  531. package/dist/styles/theme/tianyi.js +102 -0
  532. package/dist/styles/types.js +1 -0
  533. package/dist/styles/typo/business.js +34 -0
  534. package/dist/styles/typo/compact.js +34 -0
  535. package/dist/styles/typo/index.js +99 -0
  536. package/dist/styles/typo/luxury.js +34 -0
  537. package/dist/styles/typo/minimal.js +34 -0
  538. package/dist/types/index.js +2 -0
  539. package/dist/utils/dom.js +51 -0
  540. package/dist/utils/events.js +32 -0
  541. package/dist/utils/icon.js +176 -0
  542. package/dist/utils/index.js +4 -0
  543. package/dist/utils/utils.d.ts +5 -5
  544. package/dist/utils/utils.js +89 -0
  545. package/dist/utils/validation.js +52 -0
  546. package/docs/api/basic/button.md +9 -6
  547. package/docs/api/basic/tag.md +24 -17
  548. package/docs/api/data/box-table.md +73 -0
  549. package/docs/api/data/dropdown.md +3 -2
  550. package/docs/api/data/metrics.md +2 -0
  551. package/docs/api/data/table-column.md +37 -23
  552. package/docs/api/data/table.md +158 -44
  553. package/docs/api/data/tabs.md +46 -1
  554. package/docs/api/data/tree-menu.md +55 -2
  555. package/docs/api/display/autoview.md +277 -0
  556. package/docs/api/display/box.md +66 -0
  557. package/docs/api/display/brief-box.md +73 -0
  558. package/docs/api/display/desc-item.md +57 -0
  559. package/docs/api/display/desc.md +246 -0
  560. package/docs/api/display/detail-box.md +75 -0
  561. package/docs/api/display/mini-box.md +100 -0
  562. package/docs/api/display/profile.md +92 -0
  563. package/docs/api/feedback/popover.md +10 -10
  564. package/docs/api/feedback/tooltip.md +14 -14
  565. package/docs/api/form/autoform-item.md +115 -0
  566. package/docs/api/form/autoform.md +7 -3
  567. package/docs/api/form/combobox.md +27 -7
  568. package/docs/api/form/select.md +50 -28
  569. package/docs/api/framework/log-panel.md +46 -0
  570. package/docs/api/framework/sidebar.md +3 -2
  571. package/docs/api/summary.md +46 -35
  572. package/docs/api/theme/theme-switch.md +1 -1
  573. package/docs/autoform.md +14 -33
  574. package/docs/changelog/CHANGELOG.md +155 -0
  575. package/docs/changelog/VERSION_26.3.1.md +966 -0
  576. package/docs/changelog/VERSION_26.3.2.md +852 -0
  577. package/docs/datahub.md +4 -1
  578. package/docs/filter.md +332 -0
  579. package/docs/framework-integration.md +2 -2
  580. package/docs/guide.md +72 -6
  581. package/docs/i18n.md +2 -4
  582. package/docs/issue/26.3.1/issue_26.3.1.0.md +84 -0
  583. package/docs/issue/26.3.1/issue_26.3.1.1.md +72 -0
  584. package/docs/issue/26.3.1/issue_26.3.1.2.md +75 -0
  585. package/docs/issue/26.3.1/issue_26.3.1.3.md +78 -0
  586. package/docs/issue/26.3.1/issue_26.3.1.4.md +113 -0
  587. package/docs/issue/26.3.1/issue_26.3.1.5.md +142 -0
  588. package/docs/issue/26.3.1/issue_26.3.1.6.md +100 -0
  589. package/docs/issue/26.3.1/issue_26.3.1.7.md +78 -0
  590. package/docs/issue/26.3.2/issue_26.3.2.1.md +46 -0
  591. package/docs/issue/26.3.2/issue_26.3.2.2.md +82 -0
  592. package/docs/issue/26.3.2/issue_26.3.2.3.md +57 -0
  593. package/docs/issue/26.3.2/issue_26.3.2.4.md +43 -0
  594. package/docs/issue/AGENTS.md +24 -3
  595. package/docs/markdown.md +2 -2
  596. package/docs/quickstart.md +5 -5
  597. package/docs/theming.md +5 -4
  598. package/package.json +5 -2
  599. package/dist/components/navigation/dropdown.d.ts +0 -56
  600. package/dist/components/navigation/dropdown.d.ts.map +0 -1
  601. /package/docs/issue/{issue_26.2.2.1.md → 26.2.2/issue_26.2.2.1.md} +0 -0
  602. /package/docs/issue/{issue_26.2.2.2.md → 26.2.2/issue_26.2.2.2.md} +0 -0
  603. /package/docs/issue/{issue_26.2.2.3.md → 26.2.2/issue_26.2.2.3.md} +0 -0
  604. /package/docs/issue/{issue_26.2.2.4.md → 26.2.2/issue_26.2.2.4.md} +0 -0
  605. /package/docs/issue/{issue_26.2.3.1.md → 26.2.3/issue_26.2.3.1.md} +0 -0
  606. /package/docs/issue/{issue_26.2.3.10.md → 26.2.3/issue_26.2.3.10.md} +0 -0
  607. /package/docs/issue/{issue_26.2.3.11.md → 26.2.3/issue_26.2.3.11.md} +0 -0
  608. /package/docs/issue/{issue_26.2.3.12.md → 26.2.3/issue_26.2.3.12.md} +0 -0
  609. /package/docs/issue/{issue_26.2.3.13.md → 26.2.3/issue_26.2.3.13.md} +0 -0
  610. /package/docs/issue/{issue_26.2.3.14.md → 26.2.3/issue_26.2.3.14.md} +0 -0
  611. /package/docs/issue/{issue_26.2.3.15.md → 26.2.3/issue_26.2.3.15.md} +0 -0
  612. /package/docs/issue/{issue_26.2.3.16.md → 26.2.3/issue_26.2.3.16.md} +0 -0
  613. /package/docs/issue/{issue_26.2.3.2.md → 26.2.3/issue_26.2.3.2.md} +0 -0
  614. /package/docs/issue/{issue_26.2.3.3.md → 26.2.3/issue_26.2.3.3.md} +0 -0
  615. /package/docs/issue/{issue_26.2.3.4.md → 26.2.3/issue_26.2.3.4.md} +0 -0
  616. /package/docs/issue/{issue_26.2.3.5.md → 26.2.3/issue_26.2.3.5.md} +0 -0
  617. /package/docs/issue/{issue_26.2.3.6.md → 26.2.3/issue_26.2.3.6.md} +0 -0
  618. /package/docs/issue/{issue_26.2.3.7.md → 26.2.3/issue_26.2.3.7.md} +0 -0
  619. /package/docs/issue/{issue_26.2.3.8.md → 26.2.3/issue_26.2.3.8.md} +0 -0
  620. /package/docs/issue/{issue_26.2.3.9.md → 26.2.3/issue_26.2.3.9.md} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"tianyi.d.ts","sourceRoot":"","sources":["../../../src/styles/theme/tianyi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,iyFAqF7B,CAAC"}
1
+ {"version":3,"file":"tianyi.d.ts","sourceRoot":"","sources":["../../../src/styles/theme/tianyi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,6mGA6F7B,CAAC"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Tianyi Cloud (China Telecom) theme tokens.
3
+ * 天翼云风格主题令牌。
4
+ *
5
+ * Inspired by Tianyi Cloud's brand identity: blue primary (#0052CC) with
6
+ * trustworthy, state-owned enterprise style.
7
+ * 灵感来自天翼云品牌色:蓝色 primary (#0052CC),配央企可信赖风格。
8
+ */
9
+ export const tianyiThemeTokens = `
10
+ .aithe-theme-tianyi,
11
+ [data-aithe-theme='tianyi'] {
12
+ color-scheme: light;
13
+ --aithe-primary-1: #edf5ff;
14
+ --aithe-primary-2: #d4e8ff;
15
+ --aithe-primary-3: #a8d0ff;
16
+ --aithe-primary-4: #75b2ff;
17
+ --aithe-primary-5: #4d97ff;
18
+ --aithe-primary-6: #2679f0;
19
+ --aithe-primary-7: #0052cc;
20
+ --aithe-primary-8: #0042a8;
21
+ --aithe-primary-9: #003688;
22
+ --aithe-primary-10: #002b6b;
23
+ --aithe-success-1: #edfcf6;
24
+ --aithe-success-2: #c9f5e0;
25
+ --aithe-success-3: #9cecc4;
26
+ --aithe-success-4: #6cd8a2;
27
+ --aithe-success-5: #44c084;
28
+ --aithe-success-6: #2ea86c;
29
+ --aithe-success-7: #228c58;
30
+ --aithe-success-8: #1a7046;
31
+ --aithe-success-9: #145a38;
32
+ --aithe-success-10: #10482e;
33
+ --aithe-warning-1: #fff9eb;
34
+ --aithe-warning-2: #ffefc4;
35
+ --aithe-warning-3: #ffde8e;
36
+ --aithe-warning-4: #ffc95a;
37
+ --aithe-warning-5: #f0b03e;
38
+ --aithe-warning-6: #d08e26;
39
+ --aithe-warning-7: #ac701a;
40
+ --aithe-warning-8: #8a5816;
41
+ --aithe-warning-9: #6e4614;
42
+ --aithe-warning-10: #583610;
43
+ --aithe-danger-1: #fff1f4;
44
+ --aithe-danger-2: #ffdce2;
45
+ --aithe-danger-3: #ffbcc8;
46
+ --aithe-danger-4: #ff92a4;
47
+ --aithe-danger-5: #f86c83;
48
+ --aithe-danger-6: #df526b;
49
+ --aithe-danger-7: #be4159;
50
+ --aithe-danger-8: #99354a;
51
+ --aithe-danger-9: #7a2d3d;
52
+ --aithe-danger-10: #612634;
53
+ --aithe-neutral-1: #f4f6fa;
54
+ --aithe-neutral-2: #e6eaf3;
55
+ --aithe-neutral-3: #d0d7e6;
56
+ --aithe-neutral-4: #b1bbd0;
57
+ --aithe-neutral-5: #8f9bb5;
58
+ --aithe-neutral-6: #6f7c9a;
59
+ --aithe-neutral-7: #515f7e;
60
+ --aithe-neutral-8: #384662;
61
+ --aithe-neutral-9: #222e47;
62
+ --aithe-neutral-10: #111a2d;
63
+ --aithe-fill-1: #f7f8fa;
64
+ --aithe-fill-2: #f0f1f3;
65
+ --aithe-color-bg: #f2f6fc;
66
+ --aithe-color-bg-subtle: linear-gradient(180deg, #f8fbff 0%, #ecf2fa 100%);
67
+ --aithe-color-surface: rgba(255, 255, 255, 0.88);
68
+ --aithe-color-surface-elevated: rgba(255, 255, 255, 0.98);
69
+ --aithe-color-surface-muted: #e4ebf6;
70
+ --aithe-color-surface-hover: rgba(0, 0, 0, 0.04);
71
+ --aithe-color-border: rgba(0, 82, 204, 0.16);
72
+ --aithe-color-border-strong: rgba(0, 82, 204, 0.28);
73
+ --aithe-color-text: #0c1324;
74
+ --aithe-color-text-muted: #384b6a;
75
+ --aithe-color-text-subtle: #687b9a;
76
+ --aithe-color-overlay: rgba(6, 14, 28, 0.50);
77
+ --aithe-color-selection: rgba(0, 82, 204, 0.16);
78
+ --aithe-color-focus-ring: rgba(0, 82, 204, 0.36);
79
+ --aithe-color-text-secondary: #3d4a66;
80
+ --aithe-color-bg-muted: #e8ecf4;
81
+ --aithe-color-bg-hover: rgba(0, 0, 0, 0.04);
82
+ --aithe-color-border-subtle: rgba(76, 94, 132, 0.10);
83
+ --aithe-primary-6-rgb: 77, 141, 255;
84
+ --aithe-color-text-on-primary: #ffffff;
85
+ --aithe-code-keyword: #7c3aed;
86
+ --aithe-code-boolean: #b45309;
87
+ --aithe-code-builtin: #2563eb;
88
+ --aithe-code-number: #b45309;
89
+ --aithe-code-string: #15803d;
90
+ --aithe-code-function: #2563eb;
91
+ --aithe-code-type: #a16207;
92
+ --aithe-code-preprocessor: #7c3aed;
93
+ --aithe-code-tag: #dc2626;
94
+ --aithe-code-attr: #b45309;
95
+ --aithe-code-key: #dc2626;
96
+ --aithe-code-punctuation: #5c6bc0;
97
+ --aithe-code-entity: #b45309;
98
+ --aithe-code-comment: #94a3b8;
99
+ --aithe-code-doctype: #94a3b8;
100
+ --aithe-code-placeholder: #94a3b8;
101
+ }
102
+ `;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,34 @@
1
+ export const businessTypoTokens = {
2
+ '--aithe-font-size-xs': '12px',
3
+ '--aithe-font-size-sm': '13px',
4
+ '--aithe-font-size-md': '14px',
5
+ '--aithe-font-size-lg': '16px',
6
+ '--aithe-font-size-xl': '20px',
7
+ '--aithe-font-size-2xl': '28px',
8
+ '--aithe-font-weight-regular': '400',
9
+ '--aithe-font-weight-medium': '500',
10
+ '--aithe-font-weight-semibold': '600',
11
+ '--aithe-font-weight-bold': '700',
12
+ '--aithe-line-height-tight': '1.25',
13
+ '--aithe-line-height-base': '1.5',
14
+ '--aithe-line-height-loose': '1.7',
15
+ '--aithe-space-0': '0',
16
+ '--aithe-space-1': '4px',
17
+ '--aithe-space-2': '8px',
18
+ '--aithe-space-3': '12px',
19
+ '--aithe-space-4': '16px',
20
+ '--aithe-space-5': '20px',
21
+ '--aithe-space-6': '24px',
22
+ '--aithe-space-7': '32px',
23
+ '--aithe-space-8': '40px',
24
+ '--aithe-space-9': '48px',
25
+ '--aithe-space-10': '64px',
26
+ '--aithe-space-xs': 'var(--aithe-space-2)',
27
+ '--aithe-space-sm': 'var(--aithe-space-3)',
28
+ '--aithe-space-md': 'var(--aithe-space-4)',
29
+ '--aithe-space-lg': 'var(--aithe-space-6)',
30
+ '--aithe-space-xl': 'var(--aithe-space-8)',
31
+ '--aithe-control-height-sm': '32px',
32
+ '--aithe-control-height-md': '40px',
33
+ '--aithe-control-height-lg': '48px',
34
+ };
@@ -0,0 +1,34 @@
1
+ export const compactTypoTokens = {
2
+ '--aithe-font-size-xs': '11px',
3
+ '--aithe-font-size-sm': '12px',
4
+ '--aithe-font-size-md': '13px',
5
+ '--aithe-font-size-lg': '14px',
6
+ '--aithe-font-size-xl': '16px',
7
+ '--aithe-font-size-2xl': '20px',
8
+ '--aithe-font-weight-regular': '400',
9
+ '--aithe-font-weight-medium': '500',
10
+ '--aithe-font-weight-semibold': '600',
11
+ '--aithe-font-weight-bold': '700',
12
+ '--aithe-line-height-tight': '1.15',
13
+ '--aithe-line-height-base': '1.35',
14
+ '--aithe-line-height-loose': '1.5',
15
+ '--aithe-space-0': '0',
16
+ '--aithe-space-1': '2px',
17
+ '--aithe-space-2': '4px',
18
+ '--aithe-space-3': '8px',
19
+ '--aithe-space-4': '12px',
20
+ '--aithe-space-5': '16px',
21
+ '--aithe-space-6': '20px',
22
+ '--aithe-space-7': '24px',
23
+ '--aithe-space-8': '32px',
24
+ '--aithe-space-9': '40px',
25
+ '--aithe-space-10': '48px',
26
+ '--aithe-space-xs': 'var(--aithe-space-1)',
27
+ '--aithe-space-sm': 'var(--aithe-space-2)',
28
+ '--aithe-space-md': 'var(--aithe-space-3)',
29
+ '--aithe-space-lg': 'var(--aithe-space-5)',
30
+ '--aithe-space-xl': 'var(--aithe-space-7)',
31
+ '--aithe-control-height-sm': '28px',
32
+ '--aithe-control-height-md': '36px',
33
+ '--aithe-control-height-lg': '44px',
34
+ };
@@ -0,0 +1,99 @@
1
+ export { minimalTypoTokens } from './minimal';
2
+ export { businessTypoTokens } from './business';
3
+ export { luxuryTypoTokens } from './luxury';
4
+ export { compactTypoTokens } from './compact';
5
+ import { minimalTypoTokens } from './minimal';
6
+ import { businessTypoTokens } from './business';
7
+ import { luxuryTypoTokens } from './luxury';
8
+ import { compactTypoTokens } from './compact';
9
+ const TYPO_TOKENS = {
10
+ minimal: minimalTypoTokens,
11
+ business: businessTypoTokens,
12
+ luxury: luxuryTypoTokens,
13
+ compact: compactTypoTokens,
14
+ };
15
+ /** Preview icon characters for each built-in typo style. 每个内置排版风格的预览图标字符。 */
16
+ const TYPO_ICONS = {
17
+ minimal: '░',
18
+ business: '≡',
19
+ luxury: '✦',
20
+ compact: '⊞',
21
+ };
22
+ /**
23
+ * Static tree menu data for typo selection, compatible with `<aithe-tree-menu>`.
24
+ * 用于排版选择的静态树形菜单数据,兼容 `<aithe-tree-menu>`。
25
+ * Each item carries an `icon` extension field with the preview character.
26
+ * 每个项携带 `icon` 扩展字段,包含预览字符。
27
+ */
28
+ export const typoMenu = Object.keys(TYPO_TOKENS).map((typo) => ({
29
+ id: typo,
30
+ label: typo.charAt(0).toUpperCase() + typo.slice(1),
31
+ icon: TYPO_ICONS[typo],
32
+ i18n: `typoPicker.${typo}`,
33
+ }));
34
+ const STORAGE_KEY = 'aithe-typo';
35
+ export const AITHE_DEFAULT_TYPO = 'business';
36
+ let currentTypo = AITHE_DEFAULT_TYPO;
37
+ const listeners = new Set();
38
+ export function getTypoTokens(typo) {
39
+ return TYPO_TOKENS[typo];
40
+ }
41
+ export function getAitheTypos() {
42
+ return Object.keys(TYPO_TOKENS);
43
+ }
44
+ function loadStoredTypo() {
45
+ try {
46
+ const raw = localStorage.getItem(STORAGE_KEY);
47
+ if (!raw)
48
+ return undefined;
49
+ return raw;
50
+ }
51
+ catch {
52
+ return undefined;
53
+ }
54
+ }
55
+ function storeTypo(typo) {
56
+ try {
57
+ localStorage.setItem(STORAGE_KEY, typo);
58
+ }
59
+ catch {
60
+ // ignore
61
+ }
62
+ }
63
+ function applyTypoTokens(typo) {
64
+ const tokens = TYPO_TOKENS[typo];
65
+ if (!tokens)
66
+ return;
67
+ const html = document.documentElement;
68
+ const body = document.body;
69
+ for (const [key, value] of Object.entries(tokens)) {
70
+ html.style.setProperty(key, value);
71
+ body.style.setProperty(key, value);
72
+ }
73
+ html.dataset.aitheTypo = typo;
74
+ }
75
+ export function setAitheTypo(typo, persist = true) {
76
+ if (typo === currentTypo)
77
+ return;
78
+ currentTypo = typo;
79
+ if (persist)
80
+ storeTypo(typo);
81
+ document.documentElement.dataset.aitheTypo = typo;
82
+ applyTypoTokens(typo);
83
+ for (const fn of listeners) {
84
+ fn();
85
+ }
86
+ }
87
+ export function getAitheTypo() {
88
+ return currentTypo;
89
+ }
90
+ export function initAitheTypo(defaultTypo = AITHE_DEFAULT_TYPO) {
91
+ const stored = loadStoredTypo();
92
+ currentTypo = stored || defaultTypo;
93
+ document.documentElement.dataset.aitheTypo = currentTypo;
94
+ applyTypoTokens(currentTypo);
95
+ }
96
+ export function onAitheTypoChange(fn) {
97
+ listeners.add(fn);
98
+ return () => listeners.delete(fn);
99
+ }
@@ -0,0 +1,34 @@
1
+ export const luxuryTypoTokens = {
2
+ '--aithe-font-size-xs': '11px',
3
+ '--aithe-font-size-sm': '13px',
4
+ '--aithe-font-size-md': '15px',
5
+ '--aithe-font-size-lg': '18px',
6
+ '--aithe-font-size-xl': '24px',
7
+ '--aithe-font-size-2xl': '36px',
8
+ '--aithe-font-weight-regular': '400',
9
+ '--aithe-font-weight-medium': '500',
10
+ '--aithe-font-weight-semibold': '500',
11
+ '--aithe-font-weight-bold': '600',
12
+ '--aithe-line-height-tight': '1.3',
13
+ '--aithe-line-height-base': '1.7',
14
+ '--aithe-line-height-loose': '1.9',
15
+ '--aithe-space-0': '0',
16
+ '--aithe-space-1': '4px',
17
+ '--aithe-space-2': '8px',
18
+ '--aithe-space-3': '14px',
19
+ '--aithe-space-4': '20px',
20
+ '--aithe-space-5': '24px',
21
+ '--aithe-space-6': '30px',
22
+ '--aithe-space-7': '38px',
23
+ '--aithe-space-8': '48px',
24
+ '--aithe-space-9': '56px',
25
+ '--aithe-space-10': '72px',
26
+ '--aithe-space-xs': 'var(--aithe-space-2)',
27
+ '--aithe-space-sm': 'var(--aithe-space-3)',
28
+ '--aithe-space-md': 'var(--aithe-space-4)',
29
+ '--aithe-space-lg': 'var(--aithe-space-6)',
30
+ '--aithe-space-xl': 'var(--aithe-space-8)',
31
+ '--aithe-control-height-sm': '34px',
32
+ '--aithe-control-height-md': '42px',
33
+ '--aithe-control-height-lg': '50px',
34
+ };
@@ -0,0 +1,34 @@
1
+ export const minimalTypoTokens = {
2
+ '--aithe-font-size-xs': '12px',
3
+ '--aithe-font-size-sm': '14px',
4
+ '--aithe-font-size-md': '15px',
5
+ '--aithe-font-size-lg': '18px',
6
+ '--aithe-font-size-xl': '22px',
7
+ '--aithe-font-size-2xl': '32px',
8
+ '--aithe-font-weight-regular': '400',
9
+ '--aithe-font-weight-medium': '500',
10
+ '--aithe-font-weight-semibold': '600',
11
+ '--aithe-font-weight-bold': '700',
12
+ '--aithe-line-height-tight': '1.25',
13
+ '--aithe-line-height-base': '1.7',
14
+ '--aithe-line-height-loose': '1.9',
15
+ '--aithe-space-0': '0',
16
+ '--aithe-space-1': '4px',
17
+ '--aithe-space-2': '8px',
18
+ '--aithe-space-3': '14px',
19
+ '--aithe-space-4': '18px',
20
+ '--aithe-space-5': '22px',
21
+ '--aithe-space-6': '28px',
22
+ '--aithe-space-7': '36px',
23
+ '--aithe-space-8': '44px',
24
+ '--aithe-space-9': '52px',
25
+ '--aithe-space-10': '68px',
26
+ '--aithe-space-xs': 'var(--aithe-space-2)',
27
+ '--aithe-space-sm': 'var(--aithe-space-3)',
28
+ '--aithe-space-md': 'var(--aithe-space-4)',
29
+ '--aithe-space-lg': 'var(--aithe-space-6)',
30
+ '--aithe-space-xl': 'var(--aithe-space-8)',
31
+ '--aithe-control-height-sm': '32px',
32
+ '--aithe-control-height-md': '40px',
33
+ '--aithe-control-height-lg': '48px',
34
+ };
@@ -0,0 +1,2 @@
1
+ export * from '../styles/types';
2
+ export * from '../core/types';
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Walk up the DOM tree to find the closest element that carries a theme
3
+ * (via `data-aithe-theme` attribute or `aithe-theme-*` class).
4
+ * 向上遍历 DOM 树,查找携带主题的最近元素(通过 `data-aithe-theme` 属性或 `aithe-theme-*` 类)。
5
+ *
6
+ * @param element - Starting element. 起始元素。
7
+ * @returns The themed ancestor, or `null` if none found. 携带主题的祖先元素,或 `null`。
8
+ */
9
+ export function findClosestThemeElement(element) {
10
+ let current = element?.parentElement ?? null;
11
+ while (current) {
12
+ if (Object.hasOwn(current.dataset, 'aitheTheme')) {
13
+ return current;
14
+ }
15
+ const className = Array.from(current.classList).find((token) => token.startsWith('aithe-theme-'));
16
+ if (className) {
17
+ return current;
18
+ }
19
+ current = current.parentElement;
20
+ }
21
+ return null;
22
+ }
23
+ /**
24
+ * Collect all focusable elements inside a root container.
25
+ * 收集根容器中所有可聚焦元素。
26
+ *
27
+ * @param root - Parent node to search within. 要搜索的父节点。
28
+ * @returns Array of visible, non-disabled focusable elements. 可见、非禁用的可聚焦元素数组。
29
+ */
30
+ export function getFocusableElements(root) {
31
+ const selectors = [
32
+ 'button:not([disabled])',
33
+ '[href]',
34
+ 'input:not([disabled])',
35
+ 'select:not([disabled])',
36
+ 'textarea:not([disabled])',
37
+ '[tabindex]:not([tabindex="-1"])',
38
+ '[role="button"]',
39
+ ];
40
+ return Array.from(root.querySelectorAll(selectors.join(','))).filter((item) => !item.hasAttribute('hidden') && item.offsetParent !== null);
41
+ }
42
+ /**
43
+ * Find the first focusable element inside a root container.
44
+ * 在根容器中查找第一个可聚焦元素。
45
+ *
46
+ * @param root - Parent node to search within. 要搜索的父节点。
47
+ * @returns The first focusable element, or `null`. 第一个可聚焦元素,或 `null`。
48
+ */
49
+ export function findFirstFocusable(root) {
50
+ return getFocusableElements(root)[0] ?? null;
51
+ }
@@ -0,0 +1,32 @@
1
+ import { logger, LogLevel } from '../core/logger';
2
+ /**
3
+ * Dispatch a composed, bubbling `CustomEvent` with Aithe defaults.
4
+ * Also records the event in the logger for debugging / telemetry.
5
+ * 使用 Aithe 默认值分发一个组合、冒泡的 `CustomEvent`,同时记录到日志器。
6
+ *
7
+ * @param target - Event target element. 事件目标元素。
8
+ * @param type - Event type string. 事件类型字符串。
9
+ * @param detail - Optional event detail payload. 可选的事件详情载荷。
10
+ * @typeparam T - Type of the event detail. 事件详情的类型。
11
+ */
12
+ export function emitAitheEvent(target, type, detail) {
13
+ if (logger.isEnabled) {
14
+ // Only log when detail is a plain object with log: true — component-instance-level opt-in.
15
+ const shouldLog = detail != null
16
+ && typeof detail === 'object'
17
+ && detail.log === true;
18
+ if (shouldLog) {
19
+ const tagName = target.tagName?.toLowerCase?.() ?? '';
20
+ logger.addEntry(LogLevel.DEBUG, [
21
+ `[AitheEvent] ${type} from ${tagName}`,
22
+ { type, tagName, detail },
23
+ ], ['aithe']);
24
+ }
25
+ }
26
+ return target.dispatchEvent(new CustomEvent(type, {
27
+ bubbles: true,
28
+ composed: true,
29
+ cancelable: true,
30
+ detail,
31
+ }));
32
+ }
@@ -0,0 +1,176 @@
1
+ import { html, svg } from 'lit';
2
+ const ICON_PATTERN = /^\((\w+)\)(.+)/;
3
+ export const ICON_SIZE_MAP = {
4
+ xs: '12px', sm: '16px', md: '20px', lg: '24px',
5
+ xl: '28px', '2xl': '32px', '3xl': '48px',
6
+ '4xl': '64px', '5xl': '96px', '6xl': '128px',
7
+ };
8
+ export const ICON_GLYPH_MAP = {
9
+ // ── General / 通用 ──
10
+ sparkles: svg `<path d="M12 3l1.8 4.2L18 9l-4.2 1.8L12 15l-1.8-4.2L6 9l4.2-1.8L12 3z"></path><path d="M5 14l.9 2.1L8 17l-2.1.9L5 20l-.9-2.1L2 17l2.1-.9L5 14z"></path>`,
11
+ close: svg `<path d="M6 6l12 12M18 6L6 18"></path>`,
12
+ check: svg `<path d="M5 13l4 4L19 7"></path>`,
13
+ info: svg `<circle cx="12" cy="12" r="9"></circle><path d="M12 10v5"></path><path d="M12 7h.01"></path>`,
14
+ warning: svg `<path d="M12 4l9 16H3L12 4z"></path><path d="M12 10v4"></path><path d="M12 17h.01"></path>`,
15
+ image: svg `<rect x="4" y="5" width="16" height="14" rx="2"></rect><path d="M8 14l3-3 5 5"></path><path d="M14 12l2-2 4 4"></path><circle cx="9" cy="9" r="1.5"></circle>`,
16
+ search: svg `<circle cx="11" cy="11" r="7"></circle><path d="M21 21l-4.35-4.35"></path>`,
17
+ plus: svg `<path d="M12 5v14M5 12h14"></path>`,
18
+ minus: svg `<path d="M5 12h14"></path>`,
19
+ menu: svg `<path d="M4 6h16M4 12h16M4 18h16"></path>`,
20
+ more: svg `<circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle>`,
21
+ settings: svg `<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 00.5 1.8l.05.05a2 2 0 010 2.83 2 2 0 01-2.83 0l-.05-.05a1.65 1.65 0 00-1.8-.5 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09a1.65 1.65 0 00-1-1.51 1.65 1.65 0 00-1.8.5l-.05.05a2 2 0 01-2.83 0 2 2 0 010-2.83l.05-.05a1.65 1.65 0 00.5-1.8 1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09a1.65 1.65 0 001.51-1 1.65 1.65 0 00-.5-1.8l-.05-.05a2 2 0 010-2.83 2 2 0 012.83 0l.05.05a1.65 1.65 0 001.8.5H9a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.8-.5l.05-.05a2 2 0 012.83 0 2 2 0 010 2.83l-.05.05a1.65 1.65 0 00-.5 1.8 1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"></path>`,
22
+ home: svg `<path d="M3 12l9-9 9 9"></path><path d="M9 21V12h6v9"></path>`,
23
+ star: svg `<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>`,
24
+ heart: svg `<path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"></path>`,
25
+ copy: svg `<rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path>`,
26
+ download: svg `<path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"></path><path d="M7 10l5 5 5-5"></path><path d="M12 15V3"></path>`,
27
+ upload: svg `<path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"></path><path d="M17 8l-5-5-5 5"></path><path d="M12 3v12"></path>`,
28
+ share: svg `<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><path d="M8.59 13.51l6.83 3.98M15.41 6.51l-6.82 3.98"></path>`,
29
+ link: svg `<path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"></path>`,
30
+ external: svg `<path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"></path><path d="M15 3h6v6"></path><path d="M10 14L21 3"></path>`,
31
+ refresh: svg `<path d="M21.5 2v6h-6"></path><path d="M2.5 22v-6h6"></path><path d="M21.5 8A10 10 0 003.5 8"></path><path d="M2.5 16A10 10 0 0020.5 16"></path>`,
32
+ edit: svg `<path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path><path d="M18.5 2.5a2.12 2.12 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path>`,
33
+ trash: svg `<path d="M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m3 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6h14"></path>`,
34
+ filter: svg `<path d="M22 3H2l8 9.46V19l4 2v-8.54L22 3z"></path>`,
35
+ sort: svg `<path d="M7 4l-4 4 4 4"></path><path d="M17 4l4 4-4 4"></path><path d="M3 8h18"></path>`,
36
+ lock: svg `<rect x="3" y="11" width="18" height="11" rx="2"></rect><path d="M7 11V7a5 5 0 0110 0v4"></path>`,
37
+ unlock: svg `<rect x="3" y="11" width="18" height="11" rx="2"></rect><path d="M7 11V7a5 5 0 019.9-1"></path>`,
38
+ eye: svg `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>`,
39
+ eyeOff: svg `<path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94"></path><path d="M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19"></path><path d="M14.12 14.12a3 3 0 11-4.24-4.24"></path><path d="M1 1l22 22"></path>`,
40
+ clock: svg `<circle cx="12" cy="12" r="10"></circle><path d="M12 6v6l4 2"></path>`,
41
+ calendar: svg `<rect x="3" y="4" width="18" height="18" rx="2"></rect><path d="M16 2v4M8 2v4M3 10h18"></path>`,
42
+ pin: svg `<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"></path><circle cx="12" cy="9" r="2.5"></circle>`,
43
+ flag: svg `<path d="M4 22V4"></path><path d="M4 4l8 4-8 4 8 4-8 4"></path>`,
44
+ bookmark: svg `<path d="M19 21l-7-5-7 5V5a2 2 0 012-2h10a2 2 0 012 2z"></path>`,
45
+ paperclip: svg `<path d="M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"></path>`,
46
+ tag: svg `<path d="M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z"></path><path d="M7 7h.01"></path>`,
47
+ thumbUp: svg `<path d="M14 9V5a3 3 0 00-3-3l-4 9v11h11.56a2 2 0 002-1.72l1.67-8a2 2 0 00-2-2.28H14z"></path><path d="M7 22H4a2 2 0 01-2-2v-7a2 2 0 012-2h3"></path>`,
48
+ thumbDown: svg `<path d="M10 15v4a3 3 0 003 3l4-9V2H5.44a2 2 0 00-2 1.72l-1.67 8a2 2 0 002 2.28H10z"></path><path d="M17 2h3a2 2 0 012 2v7a2 2 0 01-2 2h-3"></path>`,
49
+ // ── Arrows / 箭头 ──
50
+ arrowUp: svg `<path d="M12 19V5M5 12l7-7 7 7"></path>`,
51
+ arrowDown: svg `<path d="M12 5v14M19 12l-7 7-7-7"></path>`,
52
+ arrowLeft: svg `<path d="M19 12H5M12 19l-7-7 7-7"></path>`,
53
+ arrowRight: svg `<path d="M5 12h14M12 5l7 7-7 7"></path>`,
54
+ chevronUp: svg `<path d="M6 15l6-6 6 6"></path>`,
55
+ chevronDown: svg `<path d="M6 9l6 6 6-6"></path>`,
56
+ chevronLeft: svg `<path d="M15 6l-6 6 6 6"></path>`,
57
+ chevronRight: svg `<path d="M9 6l6 6-6 6"></path>`,
58
+ expand: svg `<path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"></path>`,
59
+ collapse: svg `<path d="M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7"></path>`,
60
+ // ── Status / 状态 ──
61
+ success: svg `<circle cx="12" cy="12" r="10"></circle><path d="M8 12l3 3 5-5"></path>`,
62
+ error: svg `<circle cx="12" cy="12" r="10"></circle><path d="M15 9l-6 6M9 9l6 6"></path>`,
63
+ question: svg `<circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"></path><path d="M12 17h.01"></path>`,
64
+ // ── Media / 媒体 ──
65
+ play: svg `<circle cx="12" cy="12" r="10"></circle><path d="M10 8l6 4-6 4V8z"></path>`,
66
+ pause: svg `<circle cx="12" cy="12" r="10"></circle><rect x="9" y="8" width="2" height="8"></rect><rect x="15" y="8" width="2" height="8"></rect>`,
67
+ volume: svg `<path d="M11 5L6 9H2v6h4l5 4V5z"></path><path d="M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07"></path>`,
68
+ mute: svg `<path d="M11 5L6 9H2v6h4l5 4V5z"></path><path d="M23 9l-6 6M17 9l6 6"></path>`,
69
+ camera: svg `<path d="M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z"></path><circle cx="12" cy="13" r="4"></circle>`,
70
+ video: svg `<polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2"></rect>`,
71
+ music: svg `<path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle>`,
72
+ // ── Communication / 交流 ──
73
+ mail: svg `<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><path d="M22 6l-10 7L2 6"></path>`,
74
+ bell: svg `<path d="M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 01-3.46 0"></path>`,
75
+ chat: svg `<path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"></path>`,
76
+ phone: svg `<path d="M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.5 19.5 0 01-6-6 19.79 19.79 0 01-3.07-8.67A2 2 0 014.11 2h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z"></path>`,
77
+ // ── Data / 数据 ──
78
+ barChart: svg `<path d="M12 20V10M18 20V4M6 20v-4"></path>`,
79
+ pieChart: svg `<path d="M21.21 15.89A10 10 0 118 2.83"></path><path d="M22 12A10 10 0 0012 2v10z"></path>`,
80
+ database: svg `<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path>`,
81
+ code: svg `<path d="M16 18l6-6-6-6M8 6l-6 6 6 6"></path>`,
82
+ terminal: svg `<polyline points="4 17 10 11 4 5"></polyline><path d="M12 19h8"></path>`,
83
+ file: svg `<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"></path><path d="M14 2v6h6"></path>`,
84
+ folder: svg `<path d="M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z"></path>`,
85
+ // ── Layout / 布局 ──
86
+ grid: svg `<rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect>`,
87
+ list: svg `<path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"></path>`,
88
+ sidebar: svg `<rect x="3" y="3" width="18" height="18" rx="2"></rect><path d="M9 3v18"></path>`,
89
+ maximize: svg `<path d="M8 3H5a2 2 0 00-2 2v3M21 8V5a2 2 0 00-2-2h-3M3 16v3a2 2 0 002 2h3M16 21h3a2 2 0 002-2v-3"></path>`,
90
+ minimize: svg `<path d="M8 3v3a2 2 0 01-2 2H3M21 8h-3a2 2 0 01-2-2V3M3 16h3a2 2 0 012 2v3M16 21v-3a2 2 0 012-2h3"></path>`,
91
+ // ── User / 用户 ──
92
+ user: svg `<path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>`,
93
+ users: svg `<path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"></path>`,
94
+ // ── Weather / 天气 ──
95
+ sun: svg `<circle cx="12" cy="12" r="5"></circle><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"></path>`,
96
+ moon: svg `<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>`,
97
+ cloud: svg `<path d="M18 10h-1.26A8 8 0 109 20h9a5 5 0 000-10z"></path>`,
98
+ };
99
+ const SVG_STYLE = 'fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8;';
100
+ export class IconUtil {
101
+ static resolveSize(size, fallback = '20px') {
102
+ if (!size)
103
+ return fallback;
104
+ const mapped = ICON_SIZE_MAP[size];
105
+ if (mapped)
106
+ return mapped;
107
+ return /^\d+$/.test(size) ? `${size}px` : size;
108
+ }
109
+ static parse(input) {
110
+ const match = ICON_PATTERN.exec(input);
111
+ if (match) {
112
+ const rawType = match[1].toLowerCase();
113
+ const value = match[2].trim();
114
+ if (rawType === 'class' ||
115
+ rawType === 'auto' ||
116
+ rawType === 'url' ||
117
+ rawType === 'share' ||
118
+ rawType === 'remote') {
119
+ return { type: rawType, value };
120
+ }
121
+ }
122
+ return { type: 'class', value: input };
123
+ }
124
+ static renderAuto(value, cssSize, cls, iconStyle, extraStyle = '') {
125
+ return html `
126
+ <span class="${cls}" style="${extraStyle}${iconStyle}display:inline-flex;align-items:center;justify-content:center;width:${cssSize};height:${cssSize};border-radius:50%;background:linear-gradient(135deg, var(--aithe-primary-4), var(--aithe-primary-7));color:var(--aithe-color-text-on-primary, #ffffff);font-size:calc(${cssSize} * 0.85);font-weight:600;">
127
+ ${value.charAt(0).toUpperCase()}
128
+ </span>
129
+ `;
130
+ }
131
+ static renderClass(value, cssSize, extraStyle = '') {
132
+ const glyph = ICON_GLYPH_MAP[value] ?? ICON_GLYPH_MAP['sparkles'];
133
+ return html `
134
+ <svg viewBox="0 0 24 24" aria-hidden="true"
135
+ style="${extraStyle}width:${cssSize};height:${cssSize};${SVG_STYLE}">
136
+ ${glyph}
137
+ </svg>
138
+ `;
139
+ }
140
+ static render(input, size = '16', cls = '', iconStyle = '', alt = '') {
141
+ const { type, value } = IconUtil.parse(input);
142
+ const cssSize = /^\d+$/.test(size) ? `${size}px` : size;
143
+ switch (type) {
144
+ case 'auto':
145
+ return IconUtil.renderAuto(value, cssSize, cls, iconStyle);
146
+ case 'url':
147
+ case 'share':
148
+ case 'remote': {
149
+ const altText = alt || (value.includes('|')
150
+ ? value.split('|')[1].trim()
151
+ : '');
152
+ const src = value.includes('|') ? value.split('|')[0].trim() : value;
153
+ return html `
154
+ <span style="${iconStyle}display:inline-flex;position:relative;width:${cssSize};height:${cssSize};">
155
+ <img class="${cls}" src="${src}" alt="${altText}"
156
+ style="${iconStyle}display:inline-flex;width:${cssSize};height:${cssSize};object-fit:contain;"
157
+ @error=${(e) => {
158
+ const el = e.target;
159
+ el.style.display = 'none';
160
+ const fallback = el.nextElementSibling;
161
+ if (fallback)
162
+ fallback.style.display = 'inline-flex';
163
+ }}
164
+ />
165
+ ${altText
166
+ ? html `<span style="position:absolute;top:0;left:0;line-height:1;width:${cssSize};height:${cssSize};border-radius:50%;background:linear-gradient(135deg, var(--aithe-primary-4), var(--aithe-primary-7));color:var(--aithe-color-text-on-primary, #ffffff);font-size:calc(${cssSize} * 0.85);font-weight:600;display:inline-flex;align-items:center;justify-content:center;display:none;">${altText.charAt(0).toUpperCase()}</span>`
167
+ : IconUtil.renderClass('image', cssSize, 'display:none;position:absolute;top:0;left:0;')}
168
+ </span>
169
+ `;
170
+ }
171
+ case 'class':
172
+ default:
173
+ return IconUtil.renderClass(value, cssSize);
174
+ }
175
+ }
176
+ }
@@ -0,0 +1,4 @@
1
+ export * from './dom';
2
+ export * from './events';
3
+ export * from './validation';
4
+ export * from './icon';
@@ -34,14 +34,14 @@ export declare function uid(prefix?: string): string;
34
34
  */
35
35
  export declare function findFirstFocusable(root: ParentNode): HTMLElement | null;
36
36
  /**
37
- * Safely converts an unknown value to a JSON string, preventing "[object Object]" output.
37
+ * Safely converts an unknown value to a string, preventing "[object Object]" output.
38
38
  * Falls back gracefully through multiple strategies:
39
- * 1. JSON.stringify with pretty-print (fails on circular references)
40
- * 2. JSON.stringify without pretty-print for objects, or String() for primitives
39
+ * 1. Pretty-print JSON.stringify for objects (fails on circular references)
40
+ * 2. Compact JSON.stringify as second attempt
41
41
  * 3. String() as final fallback
42
42
  *
43
- * 安全地将任意值转换为 JSON 字符串,避免 "[object Object]" 输出。
44
- * 逐级降级:格式化序列化 无格式序列化/基本类型转换 → String() 兜底
43
+ * 安全地将任意值转换为字符串,避免 "[object Object]" 输出。
44
+ * 对象优先尝试格式化 JSON.stringify,失败后降级为紧凑格式,最后 String() 兜底。
45
45
  */
46
46
  export declare function safeStringify(value: unknown): string;
47
47
  //# sourceMappingURL=utils.d.ts.map