@icen.ai/ui 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/AGENTS.md +79 -309
  2. package/LICENSE +21 -0
  3. package/README.md +43 -54
  4. package/dist/base.css +57 -16
  5. package/dist/behaviors/accordion.mjs +1 -1
  6. package/dist/behaviors/ai-branch.mjs +1 -0
  7. package/dist/behaviors/ai-chat.d.mts +2 -2
  8. package/dist/behaviors/ai-chat.mjs +53 -10
  9. package/dist/behaviors/ai-composer.d.mts +5 -5
  10. package/dist/behaviors/ai-composer.mjs +21 -10
  11. package/dist/behaviors/ai-core.mjs +1 -0
  12. package/dist/behaviors/ai-diff.mjs +1 -0
  13. package/dist/behaviors/ai-feedback.mjs +1 -0
  14. package/dist/behaviors/ai-panel.d.mts +2 -2
  15. package/dist/behaviors/ai-panel.mjs +1 -0
  16. package/dist/behaviors/ai-provider.d.mts +1 -1
  17. package/dist/behaviors/ai-provider.mjs +1 -0
  18. package/dist/behaviors/ai-threads.mjs +1 -0
  19. package/dist/behaviors/ai-tool.d.mts +1 -1
  20. package/dist/behaviors/ai-tool.mjs +57 -24
  21. package/dist/behaviors/ai-tools.mjs +937 -28
  22. package/dist/behaviors/autocomplete.d.mts +1 -1
  23. package/dist/behaviors/autocomplete.mjs +1 -0
  24. package/dist/behaviors/back-top.mjs +1 -0
  25. package/dist/behaviors/carousel.mjs +8 -1
  26. package/dist/behaviors/cascader.mjs +14 -0
  27. package/dist/behaviors/charts.mjs +56 -20
  28. package/dist/behaviors/code-block.mjs +9 -1
  29. package/dist/behaviors/command-palette.mjs +3 -3
  30. package/dist/behaviors/context-menu.d.mts +2 -2
  31. package/dist/behaviors/context-menu.mjs +1 -0
  32. package/dist/behaviors/controls.d.mts +8 -8
  33. package/dist/behaviors/controls.mjs +37 -6
  34. package/dist/behaviors/copy.mjs +1 -0
  35. package/dist/behaviors/datatable.d.mts +3 -3
  36. package/dist/behaviors/datatable.mjs +76 -11
  37. package/dist/behaviors/date-picker.mjs +1 -0
  38. package/dist/behaviors/events.d.mts +10 -10
  39. package/dist/behaviors/events.mjs +11 -1
  40. package/dist/behaviors/form-validate.d.mts +10 -1
  41. package/dist/behaviors/form-validate.mjs +266 -4611
  42. package/dist/behaviors/i18n.d.mts +1 -0
  43. package/dist/behaviors/i18n.mjs +2 -0
  44. package/dist/behaviors/input.mjs +3 -0
  45. package/dist/behaviors/kb-access.d.mts +2 -2
  46. package/dist/behaviors/kb-access.mjs +8 -2
  47. package/dist/behaviors/kb-acl.d.mts +2 -2
  48. package/dist/behaviors/kb-acl.mjs +1 -0
  49. package/dist/behaviors/kb-answer.d.mts +2 -2
  50. package/dist/behaviors/kb-answer.mjs +56 -23
  51. package/dist/behaviors/kb-audit.d.mts +2 -2
  52. package/dist/behaviors/kb-audit.mjs +1 -0
  53. package/dist/behaviors/kb-canvas.d.mts +3 -3
  54. package/dist/behaviors/kb-canvas.mjs +1 -0
  55. package/dist/behaviors/kb-chain.d.mts +2 -2
  56. package/dist/behaviors/kb-chain.mjs +1 -0
  57. package/dist/behaviors/kb-checkpoint.d.mts +2 -2
  58. package/dist/behaviors/kb-checkpoint.mjs +1 -0
  59. package/dist/behaviors/kb-chunks.d.mts +2 -2
  60. package/dist/behaviors/kb-chunks.mjs +1 -0
  61. package/dist/behaviors/kb-citation.d.mts +2 -2
  62. package/dist/behaviors/kb-citation.mjs +20 -6
  63. package/dist/behaviors/kb-clarify.d.mts +2 -2
  64. package/dist/behaviors/kb-clarify.mjs +1 -0
  65. package/dist/behaviors/kb-conflict.d.mts +2 -2
  66. package/dist/behaviors/kb-conflict.mjs +1 -0
  67. package/dist/behaviors/kb-connector.d.mts +2 -2
  68. package/dist/behaviors/kb-connector.mjs +1 -0
  69. package/dist/behaviors/kb-core.d.mts +1 -1
  70. package/dist/behaviors/kb-core.mjs +1 -0
  71. package/dist/behaviors/kb-eval.d.mts +2 -2
  72. package/dist/behaviors/kb-eval.mjs +8 -2
  73. package/dist/behaviors/kb-explain.d.mts +2 -2
  74. package/dist/behaviors/kb-explain.mjs +13 -2
  75. package/dist/behaviors/kb-filter.d.mts +2 -2
  76. package/dist/behaviors/kb-filter.mjs +8 -2
  77. package/dist/behaviors/kb-gap.d.mts +2 -2
  78. package/dist/behaviors/kb-gap.mjs +1 -0
  79. package/dist/behaviors/kb-hittest.d.mts +2 -2
  80. package/dist/behaviors/kb-hittest.mjs +2 -1
  81. package/dist/behaviors/kb-metadata.mjs +6 -0
  82. package/dist/behaviors/kb-passage.d.mts +2 -2
  83. package/dist/behaviors/kb-passage.mjs +1 -0
  84. package/dist/behaviors/kb-pipeline.d.mts +2 -2
  85. package/dist/behaviors/kb-pipeline.mjs +1 -0
  86. package/dist/behaviors/kb-qa.mjs +1 -0
  87. package/dist/behaviors/kb-rerank.d.mts +2 -2
  88. package/dist/behaviors/kb-rerank.mjs +1 -0
  89. package/dist/behaviors/kb-retrieval.d.mts +2 -2
  90. package/dist/behaviors/kb-retrieval.mjs +18 -4
  91. package/dist/behaviors/kb-review.d.mts +2 -2
  92. package/dist/behaviors/kb-review.mjs +8 -2
  93. package/dist/behaviors/kb-sandbox.d.mts +2 -2
  94. package/dist/behaviors/kb-sandbox.mjs +7 -1
  95. package/dist/behaviors/kb-segment.d.mts +2 -2
  96. package/dist/behaviors/kb-segment.mjs +2 -1
  97. package/dist/behaviors/kb-select.mjs +8 -2
  98. package/dist/behaviors/kb-sources.d.mts +2 -2
  99. package/dist/behaviors/kb-sources.mjs +1 -0
  100. package/dist/behaviors/kb-sql.d.mts +2 -2
  101. package/dist/behaviors/kb-sql.mjs +1 -0
  102. package/dist/behaviors/kb-trace.d.mts +2 -2
  103. package/dist/behaviors/kb-trace.mjs +9 -3
  104. package/dist/behaviors/kb-visibility.d.mts +2 -2
  105. package/dist/behaviors/kb-visibility.mjs +1 -0
  106. package/dist/behaviors/kb-who-can.d.mts +2 -2
  107. package/dist/behaviors/kb-who-can.mjs +8 -2
  108. package/dist/behaviors/mentions.d.mts +1 -1
  109. package/dist/behaviors/mentions.mjs +1 -0
  110. package/dist/behaviors/modal.d.mts +1 -1
  111. package/dist/behaviors/modal.mjs +1 -0
  112. package/dist/behaviors/notification.d.mts +2 -2
  113. package/dist/behaviors/notification.mjs +14 -3
  114. package/dist/behaviors/panel.mjs +1 -0
  115. package/dist/behaviors/scroll-area.d.mts +17 -0
  116. package/dist/behaviors/scroll-area.mjs +59 -0
  117. package/dist/behaviors/select.mjs +8 -2
  118. package/dist/behaviors/slider.mjs +3 -3
  119. package/dist/behaviors/split-pane.mjs +2 -0
  120. package/dist/behaviors/suggestions.mjs +1 -0
  121. package/dist/behaviors/tabs.mjs +10 -0
  122. package/dist/behaviors/tag-input.mjs +1 -0
  123. package/dist/behaviors/theme-switcher.d.mts +2 -2
  124. package/dist/behaviors/theme-switcher.mjs +17 -2
  125. package/dist/behaviors/theme.mjs +16 -2
  126. package/dist/behaviors/toast.d.mts +2 -2
  127. package/dist/behaviors/toast.mjs +1 -0
  128. package/dist/behaviors/tree-select.mjs +14 -0
  129. package/dist/behaviors/tree.mjs +4 -4
  130. package/dist/behaviors/upload.mjs +1 -0
  131. package/dist/behaviors/url-safety.d.mts +8 -0
  132. package/dist/behaviors/url-safety.mjs +11 -0
  133. package/dist/components/accordion.d.mts +2 -0
  134. package/dist/components/ai-branch.d.mts +2 -0
  135. package/dist/components/ai-chat.css +40 -33
  136. package/dist/components/ai-chat.d.mts +2 -0
  137. package/dist/components/ai-composer.d.mts +2 -0
  138. package/dist/components/ai-context.d.mts +2 -0
  139. package/dist/components/ai-context.mjs +1 -0
  140. package/dist/components/ai-diff.css +6 -6
  141. package/dist/components/ai-diff.d.mts +2 -0
  142. package/dist/components/ai-feedback.d.mts +2 -0
  143. package/dist/components/ai-files.d.mts +2 -0
  144. package/dist/components/ai-message.d.mts +2 -0
  145. package/dist/components/ai-panel.css +12 -10
  146. package/dist/components/ai-reasoning.d.mts +2 -0
  147. package/dist/components/ai-subagent.d.mts +2 -0
  148. package/dist/components/ai-subagent.mjs +1 -0
  149. package/dist/components/ai-threads.d.mts +2 -0
  150. package/dist/components/ai-todo.d.mts +2 -0
  151. package/dist/components/ai-todo.mjs +1 -0
  152. package/dist/components/ai-tool-call.d.mts +2 -0
  153. package/dist/components/ai-tool-call.mjs +1 -0
  154. package/dist/components/ai-tool.css +16 -16
  155. package/dist/components/ai-usage.d.mts +2 -0
  156. package/dist/components/alert.d.mts +2 -0
  157. package/dist/components/autocomplete.css +12 -12
  158. package/dist/components/autocomplete.d.mts +2 -0
  159. package/dist/components/avatar.d.mts +2 -0
  160. package/dist/components/back-top.css +47 -16
  161. package/dist/components/back-top.d.mts +2 -0
  162. package/dist/components/badge.css +1 -1
  163. package/dist/components/badge.d.mts +2 -0
  164. package/dist/components/breadcrumb.css +26 -8
  165. package/dist/components/breadcrumb.d.mts +2 -0
  166. package/dist/components/btn.css +67 -62
  167. package/dist/components/btn.d.mts +2 -0
  168. package/dist/components/card.css +22 -22
  169. package/dist/components/card.d.mts +2 -0
  170. package/dist/components/carousel.d.mts +2 -0
  171. package/dist/components/cascader.css +56 -35
  172. package/dist/components/cascader.d.mts +2 -0
  173. package/dist/components/chart-area.css +46 -0
  174. package/dist/components/chart-area.d.mts +2 -0
  175. package/dist/components/chart-bar.css +66 -19
  176. package/dist/components/chart-bar.d.mts +2 -0
  177. package/dist/components/chart-calendar.d.mts +2 -0
  178. package/dist/components/chart-gauge.css +23 -3
  179. package/dist/components/chart-gauge.d.mts +2 -0
  180. package/dist/components/chart-graph.css +15 -3
  181. package/dist/components/chart-graph.d.mts +2 -0
  182. package/dist/components/chart-heatmap.css +117 -95
  183. package/dist/components/chart-heatmap.d.mts +2 -0
  184. package/dist/components/chart-line.css +54 -0
  185. package/dist/components/chart-line.d.mts +2 -0
  186. package/dist/components/chart-map.d.mts +2 -0
  187. package/dist/components/chart-pie.css +29 -0
  188. package/dist/components/chart-pie.d.mts +2 -0
  189. package/dist/components/chart-radar.css +50 -1
  190. package/dist/components/chart-radar.d.mts +2 -0
  191. package/dist/components/chart-scatter.css +39 -2
  192. package/dist/components/chart-scatter.d.mts +2 -0
  193. package/dist/components/chart-sparkline.css +20 -0
  194. package/dist/components/chart-sparkline.d.mts +2 -0
  195. package/dist/components/chart-stack.css +16 -5
  196. package/dist/components/chart-stack.d.mts +2 -0
  197. package/dist/components/charts.css +80 -35
  198. package/dist/components/charts.d.mts +2 -0
  199. package/dist/components/code-block.css +10 -8
  200. package/dist/components/code-block.d.mts +2 -0
  201. package/dist/components/command-palette.css +45 -38
  202. package/dist/components/command-palette.d.mts +2 -0
  203. package/dist/components/content.css +62 -57
  204. package/dist/components/context-menu.d.mts +2 -0
  205. package/dist/components/copy.css +10 -10
  206. package/dist/components/copy.d.mts +2 -0
  207. package/dist/components/datatable.css +72 -59
  208. package/dist/components/datatable.d.mts +2 -0
  209. package/dist/components/date-picker.css +26 -26
  210. package/dist/components/date-picker.d.mts +2 -0
  211. package/dist/components/desc.d.mts +2 -0
  212. package/dist/components/dropdown.d.mts +2 -0
  213. package/dist/components/empty.css +16 -16
  214. package/dist/components/empty.d.mts +2 -0
  215. package/dist/components/feedback.css +31 -29
  216. package/dist/components/form-validate.css +20 -6
  217. package/dist/components/form-validate.d.mts +2 -0
  218. package/dist/components/form.css +17 -14
  219. package/dist/components/form.d.mts +2 -0
  220. package/dist/components/icon.css +21 -10
  221. package/dist/components/icon.d.mts +2 -0
  222. package/dist/components/input.css +22 -22
  223. package/dist/components/input.d.mts +2 -0
  224. package/dist/components/kb-access.d.mts +2 -0
  225. package/dist/components/kb-acl.d.mts +2 -0
  226. package/dist/components/kb-agent.css +134 -55
  227. package/dist/components/kb-answer.d.mts +2 -0
  228. package/dist/components/kb-audit.d.mts +2 -0
  229. package/dist/components/kb-canvas.d.mts +2 -0
  230. package/dist/components/kb-chain.d.mts +2 -0
  231. package/dist/components/kb-checkpoint.d.mts +2 -0
  232. package/dist/components/kb-chunks.d.mts +2 -0
  233. package/dist/components/kb-citation.d.mts +2 -0
  234. package/dist/components/kb-clarify.d.mts +2 -0
  235. package/dist/components/kb-conflict.d.mts +2 -0
  236. package/dist/components/kb-connector.d.mts +2 -0
  237. package/dist/components/kb-data.css +192 -80
  238. package/dist/components/kb-eval.d.mts +2 -0
  239. package/dist/components/kb-explain.d.mts +2 -0
  240. package/dist/components/kb-filter.d.mts +2 -0
  241. package/dist/components/kb-gap.d.mts +2 -0
  242. package/dist/components/kb-ground.css +165 -73
  243. package/dist/components/kb-hittest.d.mts +2 -0
  244. package/dist/components/kb-ingest.css +308 -113
  245. package/dist/components/kb-metadata.d.mts +2 -0
  246. package/dist/components/kb-ops.css +189 -75
  247. package/dist/components/kb-passage.d.mts +2 -0
  248. package/dist/components/kb-perm.css +158 -87
  249. package/dist/components/kb-pipeline.d.mts +2 -0
  250. package/dist/components/kb-qa.d.mts +2 -0
  251. package/dist/components/kb-rerank.d.mts +2 -0
  252. package/dist/components/kb-retrieval.d.mts +2 -0
  253. package/dist/components/kb-review.d.mts +2 -0
  254. package/dist/components/kb-sandbox.d.mts +2 -0
  255. package/dist/components/kb-search.css +353 -116
  256. package/dist/components/kb-segment.d.mts +2 -0
  257. package/dist/components/kb-sources.d.mts +2 -0
  258. package/dist/components/kb-sql.d.mts +2 -0
  259. package/dist/components/kb-trace.d.mts +2 -0
  260. package/dist/components/kb-visibility.d.mts +2 -0
  261. package/dist/components/kb-who-can.d.mts +2 -0
  262. package/dist/components/kb.css +60 -36
  263. package/dist/components/kb.d.mts +2 -0
  264. package/dist/components/kbd.d.mts +2 -0
  265. package/dist/components/layout.css +10 -10
  266. package/dist/components/layout.d.mts +2 -0
  267. package/dist/components/list.d.mts +2 -0
  268. package/dist/components/material-chinese.css +10 -0
  269. package/dist/components/material-soviet.css +10 -0
  270. package/dist/components/material.css +61 -18
  271. package/dist/components/media-card.d.mts +2 -0
  272. package/dist/components/media.css +22 -27
  273. package/dist/components/mentions.css +18 -17
  274. package/dist/components/mentions.d.mts +2 -0
  275. package/dist/components/menu.css +32 -28
  276. package/dist/components/modal.css +30 -27
  277. package/dist/components/modal.d.mts +2 -0
  278. package/dist/components/nav.css +48 -44
  279. package/dist/components/nav.d.mts +2 -0
  280. package/dist/components/notification.css +31 -25
  281. package/dist/components/notification.d.mts +2 -0
  282. package/dist/components/pagination.css +15 -13
  283. package/dist/components/pagination.d.mts +2 -0
  284. package/dist/components/panel.css +19 -20
  285. package/dist/components/panel.d.mts +2 -0
  286. package/dist/components/pill.css +8 -7
  287. package/dist/components/pill.d.mts +2 -0
  288. package/dist/components/popover.css +32 -23
  289. package/dist/components/popover.d.mts +2 -0
  290. package/dist/components/progress.d.mts +2 -0
  291. package/dist/components/rating.d.mts +2 -0
  292. package/dist/components/result.d.mts +2 -0
  293. package/dist/components/scroll-area.css +84 -112
  294. package/dist/components/scroll-area.d.mts +2 -0
  295. package/dist/components/scroll-area.mjs +1 -0
  296. package/dist/components/segmented.css +47 -29
  297. package/dist/components/segmented.d.mts +2 -0
  298. package/dist/components/select.css +80 -41
  299. package/dist/components/select.d.mts +2 -0
  300. package/dist/components/sidebar.css +42 -38
  301. package/dist/components/sidebar.d.mts +2 -0
  302. package/dist/components/skeleton.d.mts +2 -0
  303. package/dist/components/slider.css +26 -22
  304. package/dist/components/slider.d.mts +2 -0
  305. package/dist/components/spinner.d.mts +2 -0
  306. package/dist/components/split-pane.css +16 -7
  307. package/dist/components/split-pane.d.mts +2 -0
  308. package/dist/components/stat.css +17 -16
  309. package/dist/components/stat.d.mts +2 -0
  310. package/dist/components/steps.css +26 -26
  311. package/dist/components/steps.d.mts +2 -0
  312. package/dist/components/switch.css +78 -39
  313. package/dist/components/switch.d.mts +2 -0
  314. package/dist/components/table.css +54 -32
  315. package/dist/components/table.d.mts +2 -0
  316. package/dist/components/tabs.css +53 -32
  317. package/dist/components/tabs.d.mts +2 -0
  318. package/dist/components/tag-input.css +12 -8
  319. package/dist/components/tag-input.d.mts +2 -0
  320. package/dist/components/tag.css +20 -12
  321. package/dist/components/tag.d.mts +2 -0
  322. package/dist/components/theme-switcher.css +7 -7
  323. package/dist/components/theme-switcher.d.mts +2 -0
  324. package/dist/components/timeline.d.mts +2 -0
  325. package/dist/components/toast.css +34 -30
  326. package/dist/components/toast.d.mts +2 -0
  327. package/dist/components/toolbar.css +19 -18
  328. package/dist/components/toolbar.d.mts +2 -0
  329. package/dist/components/tooltip.css +9 -8
  330. package/dist/components/tooltip.d.mts +2 -0
  331. package/dist/components/tree-select.css +63 -40
  332. package/dist/components/tree-select.d.mts +2 -0
  333. package/dist/components/tree.d.mts +2 -0
  334. package/dist/components/upload.css +9 -11
  335. package/dist/components/upload.d.mts +2 -0
  336. package/dist/index.d.mts +85 -84
  337. package/dist/index.mjs +14764 -14311
  338. package/dist/react.d.mts +18 -18
  339. package/dist/react.mjs +135 -36
  340. package/dist/registry.json +795 -64
  341. package/dist/tokens/colors.css +6 -0
  342. package/dist/tokens/design.css +130 -30
  343. package/dist/tokens/dtcg.json +6189 -1461
  344. package/dist/tokens/figma.variables.json +4107 -345
  345. package/dist/tokens/pixel.css +3 -0
  346. package/dist/tokens/scrollbars.css +40 -0
  347. package/dist/tokens/tokens-studio.json +5191 -271
  348. package/dist/tokens.css +304 -81
  349. package/dist/ui.css +4050 -2148
  350. package/dist/vue.d.mts +17 -17
  351. package/dist/vue.mjs +129 -34
  352. package/docs/spec/design-philosophy.md +5 -5
  353. package/docs/spec/design-primitives.md +10 -10
  354. package/docs/spec/scrollbars.md +46 -0
  355. package/package.json +16 -3
@@ -1,4 +1,4 @@
1
- import { SuggestionSourceContext } from './suggestions.js';
1
+ import { SuggestionSourceContext } from './suggestions.mjs';
2
2
 
3
3
  /** Single-line combobox suggestions. A named listbox contains options only;
4
4
  * loading, empty and retry states are siblings. Sources receive AbortSignal,
@@ -21,6 +21,7 @@ var ICEN_LOCALE_ZH_CN = {
21
21
  "aiChat.roleTool": "\u5DE5",
22
22
  "aiChat.roleUser": "\u6211",
23
23
  "aiChat.thinking": "\u601D\u8003 {p0}",
24
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
24
25
  /* ── aiComposer ── */
25
26
  "aiComposer.attachAgent": "\u4EE3\u7406",
26
27
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -116,6 +116,7 @@ var ICEN_LOCALE_ZH_CN = {
116
116
  "aiChat.roleTool": "\u5DE5",
117
117
  "aiChat.roleUser": "\u6211",
118
118
  "aiChat.thinking": "\u601D\u8003 {p0}",
119
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
119
120
  /* ── aiComposer ── */
120
121
  "aiComposer.attachAgent": "\u4EE3\u7406",
121
122
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -21,6 +21,7 @@ var ICEN_LOCALE_ZH_CN = {
21
21
  "aiChat.roleTool": "\u5DE5",
22
22
  "aiChat.roleUser": "\u6211",
23
23
  "aiChat.thinking": "\u601D\u8003 {p0}",
24
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
24
25
  /* ── aiComposer ── */
25
26
  "aiComposer.attachAgent": "\u4EE3\u7406",
26
27
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -909,7 +910,10 @@ function setup(carousel) {
909
910
  const slideLabel = t("carousel.slide");
910
911
  const render = () => {
911
912
  track.style.transform = `translateX(${-index * 100}%)`;
912
- slides.forEach((s, i) => s.setAttribute("aria-hidden", String(i !== index)));
913
+ slides.forEach((s, i) => {
914
+ s.setAttribute("aria-hidden", String(i !== index));
915
+ s.toggleAttribute("inert", i !== index);
916
+ });
913
917
  dots.forEach((d, i) => {
914
918
  d.classList.toggle("is-active", i === index);
915
919
  if (i === index) d.setAttribute("aria-current", "true");
@@ -955,6 +959,8 @@ function setup(carousel) {
955
959
  const rtl = () => getComputedStyle(carousel).direction === "rtl";
956
960
  const onKeyDown = (ev) => {
957
961
  const kev = ev;
962
+ const t2 = kev.target;
963
+ if (t2 instanceof Element && t2.closest("input, textarea, select, [contenteditable], [contenteditable] *")) return;
958
964
  switch (kev.key) {
959
965
  case "ArrowLeft":
960
966
  kev.preventDefault();
@@ -993,6 +999,7 @@ function setup(carousel) {
993
999
  s.removeAttribute("aria-roledescription");
994
1000
  s.removeAttribute("aria-label");
995
1001
  s.removeAttribute("aria-hidden");
1002
+ s.removeAttribute("inert");
996
1003
  });
997
1004
  el.__icenCarouselInit = false;
998
1005
  };
@@ -21,6 +21,7 @@ var ICEN_LOCALE_ZH_CN = {
21
21
  "aiChat.roleTool": "\u5DE5",
22
22
  "aiChat.roleUser": "\u6211",
23
23
  "aiChat.thinking": "\u601D\u8003 {p0}",
24
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
24
25
  /* ── aiComposer ── */
25
26
  "aiComposer.attachAgent": "\u4EE3\u7406",
26
27
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -1227,6 +1228,7 @@ function bindGlobalListeners() {
1227
1228
  document.addEventListener("pointerdown", onGlobalPointerDown);
1228
1229
  document.addEventListener("keydown", onGlobalKeyDown);
1229
1230
  }
1231
+ var activeSetups = /* @__PURE__ */ new Set();
1230
1232
  function bindOpenListeners() {
1231
1233
  window.addEventListener("scroll", onWindowChange, true);
1232
1234
  window.addEventListener("resize", onWindowChange);
@@ -1273,6 +1275,11 @@ function createCascader(el, opts) {
1273
1275
  const valueEl = document.createElement("span");
1274
1276
  valueEl.className = "icen-cascader-value";
1275
1277
  trigger.appendChild(valueEl);
1278
+ const triggerChevron = createIcon("chevron-down", { size: 12, className: "icen-cascader-chevron" });
1279
+ if (triggerChevron) {
1280
+ triggerChevron.setAttribute("aria-hidden", "true");
1281
+ trigger.appendChild(triggerChevron);
1282
+ }
1276
1283
  let clearBtn = null;
1277
1284
  if (opts.clearable) {
1278
1285
  clearBtn = document.createElement("button");
@@ -1818,8 +1825,15 @@ function createCascader(el, opts) {
1818
1825
  root.remove();
1819
1826
  el.textContent = "";
1820
1827
  if (instances.get(el) === destroy) instances.delete(el);
1828
+ activeSetups.delete(destroy);
1829
+ if (!activeSetups.size && globalBound) {
1830
+ document.removeEventListener("pointerdown", onGlobalPointerDown);
1831
+ document.removeEventListener("keydown", onGlobalKeyDown);
1832
+ globalBound = false;
1833
+ }
1821
1834
  }
1822
1835
  instances.set(el, destroy);
1836
+ activeSetups.add(destroy);
1823
1837
  return {
1824
1838
  getValue: () => [...value],
1825
1839
  getPath: () => {
@@ -116,6 +116,7 @@ var ICEN_LOCALE_ZH_CN = {
116
116
  "aiChat.roleTool": "\u5DE5",
117
117
  "aiChat.roleUser": "\u6211",
118
118
  "aiChat.thinking": "\u601D\u8003 {p0}",
119
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
119
120
  /* ── aiComposer ── */
120
121
  "aiComposer.attachAgent": "\u4EE3\u7406",
121
122
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -1167,7 +1168,8 @@ function withChrome(el, opts, hasLegend, paint, state, extras) {
1167
1168
  emitIcen(el, "icen:chart-legend-visibility", { visible: hidden ? false : true });
1168
1169
  });
1169
1170
  syncEye();
1170
- head.append(title, eye);
1171
+ if (hasLegend) head.append(title, eye);
1172
+ else head.append(title);
1171
1173
  el.append(head, body);
1172
1174
  paint(body);
1173
1175
  }
@@ -1268,7 +1270,7 @@ function renderVBar(el, opts) {
1268
1270
  wrap.appendChild(track);
1269
1271
  }
1270
1272
  body.append(wrap, labelsRow(labelsUsed));
1271
- if (seriesList.length > 1) body.appendChild(toggleLegend(seriesList.map((s, si) => ({ key: s.name, label: s.name, tone: s.tone ?? (si === 0 ? opts.tone : void 0), si })), wrap));
1273
+ if (seriesList.length > 1) body.appendChild(toggleLegend(seriesList.map((s, si) => ({ key: `${si}:${s.name}`, label: s.name, tone: s.tone ?? (si === 0 ? opts.tone : void 0), si })), wrap));
1272
1274
  });
1273
1275
  attachChartInteraction(el, "vbar");
1274
1276
  return el;
@@ -1363,8 +1365,10 @@ function renderDonut(el, opts) {
1363
1365
  "stroke-width": "14"
1364
1366
  }));
1365
1367
  let offset = 0;
1368
+ const gap = opts.segments.length > 1 ? 2.5 : 0;
1366
1369
  opts.segments.forEach((seg, segIndex) => {
1367
- const dash = seg.value / total * circumference;
1370
+ const arcLength = Math.max(0, seg.value / total * circumference);
1371
+ const dash = arcLength - Math.min(gap, arcLength * 0.1);
1368
1372
  const arc = svgEl("circle", {
1369
1373
  cx: "60",
1370
1374
  cy: "60",
@@ -1378,7 +1382,7 @@ function renderDonut(el, opts) {
1378
1382
  });
1379
1383
  setMarkData(arc, { index: segIndex, label: seg.label, value: seg.value });
1380
1384
  svg.appendChild(arc);
1381
- offset += dash;
1385
+ offset += arcLength;
1382
1386
  });
1383
1387
  const legend = document.createElement("div");
1384
1388
  legend.className = "icen-chart-legend";
@@ -1413,8 +1417,9 @@ function renderLine(el, opts) {
1413
1417
  const svg = svgEl("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": chartAriaLabel(opts.title, t("charts.type.line")) });
1414
1418
  const defs = svgEl("defs", {});
1415
1419
  for (let i = 0; i < 4; i++) {
1416
- const y = pad + i * (height - pad * 2) / 3;
1420
+ const y = Math.round(pad + i * (height - pad * 2) / 3) + 0.5;
1417
1421
  svg.appendChild(svgEl("line", {
1422
+ class: i === 3 ? "icen-chart-grid icen-chart-baseline" : "icen-chart-grid",
1418
1423
  x1: String(pad),
1419
1424
  x2: String(width - pad),
1420
1425
  y1: String(y),
@@ -1498,7 +1503,7 @@ function renderLine(el, opts) {
1498
1503
  if (defs.firstChild) svg.insertBefore(defs, svg.firstChild);
1499
1504
  wrap.append(svg, pointLabelsRow(labelsUsed, width, pad));
1500
1505
  body.appendChild(wrap);
1501
- if (seriesList.length > 1) body.appendChild(toggleLegend(seriesList.map((s, si) => ({ key: s.name, label: s.name, tone: s.tone ?? (si === 0 ? opts.tone : void 0), si })), wrap));
1506
+ if (seriesList.length > 1) body.appendChild(toggleLegend(seriesList.map((s, si) => ({ key: `${si}:${s.name}`, label: s.name, tone: s.tone ?? (si === 0 ? opts.tone : void 0), si })), wrap));
1502
1507
  });
1503
1508
  if (el.dataset.icenChartBody == null) observeFluidWidth(el, () => renderLine(el, opts));
1504
1509
  attachChartInteraction(el, "line");
@@ -1520,8 +1525,10 @@ function renderArea(el, opts) {
1520
1525
  const max = maxOf(values);
1521
1526
  const tone = toneVar(opts.tone);
1522
1527
  const points = values.map((value, i) => ({
1528
+ i,
1523
1529
  x: values.length <= 1 ? width / 2 : pad + i / (values.length - 1) * (width - pad * 2),
1524
- y: height - pad - value / max * (height - pad * 2),
1530
+ /* 负值钳到基线(与折线图同口径):容器 overflow:visible,反向射出会压住下方内容 */
1531
+ y: height - pad - Math.max(0, value) / max * (height - pad * 2),
1525
1532
  value,
1526
1533
  label: labels[i] ?? ""
1527
1534
  }));
@@ -1540,8 +1547,9 @@ function renderArea(el, opts) {
1540
1547
  defs.appendChild(gradient);
1541
1548
  svg.appendChild(defs);
1542
1549
  for (let i = 0; i < 4; i++) {
1543
- const y = pad + i * (height - pad * 2) / 3;
1550
+ const y = Math.round(pad + i * (height - pad * 2) / 3) + 0.5;
1544
1551
  svg.appendChild(svgEl("line", {
1552
+ class: i === 3 ? "icen-chart-grid icen-chart-baseline" : "icen-chart-grid",
1545
1553
  x1: String(pad),
1546
1554
  x2: String(width - pad),
1547
1555
  y1: String(y),
@@ -1562,14 +1570,26 @@ function renderArea(el, opts) {
1562
1570
  for (const p of points) {
1563
1571
  const title = svgEl("title", {});
1564
1572
  title.textContent = `${p.label}: ${fmt(opts, p.value)}`;
1565
- const inv = svgEl("circle", {
1573
+ const dot = svgEl("circle", {
1574
+ cx: p.x.toFixed(1),
1575
+ cy: p.y.toFixed(1),
1576
+ r: "2.6",
1577
+ fill: "var(--icen-token-card)",
1578
+ stroke: tone,
1579
+ "stroke-width": "1.6"
1580
+ });
1581
+ dot.appendChild(title);
1582
+ setMarkData(dot, { index: p.i, label: p.label, value: p.value });
1583
+ svg.appendChild(dot);
1584
+ const hit = svgEl("circle", {
1566
1585
  cx: p.x.toFixed(1),
1567
1586
  cy: p.y.toFixed(1),
1568
- r: "2",
1569
- fill: "transparent"
1587
+ r: "9",
1588
+ fill: "transparent",
1589
+ "data-icen-chart-hit": "1"
1570
1590
  });
1571
- inv.appendChild(title);
1572
- svg.appendChild(inv);
1591
+ copyMarkData(hit, dot);
1592
+ svg.appendChild(hit);
1573
1593
  }
1574
1594
  wrap.append(svg, pointLabelsRow(labels, width, pad));
1575
1595
  body.appendChild(wrap);
@@ -1679,7 +1699,7 @@ function renderRadar(el, opts) {
1679
1699
  setMarkData(dot, { index: i, seriesIndex: si, seriesName: s.name || void 0, label: axes[i] ?? "", value: s.values[i] ?? 0 });
1680
1700
  svg.appendChild(dot);
1681
1701
  }
1682
- legendItems.push({ key: s.name || t("charts.seriesName", { p0: si + 1 }), label: s.name || t("charts.seriesName", { p0: si + 1 }), tone: s.tone, si });
1702
+ legendItems.push({ key: `${si}:${s.name || t("charts.seriesName", { p0: si + 1 })}`, label: s.name || t("charts.seriesName", { p0: si + 1 }), tone: s.tone, si });
1683
1703
  });
1684
1704
  wrap.appendChild(svg);
1685
1705
  body.appendChild(wrap);
@@ -1701,6 +1721,11 @@ function niceCeil(v) {
1701
1721
  else nice = 10;
1702
1722
  return nice * base;
1703
1723
  }
1724
+ function tickPrecision(min, max, steps) {
1725
+ const span = Math.abs(max - min);
1726
+ if (!Number.isFinite(span) || span <= 0) return 0;
1727
+ return Math.max(0, Math.ceil(-Math.log10(span / steps)));
1728
+ }
1704
1729
  function isoDate(d) {
1705
1730
  const m = String(d.getMonth() + 1).padStart(2, "0");
1706
1731
  const day = String(d.getDate()).padStart(2, "0");
@@ -1796,7 +1821,8 @@ function renderSparkline(el, opts) {
1796
1821
  const tone = toneVar(opts.tone);
1797
1822
  const points = values.map((value, i) => ({
1798
1823
  x: values.length <= 1 ? width / 2 : pad + i / (values.length - 1) * (width - pad * 2),
1799
- y: height - pad - value / max * (height - pad * 2),
1824
+ /* 负值钳到基线(与折线图同口径):viewBox 仅 28 高,反向射出更刺眼 */
1825
+ y: height - pad - Math.max(0, value) / max * (height - pad * 2),
1800
1826
  value
1801
1827
  }));
1802
1828
  const line = points.map((p, i) => `${i === 0 ? "M" : "L"}${p.x.toFixed(1)},${p.y.toFixed(1)}`).join(" ");
@@ -1921,6 +1947,7 @@ function renderCalendar(el, opts) {
1921
1947
  weekdayRow.appendChild(s);
1922
1948
  });
1923
1949
  const max = maxOf(entries.map((e) => e.value));
1950
+ entries.sort((a, b) => a.date.localeCompare(b.date));
1924
1951
  const pad = padFirstWeek(grid, entries[0].date, weekStart);
1925
1952
  let lastMonth = -1;
1926
1953
  entries.forEach((entry, i) => {
@@ -1979,8 +2006,9 @@ function renderScatter(el, opts) {
1979
2006
  const xAt = (x) => pad + (x - xMin) / (xMax - xMin) * (width - pad * 2);
1980
2007
  const yAt = (y) => height - pad - (y - yMin) / (yMax - yMin) * (height - pad * 2);
1981
2008
  for (let i = 0; i <= 3; i++) {
1982
- const y = pad + i * (height - pad * 2) / 3;
2009
+ const y = Math.round(pad + i * (height - pad * 2) / 3) + 0.5;
1983
2010
  svg.appendChild(svgEl("line", {
2011
+ class: i === 3 ? "icen-chart-grid icen-chart-baseline" : "icen-chart-grid",
1984
2012
  x1: String(pad),
1985
2013
  x2: String(width - pad),
1986
2014
  y1: String(y),
@@ -1996,12 +2024,13 @@ function renderScatter(el, opts) {
1996
2024
  "font-size": "8",
1997
2025
  fill: "var(--icen-token-text-faint)"
1998
2026
  });
1999
- txt.textContent = fmt(opts, Math.round(tv * 10) / 10);
2027
+ txt.textContent = fmt(opts, +tv.toFixed(tickPrecision(yMin, yMax, 3)));
2000
2028
  svg.appendChild(txt);
2001
2029
  }
2002
2030
  for (let i = 0; i <= 4; i++) {
2003
- const x = pad + i * (width - pad * 2) / 4;
2031
+ const x = Math.round(pad + i * (width - pad * 2) / 4) + 0.5;
2004
2032
  svg.appendChild(svgEl("line", {
2033
+ class: i === 0 ? "icen-chart-grid icen-chart-grid--v icen-chart-axis" : "icen-chart-grid icen-chart-grid--v",
2005
2034
  x1: String(x),
2006
2035
  x2: String(x),
2007
2036
  y1: String(pad),
@@ -2018,7 +2047,7 @@ function renderScatter(el, opts) {
2018
2047
  "font-size": "8",
2019
2048
  fill: "var(--icen-token-text-faint)"
2020
2049
  });
2021
- txt.textContent = fmt(opts, Math.round(tv * 10) / 10);
2050
+ txt.textContent = fmt(opts, +tv.toFixed(tickPrecision(xMin, xMax, 4)));
2022
2051
  svg.appendChild(txt);
2023
2052
  }
2024
2053
  if (opts.yLabel) {
@@ -2382,6 +2411,7 @@ function renderChartSkeleton(body) {
2382
2411
  body.appendChild(box);
2383
2412
  }
2384
2413
  var CHART_MARK_ACCENT = "var(--icen-token-accent)";
2414
+ var CHART_MARK_ACCENT_TEXT = "var(--icen-token-accent-text)";
2385
2415
  function markToneVar(tone) {
2386
2416
  switch (tone) {
2387
2417
  case "success":
@@ -2517,7 +2547,7 @@ function paintSvgChartMarks(root, view, marks, formatValue, warned) {
2517
2547
  y: String(clampNum(y - 10, 8, CHART_LINE_H - 4)),
2518
2548
  "text-anchor": "middle",
2519
2549
  "font-size": "8",
2520
- fill: CHART_MARK_ACCENT
2550
+ fill: CHART_MARK_ACCENT_TEXT
2521
2551
  });
2522
2552
  label.textContent = mark.text ?? mark.label;
2523
2553
  g.appendChild(label);
@@ -3075,6 +3105,12 @@ function renderChart(el, raw) {
3075
3105
  const graphic = root.querySelector('[role="img"]');
3076
3106
  if (graphic && !graphic.getAttribute("aria-label")) {
3077
3107
  graphic.setAttribute("aria-label", spec.title ? `${spec.title}\uFF08${type}\uFF09` : type);
3108
+ } else if (!graphic) {
3109
+ const dom = root.querySelector(".icen-chart-vbar, .icen-chart-hbar");
3110
+ if (dom) {
3111
+ dom.setAttribute("role", "img");
3112
+ dom.setAttribute("aria-label", spec.title ? `${spec.title}\uFF08${type}\uFF09` : type);
3113
+ }
3078
3114
  }
3079
3115
  }
3080
3116
  if (loading) return;
@@ -230,6 +230,7 @@ var ICEN_LOCALE_ZH_CN = {
230
230
  "aiChat.roleTool": "\u5DE5",
231
231
  "aiChat.roleUser": "\u6211",
232
232
  "aiChat.thinking": "\u601D\u8003 {p0}",
233
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
233
234
  /* ── aiComposer ── */
234
235
  "aiComposer.attachAgent": "\u4EE3\u7406",
235
236
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -1435,12 +1436,19 @@ function prepareFigure(fig) {
1435
1436
  if (!pre) return;
1436
1437
  pre.tabIndex = 0;
1437
1438
  pre.setAttribute("role", "region");
1438
- if (!pre.hasAttribute("aria-label")) pre.setAttribute("aria-label", fig.querySelector(".icen-code-block-file,.icen-code-block-title,.icen-code-block-lang")?.textContent || t("codeBlock.region"));
1439
1439
  if (!pre.id) {
1440
1440
  do {
1441
1441
  pre.id = "icen-code-region-" + ++regionSequence;
1442
1442
  } while (document.getElementById(pre.id) && document.getElementById(pre.id) !== pre);
1443
1443
  }
1444
+ {
1445
+ const base = (pre.getAttribute("aria-label") || fig.querySelector(".icen-code-block-file,.icen-code-block-title,.icen-code-block-lang")?.textContent || t("codeBlock.region")).trim();
1446
+ const used = /* @__PURE__ */ new Set();
1447
+ for (const region of document.querySelectorAll('pre[role="region"][aria-label]')) if (region !== pre) used.add(region.getAttribute("aria-label") ?? "");
1448
+ let label = base, n = 2;
1449
+ while (used.has(label)) label = `${base} ${n++}`;
1450
+ if (label !== base || !pre.hasAttribute("aria-label")) pre.setAttribute("aria-label", label);
1451
+ }
1444
1452
  fig.querySelectorAll("[data-icen-code-block-num],[data-icen-code-block-wrap],[data-icen-code-block-fold],.icen-code-block-tail").forEach((control) => control.setAttribute("aria-controls", pre.id));
1445
1453
  syncFold(fig, fig.classList.contains("is-folded"));
1446
1454
  }
@@ -244,6 +244,7 @@ function openCommandPalette(id, opts) {
244
244
  window.clearTimeout(closingState.timer);
245
245
  closingState.backdrop.removeEventListener("transitionend", closingState.onEnd);
246
246
  delete closingState.backdrop.dataset.icenState;
247
+ if (closingState.backdrop !== backdrop) closingState.backdrop.hidden = true;
247
248
  closingState = null;
248
249
  }
249
250
  backdrop.hidden = false;
@@ -286,7 +287,6 @@ function openCommandPalette(id, opts) {
286
287
  const active = panel.querySelector(".icen-command-palette-item.is-active");
287
288
  if (active && !isDisabledItem(active)) {
288
289
  e.preventDefault();
289
- if (!programmaticCommands.has(active)) emitMenuSelect(panel, active);
290
290
  active.click();
291
291
  }
292
292
  return;
@@ -300,7 +300,7 @@ function openCommandPalette(id, opts) {
300
300
  els[next]?.focus();
301
301
  }
302
302
  };
303
- window.addEventListener("keydown", keyHandler);
303
+ window.addEventListener("keydown", keyHandler, true);
304
304
  emitIcen(document, "icen:command-palette-open", {});
305
305
  }
306
306
  function closeCommandPalette(id, opts) {
@@ -313,7 +313,7 @@ function closeCommandPalette(id, opts) {
313
313
  if (openId !== id) return;
314
314
  openId = null;
315
315
  if (keyHandler) {
316
- window.removeEventListener("keydown", keyHandler);
316
+ window.removeEventListener("keydown", keyHandler, true);
317
317
  keyHandler = null;
318
318
  }
319
319
  document.body.style.overflow = prevBodyOverflow;
@@ -1,5 +1,5 @@
1
- import { IconName } from './icons.js';
2
- import { PanelSizing } from './popover.js';
1
+ import { IconName } from './icons.mjs';
2
+ import { PanelSizing } from './popover.mjs';
3
3
 
4
4
  interface ContextMenuEntry {
5
5
  label: string;
@@ -222,6 +222,7 @@ var ICEN_LOCALE_ZH_CN = {
222
222
  "aiChat.roleTool": "\u5DE5",
223
223
  "aiChat.roleUser": "\u6211",
224
224
  "aiChat.thinking": "\u601D\u8003 {p0}",
225
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
225
226
  /* ── aiComposer ── */
226
227
  "aiComposer.attachAgent": "\u4EE3\u7406",
227
228
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -1,4 +1,4 @@
1
- export { initInput } from './input.js';
1
+ export { initInput } from './input.mjs';
2
2
 
3
3
  /**
4
4
  * 接线开关 / 勾选框 / 单选(document 级委托,页面级一次即可,重复调用幂等)。
@@ -6,21 +6,21 @@ export { initInput } from './input.js';
6
6
  * radio 组内互斥),派 icen:switch-change / icen:check-change。
7
7
  * 返回销毁函数:摘除委托并复位幂等标记,销毁后可重新 initSwitch。SSR 下返回 no-op。
8
8
  */
9
- declare const initSwitch: () => void;
9
+ declare const initSwitch: () => () => void;
10
10
  /**
11
11
  * 接线数字步进器(document 级委托,重复调用幂等)。
12
12
  * .icen-stepper 内 .icen-stepper-btn[data-icen-step] 点击 → .icen-stepper-input 数值 ±step 并 clamp 到
13
13
  * min/max,派 icen:stepper-change { el: .icen-stepper 根, value, delta }(触界 delta 为 0)。
14
14
  * 返回销毁函数:摘除委托并复位幂等标记,销毁后可重新 initStepper。SSR 下返回 no-op。
15
15
  */
16
- declare const initStepper: () => void;
16
+ declare const initStepper: () => () => void;
17
17
  /**
18
18
  * 接线分段控件(document 级委托,重复调用幂等)。
19
19
  * .icen-segmented 内 .icen-segmented-item 点击 → 组内 .is-active 互斥 + role="radio" 项同步
20
20
  * aria-checked,派 icen:segmented-change { el: 容器, value: data-icen-value ?? String(index), index }。
21
21
  * 返回销毁函数:摘除委托并复位幂等标记,销毁后可重新 initSegmented。SSR 下返回 no-op。
22
22
  */
23
- declare const initSegmented: () => void;
23
+ declare const initSegmented: () => () => void;
24
24
  /**
25
25
  * 接线可点击步骤条(document 级委托,重复调用幂等)。
26
26
  * .icen-steps 内 .icen-step[role="button"] 点击(或聚焦后 Space / Enter)→ 激活点位移
@@ -28,7 +28,7 @@ declare const initSegmented: () => void;
28
28
  * icen:step-change { step, index }。返回销毁函数:摘除委托并复位幂等标记,
29
29
  * 销毁后可重新 initSteps。SSR 下返回 no-op。
30
30
  */
31
- declare const initSteps: () => void;
31
+ declare const initSteps: () => () => void;
32
32
  /**
33
33
  * 接线星级评分(document 级委托,重复调用幂等)。
34
34
  * .icen-rating 内 .icen-rating-star 点击 → 该星及之前 .is-filled(重建选中态,清除残留
@@ -36,7 +36,7 @@ declare const initSteps: () => void;
36
36
  * icen:rating-change { el: 容器, value }(1 起算);.icen-rating--readonly 不接线。
37
37
  * 返回销毁函数:摘除委托并复位幂等标记,销毁后可重新 initRating。SSR 下返回 no-op。
38
38
  */
39
- declare const initRating: () => void;
39
+ declare const initRating: () => () => void;
40
40
  /**
41
41
  * 接线分页(document 级委托,重复调用幂等)。
42
42
  * .icen-pagination 内 .icen-page-btn 点击 → .is-active / aria-current 位移并派
@@ -45,7 +45,7 @@ declare const initRating: () => void;
45
45
  * 总页数与省略号折叠策略归消费方。返回销毁函数:摘除委托并复位幂等标记,
46
46
  * 销毁后可重新 initPagination。SSR 下返回 no-op。
47
47
  */
48
- declare const initPagination: () => void;
48
+ declare const initPagination: () => () => void;
49
49
  /**
50
50
  * 接线静态表排序(document 级委托,重复调用幂等)。
51
51
  * th[data-icen-sort] 点击 → asc→desc→无 循环(data-icen-sort 属性即方向载体,列 key 首次
@@ -54,6 +54,6 @@ declare const initPagination: () => void;
54
54
  * behaviors/datatable 的 icen:table-sort-change)。返回销毁函数:摘除委托并
55
55
  * 复位幂等标记,销毁后可重新 initTableSort。SSR 下返回 no-op。
56
56
  */
57
- declare const initTableSort: () => void;
57
+ declare const initTableSort: () => () => void;
58
58
 
59
59
  export { initPagination, initRating, initSegmented, initStepper, initSteps, initSwitch, initTableSort };
@@ -21,6 +21,7 @@ var ICEN_LOCALE_ZH_CN = {
21
21
  "aiChat.roleTool": "\u5DE5",
22
22
  "aiChat.roleUser": "\u6211",
23
23
  "aiChat.thinking": "\u601D\u8003 {p0}",
24
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
24
25
  /* ── aiComposer ── */
25
26
  "aiComposer.attachAgent": "\u4EE3\u7406",
26
27
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -864,6 +865,7 @@ function setupClear(wrap) {
864
865
  const field = wrap.querySelector("input.icen-input, textarea.icen-textarea");
865
866
  if (!btn || !field) return;
866
867
  btn.addEventListener("click", () => {
868
+ if (field.disabled || field.readOnly) return;
867
869
  field.value = "";
868
870
  field.dispatchEvent(new Event("input", { bubbles: true }));
869
871
  field.focus();
@@ -1072,6 +1074,7 @@ function setupOtp(group) {
1072
1074
  syncFilled(target);
1073
1075
  }
1074
1076
  cells[Math.min(i + text.length, cells.length - 1)].focus();
1077
+ fireComplete();
1075
1078
  });
1076
1079
  });
1077
1080
  const fireComplete = () => {
@@ -1155,6 +1158,12 @@ function createDelegatedInit(handlers) {
1155
1158
  }
1156
1159
  var SWITCH_LIKE = '.icen-switch[role="switch"], .icen-checkbox[role="checkbox"], .icen-radio-item[role="radio"], .radio[role="radio"], .icen-radio-card[role="radio"]';
1157
1160
  var seenCheckboxes = /* @__PURE__ */ new WeakSet();
1161
+ function radioPeers(el) {
1162
+ const group = el.closest('[data-icen-radio-group], .icen-radio-group, [role="radiogroup"], .icen-radio-card-grid');
1163
+ return group ? Array.from(group.querySelectorAll('[role="radio"]')).filter(
1164
+ (it) => it.closest('[data-icen-radio-group], .icen-radio-group, [role="radiogroup"], .icen-radio-card-grid') === group
1165
+ ) : [el];
1166
+ }
1158
1167
  function toggleSwitch(el) {
1159
1168
  const checked = el.getAttribute("aria-checked") !== "true";
1160
1169
  el.setAttribute("aria-checked", String(checked));
@@ -1173,11 +1182,7 @@ function toggleCheckbox(el) {
1173
1182
  }
1174
1183
  function selectRadio(el) {
1175
1184
  if (el.getAttribute("aria-checked") === "true") return;
1176
- const group = el.closest('[data-icen-radio-group], .icen-radio-group, [role="radiogroup"], .icen-radio-card-grid');
1177
- const peers = group ? Array.from(group.querySelectorAll('[role="radio"]')).filter(
1178
- (it) => it.closest('[data-icen-radio-group], .icen-radio-group, [role="radiogroup"], .icen-radio-card-grid') === group
1179
- ) : [el];
1180
- for (const it of peers) {
1185
+ for (const it of radioPeers(el)) {
1181
1186
  const on = it === el;
1182
1187
  it.classList.toggle("is-selected", on);
1183
1188
  it.setAttribute("aria-checked", String(on));
@@ -1196,6 +1201,9 @@ function resolveSwitchTarget(t2) {
1196
1201
  const row = t2.closest(".icen-checkbox-row");
1197
1202
  if (row && !t2.closest("button, a, input, select, textarea, [contenteditable]")) {
1198
1203
  const box = row.querySelector('.icen-checkbox[role="checkbox"]');
1204
+ if (row instanceof HTMLLabelElement && (box instanceof HTMLButtonElement || box instanceof HTMLInputElement)) {
1205
+ return null;
1206
+ }
1199
1207
  if (box && !isDisabled(box)) return box;
1200
1208
  }
1201
1209
  return null;
@@ -1205,11 +1213,34 @@ function onSwitchClick(ev) {
1205
1213
  if (el) activateSwitchLike(el);
1206
1214
  }
1207
1215
  function onSwitchKeydown(ev) {
1208
- if (!isActivateKey(ev)) return;
1209
1216
  const t2 = ev.target;
1210
1217
  if (!(t2 instanceof Element)) return;
1211
1218
  const el = t2.closest(SWITCH_LIKE);
1212
1219
  if (!el || isDisabled(el)) return;
1220
+ if (el.getAttribute("role") === "radio") {
1221
+ const key = ev.key;
1222
+ const isRadioNav = key === "ArrowLeft" || key === "ArrowRight" || key === "ArrowUp" || key === "ArrowDown" || key === "Home" || key === "End";
1223
+ const peers = radioPeers(el).filter((it) => !isDisabled(it));
1224
+ const cur = peers.indexOf(el);
1225
+ if (isRadioNav && peers.length > 1 && cur !== -1) {
1226
+ let next;
1227
+ if (key === "Home") next = peers[0];
1228
+ else if (key === "End") next = peers[peers.length - 1];
1229
+ else {
1230
+ const rtl = getComputedStyle(el).direction === "rtl";
1231
+ const forward = key === "ArrowRight" || key === "ArrowDown";
1232
+ const delta = forward ? rtl ? -1 : 1 : rtl ? 1 : -1;
1233
+ next = peers[(cur + delta + peers.length) % peers.length];
1234
+ }
1235
+ if (next) {
1236
+ ev.preventDefault();
1237
+ if (next !== el) selectRadio(next);
1238
+ next.focus({ preventScroll: true });
1239
+ }
1240
+ return;
1241
+ }
1242
+ }
1243
+ if (!isActivateKey(ev)) return;
1213
1244
  ev.preventDefault();
1214
1245
  activateSwitchLike(el);
1215
1246
  }
@@ -21,6 +21,7 @@ var ICEN_LOCALE_ZH_CN = {
21
21
  "aiChat.roleTool": "\u5DE5",
22
22
  "aiChat.roleUser": "\u6211",
23
23
  "aiChat.thinking": "\u601D\u8003 {p0}",
24
+ "aiChat.thinkingNow": "\u6B63\u5728\u601D\u8003\u2026",
24
25
  /* ── aiComposer ── */
25
26
  "aiComposer.attachAgent": "\u4EE3\u7406",
26
27
  "aiComposer.library": "\u6DFB\u52A0\u4E0A\u4E0B\u6587\u4E0E\u547D\u4EE4",
@@ -1,6 +1,6 @@
1
- import { ContextMenuItem } from './context-menu.js';
2
- import './icons.js';
3
- import './popover.js';
1
+ import { ContextMenuItem } from './context-menu.mjs';
2
+ import './icons.mjs';
3
+ import './popover.mjs';
4
4
 
5
5
  type TableFrozenSide = 'left' | 'right';
6
6
  /** 行分组聚合器:内置五种 + 自定义函数(收数字数组,返回展示串) */