@seanyeh77/ui 0.44.0 → 0.45.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 (868) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/bundle.js +20 -20
  4. package/dist/components/AccentPicker/AccentPicker.d.ts +1 -0
  5. package/dist/components/AccentPicker/AccentPicker.js +92 -72
  6. package/dist/components/AccentPicker/AccentPicker.js.map +1 -1
  7. package/dist/components/ActionBar/ActionBar.d.ts +2 -0
  8. package/dist/components/ActionBar/ActionBar.js.map +1 -1
  9. package/dist/components/AiMark/AiMark.d.ts +1 -0
  10. package/dist/components/AiMark/AiMark.js.map +1 -1
  11. package/dist/components/Alert/Alert.d.ts +5 -2
  12. package/dist/components/Alert/Alert.js +17 -14
  13. package/dist/components/Alert/Alert.js.map +1 -1
  14. package/dist/components/AppShell/AppShell.d.ts +10 -4
  15. package/dist/components/AppShell/AppShell.js +30 -19
  16. package/dist/components/AppShell/AppShell.js.map +1 -1
  17. package/dist/components/Badge/Badge.d.ts +24 -7
  18. package/dist/components/Badge/Badge.js +78 -21
  19. package/dist/components/Badge/Badge.js.map +1 -1
  20. package/dist/components/BarChart/BarChart.d.ts +14 -1
  21. package/dist/components/BarChart/BarChart.js +88 -59
  22. package/dist/components/BarChart/BarChart.js.map +1 -1
  23. package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -0
  24. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  25. package/dist/components/Button/Button.d.ts +4 -1
  26. package/dist/components/Button/Button.js +17 -3
  27. package/dist/components/Button/Button.js.map +1 -1
  28. package/dist/components/Calendar/Calendar.d.ts +11 -2
  29. package/dist/components/Calendar/Calendar.js +16 -5
  30. package/dist/components/Calendar/Calendar.js.map +1 -1
  31. package/dist/components/Card/Card.d.ts +1 -0
  32. package/dist/components/Card/Card.js.map +1 -1
  33. package/dist/components/Checkbox/Checkbox.d.ts +24 -8
  34. package/dist/components/Checkbox/Checkbox.js +22 -9
  35. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  36. package/dist/components/CodeView/CodeView.d.ts +3 -0
  37. package/dist/components/CodeView/CodeView.js +6 -6
  38. package/dist/components/CodeView/CodeView.js.map +1 -1
  39. package/dist/components/CommandPalette/CommandPalette.d.ts +16 -4
  40. package/dist/components/CommandPalette/CommandPalette.js +38 -11
  41. package/dist/components/CommandPalette/CommandPalette.js.map +1 -1
  42. package/dist/components/ConsoleLayout/ConsoleLayout.d.ts +2 -3
  43. package/dist/components/ConsoleLayout/ConsoleLayout.js +4 -1
  44. package/dist/components/ConsoleLayout/ConsoleLayout.js.map +1 -1
  45. package/dist/components/DangerZone/DangerZone.d.ts +2 -1
  46. package/dist/components/DangerZone/DangerZone.js +1 -1
  47. package/dist/components/DangerZone/DangerZone.js.map +1 -1
  48. package/dist/components/DataTable/DataTable.d.ts +8 -1
  49. package/dist/components/DataTable/DataTable.js +213 -167
  50. package/dist/components/DataTable/DataTable.js.map +1 -1
  51. package/dist/components/DataTable/SortButton.js +48 -5
  52. package/dist/components/DataTable/SortButton.js.map +1 -1
  53. package/dist/components/DataTable/filters.js +2 -1
  54. package/dist/components/DataTable/filters.js.map +1 -1
  55. package/dist/components/DataTable/parts.js +1 -1
  56. package/dist/components/DataTable/parts.js.map +1 -1
  57. package/dist/components/DataTable/types.d.ts +10 -3
  58. package/dist/components/DatePicker/DatePicker.d.ts +7 -5
  59. package/dist/components/DatePicker/DatePicker.js +16 -6
  60. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  61. package/dist/components/DateRangePicker/DateRangePicker.d.ts +12 -7
  62. package/dist/components/DateRangePicker/DateRangePicker.js +81 -45
  63. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  64. package/dist/components/DetailList/DetailList.d.ts +2 -0
  65. package/dist/components/DetailList/DetailList.js.map +1 -1
  66. package/dist/components/Dialog/Dialog.d.ts +56 -20
  67. package/dist/components/Dialog/Dialog.js +45 -14
  68. package/dist/components/Dialog/Dialog.js.map +1 -1
  69. package/dist/components/Drawer/Drawer.d.ts +17 -5
  70. package/dist/components/Drawer/Drawer.js +86 -24
  71. package/dist/components/Drawer/Drawer.js.map +1 -1
  72. package/dist/components/ErrorPage/ErrorPage.d.ts +3 -0
  73. package/dist/components/ErrorPage/ErrorPage.js.map +1 -1
  74. package/dist/components/EventTimeline/EventTimeline.d.ts +22 -4
  75. package/dist/components/EventTimeline/EventTimeline.js +63 -20
  76. package/dist/components/EventTimeline/EventTimeline.js.map +1 -1
  77. package/dist/components/FileUpload/FileUpload.d.ts +9 -1
  78. package/dist/components/FileUpload/FileUpload.js +3 -1
  79. package/dist/components/FileUpload/FileUpload.js.map +1 -1
  80. package/dist/components/FormGrid/FormGrid.d.ts +3 -1
  81. package/dist/components/FormGrid/FormGrid.js +5 -2
  82. package/dist/components/FormGrid/FormGrid.js.map +1 -1
  83. package/dist/components/Graph/Graph.d.ts +1 -0
  84. package/dist/components/Graph/Graph.js +8 -4
  85. package/dist/components/Graph/Graph.js.map +1 -1
  86. package/dist/components/Grid/Grid.d.ts +11 -4
  87. package/dist/components/Grid/Grid.js +14 -2
  88. package/dist/components/Grid/Grid.js.map +1 -1
  89. package/dist/components/IconButton/IconButton.d.ts +2 -1
  90. package/dist/components/IconButton/IconButton.js +10 -1
  91. package/dist/components/IconButton/IconButton.js.map +1 -1
  92. package/dist/components/InlineCode/InlineCode.d.ts +6 -0
  93. package/dist/components/InlineCode/InlineCode.js.map +1 -1
  94. package/dist/components/KpiCard/KpiCard.d.ts +5 -1
  95. package/dist/components/KpiCard/KpiCard.js +35 -21
  96. package/dist/components/KpiCard/KpiCard.js.map +1 -1
  97. package/dist/components/LayerGraph/LayerGraph.d.ts +68 -23
  98. package/dist/components/LayerGraph/LayerGraph.js +159 -88
  99. package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
  100. package/dist/components/LineChart/LineChart.d.ts +10 -3
  101. package/dist/components/LineChart/LineChart.js +55 -23
  102. package/dist/components/LineChart/LineChart.js.map +1 -1
  103. package/dist/components/Link/Link.d.ts +17 -0
  104. package/dist/components/Link/Link.js +47 -0
  105. package/dist/components/Link/Link.js.map +1 -0
  106. package/dist/components/LoadingBar/LoadingBar.d.ts +1 -0
  107. package/dist/components/LoadingBar/LoadingBar.js.map +1 -1
  108. package/dist/components/LoginCard/LoginCard.d.ts +9 -3
  109. package/dist/components/LoginCard/LoginCard.js +99 -78
  110. package/dist/components/LoginCard/LoginCard.js.map +1 -1
  111. package/dist/components/Markdown/Markdown.d.ts +1 -0
  112. package/dist/components/Markdown/Markdown.js +1 -1
  113. package/dist/components/Markdown/Markdown.js.map +1 -1
  114. package/dist/components/Menu/Menu.d.ts +4 -2
  115. package/dist/components/Menu/Menu.js +43 -33
  116. package/dist/components/Menu/Menu.js.map +1 -1
  117. package/dist/components/Meter/Meter.d.ts +4 -0
  118. package/dist/components/Meter/Meter.js.map +1 -1
  119. package/dist/components/MobileTabBar/MobileTabBar.d.ts +3 -0
  120. package/dist/components/MobileTabBar/MobileTabBar.js.map +1 -1
  121. package/dist/components/MultiSelect/MultiSelect.d.ts +7 -6
  122. package/dist/components/MultiSelect/MultiSelect.js +27 -9
  123. package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
  124. package/dist/components/NotificationBell/NotificationBell.d.ts +3 -0
  125. package/dist/components/NotificationBell/NotificationBell.js +2 -2
  126. package/dist/components/NotificationBell/NotificationBell.js.map +1 -1
  127. package/dist/components/PageHeader/PageHeader.d.ts +34 -0
  128. package/dist/components/PageHeader/PageHeader.js +68 -0
  129. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  130. package/dist/components/Popover/Popover.d.ts +11 -4
  131. package/dist/components/Popover/Popover.js +17 -7
  132. package/dist/components/Popover/Popover.js.map +1 -1
  133. package/dist/components/ProgressBar/ProgressBar.d.ts +2 -0
  134. package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
  135. package/dist/components/ProgressRing/ProgressRing.d.ts +1 -0
  136. package/dist/components/ProgressRing/ProgressRing.js.map +1 -1
  137. package/dist/components/ProjectSwitcher/ProjectSwitcher.d.ts +5 -1
  138. package/dist/components/ProjectSwitcher/ProjectSwitcher.js +16 -3
  139. package/dist/components/ProjectSwitcher/ProjectSwitcher.js.map +1 -1
  140. package/dist/components/RadioGroup/RadioGroup.d.ts +22 -5
  141. package/dist/components/RadioGroup/RadioGroup.js +48 -47
  142. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  143. package/dist/components/RelativeTime/RelativeTime.d.ts +10 -0
  144. package/dist/components/RelativeTime/RelativeTime.js +44 -0
  145. package/dist/components/RelativeTime/RelativeTime.js.map +1 -0
  146. package/dist/components/SearchField/SearchField.d.ts +2 -0
  147. package/dist/components/SearchField/SearchField.js.map +1 -1
  148. package/dist/components/Section/Section.d.ts +4 -0
  149. package/dist/components/Section/Section.js +8 -22
  150. package/dist/components/Section/Section.js.map +1 -1
  151. package/dist/components/SegmentedControl/SegmentedControl.d.ts +22 -9
  152. package/dist/components/SegmentedControl/SegmentedControl.js +20 -19
  153. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  154. package/dist/components/Select/Select.d.ts +7 -11
  155. package/dist/components/Select/Select.js +7 -3
  156. package/dist/components/Select/Select.js.map +1 -1
  157. package/dist/components/SettingsLayout/SettingsLayout.d.ts +32 -3
  158. package/dist/components/SettingsLayout/SettingsLayout.js +60 -13
  159. package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
  160. package/dist/components/SideNav/SideNav.d.ts +2 -0
  161. package/dist/components/SideNav/SideNav.js +3 -3
  162. package/dist/components/SideNav/SideNav.js.map +1 -1
  163. package/dist/components/SplitPane/SplitPane.d.ts +1 -0
  164. package/dist/components/SplitPane/SplitPane.js.map +1 -1
  165. package/dist/components/StatusBand/StatusBand.d.ts +1 -0
  166. package/dist/components/StatusBand/StatusBand.js.map +1 -1
  167. package/dist/components/Suggestion/Suggestion.d.ts +6 -0
  168. package/dist/components/Suggestion/Suggestion.js.map +1 -1
  169. package/dist/components/Switch/Switch.d.ts +13 -3
  170. package/dist/components/Switch/Switch.js +16 -7
  171. package/dist/components/Switch/Switch.js.map +1 -1
  172. package/dist/components/Tabs/Tabs.d.ts +4 -0
  173. package/dist/components/Tabs/Tabs.js +1 -1
  174. package/dist/components/Tabs/Tabs.js.map +1 -1
  175. package/dist/components/Tag/Tag.d.ts +15 -7
  176. package/dist/components/Tag/Tag.js +22 -10
  177. package/dist/components/Tag/Tag.js.map +1 -1
  178. package/dist/components/Term/Term.d.ts +8 -3
  179. package/dist/components/Term/Term.js +1 -1
  180. package/dist/components/Term/Term.js.map +1 -1
  181. package/dist/components/TextArea/TextArea.d.ts +6 -10
  182. package/dist/components/TextArea/TextArea.js +22 -10
  183. package/dist/components/TextArea/TextArea.js.map +1 -1
  184. package/dist/components/TextField/TextField.d.ts +8 -11
  185. package/dist/components/TextField/TextField.js +9 -7
  186. package/dist/components/TextField/TextField.js.map +1 -1
  187. package/dist/components/ThemePicker/ThemePicker.d.ts +1 -0
  188. package/dist/components/ThemePicker/ThemePicker.js +35 -34
  189. package/dist/components/ThemePicker/ThemePicker.js.map +1 -1
  190. package/dist/components/TimeControl/TimeControl.d.ts +1 -0
  191. package/dist/components/TimeControl/TimeControl.js.map +1 -1
  192. package/dist/components/Toast/Toast.d.ts +55 -2
  193. package/dist/components/Toast/Toast.js +190 -8
  194. package/dist/components/Toast/Toast.js.map +1 -1
  195. package/dist/components/TopBar/TopBar.d.ts +6 -2
  196. package/dist/components/TopBar/TopBar.js +7 -1
  197. package/dist/components/TopBar/TopBar.js.map +1 -1
  198. package/dist/components/Tour/Tour.d.ts +14 -3
  199. package/dist/components/Tour/Tour.js +26 -14
  200. package/dist/components/Tour/Tour.js.map +1 -1
  201. package/dist/components/TreeList/TreeList.d.ts +28 -4
  202. package/dist/components/TreeList/TreeList.js +32 -20
  203. package/dist/components/TreeList/TreeList.js.map +1 -1
  204. package/dist/components/Workbench/Workbench.d.ts +1 -0
  205. package/dist/components/Workbench/Workbench.js +24 -12
  206. package/dist/components/Workbench/Workbench.js.map +1 -1
  207. package/dist/components/ZoneMap/ZoneMap.d.ts +12 -2
  208. package/dist/components/ZoneMap/ZoneMap.js +13 -5
  209. package/dist/components/ZoneMap/ZoneMap.js.map +1 -1
  210. package/dist/components/useFormErrors/useFormErrors.d.ts +20 -0
  211. package/dist/components/useFormErrors/useFormErrors.js +55 -0
  212. package/dist/components/useFormErrors/useFormErrors.js.map +1 -0
  213. package/dist/css/AccentPicker.css +1 -0
  214. package/dist/css/Alert.css +7 -19
  215. package/dist/css/AppShell.css +1 -0
  216. package/dist/css/Badge.css +19 -45
  217. package/dist/css/BarChart.css +21 -3
  218. package/dist/css/Button.css +5 -1
  219. package/dist/css/Card.css +8 -8
  220. package/dist/css/Checkbox.css +19 -0
  221. package/dist/css/CodeView.css +2 -1
  222. package/dist/css/DangerZone.css +4 -3
  223. package/dist/css/DataTable.css +129 -34
  224. package/dist/css/DateRangePicker.css +23 -2
  225. package/dist/css/Drawer.css +30 -0
  226. package/dist/css/ErrorPage.css +3 -1
  227. package/dist/css/EventTimeline.css +33 -5
  228. package/dist/css/FormGrid.css +12 -3
  229. package/dist/css/Graph.css +9 -1
  230. package/dist/css/Grid.css +8 -0
  231. package/dist/css/KpiCard.css +12 -1
  232. package/dist/css/LayerGraph.css +40 -15
  233. package/dist/css/Link.css +23 -0
  234. package/dist/css/LoginCard.css +16 -11
  235. package/dist/css/Markdown.css +2 -1
  236. package/dist/css/Menu.css +0 -2
  237. package/dist/css/Meter.css +16 -0
  238. package/dist/css/PageHeader.css +50 -0
  239. package/dist/css/ProgressBar.css +12 -0
  240. package/dist/css/ProjectSwitcher.css +23 -26
  241. package/dist/css/RelativeTime.css +2 -0
  242. package/dist/css/SegmentedControl.css +38 -10
  243. package/dist/css/SettingsLayout.css +28 -8
  244. package/dist/css/SideNav.css +4 -1
  245. package/dist/css/Skeleton.css +22 -1
  246. package/dist/css/Switch.css +27 -0
  247. package/dist/css/Tabs.css +2 -1
  248. package/dist/css/Tag.css +19 -12
  249. package/dist/css/Toast.css +100 -4
  250. package/dist/css/TopBar.css +21 -2
  251. package/dist/css/TreeList.css +6 -3
  252. package/dist/css/Workbench.css +1 -1
  253. package/dist/css/ZoneMap.css +0 -1
  254. package/dist/css/base.css +45 -0
  255. package/dist/css/end.css +119 -5
  256. package/dist/deprecated.d.ts +3 -0
  257. package/dist/deprecated.js +13 -0
  258. package/dist/deprecated.js.map +1 -0
  259. package/dist/fonts.css +2 -7543
  260. package/dist/format.d.ts +3 -1
  261. package/dist/format.js +12 -4
  262. package/dist/format.js.map +1 -1
  263. package/dist/generated/themeDefaults.d.ts +8 -0
  264. package/dist/generated/themeDefaults.js +35 -0
  265. package/dist/generated/themeDefaults.js.map +1 -0
  266. package/dist/i18n.d.ts +7 -2
  267. package/dist/i18n.js +65 -10
  268. package/dist/i18n.js.map +1 -1
  269. package/dist/icons/Icon.d.ts +3 -1
  270. package/dist/icons/Icon.js.map +1 -1
  271. package/dist/index.d.ts +23 -14
  272. package/dist/index.js +14 -8
  273. package/dist/internal/Field.d.ts +19 -0
  274. package/dist/internal/Field.js +10 -4
  275. package/dist/internal/Field.js.map +1 -1
  276. package/dist/internal/FloatingPanel.js +2 -1
  277. package/dist/internal/FloatingPanel.js.map +1 -1
  278. package/dist/internal/chart.d.ts +4 -0
  279. package/dist/internal/chart.js +89 -19
  280. package/dist/internal/chart.js.map +1 -1
  281. package/dist/internal/dev.js +9 -4
  282. package/dist/internal/dev.js.map +1 -1
  283. package/dist/internal/focus.js +27 -3
  284. package/dist/internal/focus.js.map +1 -1
  285. package/dist/internal/focusMain.js +6 -2
  286. package/dist/internal/focusMain.js.map +1 -1
  287. package/dist/internal/open.d.ts +14 -0
  288. package/dist/internal/open.js +28 -0
  289. package/dist/internal/open.js.map +1 -0
  290. package/dist/internal/roving.js +37 -0
  291. package/dist/internal/roving.js.map +1 -0
  292. package/dist/internal/shell.js +12 -0
  293. package/dist/internal/shell.js.map +1 -0
  294. package/dist/internal/stored.js +89 -0
  295. package/dist/internal/stored.js.map +1 -0
  296. package/dist/internal/tableTools.js +46 -4
  297. package/dist/internal/tableTools.js.map +1 -1
  298. package/dist/internal/util.js +8 -17
  299. package/dist/internal/util.js.map +1 -1
  300. package/dist/locale.d.ts +17 -0
  301. package/dist/locale.js +29 -0
  302. package/dist/locale.js.map +1 -0
  303. package/dist/styles.css +944 -231
  304. package/dist/theme.d.ts +23 -5
  305. package/dist/theme.js +85 -25
  306. package/dist/theme.js.map +1 -1
  307. package/dist/tokens.css +3 -0
  308. package/docs/AccentPicker.md +3 -1
  309. package/docs/Alert.md +4 -4
  310. package/docs/AppShell.md +11 -10
  311. package/docs/Badge.md +26 -16
  312. package/docs/BarChart.md +7 -4
  313. package/docs/Button.md +4 -5
  314. package/docs/Calendar.md +2 -2
  315. package/docs/Card.md +8 -7
  316. package/docs/Checkbox.md +4 -1
  317. package/docs/CodeView.md +30 -43
  318. package/docs/CommandPalette.md +3 -2
  319. package/docs/ConsoleLayout.md +5 -5
  320. package/docs/DangerZone.md +3 -3
  321. package/docs/DataColors.md +2 -2
  322. package/docs/DataTable.md +26 -148
  323. package/docs/DatePicker.md +1 -1
  324. package/docs/DateRangePicker.md +3 -0
  325. package/docs/DetailList.md +9 -9
  326. package/docs/Dialog.md +8 -5
  327. package/docs/Drawer.md +7 -5
  328. package/docs/EmptyState.md +0 -1
  329. package/docs/ErrorPage.md +1 -2
  330. package/docs/EventTimeline.md +23 -13
  331. package/docs/FileUpload.md +1 -2
  332. package/docs/FormGrid.md +2 -1
  333. package/docs/Format.md +4 -2
  334. package/docs/Graph.md +1 -1
  335. package/docs/Grid.md +5 -1
  336. package/docs/KpiCard.md +6 -5
  337. package/docs/LayerGraph.md +18 -53
  338. package/docs/LineChart.md +5 -3
  339. package/docs/Link.md +22 -0
  340. package/docs/LoginCard.md +7 -4
  341. package/docs/Markdown.md +2 -15
  342. package/docs/Menu.md +2 -0
  343. package/docs/Meter.md +1 -0
  344. package/docs/MultiSelect.md +2 -2
  345. package/docs/NotificationBell.md +1 -1
  346. package/docs/PageHeader.md +34 -0
  347. package/docs/Popover.md +3 -1
  348. package/docs/ProgressBar.md +3 -1
  349. package/docs/ProjectSwitcher.md +14 -14
  350. package/docs/RadioGroup.md +2 -0
  351. package/docs/RelativeTime.md +23 -0
  352. package/docs/Section.md +1 -1
  353. package/docs/SegmentedControl.md +9 -6
  354. package/docs/Select.md +2 -2
  355. package/docs/SettingsLayout.md +19 -5
  356. package/docs/SideNav.md +1 -1
  357. package/docs/Skeleton.md +2 -1
  358. package/docs/Switch.md +3 -1
  359. package/docs/Tabs.md +2 -1
  360. package/docs/Tag.md +9 -7
  361. package/docs/Term.md +3 -4
  362. package/docs/TextArea.md +2 -2
  363. package/docs/TextField.md +5 -4
  364. package/docs/ThemePicker.md +3 -1
  365. package/docs/Toast.md +17 -6
  366. package/docs/TopBar.md +8 -5
  367. package/docs/Tour.md +3 -2
  368. package/docs/TreeList.md +10 -37
  369. package/docs/Workbench.md +1 -48
  370. package/docs/ZoneMap.md +5 -5
  371. package/docs/agents.md +82 -0
  372. package/docs/code.md +2 -2
  373. package/docs/components.json +314 -0
  374. package/docs/data.md +9 -19
  375. package/docs/forms.md +6 -5
  376. package/docs/guidelines.md +39 -31
  377. package/docs/icons.md +9 -0
  378. package/docs/layout.md +16 -20
  379. package/docs/motion.md +31 -56
  380. package/docs/theme.md +15 -18
  381. package/docs/useFormErrors.md +35 -0
  382. package/package.json +8 -7
  383. package/dist/bundle.js.map +0 -1
  384. package/dist/fonts/LICENSE-OFL.txt +0 -93
  385. package/dist/fonts/geist-mono-cyrillic-400-normal.woff2 +0 -0
  386. package/dist/fonts/geist-mono-cyrillic-500-normal.woff2 +0 -0
  387. package/dist/fonts/geist-mono-cyrillic-600-normal.woff2 +0 -0
  388. package/dist/fonts/geist-mono-cyrillic-700-normal.woff2 +0 -0
  389. package/dist/fonts/geist-mono-cyrillic-ext-400-normal.woff2 +0 -0
  390. package/dist/fonts/geist-mono-cyrillic-ext-500-normal.woff2 +0 -0
  391. package/dist/fonts/geist-mono-cyrillic-ext-600-normal.woff2 +0 -0
  392. package/dist/fonts/geist-mono-cyrillic-ext-700-normal.woff2 +0 -0
  393. package/dist/fonts/geist-mono-latin-400-normal.woff2 +0 -0
  394. package/dist/fonts/geist-mono-latin-500-normal.woff2 +0 -0
  395. package/dist/fonts/geist-mono-latin-600-normal.woff2 +0 -0
  396. package/dist/fonts/geist-mono-latin-700-normal.woff2 +0 -0
  397. package/dist/fonts/geist-mono-latin-ext-400-normal.woff2 +0 -0
  398. package/dist/fonts/geist-mono-latin-ext-500-normal.woff2 +0 -0
  399. package/dist/fonts/geist-mono-latin-ext-600-normal.woff2 +0 -0
  400. package/dist/fonts/geist-mono-latin-ext-700-normal.woff2 +0 -0
  401. package/dist/fonts/geist-mono-symbols2-400-normal.woff2 +0 -0
  402. package/dist/fonts/geist-mono-symbols2-500-normal.woff2 +0 -0
  403. package/dist/fonts/geist-mono-symbols2-600-normal.woff2 +0 -0
  404. package/dist/fonts/geist-mono-symbols2-700-normal.woff2 +0 -0
  405. package/dist/fonts/geist-mono-vietnamese-400-normal.woff2 +0 -0
  406. package/dist/fonts/geist-mono-vietnamese-500-normal.woff2 +0 -0
  407. package/dist/fonts/geist-mono-vietnamese-600-normal.woff2 +0 -0
  408. package/dist/fonts/geist-mono-vietnamese-700-normal.woff2 +0 -0
  409. package/dist/fonts/inter-cyrillic-400-normal.woff2 +0 -0
  410. package/dist/fonts/inter-cyrillic-500-normal.woff2 +0 -0
  411. package/dist/fonts/inter-cyrillic-600-normal.woff2 +0 -0
  412. package/dist/fonts/inter-cyrillic-700-normal.woff2 +0 -0
  413. package/dist/fonts/inter-cyrillic-ext-400-normal.woff2 +0 -0
  414. package/dist/fonts/inter-cyrillic-ext-500-normal.woff2 +0 -0
  415. package/dist/fonts/inter-cyrillic-ext-600-normal.woff2 +0 -0
  416. package/dist/fonts/inter-cyrillic-ext-700-normal.woff2 +0 -0
  417. package/dist/fonts/inter-greek-400-normal.woff2 +0 -0
  418. package/dist/fonts/inter-greek-500-normal.woff2 +0 -0
  419. package/dist/fonts/inter-greek-600-normal.woff2 +0 -0
  420. package/dist/fonts/inter-greek-700-normal.woff2 +0 -0
  421. package/dist/fonts/inter-greek-ext-400-normal.woff2 +0 -0
  422. package/dist/fonts/inter-greek-ext-500-normal.woff2 +0 -0
  423. package/dist/fonts/inter-greek-ext-600-normal.woff2 +0 -0
  424. package/dist/fonts/inter-greek-ext-700-normal.woff2 +0 -0
  425. package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
  426. package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
  427. package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
  428. package/dist/fonts/inter-latin-700-normal.woff2 +0 -0
  429. package/dist/fonts/inter-latin-ext-400-normal.woff2 +0 -0
  430. package/dist/fonts/inter-latin-ext-500-normal.woff2 +0 -0
  431. package/dist/fonts/inter-latin-ext-600-normal.woff2 +0 -0
  432. package/dist/fonts/inter-latin-ext-700-normal.woff2 +0 -0
  433. package/dist/fonts/inter-vietnamese-400-normal.woff2 +0 -0
  434. package/dist/fonts/inter-vietnamese-500-normal.woff2 +0 -0
  435. package/dist/fonts/inter-vietnamese-600-normal.woff2 +0 -0
  436. package/dist/fonts/inter-vietnamese-700-normal.woff2 +0 -0
  437. package/dist/fonts/noto-sans-tc-0-400-normal.woff2 +0 -0
  438. package/dist/fonts/noto-sans-tc-0-500-normal.woff2 +0 -0
  439. package/dist/fonts/noto-sans-tc-0-600-normal.woff2 +0 -0
  440. package/dist/fonts/noto-sans-tc-0-700-normal.woff2 +0 -0
  441. package/dist/fonts/noto-sans-tc-1-400-normal.woff2 +0 -0
  442. package/dist/fonts/noto-sans-tc-1-500-normal.woff2 +0 -0
  443. package/dist/fonts/noto-sans-tc-1-600-normal.woff2 +0 -0
  444. package/dist/fonts/noto-sans-tc-1-700-normal.woff2 +0 -0
  445. package/dist/fonts/noto-sans-tc-10-400-normal.woff2 +0 -0
  446. package/dist/fonts/noto-sans-tc-10-500-normal.woff2 +0 -0
  447. package/dist/fonts/noto-sans-tc-10-600-normal.woff2 +0 -0
  448. package/dist/fonts/noto-sans-tc-10-700-normal.woff2 +0 -0
  449. package/dist/fonts/noto-sans-tc-101-400-normal.woff2 +0 -0
  450. package/dist/fonts/noto-sans-tc-101-500-normal.woff2 +0 -0
  451. package/dist/fonts/noto-sans-tc-101-600-normal.woff2 +0 -0
  452. package/dist/fonts/noto-sans-tc-101-700-normal.woff2 +0 -0
  453. package/dist/fonts/noto-sans-tc-102-400-normal.woff2 +0 -0
  454. package/dist/fonts/noto-sans-tc-102-500-normal.woff2 +0 -0
  455. package/dist/fonts/noto-sans-tc-102-600-normal.woff2 +0 -0
  456. package/dist/fonts/noto-sans-tc-102-700-normal.woff2 +0 -0
  457. package/dist/fonts/noto-sans-tc-103-400-normal.woff2 +0 -0
  458. package/dist/fonts/noto-sans-tc-103-500-normal.woff2 +0 -0
  459. package/dist/fonts/noto-sans-tc-103-600-normal.woff2 +0 -0
  460. package/dist/fonts/noto-sans-tc-103-700-normal.woff2 +0 -0
  461. package/dist/fonts/noto-sans-tc-104-400-normal.woff2 +0 -0
  462. package/dist/fonts/noto-sans-tc-104-500-normal.woff2 +0 -0
  463. package/dist/fonts/noto-sans-tc-104-600-normal.woff2 +0 -0
  464. package/dist/fonts/noto-sans-tc-104-700-normal.woff2 +0 -0
  465. package/dist/fonts/noto-sans-tc-105-400-normal.woff2 +0 -0
  466. package/dist/fonts/noto-sans-tc-105-500-normal.woff2 +0 -0
  467. package/dist/fonts/noto-sans-tc-105-600-normal.woff2 +0 -0
  468. package/dist/fonts/noto-sans-tc-105-700-normal.woff2 +0 -0
  469. package/dist/fonts/noto-sans-tc-106-400-normal.woff2 +0 -0
  470. package/dist/fonts/noto-sans-tc-106-500-normal.woff2 +0 -0
  471. package/dist/fonts/noto-sans-tc-106-600-normal.woff2 +0 -0
  472. package/dist/fonts/noto-sans-tc-106-700-normal.woff2 +0 -0
  473. package/dist/fonts/noto-sans-tc-107-400-normal.woff2 +0 -0
  474. package/dist/fonts/noto-sans-tc-107-500-normal.woff2 +0 -0
  475. package/dist/fonts/noto-sans-tc-107-600-normal.woff2 +0 -0
  476. package/dist/fonts/noto-sans-tc-107-700-normal.woff2 +0 -0
  477. package/dist/fonts/noto-sans-tc-108-400-normal.woff2 +0 -0
  478. package/dist/fonts/noto-sans-tc-108-500-normal.woff2 +0 -0
  479. package/dist/fonts/noto-sans-tc-108-600-normal.woff2 +0 -0
  480. package/dist/fonts/noto-sans-tc-108-700-normal.woff2 +0 -0
  481. package/dist/fonts/noto-sans-tc-109-400-normal.woff2 +0 -0
  482. package/dist/fonts/noto-sans-tc-109-500-normal.woff2 +0 -0
  483. package/dist/fonts/noto-sans-tc-109-600-normal.woff2 +0 -0
  484. package/dist/fonts/noto-sans-tc-109-700-normal.woff2 +0 -0
  485. package/dist/fonts/noto-sans-tc-11-400-normal.woff2 +0 -0
  486. package/dist/fonts/noto-sans-tc-11-500-normal.woff2 +0 -0
  487. package/dist/fonts/noto-sans-tc-11-600-normal.woff2 +0 -0
  488. package/dist/fonts/noto-sans-tc-11-700-normal.woff2 +0 -0
  489. package/dist/fonts/noto-sans-tc-110-400-normal.woff2 +0 -0
  490. package/dist/fonts/noto-sans-tc-110-500-normal.woff2 +0 -0
  491. package/dist/fonts/noto-sans-tc-110-600-normal.woff2 +0 -0
  492. package/dist/fonts/noto-sans-tc-110-700-normal.woff2 +0 -0
  493. package/dist/fonts/noto-sans-tc-111-400-normal.woff2 +0 -0
  494. package/dist/fonts/noto-sans-tc-111-500-normal.woff2 +0 -0
  495. package/dist/fonts/noto-sans-tc-111-600-normal.woff2 +0 -0
  496. package/dist/fonts/noto-sans-tc-111-700-normal.woff2 +0 -0
  497. package/dist/fonts/noto-sans-tc-112-400-normal.woff2 +0 -0
  498. package/dist/fonts/noto-sans-tc-112-500-normal.woff2 +0 -0
  499. package/dist/fonts/noto-sans-tc-112-600-normal.woff2 +0 -0
  500. package/dist/fonts/noto-sans-tc-112-700-normal.woff2 +0 -0
  501. package/dist/fonts/noto-sans-tc-113-400-normal.woff2 +0 -0
  502. package/dist/fonts/noto-sans-tc-113-500-normal.woff2 +0 -0
  503. package/dist/fonts/noto-sans-tc-113-600-normal.woff2 +0 -0
  504. package/dist/fonts/noto-sans-tc-113-700-normal.woff2 +0 -0
  505. package/dist/fonts/noto-sans-tc-114-400-normal.woff2 +0 -0
  506. package/dist/fonts/noto-sans-tc-114-500-normal.woff2 +0 -0
  507. package/dist/fonts/noto-sans-tc-114-600-normal.woff2 +0 -0
  508. package/dist/fonts/noto-sans-tc-114-700-normal.woff2 +0 -0
  509. package/dist/fonts/noto-sans-tc-115-400-normal.woff2 +0 -0
  510. package/dist/fonts/noto-sans-tc-115-500-normal.woff2 +0 -0
  511. package/dist/fonts/noto-sans-tc-115-600-normal.woff2 +0 -0
  512. package/dist/fonts/noto-sans-tc-115-700-normal.woff2 +0 -0
  513. package/dist/fonts/noto-sans-tc-116-400-normal.woff2 +0 -0
  514. package/dist/fonts/noto-sans-tc-116-500-normal.woff2 +0 -0
  515. package/dist/fonts/noto-sans-tc-116-600-normal.woff2 +0 -0
  516. package/dist/fonts/noto-sans-tc-116-700-normal.woff2 +0 -0
  517. package/dist/fonts/noto-sans-tc-117-400-normal.woff2 +0 -0
  518. package/dist/fonts/noto-sans-tc-117-500-normal.woff2 +0 -0
  519. package/dist/fonts/noto-sans-tc-117-600-normal.woff2 +0 -0
  520. package/dist/fonts/noto-sans-tc-117-700-normal.woff2 +0 -0
  521. package/dist/fonts/noto-sans-tc-118-400-normal.woff2 +0 -0
  522. package/dist/fonts/noto-sans-tc-118-500-normal.woff2 +0 -0
  523. package/dist/fonts/noto-sans-tc-118-600-normal.woff2 +0 -0
  524. package/dist/fonts/noto-sans-tc-118-700-normal.woff2 +0 -0
  525. package/dist/fonts/noto-sans-tc-119-400-normal.woff2 +0 -0
  526. package/dist/fonts/noto-sans-tc-119-500-normal.woff2 +0 -0
  527. package/dist/fonts/noto-sans-tc-119-600-normal.woff2 +0 -0
  528. package/dist/fonts/noto-sans-tc-119-700-normal.woff2 +0 -0
  529. package/dist/fonts/noto-sans-tc-12-400-normal.woff2 +0 -0
  530. package/dist/fonts/noto-sans-tc-12-500-normal.woff2 +0 -0
  531. package/dist/fonts/noto-sans-tc-12-600-normal.woff2 +0 -0
  532. package/dist/fonts/noto-sans-tc-12-700-normal.woff2 +0 -0
  533. package/dist/fonts/noto-sans-tc-120-400-normal.woff2 +0 -0
  534. package/dist/fonts/noto-sans-tc-120-500-normal.woff2 +0 -0
  535. package/dist/fonts/noto-sans-tc-120-600-normal.woff2 +0 -0
  536. package/dist/fonts/noto-sans-tc-120-700-normal.woff2 +0 -0
  537. package/dist/fonts/noto-sans-tc-121-400-normal.woff2 +0 -0
  538. package/dist/fonts/noto-sans-tc-121-500-normal.woff2 +0 -0
  539. package/dist/fonts/noto-sans-tc-121-600-normal.woff2 +0 -0
  540. package/dist/fonts/noto-sans-tc-121-700-normal.woff2 +0 -0
  541. package/dist/fonts/noto-sans-tc-122-400-normal.woff2 +0 -0
  542. package/dist/fonts/noto-sans-tc-122-500-normal.woff2 +0 -0
  543. package/dist/fonts/noto-sans-tc-122-600-normal.woff2 +0 -0
  544. package/dist/fonts/noto-sans-tc-122-700-normal.woff2 +0 -0
  545. package/dist/fonts/noto-sans-tc-123-400-normal.woff2 +0 -0
  546. package/dist/fonts/noto-sans-tc-123-500-normal.woff2 +0 -0
  547. package/dist/fonts/noto-sans-tc-123-600-normal.woff2 +0 -0
  548. package/dist/fonts/noto-sans-tc-123-700-normal.woff2 +0 -0
  549. package/dist/fonts/noto-sans-tc-2-400-normal.woff2 +0 -0
  550. package/dist/fonts/noto-sans-tc-2-500-normal.woff2 +0 -0
  551. package/dist/fonts/noto-sans-tc-2-600-normal.woff2 +0 -0
  552. package/dist/fonts/noto-sans-tc-2-700-normal.woff2 +0 -0
  553. package/dist/fonts/noto-sans-tc-23-400-normal.woff2 +0 -0
  554. package/dist/fonts/noto-sans-tc-23-500-normal.woff2 +0 -0
  555. package/dist/fonts/noto-sans-tc-23-600-normal.woff2 +0 -0
  556. package/dist/fonts/noto-sans-tc-23-700-normal.woff2 +0 -0
  557. package/dist/fonts/noto-sans-tc-24-400-normal.woff2 +0 -0
  558. package/dist/fonts/noto-sans-tc-24-500-normal.woff2 +0 -0
  559. package/dist/fonts/noto-sans-tc-24-600-normal.woff2 +0 -0
  560. package/dist/fonts/noto-sans-tc-24-700-normal.woff2 +0 -0
  561. package/dist/fonts/noto-sans-tc-25-400-normal.woff2 +0 -0
  562. package/dist/fonts/noto-sans-tc-25-500-normal.woff2 +0 -0
  563. package/dist/fonts/noto-sans-tc-25-600-normal.woff2 +0 -0
  564. package/dist/fonts/noto-sans-tc-25-700-normal.woff2 +0 -0
  565. package/dist/fonts/noto-sans-tc-26-400-normal.woff2 +0 -0
  566. package/dist/fonts/noto-sans-tc-26-500-normal.woff2 +0 -0
  567. package/dist/fonts/noto-sans-tc-26-600-normal.woff2 +0 -0
  568. package/dist/fonts/noto-sans-tc-26-700-normal.woff2 +0 -0
  569. package/dist/fonts/noto-sans-tc-27-400-normal.woff2 +0 -0
  570. package/dist/fonts/noto-sans-tc-27-500-normal.woff2 +0 -0
  571. package/dist/fonts/noto-sans-tc-27-600-normal.woff2 +0 -0
  572. package/dist/fonts/noto-sans-tc-27-700-normal.woff2 +0 -0
  573. package/dist/fonts/noto-sans-tc-28-400-normal.woff2 +0 -0
  574. package/dist/fonts/noto-sans-tc-28-500-normal.woff2 +0 -0
  575. package/dist/fonts/noto-sans-tc-28-600-normal.woff2 +0 -0
  576. package/dist/fonts/noto-sans-tc-28-700-normal.woff2 +0 -0
  577. package/dist/fonts/noto-sans-tc-29-400-normal.woff2 +0 -0
  578. package/dist/fonts/noto-sans-tc-29-500-normal.woff2 +0 -0
  579. package/dist/fonts/noto-sans-tc-29-600-normal.woff2 +0 -0
  580. package/dist/fonts/noto-sans-tc-29-700-normal.woff2 +0 -0
  581. package/dist/fonts/noto-sans-tc-30-400-normal.woff2 +0 -0
  582. package/dist/fonts/noto-sans-tc-30-500-normal.woff2 +0 -0
  583. package/dist/fonts/noto-sans-tc-30-600-normal.woff2 +0 -0
  584. package/dist/fonts/noto-sans-tc-30-700-normal.woff2 +0 -0
  585. package/dist/fonts/noto-sans-tc-31-400-normal.woff2 +0 -0
  586. package/dist/fonts/noto-sans-tc-31-500-normal.woff2 +0 -0
  587. package/dist/fonts/noto-sans-tc-31-600-normal.woff2 +0 -0
  588. package/dist/fonts/noto-sans-tc-31-700-normal.woff2 +0 -0
  589. package/dist/fonts/noto-sans-tc-32-400-normal.woff2 +0 -0
  590. package/dist/fonts/noto-sans-tc-32-500-normal.woff2 +0 -0
  591. package/dist/fonts/noto-sans-tc-32-600-normal.woff2 +0 -0
  592. package/dist/fonts/noto-sans-tc-32-700-normal.woff2 +0 -0
  593. package/dist/fonts/noto-sans-tc-33-400-normal.woff2 +0 -0
  594. package/dist/fonts/noto-sans-tc-33-500-normal.woff2 +0 -0
  595. package/dist/fonts/noto-sans-tc-33-600-normal.woff2 +0 -0
  596. package/dist/fonts/noto-sans-tc-33-700-normal.woff2 +0 -0
  597. package/dist/fonts/noto-sans-tc-34-400-normal.woff2 +0 -0
  598. package/dist/fonts/noto-sans-tc-34-500-normal.woff2 +0 -0
  599. package/dist/fonts/noto-sans-tc-34-600-normal.woff2 +0 -0
  600. package/dist/fonts/noto-sans-tc-34-700-normal.woff2 +0 -0
  601. package/dist/fonts/noto-sans-tc-35-400-normal.woff2 +0 -0
  602. package/dist/fonts/noto-sans-tc-35-500-normal.woff2 +0 -0
  603. package/dist/fonts/noto-sans-tc-35-600-normal.woff2 +0 -0
  604. package/dist/fonts/noto-sans-tc-35-700-normal.woff2 +0 -0
  605. package/dist/fonts/noto-sans-tc-36-400-normal.woff2 +0 -0
  606. package/dist/fonts/noto-sans-tc-36-500-normal.woff2 +0 -0
  607. package/dist/fonts/noto-sans-tc-36-600-normal.woff2 +0 -0
  608. package/dist/fonts/noto-sans-tc-36-700-normal.woff2 +0 -0
  609. package/dist/fonts/noto-sans-tc-37-400-normal.woff2 +0 -0
  610. package/dist/fonts/noto-sans-tc-37-500-normal.woff2 +0 -0
  611. package/dist/fonts/noto-sans-tc-37-600-normal.woff2 +0 -0
  612. package/dist/fonts/noto-sans-tc-37-700-normal.woff2 +0 -0
  613. package/dist/fonts/noto-sans-tc-38-400-normal.woff2 +0 -0
  614. package/dist/fonts/noto-sans-tc-38-500-normal.woff2 +0 -0
  615. package/dist/fonts/noto-sans-tc-38-600-normal.woff2 +0 -0
  616. package/dist/fonts/noto-sans-tc-38-700-normal.woff2 +0 -0
  617. package/dist/fonts/noto-sans-tc-39-400-normal.woff2 +0 -0
  618. package/dist/fonts/noto-sans-tc-39-500-normal.woff2 +0 -0
  619. package/dist/fonts/noto-sans-tc-39-600-normal.woff2 +0 -0
  620. package/dist/fonts/noto-sans-tc-39-700-normal.woff2 +0 -0
  621. package/dist/fonts/noto-sans-tc-4-400-normal.woff2 +0 -0
  622. package/dist/fonts/noto-sans-tc-4-500-normal.woff2 +0 -0
  623. package/dist/fonts/noto-sans-tc-4-600-normal.woff2 +0 -0
  624. package/dist/fonts/noto-sans-tc-4-700-normal.woff2 +0 -0
  625. package/dist/fonts/noto-sans-tc-40-400-normal.woff2 +0 -0
  626. package/dist/fonts/noto-sans-tc-40-500-normal.woff2 +0 -0
  627. package/dist/fonts/noto-sans-tc-40-600-normal.woff2 +0 -0
  628. package/dist/fonts/noto-sans-tc-40-700-normal.woff2 +0 -0
  629. package/dist/fonts/noto-sans-tc-41-400-normal.woff2 +0 -0
  630. package/dist/fonts/noto-sans-tc-41-500-normal.woff2 +0 -0
  631. package/dist/fonts/noto-sans-tc-41-600-normal.woff2 +0 -0
  632. package/dist/fonts/noto-sans-tc-41-700-normal.woff2 +0 -0
  633. package/dist/fonts/noto-sans-tc-42-400-normal.woff2 +0 -0
  634. package/dist/fonts/noto-sans-tc-42-500-normal.woff2 +0 -0
  635. package/dist/fonts/noto-sans-tc-42-600-normal.woff2 +0 -0
  636. package/dist/fonts/noto-sans-tc-42-700-normal.woff2 +0 -0
  637. package/dist/fonts/noto-sans-tc-43-400-normal.woff2 +0 -0
  638. package/dist/fonts/noto-sans-tc-43-500-normal.woff2 +0 -0
  639. package/dist/fonts/noto-sans-tc-43-600-normal.woff2 +0 -0
  640. package/dist/fonts/noto-sans-tc-43-700-normal.woff2 +0 -0
  641. package/dist/fonts/noto-sans-tc-44-400-normal.woff2 +0 -0
  642. package/dist/fonts/noto-sans-tc-44-500-normal.woff2 +0 -0
  643. package/dist/fonts/noto-sans-tc-44-600-normal.woff2 +0 -0
  644. package/dist/fonts/noto-sans-tc-44-700-normal.woff2 +0 -0
  645. package/dist/fonts/noto-sans-tc-45-400-normal.woff2 +0 -0
  646. package/dist/fonts/noto-sans-tc-45-500-normal.woff2 +0 -0
  647. package/dist/fonts/noto-sans-tc-45-600-normal.woff2 +0 -0
  648. package/dist/fonts/noto-sans-tc-45-700-normal.woff2 +0 -0
  649. package/dist/fonts/noto-sans-tc-46-400-normal.woff2 +0 -0
  650. package/dist/fonts/noto-sans-tc-46-500-normal.woff2 +0 -0
  651. package/dist/fonts/noto-sans-tc-46-600-normal.woff2 +0 -0
  652. package/dist/fonts/noto-sans-tc-46-700-normal.woff2 +0 -0
  653. package/dist/fonts/noto-sans-tc-47-400-normal.woff2 +0 -0
  654. package/dist/fonts/noto-sans-tc-47-500-normal.woff2 +0 -0
  655. package/dist/fonts/noto-sans-tc-47-600-normal.woff2 +0 -0
  656. package/dist/fonts/noto-sans-tc-47-700-normal.woff2 +0 -0
  657. package/dist/fonts/noto-sans-tc-48-400-normal.woff2 +0 -0
  658. package/dist/fonts/noto-sans-tc-48-500-normal.woff2 +0 -0
  659. package/dist/fonts/noto-sans-tc-48-600-normal.woff2 +0 -0
  660. package/dist/fonts/noto-sans-tc-48-700-normal.woff2 +0 -0
  661. package/dist/fonts/noto-sans-tc-49-400-normal.woff2 +0 -0
  662. package/dist/fonts/noto-sans-tc-49-500-normal.woff2 +0 -0
  663. package/dist/fonts/noto-sans-tc-49-600-normal.woff2 +0 -0
  664. package/dist/fonts/noto-sans-tc-49-700-normal.woff2 +0 -0
  665. package/dist/fonts/noto-sans-tc-50-400-normal.woff2 +0 -0
  666. package/dist/fonts/noto-sans-tc-50-500-normal.woff2 +0 -0
  667. package/dist/fonts/noto-sans-tc-50-600-normal.woff2 +0 -0
  668. package/dist/fonts/noto-sans-tc-50-700-normal.woff2 +0 -0
  669. package/dist/fonts/noto-sans-tc-51-400-normal.woff2 +0 -0
  670. package/dist/fonts/noto-sans-tc-51-500-normal.woff2 +0 -0
  671. package/dist/fonts/noto-sans-tc-51-600-normal.woff2 +0 -0
  672. package/dist/fonts/noto-sans-tc-51-700-normal.woff2 +0 -0
  673. package/dist/fonts/noto-sans-tc-52-400-normal.woff2 +0 -0
  674. package/dist/fonts/noto-sans-tc-52-500-normal.woff2 +0 -0
  675. package/dist/fonts/noto-sans-tc-52-600-normal.woff2 +0 -0
  676. package/dist/fonts/noto-sans-tc-52-700-normal.woff2 +0 -0
  677. package/dist/fonts/noto-sans-tc-53-400-normal.woff2 +0 -0
  678. package/dist/fonts/noto-sans-tc-53-500-normal.woff2 +0 -0
  679. package/dist/fonts/noto-sans-tc-53-600-normal.woff2 +0 -0
  680. package/dist/fonts/noto-sans-tc-53-700-normal.woff2 +0 -0
  681. package/dist/fonts/noto-sans-tc-54-400-normal.woff2 +0 -0
  682. package/dist/fonts/noto-sans-tc-54-500-normal.woff2 +0 -0
  683. package/dist/fonts/noto-sans-tc-54-600-normal.woff2 +0 -0
  684. package/dist/fonts/noto-sans-tc-54-700-normal.woff2 +0 -0
  685. package/dist/fonts/noto-sans-tc-55-400-normal.woff2 +0 -0
  686. package/dist/fonts/noto-sans-tc-55-500-normal.woff2 +0 -0
  687. package/dist/fonts/noto-sans-tc-55-600-normal.woff2 +0 -0
  688. package/dist/fonts/noto-sans-tc-55-700-normal.woff2 +0 -0
  689. package/dist/fonts/noto-sans-tc-56-400-normal.woff2 +0 -0
  690. package/dist/fonts/noto-sans-tc-56-500-normal.woff2 +0 -0
  691. package/dist/fonts/noto-sans-tc-56-600-normal.woff2 +0 -0
  692. package/dist/fonts/noto-sans-tc-56-700-normal.woff2 +0 -0
  693. package/dist/fonts/noto-sans-tc-57-400-normal.woff2 +0 -0
  694. package/dist/fonts/noto-sans-tc-57-500-normal.woff2 +0 -0
  695. package/dist/fonts/noto-sans-tc-57-600-normal.woff2 +0 -0
  696. package/dist/fonts/noto-sans-tc-57-700-normal.woff2 +0 -0
  697. package/dist/fonts/noto-sans-tc-58-400-normal.woff2 +0 -0
  698. package/dist/fonts/noto-sans-tc-58-500-normal.woff2 +0 -0
  699. package/dist/fonts/noto-sans-tc-58-600-normal.woff2 +0 -0
  700. package/dist/fonts/noto-sans-tc-58-700-normal.woff2 +0 -0
  701. package/dist/fonts/noto-sans-tc-59-400-normal.woff2 +0 -0
  702. package/dist/fonts/noto-sans-tc-59-500-normal.woff2 +0 -0
  703. package/dist/fonts/noto-sans-tc-59-600-normal.woff2 +0 -0
  704. package/dist/fonts/noto-sans-tc-59-700-normal.woff2 +0 -0
  705. package/dist/fonts/noto-sans-tc-60-400-normal.woff2 +0 -0
  706. package/dist/fonts/noto-sans-tc-60-500-normal.woff2 +0 -0
  707. package/dist/fonts/noto-sans-tc-60-600-normal.woff2 +0 -0
  708. package/dist/fonts/noto-sans-tc-60-700-normal.woff2 +0 -0
  709. package/dist/fonts/noto-sans-tc-61-400-normal.woff2 +0 -0
  710. package/dist/fonts/noto-sans-tc-61-500-normal.woff2 +0 -0
  711. package/dist/fonts/noto-sans-tc-61-600-normal.woff2 +0 -0
  712. package/dist/fonts/noto-sans-tc-61-700-normal.woff2 +0 -0
  713. package/dist/fonts/noto-sans-tc-62-400-normal.woff2 +0 -0
  714. package/dist/fonts/noto-sans-tc-62-500-normal.woff2 +0 -0
  715. package/dist/fonts/noto-sans-tc-62-600-normal.woff2 +0 -0
  716. package/dist/fonts/noto-sans-tc-62-700-normal.woff2 +0 -0
  717. package/dist/fonts/noto-sans-tc-63-400-normal.woff2 +0 -0
  718. package/dist/fonts/noto-sans-tc-63-500-normal.woff2 +0 -0
  719. package/dist/fonts/noto-sans-tc-63-600-normal.woff2 +0 -0
  720. package/dist/fonts/noto-sans-tc-63-700-normal.woff2 +0 -0
  721. package/dist/fonts/noto-sans-tc-64-400-normal.woff2 +0 -0
  722. package/dist/fonts/noto-sans-tc-64-500-normal.woff2 +0 -0
  723. package/dist/fonts/noto-sans-tc-64-600-normal.woff2 +0 -0
  724. package/dist/fonts/noto-sans-tc-64-700-normal.woff2 +0 -0
  725. package/dist/fonts/noto-sans-tc-65-400-normal.woff2 +0 -0
  726. package/dist/fonts/noto-sans-tc-65-500-normal.woff2 +0 -0
  727. package/dist/fonts/noto-sans-tc-65-600-normal.woff2 +0 -0
  728. package/dist/fonts/noto-sans-tc-65-700-normal.woff2 +0 -0
  729. package/dist/fonts/noto-sans-tc-66-400-normal.woff2 +0 -0
  730. package/dist/fonts/noto-sans-tc-66-500-normal.woff2 +0 -0
  731. package/dist/fonts/noto-sans-tc-66-600-normal.woff2 +0 -0
  732. package/dist/fonts/noto-sans-tc-66-700-normal.woff2 +0 -0
  733. package/dist/fonts/noto-sans-tc-67-400-normal.woff2 +0 -0
  734. package/dist/fonts/noto-sans-tc-67-500-normal.woff2 +0 -0
  735. package/dist/fonts/noto-sans-tc-67-600-normal.woff2 +0 -0
  736. package/dist/fonts/noto-sans-tc-67-700-normal.woff2 +0 -0
  737. package/dist/fonts/noto-sans-tc-68-400-normal.woff2 +0 -0
  738. package/dist/fonts/noto-sans-tc-68-500-normal.woff2 +0 -0
  739. package/dist/fonts/noto-sans-tc-68-600-normal.woff2 +0 -0
  740. package/dist/fonts/noto-sans-tc-68-700-normal.woff2 +0 -0
  741. package/dist/fonts/noto-sans-tc-69-400-normal.woff2 +0 -0
  742. package/dist/fonts/noto-sans-tc-69-500-normal.woff2 +0 -0
  743. package/dist/fonts/noto-sans-tc-69-600-normal.woff2 +0 -0
  744. package/dist/fonts/noto-sans-tc-69-700-normal.woff2 +0 -0
  745. package/dist/fonts/noto-sans-tc-70-400-normal.woff2 +0 -0
  746. package/dist/fonts/noto-sans-tc-70-500-normal.woff2 +0 -0
  747. package/dist/fonts/noto-sans-tc-70-600-normal.woff2 +0 -0
  748. package/dist/fonts/noto-sans-tc-70-700-normal.woff2 +0 -0
  749. package/dist/fonts/noto-sans-tc-71-400-normal.woff2 +0 -0
  750. package/dist/fonts/noto-sans-tc-71-500-normal.woff2 +0 -0
  751. package/dist/fonts/noto-sans-tc-71-600-normal.woff2 +0 -0
  752. package/dist/fonts/noto-sans-tc-71-700-normal.woff2 +0 -0
  753. package/dist/fonts/noto-sans-tc-72-400-normal.woff2 +0 -0
  754. package/dist/fonts/noto-sans-tc-72-500-normal.woff2 +0 -0
  755. package/dist/fonts/noto-sans-tc-72-600-normal.woff2 +0 -0
  756. package/dist/fonts/noto-sans-tc-72-700-normal.woff2 +0 -0
  757. package/dist/fonts/noto-sans-tc-73-400-normal.woff2 +0 -0
  758. package/dist/fonts/noto-sans-tc-73-500-normal.woff2 +0 -0
  759. package/dist/fonts/noto-sans-tc-73-600-normal.woff2 +0 -0
  760. package/dist/fonts/noto-sans-tc-73-700-normal.woff2 +0 -0
  761. package/dist/fonts/noto-sans-tc-74-400-normal.woff2 +0 -0
  762. package/dist/fonts/noto-sans-tc-74-500-normal.woff2 +0 -0
  763. package/dist/fonts/noto-sans-tc-74-600-normal.woff2 +0 -0
  764. package/dist/fonts/noto-sans-tc-74-700-normal.woff2 +0 -0
  765. package/dist/fonts/noto-sans-tc-75-400-normal.woff2 +0 -0
  766. package/dist/fonts/noto-sans-tc-75-500-normal.woff2 +0 -0
  767. package/dist/fonts/noto-sans-tc-75-600-normal.woff2 +0 -0
  768. package/dist/fonts/noto-sans-tc-75-700-normal.woff2 +0 -0
  769. package/dist/fonts/noto-sans-tc-76-400-normal.woff2 +0 -0
  770. package/dist/fonts/noto-sans-tc-76-500-normal.woff2 +0 -0
  771. package/dist/fonts/noto-sans-tc-76-600-normal.woff2 +0 -0
  772. package/dist/fonts/noto-sans-tc-76-700-normal.woff2 +0 -0
  773. package/dist/fonts/noto-sans-tc-77-400-normal.woff2 +0 -0
  774. package/dist/fonts/noto-sans-tc-77-500-normal.woff2 +0 -0
  775. package/dist/fonts/noto-sans-tc-77-600-normal.woff2 +0 -0
  776. package/dist/fonts/noto-sans-tc-77-700-normal.woff2 +0 -0
  777. package/dist/fonts/noto-sans-tc-78-400-normal.woff2 +0 -0
  778. package/dist/fonts/noto-sans-tc-78-500-normal.woff2 +0 -0
  779. package/dist/fonts/noto-sans-tc-78-600-normal.woff2 +0 -0
  780. package/dist/fonts/noto-sans-tc-78-700-normal.woff2 +0 -0
  781. package/dist/fonts/noto-sans-tc-79-400-normal.woff2 +0 -0
  782. package/dist/fonts/noto-sans-tc-79-500-normal.woff2 +0 -0
  783. package/dist/fonts/noto-sans-tc-79-600-normal.woff2 +0 -0
  784. package/dist/fonts/noto-sans-tc-79-700-normal.woff2 +0 -0
  785. package/dist/fonts/noto-sans-tc-80-400-normal.woff2 +0 -0
  786. package/dist/fonts/noto-sans-tc-80-500-normal.woff2 +0 -0
  787. package/dist/fonts/noto-sans-tc-80-600-normal.woff2 +0 -0
  788. package/dist/fonts/noto-sans-tc-80-700-normal.woff2 +0 -0
  789. package/dist/fonts/noto-sans-tc-81-400-normal.woff2 +0 -0
  790. package/dist/fonts/noto-sans-tc-81-500-normal.woff2 +0 -0
  791. package/dist/fonts/noto-sans-tc-81-600-normal.woff2 +0 -0
  792. package/dist/fonts/noto-sans-tc-81-700-normal.woff2 +0 -0
  793. package/dist/fonts/noto-sans-tc-82-400-normal.woff2 +0 -0
  794. package/dist/fonts/noto-sans-tc-82-500-normal.woff2 +0 -0
  795. package/dist/fonts/noto-sans-tc-82-600-normal.woff2 +0 -0
  796. package/dist/fonts/noto-sans-tc-82-700-normal.woff2 +0 -0
  797. package/dist/fonts/noto-sans-tc-83-400-normal.woff2 +0 -0
  798. package/dist/fonts/noto-sans-tc-83-500-normal.woff2 +0 -0
  799. package/dist/fonts/noto-sans-tc-83-600-normal.woff2 +0 -0
  800. package/dist/fonts/noto-sans-tc-83-700-normal.woff2 +0 -0
  801. package/dist/fonts/noto-sans-tc-84-400-normal.woff2 +0 -0
  802. package/dist/fonts/noto-sans-tc-84-500-normal.woff2 +0 -0
  803. package/dist/fonts/noto-sans-tc-84-600-normal.woff2 +0 -0
  804. package/dist/fonts/noto-sans-tc-84-700-normal.woff2 +0 -0
  805. package/dist/fonts/noto-sans-tc-85-400-normal.woff2 +0 -0
  806. package/dist/fonts/noto-sans-tc-85-500-normal.woff2 +0 -0
  807. package/dist/fonts/noto-sans-tc-85-600-normal.woff2 +0 -0
  808. package/dist/fonts/noto-sans-tc-85-700-normal.woff2 +0 -0
  809. package/dist/fonts/noto-sans-tc-86-400-normal.woff2 +0 -0
  810. package/dist/fonts/noto-sans-tc-86-500-normal.woff2 +0 -0
  811. package/dist/fonts/noto-sans-tc-86-600-normal.woff2 +0 -0
  812. package/dist/fonts/noto-sans-tc-86-700-normal.woff2 +0 -0
  813. package/dist/fonts/noto-sans-tc-87-400-normal.woff2 +0 -0
  814. package/dist/fonts/noto-sans-tc-87-500-normal.woff2 +0 -0
  815. package/dist/fonts/noto-sans-tc-87-600-normal.woff2 +0 -0
  816. package/dist/fonts/noto-sans-tc-87-700-normal.woff2 +0 -0
  817. package/dist/fonts/noto-sans-tc-88-400-normal.woff2 +0 -0
  818. package/dist/fonts/noto-sans-tc-88-500-normal.woff2 +0 -0
  819. package/dist/fonts/noto-sans-tc-88-600-normal.woff2 +0 -0
  820. package/dist/fonts/noto-sans-tc-88-700-normal.woff2 +0 -0
  821. package/dist/fonts/noto-sans-tc-89-400-normal.woff2 +0 -0
  822. package/dist/fonts/noto-sans-tc-89-500-normal.woff2 +0 -0
  823. package/dist/fonts/noto-sans-tc-89-600-normal.woff2 +0 -0
  824. package/dist/fonts/noto-sans-tc-89-700-normal.woff2 +0 -0
  825. package/dist/fonts/noto-sans-tc-90-400-normal.woff2 +0 -0
  826. package/dist/fonts/noto-sans-tc-90-500-normal.woff2 +0 -0
  827. package/dist/fonts/noto-sans-tc-90-600-normal.woff2 +0 -0
  828. package/dist/fonts/noto-sans-tc-90-700-normal.woff2 +0 -0
  829. package/dist/fonts/noto-sans-tc-91-400-normal.woff2 +0 -0
  830. package/dist/fonts/noto-sans-tc-91-500-normal.woff2 +0 -0
  831. package/dist/fonts/noto-sans-tc-91-600-normal.woff2 +0 -0
  832. package/dist/fonts/noto-sans-tc-91-700-normal.woff2 +0 -0
  833. package/dist/fonts/noto-sans-tc-92-400-normal.woff2 +0 -0
  834. package/dist/fonts/noto-sans-tc-92-500-normal.woff2 +0 -0
  835. package/dist/fonts/noto-sans-tc-92-600-normal.woff2 +0 -0
  836. package/dist/fonts/noto-sans-tc-92-700-normal.woff2 +0 -0
  837. package/dist/fonts/noto-sans-tc-93-400-normal.woff2 +0 -0
  838. package/dist/fonts/noto-sans-tc-93-500-normal.woff2 +0 -0
  839. package/dist/fonts/noto-sans-tc-93-600-normal.woff2 +0 -0
  840. package/dist/fonts/noto-sans-tc-93-700-normal.woff2 +0 -0
  841. package/dist/fonts/noto-sans-tc-94-400-normal.woff2 +0 -0
  842. package/dist/fonts/noto-sans-tc-94-500-normal.woff2 +0 -0
  843. package/dist/fonts/noto-sans-tc-94-600-normal.woff2 +0 -0
  844. package/dist/fonts/noto-sans-tc-94-700-normal.woff2 +0 -0
  845. package/dist/fonts/noto-sans-tc-95-400-normal.woff2 +0 -0
  846. package/dist/fonts/noto-sans-tc-95-500-normal.woff2 +0 -0
  847. package/dist/fonts/noto-sans-tc-95-600-normal.woff2 +0 -0
  848. package/dist/fonts/noto-sans-tc-95-700-normal.woff2 +0 -0
  849. package/dist/fonts/noto-sans-tc-96-400-normal.woff2 +0 -0
  850. package/dist/fonts/noto-sans-tc-96-500-normal.woff2 +0 -0
  851. package/dist/fonts/noto-sans-tc-96-600-normal.woff2 +0 -0
  852. package/dist/fonts/noto-sans-tc-96-700-normal.woff2 +0 -0
  853. package/dist/fonts/noto-sans-tc-cyrillic-400-normal.woff2 +0 -0
  854. package/dist/fonts/noto-sans-tc-cyrillic-500-normal.woff2 +0 -0
  855. package/dist/fonts/noto-sans-tc-cyrillic-600-normal.woff2 +0 -0
  856. package/dist/fonts/noto-sans-tc-cyrillic-700-normal.woff2 +0 -0
  857. package/dist/fonts/noto-sans-tc-latin-400-normal.woff2 +0 -0
  858. package/dist/fonts/noto-sans-tc-latin-500-normal.woff2 +0 -0
  859. package/dist/fonts/noto-sans-tc-latin-600-normal.woff2 +0 -0
  860. package/dist/fonts/noto-sans-tc-latin-700-normal.woff2 +0 -0
  861. package/dist/fonts/noto-sans-tc-latin-ext-400-normal.woff2 +0 -0
  862. package/dist/fonts/noto-sans-tc-latin-ext-500-normal.woff2 +0 -0
  863. package/dist/fonts/noto-sans-tc-latin-ext-600-normal.woff2 +0 -0
  864. package/dist/fonts/noto-sans-tc-latin-ext-700-normal.woff2 +0 -0
  865. package/dist/fonts/noto-sans-tc-vietnamese-400-normal.woff2 +0 -0
  866. package/dist/fonts/noto-sans-tc-vietnamese-500-normal.woff2 +0 -0
  867. package/dist/fonts/noto-sans-tc-vietnamese-600-normal.woff2 +0 -0
  868. package/dist/fonts/noto-sans-tc-vietnamese-700-normal.woff2 +0 -0
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import { Button } from "../Button/Button.js";
3
3
  import { TextField } from "../TextField/TextField.js";
4
+ import { Link } from "../Link/Link.js";
4
5
  import { tr } from "../../i18n.js";
5
6
  import { Icon } from "../../icons/Icon.js";
6
7
  import { cx } from "../../internal/util.js";
7
- import { FieldErrorIcon, FieldLabel, FieldMessage } from "../../internal/Field.js";
8
+ import { FieldErrorIcon, FieldLabel, FieldMessage, QuietErrors } from "../../internal/Field.js";
8
9
  import { includeIcons } from "../../icons/store.js";
9
10
  import eye_default from "../../icons/ph/eye.js";
10
11
  import eye_slash_default from "../../icons/ph/eye-slash.js";
@@ -12,10 +13,11 @@ import * as React from "react";
12
13
  import { jsx, jsxs } from "react/jsx-runtime";
13
14
  // src/components/LoginCard/LoginCard.tsx
14
15
  includeIcons(eye_default, eye_slash_default);
15
- /** A centered sign-in card: account, password with show-password, 「忘記密碼」 beside the password label, errors under each
16
+ /** A centered sign-in page: account, password with show-password, 「忘記密碼」 beside the password label, errors under each
16
17
  * field. Pass error = { account, password } from your sign-in check. */
17
18
  function LoginCard(p) {
18
19
  const pwId = React.useId();
20
+ const userId = React.useId();
19
21
  const [user, setUser] = React.useState("");
20
22
  const [pass, setPass] = React.useState("");
21
23
  const [show, setShow] = React.useState(false);
@@ -23,6 +25,17 @@ function LoginCard(p) {
23
25
  const err = p.error || {};
24
26
  const uErr = tried && !user ? tr("請輸入帳號") : err.account;
25
27
  const pErr = tried && !pass ? tr("請輸入密碼") : err.password;
28
+ const focusFirst = (u, pw) => {
29
+ const id = u ? userId : pw ? pwId : null;
30
+ if (id) document.getElementById(id)?.focus();
31
+ };
32
+ const errKey = `${err.account ?? ""}\u0000${err.password ?? ""}`;
33
+ const lastErr = React.useRef(errKey);
34
+ React.useEffect(() => {
35
+ if (errKey === lastErr.current) return;
36
+ lastErr.current = errKey;
37
+ focusFirst(!!err.account, !!err.password);
38
+ });
26
39
  function submit(e) {
27
40
  e.preventDefault();
28
41
  setTried(true);
@@ -30,85 +43,93 @@ function LoginCard(p) {
30
43
  account: user,
31
44
  password: pass
32
45
  });
46
+ else focusFirst(!user, !pass);
33
47
  }
34
- return /* @__PURE__ */ jsx("div", {
48
+ return /* @__PURE__ */ jsx("main", {
35
49
  className: cx("ui-loginpage", p.className),
36
- children: /* @__PURE__ */ jsxs("form", {
37
- className: "ui-logincard",
38
- onSubmit: submit,
39
- noValidate: true,
40
- children: [
41
- p.brand ? /* @__PURE__ */ jsx("div", {
42
- className: "ui-login-brand",
43
- children: p.brand
44
- }) : null,
45
- /* @__PURE__ */ jsx("h1", {
46
- className: "ui-login-title",
47
- children: p.title || tr("登入")
48
- }),
49
- /* @__PURE__ */ jsx(TextField, {
50
- label: tr("帳號"),
51
- value: user,
52
- onChange: (e) => setUser(e.target.value),
53
- placeholder: tr("Email 或帳號"),
54
- autoComplete: "username",
55
- error: uErr
56
- }),
57
- /* @__PURE__ */ jsxs("div", {
58
- className: cx("ui-field", pErr && "has-error"),
59
- children: [
60
- /* @__PURE__ */ jsxs("div", {
61
- className: "ui-login-pwlabel",
62
- children: [/* @__PURE__ */ jsx(FieldLabel, {
63
- htmlFor: pwId,
64
- children: tr("密碼")
65
- }), p.forgotHref ? /* @__PURE__ */ jsx("a", {
66
- href: p.forgotHref,
67
- className: "ui-link",
68
- children: tr("忘記密碼")
69
- }) : null]
70
- }),
71
- /* @__PURE__ */ jsxs("div", {
72
- className: cx("ui-pwfield", pErr && "is-invalid"),
73
- children: [
74
- /* @__PURE__ */ jsx("input", {
75
- id: pwId,
76
- className: "ui-pwfield-input",
77
- type: show ? "text" : "password",
78
- value: pass,
79
- autoComplete: "current-password",
80
- "aria-invalid": pErr ? true : void 0,
81
- "aria-describedby": pErr ? pwId + "-err" : void 0,
82
- onChange: (e) => setPass(e.target.value)
83
- }),
84
- pErr ? /* @__PURE__ */ jsx(FieldErrorIcon, { inline: true }) : null,
85
- /* @__PURE__ */ jsx("button", {
86
- type: "button",
87
- className: "ui-datefield-btn",
88
- "aria-label": show ? tr("隱藏密碼") : tr("顯示密碼"),
89
- "aria-pressed": show,
90
- onClick: () => setShow(!show),
91
- children: /* @__PURE__ */ jsx(Icon, {
92
- name: show ? "eye-slash" : "eye",
93
- size: 18
50
+ children: /* @__PURE__ */ jsx(QuietErrors.Provider, {
51
+ value: true,
52
+ children: /* @__PURE__ */ jsxs("form", {
53
+ className: "ui-logincard",
54
+ onSubmit: submit,
55
+ noValidate: true,
56
+ children: [
57
+ p.logo || p.brand ? /* @__PURE__ */ jsxs("div", {
58
+ className: "ui-login-brand",
59
+ children: [p.logo ? /* @__PURE__ */ jsx("span", {
60
+ className: "ui-login-logo",
61
+ children: p.logo
62
+ }) : null, p.brand]
63
+ }) : null,
64
+ /* @__PURE__ */ jsx("h1", {
65
+ className: "ui-login-title",
66
+ children: p.title || tr("登入")
67
+ }),
68
+ /* @__PURE__ */ jsx(TextField, {
69
+ id: userId,
70
+ label: tr("帳號"),
71
+ value: user,
72
+ onChange: setUser,
73
+ placeholder: tr("Email 或帳號"),
74
+ autoComplete: "username",
75
+ error: uErr
76
+ }),
77
+ /* @__PURE__ */ jsxs("div", {
78
+ className: cx("ui-field", pErr && "has-error"),
79
+ children: [
80
+ /* @__PURE__ */ jsxs("div", {
81
+ className: "ui-login-pwlabel",
82
+ children: [/* @__PURE__ */ jsx(FieldLabel, {
83
+ htmlFor: pwId,
84
+ children: tr("密碼")
85
+ }), p.forgotHref ? /* @__PURE__ */ jsx(Link, {
86
+ href: p.forgotHref,
87
+ className: "ui-login-forgot",
88
+ children: tr("忘記密碼")
89
+ }) : null]
90
+ }),
91
+ /* @__PURE__ */ jsxs("div", {
92
+ className: cx("ui-pwfield", pErr && "is-invalid"),
93
+ children: [
94
+ /* @__PURE__ */ jsx("input", {
95
+ id: pwId,
96
+ className: "ui-pwfield-input",
97
+ type: show ? "text" : "password",
98
+ value: pass,
99
+ autoComplete: "current-password",
100
+ "aria-invalid": pErr ? true : void 0,
101
+ "aria-describedby": pErr ? pwId + "-err" : void 0,
102
+ onChange: (e) => setPass(e.target.value)
103
+ }),
104
+ pErr ? /* @__PURE__ */ jsx(FieldErrorIcon, { inline: true }) : null,
105
+ /* @__PURE__ */ jsx("button", {
106
+ type: "button",
107
+ className: "ui-datefield-btn",
108
+ "aria-label": tr("顯示密碼"),
109
+ "aria-pressed": show,
110
+ onClick: () => setShow(!show),
111
+ children: /* @__PURE__ */ jsx(Icon, {
112
+ name: show ? "eye-slash" : "eye",
113
+ size: 18
114
+ })
94
115
  })
95
- })
96
- ]
97
- }),
98
- /* @__PURE__ */ jsx(FieldMessage, {
99
- id: pwId + "-err",
100
- error: pErr
101
- })
102
- ]
103
- }),
104
- /* @__PURE__ */ jsx(Button, {
105
- variant: "primary",
106
- type: "submit",
107
- loading: p.loading,
108
- className: "ui-login-submit",
109
- children: tr("登入")
110
- })
111
- ]
116
+ ]
117
+ }),
118
+ /* @__PURE__ */ jsx(FieldMessage, {
119
+ id: pwId + "-err",
120
+ error: pErr
121
+ })
122
+ ]
123
+ }),
124
+ /* @__PURE__ */ jsx(Button, {
125
+ variant: "primary",
126
+ type: "submit",
127
+ loading: p.loading,
128
+ className: "ui-login-submit",
129
+ children: tr("登入")
130
+ })
131
+ ]
132
+ })
112
133
  })
113
134
  });
114
135
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LoginCard.js","names":["phEye","phEyeSlash"],"sources":["../../../src/components/LoginCard/LoginCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button } from '../Button/Button';\nimport { TextField } from '../TextField/TextField';\nimport { tr } from '../../i18n';\nimport { Icon } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { FieldErrorIcon, FieldLabel, FieldMessage } from '../../internal/Field';\nimport { includeIcons } from '../../icons/store';\nimport phEye from '../../icons/ph/eye';\nimport phEyeSlash from '../../icons/ph/eye-slash';\n\nincludeIcons(phEye, phEyeSlash);\n\nexport interface LoginCardProps {\n /** Logo or product name above the title. */\n brand?: React.ReactNode;\n /** Default 「登入」. */\n title?: string;\n onSubmit: (v: { account: string; password: string }) => void;\n /** Errors from your sign-in check, shown under each field: the cause and the fix; `backticks` are code. */\n error?: { account?: string; password?: string } | null;\n /** Adds 「忘記密碼」 beside the password label. */\n forgotHref?: string;\n loading?: boolean;\n className?: string;\n}\n\n/** A centered sign-in card: account, password with show-password, 「忘記密碼」 beside the password label, errors under each\n * field. Pass error = { account, password } from your sign-in check. */\nexport function LoginCard(p: LoginCardProps) {\n const pwId = React.useId();\n const [user, setUser] = React.useState('');\n const [pass, setPass] = React.useState('');\n const [show, setShow] = React.useState(false);\n const [tried, setTried] = React.useState(false);\n const err = p.error || {};\n const uErr = tried && !user ? tr('請輸入帳號') : err.account;\n const pErr = tried && !pass ? tr('請輸入密碼') : err.password;\n function submit(e: React.FormEvent) {\n e.preventDefault();\n setTried(true);\n if (user && pass) p.onSubmit({ account: user, password: pass });\n }\n return (\n <div className={cx('ui-loginpage', p.className)}>\n <form className=\"ui-logincard\" onSubmit={submit} noValidate>\n {p.brand ? <div className=\"ui-login-brand\">{p.brand}</div> : null}\n <h1 className=\"ui-login-title\">{p.title || tr('登入')}</h1>\n <TextField\n label={tr('帳號')}\n value={user}\n onChange={(e) => setUser(e.target.value)}\n placeholder={tr('Email 或帳號')}\n autoComplete=\"username\"\n error={uErr}\n />\n <div className={cx('ui-field', pErr && 'has-error')}>\n <div className=\"ui-login-pwlabel\">\n <FieldLabel htmlFor={pwId}>{tr('密碼')}</FieldLabel>\n {p.forgotHref ? (\n <a href={p.forgotHref} className=\"ui-link\">\n {tr('忘記密碼')}\n </a>\n ) : null}\n </div>\n <div className={cx('ui-pwfield', pErr && 'is-invalid')}>\n <input\n id={pwId}\n className=\"ui-pwfield-input\"\n type={show ? 'text' : 'password'}\n value={pass}\n autoComplete=\"current-password\"\n aria-invalid={pErr ? true : undefined}\n aria-describedby={pErr ? pwId + '-err' : undefined}\n onChange={(e) => setPass(e.target.value)}\n />\n {pErr ? <FieldErrorIcon inline /> : null}\n <button\n type=\"button\"\n className=\"ui-datefield-btn\"\n aria-label={show ? tr('隱藏密碼') : tr('顯示密碼')}\n aria-pressed={show}\n onClick={() => setShow(!show)}\n >\n <Icon name={show ? 'eye-slash' : 'eye'} size={18} />\n </button>\n </div>\n <FieldMessage id={pwId + '-err'} error={pErr} />\n </div>\n <Button variant=\"primary\" type=\"submit\" loading={p.loading} className=\"ui-login-submit\">\n {tr('登入')}\n </Button>\n </form>\n </div>\n );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AAc,CAAA,GAChD,EAAE,aACD,oBAAC,KAAD;QAAG,MAAM,EAAE;QAAY,WAAU;QAC9B,UAAA,GAAG,MAAM;OACT,CAAA,IACD,IACD;;MACL,qBAAC,OAAD;OAAK,WAAW,GAAG,cAAc,QAAQ,YAAY;OAArD,UAAA;QACE,oBAAC,SAAD;SACE,IAAI;SACJ,WAAU;SACV,MAAM,OAAO,SAAS;SACtB,OAAO;SACP,cAAa;SACb,gBAAc,OAAO,OAAO,KAAA;SAC5B,oBAAkB,OAAO,OAAO,SAAS,KAAA;SACzC,WAAW,MAAM,QAAQ,EAAE,OAAO,KAAK;QACxC,CAAA;QACA,OAAO,oBAAC,gBAAD,EAAgB,QAAA,KAAQ,CAAA,IAAI;QACpC,oBAAC,UAAD;SACE,MAAK;SACL,WAAU;SACV,cAAY,OAAO,GAAG,MAAM,IAAI,GAAG,MAAM;SACzC,gBAAc;SACd,eAAe,QAAQ,CAAC,IAAI;SAE5B,UAAA,oBAAC,MAAD;UAAM,MAAM,OAAO,cAAc;UAAO,MAAM;SAAK,CAAA;QAC7C,CAAA;OACL;;MACL,oBAAC,cAAD;OAAc,IAAI,OAAO;OAAQ,OAAO;MAAO,CAAA;KAC5C;;IACL,oBAAC,QAAD;KAAQ,SAAQ;KAAU,MAAK;KAAS,SAAS,EAAE;KAAS,WAAU;KACnE,UAAA,GAAG,IAAI;IACF,CAAA;GACJ;;CACH,CAAA;AAET"}
1
+ {"version":3,"file":"LoginCard.js","names":["phEye","phEyeSlash"],"sources":["../../../src/components/LoginCard/LoginCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button } from '../Button/Button';\nimport { TextField } from '../TextField/TextField';\nimport { Link } from '../Link/Link';\nimport { tr } from '../../i18n';\nimport { Icon } from '../../icons/Icon';\nimport { cx } from '../../internal/util';\nimport { FieldErrorIcon, FieldLabel, FieldMessage, QuietErrors } from '../../internal/Field';\nimport { includeIcons } from '../../icons/store';\nimport phEye from '../../icons/ph/eye';\nimport phEyeSlash from '../../icons/ph/eye-slash';\n\nincludeIcons(phEye, phEyeSlash);\n\nexport interface LoginCardProps {\n /** The product's mark (an <svg> or <img>, 32 px tall) beside the brand name. */\n logo?: React.ReactNode;\n /** Product name above the title. */\n brand?: React.ReactNode;\n /** Default 「登入」. */\n title?: string;\n /** Receives the account and password when both are filled. */\n onSubmit: (v: { account: string; password: string }) => void;\n /** Errors from your sign-in check, shown under each field: the cause and the fix; `backticks` are code. Focus moves to\n * the first field with an error when it arrives. */\n error?: { account?: string; password?: string } | null;\n /** Adds 「忘記密碼」 beside the password label. */\n forgotHref?: string;\n /** The sign-in is running: the button shows a spinner and ignores presses, keeping focus. */\n loading?: boolean;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** A centered sign-in page: account, password with show-password, 「忘記密碼」 beside the password label, errors under each\n * field. Pass error = { account, password } from your sign-in check. */\nexport function LoginCard(p: LoginCardProps) {\n const pwId = React.useId();\n const userId = React.useId();\n const [user, setUser] = React.useState('');\n const [pass, setPass] = React.useState('');\n const [show, setShow] = React.useState(false);\n const [tried, setTried] = React.useState(false);\n const err = p.error || {};\n const uErr = tried && !user ? tr('請輸入帳號') : err.account;\n const pErr = tried && !pass ? tr('請輸入密碼') : err.password;\n // Focus goes to the first field with an error: the field reads its error (aria-describedby), one message at a time.\n const focusFirst = (u: boolean, pw: boolean) => {\n const id = u ? userId : pw ? pwId : null;\n if (id) document.getElementById(id)?.focus();\n };\n // An error from the sign-in check arrives after the request: focus its field then too.\n const errKey = `${err.account ?? ''}\\u0000${err.password ?? ''}`;\n const lastErr = React.useRef(errKey);\n React.useEffect(() => {\n if (errKey === lastErr.current) return;\n lastErr.current = errKey;\n focusFirst(!!err.account, !!err.password);\n });\n function submit(e: React.FormEvent) {\n e.preventDefault();\n setTried(true);\n if (user && pass) p.onSubmit({ account: user, password: pass });\n else focusFirst(!user, !pass);\n }\n return (\n <main className={cx('ui-loginpage', p.className)}>\n <QuietErrors.Provider value>\n <form className=\"ui-logincard\" onSubmit={submit} noValidate>\n {p.logo || p.brand ? (\n <div className=\"ui-login-brand\">\n {p.logo ? <span className=\"ui-login-logo\">{p.logo}</span> : null}\n {p.brand}\n </div>\n ) : null}\n <h1 className=\"ui-login-title\">{p.title || tr('登入')}</h1>\n <TextField id={userId} label={tr('帳號')} value={user} onChange={setUser} placeholder={tr('Email 或帳號')} autoComplete=\"username\" error={uErr} />\n <div className={cx('ui-field', pErr && 'has-error')}>\n <div className=\"ui-login-pwlabel\">\n <FieldLabel htmlFor={pwId}>{tr('密碼')}</FieldLabel>\n {p.forgotHref ? (\n <Link href={p.forgotHref} className=\"ui-login-forgot\">\n {tr('忘記密碼')}\n </Link>\n ) : null}\n </div>\n <div className={cx('ui-pwfield', pErr && 'is-invalid')}>\n <input\n id={pwId}\n className=\"ui-pwfield-input\"\n type={show ? 'text' : 'password'}\n value={pass}\n autoComplete=\"current-password\"\n aria-invalid={pErr ? true : undefined}\n aria-describedby={pErr ? pwId + '-err' : undefined}\n onChange={(e) => setPass(e.target.value)}\n />\n {pErr ? <FieldErrorIcon inline /> : null}\n {/* One name, and pressed or not: 「顯示密碼,已按下」. */}\n <button type=\"button\" className=\"ui-datefield-btn\" aria-label={tr('顯示密碼')} aria-pressed={show} onClick={() => setShow(!show)}>\n <Icon name={show ? 'eye-slash' : 'eye'} size={18} />\n </button>\n </div>\n <FieldMessage id={pwId + '-err'} error={pErr} />\n </div>\n <Button variant=\"primary\" type=\"submit\" loading={p.loading} className=\"ui-login-submit\">\n {tr('登入')}\n </Button>\n </form>\n </QuietErrors.Provider>\n </main>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,aAAaA,aAAOC,iBAAU;;;AAwB9B,SAAgB,UAAU,GAAmB;CAC3C,MAAM,OAAO,MAAM,MAAM;CACzB,MAAM,SAAS,MAAM,MAAM;CAC3B,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,EAAE;CACzC,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,EAAE;CACzC,MAAM,CA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
31
31
  terms?: readonly TermDef[];
32
32
  /** 'first' (default): each word only where it first appears in a paragraph, list item or table cell. 'all': everywhere. */
33
33
  termsMark?: TermsMark;
34
+ /** Extra class on the root element. */
34
35
  className?: string;
35
36
  }
36
37
  /** Markdown from project documents and code comments, in the system's own type, code and table styles. Never runs HTML:
@@ -328,7 +328,7 @@ function inline(src, c) {
328
328
  id = decodeURIComponent(termId);
329
329
  } catch {}
330
330
  const t = c.terms?.find((x) => x.term === id);
331
- devWarn(!t, "Markdown", `[${m.text}](term:${termId}) 找不到 terms 裡 term 為「${id}」的項目,只顯示文字。把它加進 terms,或改 term: 後面的字。`);
331
+ devWarn(!t, "Markdown", `[${m.text}](term:${termId}) has no entry with term "${id}" in terms, so only the text shows. Add it to terms, or change the word after term:.`);
332
332
  c.seen?.add(id);
333
333
  out.push(t ? termNode(t, c.k(), inline(m.text, noTerms(c))) : /* @__PURE__ */ jsx(React.Fragment, { children: inline(m.text, noTerms(c)) }, c.k()));
334
334
  i = m.end;
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.js","names":["phCaretRight"],"sources":["../../../src/components/Markdown/Markdown.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Alert, type AlertTone } from '../Alert/Alert';\nimport { Icon } from '../../icons/Icon';\nimport { ColResize, TableDialog, ZoomButton } from '../../internal/tableTools';\nimport { cx, resizeObserver } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\nimport { CodeView } from '../CodeView/CodeView';\nimport { languageOf } from '../CodeView/tokens';\nimport { InlineCode, type OnRef, type RefHref } from '../InlineCode/InlineCode';\nimport { AiMark } from '../AiMark/AiMark';\nimport { findTerms, termNode, termPattern, withTerms, type TermDef, type TermsMark } from '../../internal/terms';\nimport { includeIcons } from '../../icons/store';\nimport phCaretRight from '../../icons/ph/caret-right';\n\nincludeIcons(phCaretRight);\n\n/* A small Markdown reader for project documents and code comments. It builds React elements only: no HTML from the\n source is ever run. HTML tags are dropped and their text kept (MX). */\n\ntype Block =\n | { t: 'h'; level: number; text: string }\n | { t: 'p'; text: string }\n | { t: 'code'; lang: string; code: string }\n | { t: 'quote'; blocks: Block[] }\n | { t: 'list'; ordered: boolean; start: number; items: Block[][] }\n | { t: 'table'; head: string[]; align: ('left' | 'right' | 'center' | null)[]; rows: string[][] }\n | { t: 'hr' }\n | { t: 'details'; summary: string; blocks: Block[] }\n | { t: 'alert'; tone: AlertTone; blocks: Block[] };\n\n// DA: <details> and <summary> are the only HTML let through, without attributes; they make a closed block.\nconst DETAILS_OPEN = /^\\s*<details\\b[^>]*>/i;\nconst DETAILS_TAG = /<(\\/?)details\\b[^>]*>/gi;\nconst SUMMARY = /<summary\\b[^>]*>([\\s\\S]*?)<\\/summary>/i;\n// NB: GitHub's alerts, > [!NOTE] and the like, shown as the system's Alert.\nconst ALERT = /^\\s*\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]\\s*$/i;\nconst ALERT_TONE: Record<string, AlertTone> = { NOTE: 'info', TIP: 'success', IMPORTANT: 'info', WARNING: 'warning', CAUTION: 'danger' };\n\nconst FENCE = /^ {0,3}(`{3,}|~{3,})\\s*([\\w+#.-]*)/;\nconst HEADING = /^ {0,3}(#{1,6})(?:\\s+(.*?))?\\s*#*\\s*$/;\nconst HR = /^ {0,3}([-*_])(?:\\s*\\1){2,}\\s*$/;\nconst ITEM = /^( {0,3})([-*+]|\\d{1,9}[.)])(\\s+|$)(.*)$/;\nconst QUOTE = /^ {0,3}> ?(.*)$/;\nconst TABLE_SEP = /^\\s*\\|?\\s*:?-{1,}:?\\s*(\\|\\s*:?-{1,}:?\\s*)*\\|?\\s*$/;\n\nfunction cells(line: string): string[] {\n let s = line.trim();\n if (s.startsWith('|')) s = s.slice(1);\n if (s.endsWith('|') && !s.endsWith('\\\\|')) s = s.slice(0, -1);\n const out: string[] = [];\n let cur = '';\n let code = false;\n for (let i = 0; i < s.length; i++) {\n const c = s[i];\n if (c === '\\\\' && s[i + 1] === '|') {\n cur += '|';\n i++;\n } else if (c === '`') {\n code = !code;\n cur += c;\n } else if (c === '|' && !code) {\n out.push(cur.trim());\n cur = '';\n } else cur += c;\n }\n out.push(cur.trim());\n return out;\n}\n\nconst blank = (l: string) => !l.trim();\nconst startsBlock = (l: string) => FENCE.test(l) || HEADING.test(l) || HR.test(l) || QUOTE.test(l) || ITEM.test(l);\n\nfunction parse(lines: string[]): Block[] {\n const out: Block[] = [];\n let i = 0;\n while (i < lines.length) {\n const line = lines[i];\n if (blank(line)) {\n i++;\n continue;\n }\n if (DETAILS_OPEN.test(line)) {\n // The matching </details>, counting nested ones; what follows it on the line goes on as more Markdown.\n const rest = lines.slice(i).join('\\n');\n DETAILS_TAG.lastIndex = 0;\n let depth = 0;\n let open = -1;\n let close = rest.length;\n let after = rest.length;\n for (let m = DETAILS_TAG.exec(rest); m; m = DETAILS_TAG.exec(rest)) {\n if (!m[1]) {\n if (depth++ === 0) open = m.index + m[0].length;\n } else if (--depth === 0) {\n close = m.index;\n after = m.index + m[0].length;\n break;\n }\n }\n let inner = rest.slice(open, close);\n const sum = SUMMARY.exec(inner);\n if (sum) inner = inner.slice(0, sum.index) + inner.slice(sum.index + sum[0].length);\n out.push({ t: 'details', summary: (sum?.[1] ?? '').trim(), blocks: parse(inner.split('\\n')) });\n return out.concat(parse(rest.slice(after).split('\\n')));\n }\n const fence = FENCE.exec(line);\n if (fence) {\n const mark = fence[1];\n const body: string[] = [];\n i++;\n while (i < lines.length && !lines[i].trim().startsWith(mark)) body.push(lines[i++]);\n i++;\n out.push({ t: 'code', lang: fence[2].toLowerCase(), code: body.join('\\n') });\n continue;\n }\n const h = HEADING.exec(line);\n if (h) {\n out.push({ t: 'h', level: h[1].length, text: h[2] ?? '' });\n i++;\n continue;\n }\n if (HR.test(line)) {\n out.push({ t: 'hr' });\n i++;\n continue;\n }\n if (QUOTE.test(line)) {\n const body: string[] = [];\n while (i < lines.length && !blank(lines[i]) && (QUOTE.test(lines[i]) || !startsBlock(lines[i]))) {\n body.push(QUOTE.exec(lines[i])?.[1] ?? lines[i]);\n i++;\n }\n const alert = body.length > 0 ? ALERT.exec(body[0]) : null;\n if (alert) out.push({ t: 'alert', tone: ALERT_TONE[alert[1].toUpperCase()], blocks: parse(body.slice(1)) });\n else out.push({ t: 'quote', blocks: parse(body) });\n continue;\n }\n const item = ITEM.exec(line);\n if (item) {\n const ordered = /\\d/.test(item[2]);\n const start = ordered ? parseInt(item[2], 10) : 1;\n const items: Block[][] = [];\n while (i < lines.length) {\n const m = ITEM.exec(lines[i]);\n if (!m || /\\d/.test(m[2]) !== ordered) break;\n const indent = m[1].length + m[2].length + Math.max(1, Math.min(m[3].length, 4));\n const body = [m[4]];\n i++;\n // The item's own lines: indented continuation (nested lists too), and lazy text right after it.\n while (i < lines.length) {\n const l = lines[i];\n if (blank(l)) {\n const next = lines[i + 1];\n if (next !== undefined && /^\\s+/.test(next) && next.search(/\\S/) >= indent) {\n body.push('');\n i++;\n continue;\n }\n break;\n }\n const lead = l.search(/\\S/);\n if (lead >= indent || (lead >= 2 && ITEM.test(l.trimStart()))) body.push(l.slice(Math.min(lead, indent)));\n else if (!startsBlock(l) && !ITEM.test(l)) body.push(l);\n else break;\n i++;\n }\n items.push(parse(body));\n if (i < lines.length && blank(lines[i])) {\n const next = lines[i + 1];\n if (next !== undefined && ITEM.test(next) && /\\d/.test(ITEM.exec(next)?.[2] ?? '') === ordered) {\n i++;\n continue;\n }\n break;\n }\n }\n out.push({ t: 'list', ordered, start, items });\n continue;\n }\n if (line.includes('|') && i + 1 < lines.length && TABLE_SEP.test(lines[i + 1]) && lines[i + 1].includes('-')) {\n const head = cells(line);\n const align = cells(lines[i + 1]).map((c) =>\n c.startsWith(':') && c.endsWith(':') ? 'center' : c.endsWith(':') ? 'right' : c.startsWith(':') ? 'left' : null,\n );\n const rows: string[][] = [];\n i += 2;\n while (i < lines.length && !blank(lines[i]) && lines[i].includes('|')) rows.push(cells(lines[i++]));\n out.push({ t: 'table', head, align, rows });\n continue;\n }\n // A paragraph: lines until a blank line or another block.\n const body = [line];\n i++;\n while (i < lines.length && !blank(lines[i]) && !startsBlock(lines[i])) body.push(lines[i++]);\n out.push({ t: 'p', text: body.join('\\n') });\n }\n return out;\n}\n\n/** Only http, https, mailto and relative addresses are kept; anything else (javascript:, data:) is not a link. */\nexport function safeHref(href: string): string | undefined {\n const h = href.trim();\n if (!h) return undefined;\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(h);\n if (!scheme) return h;\n return ['http', 'https', 'mailto'].includes(scheme[1].toLowerCase()) ? h : undefined;\n}\n\n// A path in inline code: folders and a file with an extension, or a file and line (src/app.c:86, docs/a.md).\nconst PATH = /^(?:\\.{1,2}\\/)?(?:[\\w.-]+\\/)*[\\w.-]+\\.[A-Za-z0-9]+(?::\\d+(?:-\\d+)?)?$/;\nconst isPath = (s: string) => PATH.test(s) && (s.includes('/') || /:\\d/.test(s));\n\n// Never links, even when listed in schemes.\nconst BLOCKED = ['javascript', 'data', 'vbscript'];\n\ninterface Ctx {\n /** Extra schemes (fn, file) handed to linkHref and onLink as they are. */\n schemes?: string[];\n /** The next key: counted from 0 on every render, so the same source gives the same keys. */\n k: () => string;\n linkHref?: (href: string) => string | undefined | null;\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n refHref?: RefHref;\n onRef?: OnRef;\n terms?: readonly TermDef[];\n termsMark: TermsMark;\n /** All the words in one pattern; null without terms. */\n termRe: RegExp | null;\n /** Words already marked in this block (paragraph, list item, table cell). Absent: no words here (headings, link\n * text, a details summary). */\n seen?: Set<string>;\n}\n\n/** A new block: its own count of marked words. */\nconst block = (c: Ctx): Ctx => ({ ...c, seen: new Set() });\n/** No words marked inside (headings, link text, a summary button). */\nconst noTerms = (c: Ctx): Ctx => ({ ...c, seen: undefined });\n\nconst CJK = /[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\u3000-\\u303f\\uff00-\\uffef]/u;\n\n/** Inline Markdown: code spans, links, autolinks, bold, italic, hard breaks; HTML tags dropped, their text kept. */\nfunction inline(src: string, c: Ctx): React.ReactNode[] {\n let aiMark: string | null = null;\n const out: React.ReactNode[] = [];\n let text = '';\n const flush = () => {\n if (text && c.termRe && c.terms && c.seen) out.push(...withTerms(text, findTerms(text, c.terms, c.termRe, c.termsMark, c.seen), c.terms, c.k));\n else if (text) out.push(text);\n text = '';\n };\n let i = 0;\n while (i < src.length) {\n const ch = src[i];\n if (ch === '\\\\' && i + 1 < src.length && /[\\\\`*_{}[\\]()#+\\-.!|<>~]/.test(src[i + 1])) {\n text += src[i + 1];\n i += 2;\n continue;\n }\n if (ch === '\\\\' && src[i + 1] === '\\n') {\n flush();\n out.push(<br key={c.k()} />);\n i += 2;\n continue;\n }\n if (ch === '\\n') {\n // Two spaces before a line break make a break; otherwise it is a space.\n if (/ {2,}$/.test(text)) {\n text = text.replace(/ +$/, '');\n flush();\n out.push(<br key={c.k()} />);\n } else {\n // Lines joined: a space between words, none next to Chinese text or full-width punctuation.\n text = text.replace(/ +$/, '');\n const before = text.at(-1) ?? (typeof out.at(-1) === 'string' ? String(out.at(-1)).at(-1) : '');\n const after = src.slice(i + 1).trimStart()[0] ?? '';\n if (!CJK.test(before ?? '') && !CJK.test(after)) text += ' ';\n while (src[i + 1] === ' ') i++;\n }\n i++;\n continue;\n }\n if (ch === '`') {\n const run = /^`+/.exec(src.slice(i))?.[0] ?? '`';\n const end = src.indexOf(run, i + run.length);\n if (end > 0) {\n flush();\n let v = src.slice(i + run.length, end).replace(/\\n/g, ' ');\n if (/^ .* $/.test(v)) v = v.slice(1, -1);\n out.push(code(v, c));\n i = end + run.length;\n continue;\n }\n }\n if (ch === '<') {\n const auto = /^<((?:https?:|mailto:)[^\\s<>]+)>/i.exec(src.slice(i));\n if (auto) {\n flush();\n out.push(link(auto[1], [auto[1].replace(/^mailto:/i, '')], c));\n i += auto[0].length;\n continue;\n }\n const tag = /^<!--[\\s\\S]*?-->|^<\\/?[A-Za-z][\\w-]*(?:\\s[^<>]*)?\\/?>/.exec(src.slice(i));\n if (tag) {\n // MX: an HTML tag (or comment) is dropped; the text between tags stays.\n i += tag[0].length;\n continue;\n }\n }\n if (ch === '!' && src[i + 1] === '[') {\n // An image shows its alt text; nothing is loaded.\n const m = /^!\\[([^\\]]*)\\]\\([^)]*\\)/.exec(src.slice(i));\n if (m) {\n text += m[1];\n i += m[0].length;\n continue;\n }\n }\n if (ch === '[') {\n const m = matchLink(src, i);\n if (m) {\n // [AI](ai:) marks a paragraph, list item or cell written by AI: an AiMark at its end, wherever it is written.\n // Other words in the brackets, such as [推測](ai:), are shown in the same style.\n if (m.href.trim().toLowerCase() === 'ai:') {\n const words = m.text.trim();\n aiMark = words && words !== 'AI' ? words : '';\n i = m.end;\n if (src[i] === ' ') i++;\n continue;\n }\n flush();\n // [cookie](term:cookie) marks a word explicitly with its entry in terms.\n const termId = /^term:(.*)$/i.exec(m.href.trim())?.[1];\n if (termId !== undefined) {\n let id = termId;\n try {\n id = decodeURIComponent(termId);\n } catch {\n /* kept as written */\n }\n const t = c.terms?.find((x) => x.term === id);\n devWarn(!t, 'Markdown', `[${m.text}](term:${termId}) 找不到 terms 裡 term 為「${id}」的項目,只顯示文字。把它加進 terms,或改 term: 後面的字。`);\n c.seen?.add(id);\n out.push(t ? termNode(t, c.k(), inline(m.text, noTerms(c))) : <React.Fragment key={c.k()}>{inline(m.text, noTerms(c))}</React.Fragment>);\n i = m.end;\n continue;\n }\n // A link whose text is one code span ([`_sync_as`](fn:…)) is a name: accent monospace, no chip.\n const name = /^\\s*`([^`]+)`\\s*$/.exec(m.text)?.[1];\n out.push(link(m.href, inline(m.text, noTerms(c)), c, name));\n i = m.end;\n continue;\n }\n }\n if (ch === '*' || ch === '_') {\n const run = src[i + 1] === ch ? ch + ch : ch;\n // _ inside a word (snake_case) is not emphasis.\n const prev = src[i - 1];\n const intraword = ch === '_' && prev !== undefined && /\\w/.test(prev);\n const next = src[i + run.length];\n if (!intraword && next && !/\\s/.test(next)) {\n const end = findClose(src, i + run.length, run);\n if (end > 0) {\n flush();\n const inner = inline(src.slice(i + run.length, end), c);\n out.push(run.length === 2 ? <strong key={c.k()}>{inner}</strong> : <em key={c.k()}>{inner}</em>);\n i = end + run.length;\n continue;\n }\n }\n }\n text += ch;\n i++;\n }\n flush();\n if (aiMark != null) {\n // A trailing space before the mark is dropped; the mark keeps its own 8 px.\n const last = out[out.length - 1];\n if (typeof last === 'string') out[out.length - 1] = last.replace(/\\s+$/, '');\n out.push(<AiMark key={c.k()} text={aiMark || undefined} />);\n }\n return out;\n\n function code(v: string, ctx: Ctx): React.ReactNode {\n const onRef = ctx.onRef;\n if (isPath(v)) {\n // A file and line that points somewhere is a location: gray, one step smaller.\n const href = ctx.refHref?.(v) || undefined;\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={ctx.k()} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={ctx.k()} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n }\n return <InlineCode key={ctx.k()}>{v}</InlineCode>;\n }\n}\n\nfunction matchLink(src: string, i: number): { text: string; href: string; end: number } | null {\n let depth = 0;\n let j = i;\n for (; j < src.length; j++) {\n if (src[j] === '\\\\') {\n j++;\n continue;\n }\n if (src[j] === '[') depth++;\n else if (src[j] === ']' && --depth === 0) break;\n }\n if (j >= src.length || src[j + 1] !== '(') return null;\n // The address may hold balanced parentheses (javascript:alert(1), wiki/Foo_(bar)); an optional \"title\" follows.\n let at = j + 2;\n while (src[at] === ' ') at++;\n let depth2 = 0;\n let href = '';\n for (; at < src.length; at++) {\n const ch = src[at];\n if (/\\s/.test(ch)) break;\n if (ch === '(') depth2++;\n else if (ch === ')') {\n if (depth2 === 0) break;\n depth2--;\n }\n href += ch;\n }\n const rest = /^(?:\\s+(?:\"[^\"]*\"|'[^']*'))?\\s*\\)/.exec(src.slice(at));\n if (!rest) return null;\n return { text: src.slice(i + 1, j), href: href.replace(/^<(.*)>$/, '$1'), end: at + rest[0].length };\n}\n\nfunction findClose(src: string, from: number, run: string): number {\n let j = from;\n while ((j = src.indexOf(run, j)) > 0) {\n const before = src[j - 1];\n const after = src[j + run.length];\n if (before && !/\\s/.test(before) && !(run[0] === '_' && after && /\\w/.test(after)) && !(run.length === 1 && after === run)) return j;\n j += run.length;\n }\n return -1;\n}\n\nfunction link(raw: string, children: React.ReactNode, c: Ctx, name?: string): React.ReactNode {\n // A scheme listed in schemes (fn:, file:) is up to linkHref and onLink: no address of its own.\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(raw.trim())?.[1].toLowerCase();\n const own = !!scheme && !BLOCKED.includes(scheme) && !!c.schemes?.some((x) => x.toLowerCase() === scheme);\n const safe = own ? raw.trim() : safeHref(raw);\n if (safe === undefined) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const href = c.linkHref ? c.linkHref(safe) || undefined : own ? undefined : safe;\n if (!href && !c.onLink) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const outside = !!href && /^https?:/i.test(href);\n const onLink = c.onLink;\n const click = onLink\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onLink(safe, e);\n }\n : undefined;\n if (name !== undefined && !(outside && !c.onLink)) {\n if (href)\n return (\n <InlineCode key={c.k()} look=\"name\" href={href} onClick={click}>\n {name}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={c.k()} look=\"name\" onClick={click}>\n {name}\n </InlineCode>\n );\n }\n if (!href)\n return (\n <button key={c.k()} type=\"button\" className=\"ui-md-link\" onClick={click}>\n {children}\n </button>\n );\n return (\n <a key={c.k()} className=\"ui-md-link\" href={href} onClick={click} {...(outside && !c.onLink ? { target: '_blank', rel: 'noopener noreferrer' } : {})}>\n {children}\n </a>\n );\n}\n\n/** A list item whose whole content is one link (a reference list: 「RFC 1812: IPv4 router …」): that link, made a row\n * that fills the item, or null. Links inside a sentence stay inline. */\nfunction rowLink(nodes: React.ReactNode[]): React.ReactElement | null {\n const parts = nodes.filter((n) => !(typeof n === 'string' && !n.trim()));\n if (parts.length !== 1) return null;\n const only = parts[0];\n if (!React.isValidElement<{ className?: string }>(only) || (only.type !== 'a' && only.type !== 'button') || only.props.className !== 'ui-md-link')\n return null;\n return React.cloneElement(only, { className: 'ui-md-link is-row' });\n}\n\n// A fence's language name as CodeView knows it: ```python is py, ```bash is sh; file extensions work too (```ts).\nconst FENCE_LANG: Record<string, string> = {\n python: 'py',\n javascript: 'js',\n typescript: 'js',\n jsx: 'js',\n tsx: 'js',\n bash: 'sh',\n shell: 'sh',\n zsh: 'sh',\n console: 'sh',\n 'c++': 'c',\n};\nconst fenceLang = (l: string) => FENCE_LANG[l] ?? (languageOf('x.' + l) !== 'plain' ? languageOf('x.' + l) : l || 'plain');\n\n// A number cell's figures and its unit: [all, number, space, unit].\nconst NUM_UNIT = /^([-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?)(\\s?)(%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})$/u;\nconst NUM = /^[-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?\\s?(?:%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})?$/u;\n\nexport interface MarkdownProps {\n /** The Markdown text. */\n children: string;\n /** Only inline syntax (code, links, bold, italic), no paragraphs: for a one-line summary such as a README's first\n * sentence. Line breaks become spaces. */\n inline?: boolean;\n /** small: 13 px, for notes. Default: the same 16 px as the text around it. */\n size?: 'body' | 'small';\n /** The heading level `#` becomes. Default 4: # is an h4 (20 px), ## an h5, ### and deeper h6 (both 16 px bold). */\n topLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Link schemes of your own, such as ['fn', 'file']: [_sync_as](fn:harness/controller.py:VirtualRouter._sync_as)\n * goes to linkHref and onLink as written, which decide what it opens. javascript:, data: and vbscript: never link. */\n schemes?: string[];\n /** The address of a link (after the http, https, mailto or relative check); return undefined for no link. */\n linkHref?: (href: string) => string | undefined | null;\n /** A plain click on a link (the default navigation is prevented; Ctrl, ⌘ or Shift still open linkHref). */\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n /** Inline code that is a path (harness/routing.py:108, docs/a.md) and paths in code blocks: their link. Same as\n * CodeView's refHref. */\n refHref?: RefHref;\n /** A plain click on such a path. Same as CodeView's onRef. */\n onRef?: OnRef;\n /** Words that get an explanation (Term variant=\"inline\"): matched whole and case-sensitive in plain text, not in\n * inline code, link text or headings; fenced code blocks match them in comments and strings. `[cookie](term:cookie)`\n * marks one explicitly, wherever it is. */\n terms?: readonly TermDef[];\n /** 'first' (default): each word only where it first appears in a paragraph, list item or table cell. 'all': everywhere. */\n termsMark?: TermsMark;\n className?: string;\n}\n\n/** Markdown from project documents and code comments, in the system's own type, code and table styles. Never runs HTML:\n * tags are dropped and their text kept; links only to http, https, mailto and relative addresses. */\nexport function Markdown(p: MarkdownProps) {\n // Keys count from 0 on every render, so the same source gives the same keys and nothing remounts.\n let n = 0;\n const termsMark = p.termsMark ?? 'first';\n const termRe = React.useMemo(() => termPattern(p.terms), [p.terms]);\n const c: Ctx = {\n k: () => 'm' + n++,\n schemes: p.schemes,\n linkHref: p.linkHref,\n onLink: p.onLink,\n refHref: p.refHref,\n onRef: p.onRef,\n terms: p.terms,\n termsMark,\n termRe,\n };\n const src = String(p.children ?? '').replace(/\\r\\n?/g, '\\n');\n const cls = cx('ui-md', p.size === 'small' && 'is-small', p.className);\n if (p.inline) return <span className={cx(cls, 'is-inline')}>{inline(src.trim().replace(/\\n\\s*\\n/g, '\\n'), block(c))}</span>;\n const top = p.topLevel ?? 4;\n const render = (blocks: Block[]): React.ReactNode[] =>\n blocks.map((b) => {\n switch (b.t) {\n case 'h': {\n const H = `h${Math.min(6, top + b.level - 1)}` as 'h4';\n return (\n <H key={c.k()} className=\"ui-md-h\">\n {inline(b.text, noTerms(c))}\n </H>\n );\n }\n case 'p':\n return <p key={c.k()}>{inline(b.text, block(c))}</p>;\n case 'hr':\n return <hr key={c.k()} />;\n case 'details':\n return (\n <MdDetails key={c.k()} summary={inline(b.summary, noTerms(c))}>\n {render(b.blocks)}\n </MdDetails>\n );\n case 'alert':\n return (\n <Alert key={c.k()} tone={b.tone} className=\"ui-md-alert\">\n {render(b.blocks)}\n </Alert>\n );\n case 'quote':\n return <blockquote key={c.k()}>{render(b.blocks)}</blockquote>;\n case 'list': {\n const items = b.items.map((it) => {\n const key = c.k();\n if (!(it.length === 1 && it[0].t === 'p')) return <li key={key}>{render(it)}</li>;\n const nodes = inline(it[0].text, block(c));\n const row = rowLink(nodes);\n return row ? (\n <li key={key} className=\"ui-md-rowitem\">\n {row}\n </li>\n ) : (\n <li key={key}>{nodes}</li>\n );\n });\n return b.ordered ? (\n <ol key={c.k()} start={b.start === 1 ? undefined : b.start}>\n {items}\n </ol>\n ) : (\n <ul key={c.k()}>{items}</ul>\n );\n }\n case 'code':\n return (\n <CodeView\n key={c.k()}\n className=\"ui-md-code\"\n code={b.code}\n language={fenceLang(b.lang)}\n languageLabel={b.lang ? undefined : false}\n copy\n lineNumbers={false}\n refHref={p.refHref}\n onRef={p.onRef}\n terms={p.terms}\n termsMark={termsMark}\n />\n );\n case 'table': {\n // Numbers right-aligned: a column whose cells are all numbers, unless the source sets its alignment.\n const n = b.head.length;\n const numeric = b.head.map((_, j) => b.rows.length > 0 && b.rows.every((r) => !r[j] || NUM.test(r[j])));\n const align = (j: number): React.CSSProperties | undefined => {\n const a = b.align[j] ?? (numeric[j] ? 'right' : null);\n return a ? { textAlign: a } : undefined;\n };\n return (\n <MdTable\n key={c.k()}\n label={b.head.map(plain).join('、')}\n heads={b.head.map((h) => inline(h, noTerms(c)))}\n headText={b.head.map(plain)}\n rows={b.rows.map((r) =>\n Array.from({ length: n }, (_, j) => {\n // A number column: the figures in Geist Mono (td.is-num), the unit (「46 分」「3.5 GB」) in the text font.\n const u = numeric[j] ? NUM_UNIT.exec(r[j] ?? '') : null;\n return u ? (\n <>\n {inline(u[1], block(c))}\n {u[2]}\n <span className=\"ui-unit\">{u[3]}</span>\n </>\n ) : (\n inline(r[j] ?? '', block(c))\n );\n }),\n )}\n numeric={numeric}\n align={align}\n />\n );\n }\n }\n });\n return <div className={cls}>{render(parse(src.split('\\n')))}</div>;\n}\n\n/** A header cell as plain text, for the label above each value when a narrow table turns into cards. */\nconst plain = (md: string) =>\n md\n .replace(/\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1')\n .replace(/[`*_]/g, '')\n .trim();\n\n/** DA: a <details> block: a button with the summary, closed at first. The closed content stays in the page\n * (hidden=\"until-found\"), so the browser's find opens it, as in Section. */\nfunction MdDetails({ summary, children }: { summary: React.ReactNode; children: React.ReactNode }) {\n const [open, setOpen] = React.useState(false);\n const id = React.useId();\n const body = React.useRef<HTMLDivElement>(null);\n React.useLayoutEffect(() => {\n const el = body.current;\n if (!el) return;\n if (open) {\n el.removeAttribute('hidden');\n return;\n }\n el.setAttribute('hidden', 'until-found');\n const found = () => setOpen(true);\n el.addEventListener('beforematch', found);\n return () => el.removeEventListener('beforematch', found);\n }, [open]);\n return (\n <div className={cx('ui-md-details', open && 'is-open')}>\n <button type=\"button\" className=\"ui-md-summary\" aria-expanded={open} aria-controls={id} onClick={() => setOpen(!open)}>\n <Icon name=\"caret-right\" size={16} className=\"ui-md-caret\" />\n <span>{summary}</span>\n </button>\n <div id={id} ref={body} className=\"ui-md-details-body\">\n {children}\n </div>\n </div>\n );\n}\n\n/** A Markdown table: column borders in the header drag; the corner button shows the whole table in a wide dialog.\n * Under 480 px every row is a card instead, without either. The border, the dialog and the copy icon are the same as\n * DataTable's (internal/tableTools). */\nfunction MdTable(p: {\n label: string;\n heads: React.ReactNode[];\n headText: string[];\n rows: React.ReactNode[][];\n numeric: boolean[];\n align: (j: number) => React.CSSProperties | undefined;\n}) {\n const [widths, setWidths] = React.useState<number[] | null>(null);\n const [big, setBig] = React.useState(false);\n const [dragging, setDragging] = React.useState(false);\n const table = React.useRef<HTMLTableElement>(null);\n // Rounded up: a fixed column a fraction of a pixel narrower than it was drawn would wrap its longest word.\n const measure = () => [...(table.current?.querySelectorAll<HTMLElement>('thead th') ?? [])].map((th) => Math.ceil(th.getBoundingClientRect().width));\n // The drawn widths, kept for the borders' aria-valuenow (refs are not read while rendering).\n const [measured, setMeasured] = React.useState<number[]>([]);\n React.useLayoutEffect(() => {\n const el = table.current;\n if (!el) return;\n const update = () => {\n const m = [...el.querySelectorAll<HTMLElement>('thead th')].map((th) => Math.ceil(th.getBoundingClientRect().width));\n setMeasured((old) => (old.length === m.length && old.every((v, i) => v === m[i]) ? old : m));\n };\n update();\n const ro = resizeObserver(update);\n ro?.observe(el);\n return () => ro?.disconnect();\n }, []);\n const body = (resize: boolean) => (\n <table\n ref={resize ? table : undefined}\n className=\"ui-md-table\"\n style={resize && widths ? { width: widths.reduce((a, b) => a + b, 0), tableLayout: 'fixed', minWidth: 0 } : undefined}\n >\n {resize && widths ? (\n <colgroup>\n {widths.map((w, j) => (\n <col key={j} style={{ width: w }} />\n ))}\n </colgroup>\n ) : null}\n <thead>\n <tr>\n {p.heads.map((h, j) => (\n <th key={j} style={p.align(j)}>\n {h}\n {resize ? (\n <ColResize\n name={p.headText[j]}\n width={widths?.[j] ?? measured[j] ?? 0}\n start={() => (widths ?? measure())[j]}\n onWidth={(w) => {\n const next = (widths ?? measure()).slice();\n next[j] = w;\n setWidths(next);\n }}\n onReset={() => setWidths(null)}\n onDragging={setDragging}\n />\n ) : null}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {p.rows.map((r, ri) => (\n <tr key={ri}>\n {r.map((cell, j) => (\n <td key={j} className={p.numeric[j] ? 'is-num' : undefined} style={p.align(j)} data-label={p.headText[j]}>\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n return (\n <div className={cx('ui-md-tablebox', dragging && 'is-resizing')}>\n <div className=\"ui-md-table-tools\">\n <ZoomButton onClick={() => setBig(true)} />\n </div>\n <div className=\"ui-md-table-wrap\" tabIndex={0} role=\"region\" aria-label={p.label}>\n {body(true)}\n </div>\n <TableDialog open={big} onClose={() => setBig(false)}>\n <div className=\"ui-md ui-md-table-wrap\" tabIndex={0} role=\"region\" aria-label={p.label}>\n {body(false)}\n </div>\n </TableDialog>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAcA,aAAaA,mBAAY;AAiBzB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,UAAU;AAEhB,MAAM,QAAQ;AACd,MAAM,aAAwC;CAAE,MAAM;CAAQ,KAAK;CAAW,WAAW;CAAQ,SAAS;CAAW,SAAS;AAAS;AAEvI,MAAM,QAAQ;AACd,MAAM,UAAU;AAChB,MAAM,KAAK;AACX,MAAM,OAAO;AACb,MAAM,QAAQ;AACd,MAAM,YAAY;AAElB,SAAS,MAAM,MAAwB;CACrC,IAAI,IAAI,KAAK,KAAK;CAClB,IAAI,EAAE,WAAW,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC;CACpC,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC,EAAE,SAAS,KAAK,GAAG,IAAI,EAAE,MAAM,GAAG,EAAE;CAC5D,MAAM,MAAgB,CAAC;CACvB,IAAI,MAAM;CACV,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;EACjC,MAAM,IAAI,EAAE;EACZ,IAAI,MAAM,QAAQ,EAAE,IAAI,OAAO,KAAK;GAClC,OAAO;GACP;EACF,OAAO,IAAI,MAAM,KAAK;GACpB,OAAO,CAAC;GACR,OAAO;EACT,OAAO,IAAI,MAAM,OAAO,CAAC,MAAM;GAC7B,IAAI,KAAK,IAAI,KAAK,CAAC;GACnB,MAAM;EACR,OAAO,OAAO;CAChB;CACA,IAAI,KAAK,IAAI,KAAK,CAAC;CACn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BAAC,OAAD;IAAK,WAAU;IACb,UAAA,oBAAC,YAAD,EAAY,eAAe,OAAO,IAAI,EAAI,CAAA;GACvC,CAAA;GACL,oBAAC,OAAD;IAAK,WAAU;IAAmB,UAAU;IAAG,MAAK;IAAS,cAAY,EAAE;IACxE,UAAA,KAAK,IAAI;GACP,CAAA;GACL,oBAAC,aAAD;IAAa,MAAM;IAAK,eAAe,OAAO,KAAK;IACjD,UAAA,oBAAC,OAAD;KAAK,WAAU;KAAyB,UAAU;KAAG,MAAK;KAAS,cAAY,EAAE;KAC9E,UAAA,KAAK,KAAK;IACR,CAAA;GACM,CAAA;EACV;;AAET"}
1
+ {"version":3,"file":"Markdown.js","names":["phCaretRight"],"sources":["../../../src/components/Markdown/Markdown.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Alert, type AlertTone } from '../Alert/Alert';\nimport { Icon } from '../../icons/Icon';\nimport { ColResize, TableDialog, ZoomButton } from '../../internal/tableTools';\nimport { cx, resizeObserver } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\nimport { CodeView } from '../CodeView/CodeView';\nimport { languageOf } from '../CodeView/tokens';\nimport { InlineCode, type OnRef, type RefHref } from '../InlineCode/InlineCode';\nimport { AiMark } from '../AiMark/AiMark';\nimport { findTerms, termNode, termPattern, withTerms, type TermDef, type TermsMark } from '../../internal/terms';\nimport { includeIcons } from '../../icons/store';\nimport phCaretRight from '../../icons/ph/caret-right';\n\nincludeIcons(phCaretRight);\n\n/* A small Markdown reader for project documents and code comments. It builds React elements only: no HTML from the\n source is ever run. HTML tags are dropped and their text kept (MX). */\n\ntype Block =\n | { t: 'h'; level: number; text: string }\n | { t: 'p'; text: string }\n | { t: 'code'; lang: string; code: string }\n | { t: 'quote'; blocks: Block[] }\n | { t: 'list'; ordered: boolean; start: number; items: Block[][] }\n | { t: 'table'; head: string[]; align: ('left' | 'right' | 'center' | null)[]; rows: string[][] }\n | { t: 'hr' }\n | { t: 'details'; summary: string; blocks: Block[] }\n | { t: 'alert'; tone: AlertTone; blocks: Block[] };\n\n// DA: <details> and <summary> are the only HTML let through, without attributes; they make a closed block.\nconst DETAILS_OPEN = /^\\s*<details\\b[^>]*>/i;\nconst DETAILS_TAG = /<(\\/?)details\\b[^>]*>/gi;\nconst SUMMARY = /<summary\\b[^>]*>([\\s\\S]*?)<\\/summary>/i;\n// NB: GitHub's alerts, > [!NOTE] and the like, shown as the system's Alert.\nconst ALERT = /^\\s*\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]\\s*$/i;\nconst ALERT_TONE: Record<string, AlertTone> = { NOTE: 'info', TIP: 'success', IMPORTANT: 'info', WARNING: 'warning', CAUTION: 'danger' };\n\nconst FENCE = /^ {0,3}(`{3,}|~{3,})\\s*([\\w+#.-]*)/;\nconst HEADING = /^ {0,3}(#{1,6})(?:\\s+(.*?))?\\s*#*\\s*$/;\nconst HR = /^ {0,3}([-*_])(?:\\s*\\1){2,}\\s*$/;\nconst ITEM = /^( {0,3})([-*+]|\\d{1,9}[.)])(\\s+|$)(.*)$/;\nconst QUOTE = /^ {0,3}> ?(.*)$/;\nconst TABLE_SEP = /^\\s*\\|?\\s*:?-{1,}:?\\s*(\\|\\s*:?-{1,}:?\\s*)*\\|?\\s*$/;\n\nfunction cells(line: string): string[] {\n let s = line.trim();\n if (s.startsWith('|')) s = s.slice(1);\n if (s.endsWith('|') && !s.endsWith('\\\\|')) s = s.slice(0, -1);\n const out: string[] = [];\n let cur = '';\n let code = false;\n for (let i = 0; i < s.length; i++) {\n const c = s[i];\n if (c === '\\\\' && s[i + 1] === '|') {\n cur += '|';\n i++;\n } else if (c === '`') {\n code = !code;\n cur += c;\n } else if (c === '|' && !code) {\n out.push(cur.trim());\n cur = '';\n } else cur += c;\n }\n out.push(cur.trim());\n return out;\n}\n\nconst blank = (l: string) => !l.trim();\nconst startsBlock = (l: string) => FENCE.test(l) || HEADING.test(l) || HR.test(l) || QUOTE.test(l) || ITEM.test(l);\n\nfunction parse(lines: string[]): Block[] {\n const out: Block[] = [];\n let i = 0;\n while (i < lines.length) {\n const line = lines[i];\n if (blank(line)) {\n i++;\n continue;\n }\n if (DETAILS_OPEN.test(line)) {\n // The matching </details>, counting nested ones; what follows it on the line goes on as more Markdown.\n const rest = lines.slice(i).join('\\n');\n DETAILS_TAG.lastIndex = 0;\n let depth = 0;\n let open = -1;\n let close = rest.length;\n let after = rest.length;\n for (let m = DETAILS_TAG.exec(rest); m; m = DETAILS_TAG.exec(rest)) {\n if (!m[1]) {\n if (depth++ === 0) open = m.index + m[0].length;\n } else if (--depth === 0) {\n close = m.index;\n after = m.index + m[0].length;\n break;\n }\n }\n let inner = rest.slice(open, close);\n const sum = SUMMARY.exec(inner);\n if (sum) inner = inner.slice(0, sum.index) + inner.slice(sum.index + sum[0].length);\n out.push({ t: 'details', summary: (sum?.[1] ?? '').trim(), blocks: parse(inner.split('\\n')) });\n return out.concat(parse(rest.slice(after).split('\\n')));\n }\n const fence = FENCE.exec(line);\n if (fence) {\n const mark = fence[1];\n const body: string[] = [];\n i++;\n while (i < lines.length && !lines[i].trim().startsWith(mark)) body.push(lines[i++]);\n i++;\n out.push({ t: 'code', lang: fence[2].toLowerCase(), code: body.join('\\n') });\n continue;\n }\n const h = HEADING.exec(line);\n if (h) {\n out.push({ t: 'h', level: h[1].length, text: h[2] ?? '' });\n i++;\n continue;\n }\n if (HR.test(line)) {\n out.push({ t: 'hr' });\n i++;\n continue;\n }\n if (QUOTE.test(line)) {\n const body: string[] = [];\n while (i < lines.length && !blank(lines[i]) && (QUOTE.test(lines[i]) || !startsBlock(lines[i]))) {\n body.push(QUOTE.exec(lines[i])?.[1] ?? lines[i]);\n i++;\n }\n const alert = body.length > 0 ? ALERT.exec(body[0]) : null;\n if (alert) out.push({ t: 'alert', tone: ALERT_TONE[alert[1].toUpperCase()], blocks: parse(body.slice(1)) });\n else out.push({ t: 'quote', blocks: parse(body) });\n continue;\n }\n const item = ITEM.exec(line);\n if (item) {\n const ordered = /\\d/.test(item[2]);\n const start = ordered ? parseInt(item[2], 10) : 1;\n const items: Block[][] = [];\n while (i < lines.length) {\n const m = ITEM.exec(lines[i]);\n if (!m || /\\d/.test(m[2]) !== ordered) break;\n const indent = m[1].length + m[2].length + Math.max(1, Math.min(m[3].length, 4));\n const body = [m[4]];\n i++;\n // The item's own lines: indented continuation (nested lists too), and lazy text right after it.\n while (i < lines.length) {\n const l = lines[i];\n if (blank(l)) {\n const next = lines[i + 1];\n if (next !== undefined && /^\\s+/.test(next) && next.search(/\\S/) >= indent) {\n body.push('');\n i++;\n continue;\n }\n break;\n }\n const lead = l.search(/\\S/);\n if (lead >= indent || (lead >= 2 && ITEM.test(l.trimStart()))) body.push(l.slice(Math.min(lead, indent)));\n else if (!startsBlock(l) && !ITEM.test(l)) body.push(l);\n else break;\n i++;\n }\n items.push(parse(body));\n if (i < lines.length && blank(lines[i])) {\n const next = lines[i + 1];\n if (next !== undefined && ITEM.test(next) && /\\d/.test(ITEM.exec(next)?.[2] ?? '') === ordered) {\n i++;\n continue;\n }\n break;\n }\n }\n out.push({ t: 'list', ordered, start, items });\n continue;\n }\n if (line.includes('|') && i + 1 < lines.length && TABLE_SEP.test(lines[i + 1]) && lines[i + 1].includes('-')) {\n const head = cells(line);\n const align = cells(lines[i + 1]).map((c) =>\n c.startsWith(':') && c.endsWith(':') ? 'center' : c.endsWith(':') ? 'right' : c.startsWith(':') ? 'left' : null,\n );\n const rows: string[][] = [];\n i += 2;\n while (i < lines.length && !blank(lines[i]) && lines[i].includes('|')) rows.push(cells(lines[i++]));\n out.push({ t: 'table', head, align, rows });\n continue;\n }\n // A paragraph: lines until a blank line or another block.\n const body = [line];\n i++;\n while (i < lines.length && !blank(lines[i]) && !startsBlock(lines[i])) body.push(lines[i++]);\n out.push({ t: 'p', text: body.join('\\n') });\n }\n return out;\n}\n\n/** Only http, https, mailto and relative addresses are kept; anything else (javascript:, data:) is not a link. */\nexport function safeHref(href: string): string | undefined {\n const h = href.trim();\n if (!h) return undefined;\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(h);\n if (!scheme) return h;\n return ['http', 'https', 'mailto'].includes(scheme[1].toLowerCase()) ? h : undefined;\n}\n\n// A path in inline code: folders and a file with an extension, or a file and line (src/app.c:86, docs/a.md).\nconst PATH = /^(?:\\.{1,2}\\/)?(?:[\\w.-]+\\/)*[\\w.-]+\\.[A-Za-z0-9]+(?::\\d+(?:-\\d+)?)?$/;\nconst isPath = (s: string) => PATH.test(s) && (s.includes('/') || /:\\d/.test(s));\n\n// Never links, even when listed in schemes.\nconst BLOCKED = ['javascript', 'data', 'vbscript'];\n\ninterface Ctx {\n /** Extra schemes (fn, file) handed to linkHref and onLink as they are. */\n schemes?: string[];\n /** The next key: counted from 0 on every render, so the same source gives the same keys. */\n k: () => string;\n linkHref?: (href: string) => string | undefined | null;\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n refHref?: RefHref;\n onRef?: OnRef;\n terms?: readonly TermDef[];\n termsMark: TermsMark;\n /** All the words in one pattern; null without terms. */\n termRe: RegExp | null;\n /** Words already marked in this block (paragraph, list item, table cell). Absent: no words here (headings, link\n * text, a details summary). */\n seen?: Set<string>;\n}\n\n/** A new block: its own count of marked words. */\nconst block = (c: Ctx): Ctx => ({ ...c, seen: new Set() });\n/** No words marked inside (headings, link text, a summary button). */\nconst noTerms = (c: Ctx): Ctx => ({ ...c, seen: undefined });\n\nconst CJK = /[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\u3000-\\u303f\\uff00-\\uffef]/u;\n\n/** Inline Markdown: code spans, links, autolinks, bold, italic, hard breaks; HTML tags dropped, their text kept. */\nfunction inline(src: string, c: Ctx): React.ReactNode[] {\n let aiMark: string | null = null;\n const out: React.ReactNode[] = [];\n let text = '';\n const flush = () => {\n if (text && c.termRe && c.terms && c.seen) out.push(...withTerms(text, findTerms(text, c.terms, c.termRe, c.termsMark, c.seen), c.terms, c.k));\n else if (text) out.push(text);\n text = '';\n };\n let i = 0;\n while (i < src.length) {\n const ch = src[i];\n if (ch === '\\\\' && i + 1 < src.length && /[\\\\`*_{}[\\]()#+\\-.!|<>~]/.test(src[i + 1])) {\n text += src[i + 1];\n i += 2;\n continue;\n }\n if (ch === '\\\\' && src[i + 1] === '\\n') {\n flush();\n out.push(<br key={c.k()} />);\n i += 2;\n continue;\n }\n if (ch === '\\n') {\n // Two spaces before a line break make a break; otherwise it is a space.\n if (/ {2,}$/.test(text)) {\n text = text.replace(/ +$/, '');\n flush();\n out.push(<br key={c.k()} />);\n } else {\n // Lines joined: a space between words, none next to Chinese text or full-width punctuation.\n text = text.replace(/ +$/, '');\n const before = text.at(-1) ?? (typeof out.at(-1) === 'string' ? String(out.at(-1)).at(-1) : '');\n const after = src.slice(i + 1).trimStart()[0] ?? '';\n if (!CJK.test(before ?? '') && !CJK.test(after)) text += ' ';\n while (src[i + 1] === ' ') i++;\n }\n i++;\n continue;\n }\n if (ch === '`') {\n const run = /^`+/.exec(src.slice(i))?.[0] ?? '`';\n const end = src.indexOf(run, i + run.length);\n if (end > 0) {\n flush();\n let v = src.slice(i + run.length, end).replace(/\\n/g, ' ');\n if (/^ .* $/.test(v)) v = v.slice(1, -1);\n out.push(code(v, c));\n i = end + run.length;\n continue;\n }\n }\n if (ch === '<') {\n const auto = /^<((?:https?:|mailto:)[^\\s<>]+)>/i.exec(src.slice(i));\n if (auto) {\n flush();\n out.push(link(auto[1], [auto[1].replace(/^mailto:/i, '')], c));\n i += auto[0].length;\n continue;\n }\n const tag = /^<!--[\\s\\S]*?-->|^<\\/?[A-Za-z][\\w-]*(?:\\s[^<>]*)?\\/?>/.exec(src.slice(i));\n if (tag) {\n // MX: an HTML tag (or comment) is dropped; the text between tags stays.\n i += tag[0].length;\n continue;\n }\n }\n if (ch === '!' && src[i + 1] === '[') {\n // An image shows its alt text; nothing is loaded.\n const m = /^!\\[([^\\]]*)\\]\\([^)]*\\)/.exec(src.slice(i));\n if (m) {\n text += m[1];\n i += m[0].length;\n continue;\n }\n }\n if (ch === '[') {\n const m = matchLink(src, i);\n if (m) {\n // [AI](ai:) marks a paragraph, list item or cell written by AI: an AiMark at its end, wherever it is written.\n // Other words in the brackets, such as [推測](ai:), are shown in the same style.\n if (m.href.trim().toLowerCase() === 'ai:') {\n const words = m.text.trim();\n aiMark = words && words !== 'AI' ? words : '';\n i = m.end;\n if (src[i] === ' ') i++;\n continue;\n }\n flush();\n // [cookie](term:cookie) marks a word explicitly with its entry in terms.\n const termId = /^term:(.*)$/i.exec(m.href.trim())?.[1];\n if (termId !== undefined) {\n let id = termId;\n try {\n id = decodeURIComponent(termId);\n } catch {\n /* kept as written */\n }\n const t = c.terms?.find((x) => x.term === id);\n devWarn(\n !t,\n 'Markdown',\n `[${m.text}](term:${termId}) has no entry with term \"${id}\" in terms, so only the text shows. Add it to terms, or change the word after term:.`,\n );\n c.seen?.add(id);\n out.push(t ? termNode(t, c.k(), inline(m.text, noTerms(c))) : <React.Fragment key={c.k()}>{inline(m.text, noTerms(c))}</React.Fragment>);\n i = m.end;\n continue;\n }\n // A link whose text is one code span ([`_sync_as`](fn:…)) is a name: accent monospace, no chip.\n const name = /^\\s*`([^`]+)`\\s*$/.exec(m.text)?.[1];\n out.push(link(m.href, inline(m.text, noTerms(c)), c, name));\n i = m.end;\n continue;\n }\n }\n if (ch === '*' || ch === '_') {\n const run = src[i + 1] === ch ? ch + ch : ch;\n // _ inside a word (snake_case) is not emphasis.\n const prev = src[i - 1];\n const intraword = ch === '_' && prev !== undefined && /\\w/.test(prev);\n const next = src[i + run.length];\n if (!intraword && next && !/\\s/.test(next)) {\n const end = findClose(src, i + run.length, run);\n if (end > 0) {\n flush();\n const inner = inline(src.slice(i + run.length, end), c);\n out.push(run.length === 2 ? <strong key={c.k()}>{inner}</strong> : <em key={c.k()}>{inner}</em>);\n i = end + run.length;\n continue;\n }\n }\n }\n text += ch;\n i++;\n }\n flush();\n if (aiMark != null) {\n // A trailing space before the mark is dropped; the mark keeps its own 8 px.\n const last = out[out.length - 1];\n if (typeof last === 'string') out[out.length - 1] = last.replace(/\\s+$/, '');\n out.push(<AiMark key={c.k()} text={aiMark || undefined} />);\n }\n return out;\n\n function code(v: string, ctx: Ctx): React.ReactNode {\n const onRef = ctx.onRef;\n if (isPath(v)) {\n // A file and line that points somewhere is a location: gray, one step smaller.\n const href = ctx.refHref?.(v) || undefined;\n const click = onRef\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onRef(v, e);\n }\n : undefined;\n if (href)\n return (\n <InlineCode key={ctx.k()} look=\"location\" href={href} onClick={click}>\n {v}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={ctx.k()} look=\"location\" onClick={click}>\n {v}\n </InlineCode>\n );\n }\n return <InlineCode key={ctx.k()}>{v}</InlineCode>;\n }\n}\n\nfunction matchLink(src: string, i: number): { text: string; href: string; end: number } | null {\n let depth = 0;\n let j = i;\n for (; j < src.length; j++) {\n if (src[j] === '\\\\') {\n j++;\n continue;\n }\n if (src[j] === '[') depth++;\n else if (src[j] === ']' && --depth === 0) break;\n }\n if (j >= src.length || src[j + 1] !== '(') return null;\n // The address may hold balanced parentheses (javascript:alert(1), wiki/Foo_(bar)); an optional \"title\" follows.\n let at = j + 2;\n while (src[at] === ' ') at++;\n let depth2 = 0;\n let href = '';\n for (; at < src.length; at++) {\n const ch = src[at];\n if (/\\s/.test(ch)) break;\n if (ch === '(') depth2++;\n else if (ch === ')') {\n if (depth2 === 0) break;\n depth2--;\n }\n href += ch;\n }\n const rest = /^(?:\\s+(?:\"[^\"]*\"|'[^']*'))?\\s*\\)/.exec(src.slice(at));\n if (!rest) return null;\n return { text: src.slice(i + 1, j), href: href.replace(/^<(.*)>$/, '$1'), end: at + rest[0].length };\n}\n\nfunction findClose(src: string, from: number, run: string): number {\n let j = from;\n while ((j = src.indexOf(run, j)) > 0) {\n const before = src[j - 1];\n const after = src[j + run.length];\n if (before && !/\\s/.test(before) && !(run[0] === '_' && after && /\\w/.test(after)) && !(run.length === 1 && after === run)) return j;\n j += run.length;\n }\n return -1;\n}\n\nfunction link(raw: string, children: React.ReactNode, c: Ctx, name?: string): React.ReactNode {\n // A scheme listed in schemes (fn:, file:) is up to linkHref and onLink: no address of its own.\n const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(raw.trim())?.[1].toLowerCase();\n const own = !!scheme && !BLOCKED.includes(scheme) && !!c.schemes?.some((x) => x.toLowerCase() === scheme);\n const safe = own ? raw.trim() : safeHref(raw);\n if (safe === undefined) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const href = c.linkHref ? c.linkHref(safe) || undefined : own ? undefined : safe;\n if (!href && !c.onLink) return <React.Fragment key={c.k()}>{children}</React.Fragment>;\n const outside = !!href && /^https?:/i.test(href);\n const onLink = c.onLink;\n const click = onLink\n ? (e: React.MouseEvent<HTMLElement>) => {\n if (href && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;\n e.preventDefault();\n onLink(safe, e);\n }\n : undefined;\n if (name !== undefined && !(outside && !c.onLink)) {\n if (href)\n return (\n <InlineCode key={c.k()} look=\"name\" href={href} onClick={click}>\n {name}\n </InlineCode>\n );\n if (click)\n return (\n <InlineCode key={c.k()} look=\"name\" onClick={click}>\n {name}\n </InlineCode>\n );\n }\n if (!href)\n return (\n <button key={c.k()} type=\"button\" className=\"ui-md-link\" onClick={click}>\n {children}\n </button>\n );\n return (\n <a key={c.k()} className=\"ui-md-link\" href={href} onClick={click} {...(outside && !c.onLink ? { target: '_blank', rel: 'noopener noreferrer' } : {})}>\n {children}\n </a>\n );\n}\n\n/** A list item whose whole content is one link (a reference list: 「RFC 1812: IPv4 router …」): that link, made a row\n * that fills the item, or null. Links inside a sentence stay inline. */\nfunction rowLink(nodes: React.ReactNode[]): React.ReactElement | null {\n const parts = nodes.filter((n) => !(typeof n === 'string' && !n.trim()));\n if (parts.length !== 1) return null;\n const only = parts[0];\n if (!React.isValidElement<{ className?: string }>(only) || (only.type !== 'a' && only.type !== 'button') || only.props.className !== 'ui-md-link')\n return null;\n return React.cloneElement(only, { className: 'ui-md-link is-row' });\n}\n\n// A fence's language name as CodeView knows it: ```python is py, ```bash is sh; file extensions work too (```ts).\nconst FENCE_LANG: Record<string, string> = {\n python: 'py',\n javascript: 'js',\n typescript: 'js',\n jsx: 'js',\n tsx: 'js',\n bash: 'sh',\n shell: 'sh',\n zsh: 'sh',\n console: 'sh',\n 'c++': 'c',\n};\nconst fenceLang = (l: string) => FENCE_LANG[l] ?? (languageOf('x.' + l) !== 'plain' ? languageOf('x.' + l) : l || 'plain');\n\n// A number cell's figures and its unit: [all, number, space, unit].\nconst NUM_UNIT = /^([-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?)(\\s?)(%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})$/u;\nconst NUM = /^[-+]?(?:NT\\$\\s?)?[\\d,]+(?:\\.\\d+)?\\s?(?:%|[A-Za-z]{1,3}|\\p{Script=Han}{1,2})?$/u;\n\nexport interface MarkdownProps {\n /** The Markdown text. */\n children: string;\n /** Only inline syntax (code, links, bold, italic), no paragraphs: for a one-line summary such as a README's first\n * sentence. Line breaks become spaces. */\n inline?: boolean;\n /** small: 13 px, for notes. Default: the same 16 px as the text around it. */\n size?: 'body' | 'small';\n /** The heading level `#` becomes. Default 4: # is an h4 (20 px), ## an h5, ### and deeper h6 (both 16 px bold). */\n topLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Link schemes of your own, such as ['fn', 'file']: [_sync_as](fn:harness/controller.py:VirtualRouter._sync_as)\n * goes to linkHref and onLink as written, which decide what it opens. javascript:, data: and vbscript: never link. */\n schemes?: string[];\n /** The address of a link (after the http, https, mailto or relative check); return undefined for no link. */\n linkHref?: (href: string) => string | undefined | null;\n /** A plain click on a link (the default navigation is prevented; Ctrl, ⌘ or Shift still open linkHref). */\n onLink?: (href: string, e: React.MouseEvent<HTMLElement>) => void;\n /** Inline code that is a path (harness/routing.py:108, docs/a.md) and paths in code blocks: their link. Same as\n * CodeView's refHref. */\n refHref?: RefHref;\n /** A plain click on such a path. Same as CodeView's onRef. */\n onRef?: OnRef;\n /** Words that get an explanation (Term variant=\"inline\"): matched whole and case-sensitive in plain text, not in\n * inline code, link text or headings; fenced code blocks match them in comments and strings. `[cookie](term:cookie)`\n * marks one explicitly, wherever it is. */\n terms?: readonly TermDef[];\n /** 'first' (default): each word only where it first appears in a paragraph, list item or table cell. 'all': everywhere. */\n termsMark?: TermsMark;\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Markdown from project documents and code comments, in the system's own type, code and table styles. Never runs HTML:\n * tags are dropped and their text kept; links only to http, https, mailto and relative addresses. */\nexport function Markdown(p: MarkdownProps) {\n // Keys count from 0 on every render, so the same source gives the same keys and nothing remounts.\n let n = 0;\n const termsMark = p.termsMark ?? 'first';\n const termRe = React.useMemo(() => termPattern(p.terms), [p.terms]);\n const c: Ctx = {\n k: () => 'm' + n++,\n schemes: p.schemes,\n linkHref: p.linkHref,\n onLink: p.onLink,\n refHref: p.refHref,\n onRef: p.onRef,\n terms: p.terms,\n termsMark,\n termRe,\n };\n const src = String(p.children ?? '').replace(/\\r\\n?/g, '\\n');\n const cls = cx('ui-md', p.size === 'small' && 'is-small', p.className);\n if (p.inline) return <span className={cx(cls, 'is-inline')}>{inline(src.trim().replace(/\\n\\s*\\n/g, '\\n'), block(c))}</span>;\n const top = p.topLevel ?? 4;\n const render = (blocks: Block[]): React.ReactNode[] =>\n blocks.map((b) => {\n switch (b.t) {\n case 'h': {\n const H = `h${Math.min(6, top + b.level - 1)}` as 'h4';\n return (\n <H key={c.k()} className=\"ui-md-h\">\n {inline(b.text, noTerms(c))}\n </H>\n );\n }\n case 'p':\n return <p key={c.k()}>{inline(b.text, block(c))}</p>;\n case 'hr':\n return <hr key={c.k()} />;\n case 'details':\n return (\n <MdDetails key={c.k()} summary={inline(b.summary, noTerms(c))}>\n {render(b.blocks)}\n </MdDetails>\n );\n case 'alert':\n return (\n <Alert key={c.k()} tone={b.tone} className=\"ui-md-alert\">\n {render(b.blocks)}\n </Alert>\n );\n case 'quote':\n return <blockquote key={c.k()}>{render(b.blocks)}</blockquote>;\n case 'list': {\n const items = b.items.map((it) => {\n const key = c.k();\n if (!(it.length === 1 && it[0].t === 'p')) return <li key={key}>{render(it)}</li>;\n const nodes = inline(it[0].text, block(c));\n const row = rowLink(nodes);\n return row ? (\n <li key={key} className=\"ui-md-rowitem\">\n {row}\n </li>\n ) : (\n <li key={key}>{nodes}</li>\n );\n });\n return b.ordered ? (\n <ol key={c.k()} start={b.start === 1 ? undefined : b.start}>\n {items}\n </ol>\n ) : (\n <ul key={c.k()}>{items}</ul>\n );\n }\n case 'code':\n return (\n <CodeView\n key={c.k()}\n className=\"ui-md-code\"\n code={b.code}\n language={fenceLang(b.lang)}\n languageLabel={b.lang ? undefined : false}\n copy\n lineNumbers={false}\n refHref={p.refHref}\n onRef={p.onRef}\n terms={p.terms}\n termsMark={termsMark}\n />\n );\n case 'table': {\n // Numbers right-aligned: a column whose cells are all numbers, unless the source sets its alignment.\n const n = b.head.length;\n const numeric = b.head.map((_, j) => b.rows.length > 0 && b.rows.every((r) => !r[j] || NUM.test(r[j])));\n const align = (j: number): React.CSSProperties | undefined => {\n const a = b.align[j] ?? (numeric[j] ? 'right' : null);\n return a ? { textAlign: a } : undefined;\n };\n return (\n <MdTable\n key={c.k()}\n label={b.head.map(plain).join('、')}\n heads={b.head.map((h) => inline(h, noTerms(c)))}\n headText={b.head.map(plain)}\n rows={b.rows.map((r) =>\n Array.from({ length: n }, (_, j) => {\n // A number column: the figures in Geist Mono (td.is-num), the unit (「46 分」「3.5 GB」) in the text font.\n const u = numeric[j] ? NUM_UNIT.exec(r[j] ?? '') : null;\n return u ? (\n <>\n {inline(u[1], block(c))}\n {u[2]}\n <span className=\"ui-unit\">{u[3]}</span>\n </>\n ) : (\n inline(r[j] ?? '', block(c))\n );\n }),\n )}\n numeric={numeric}\n align={align}\n />\n );\n }\n }\n });\n return <div className={cls}>{render(parse(src.split('\\n')))}</div>;\n}\n\n/** A header cell as plain text, for the label above each value when a narrow table turns into cards. */\nconst plain = (md: string) =>\n md\n .replace(/\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1')\n .replace(/[`*_]/g, '')\n .trim();\n\n/** DA: a <details> block: a button with the summary, closed at first. The closed content stays in the page\n * (hidden=\"until-found\"), so the browser's find opens it, as in Section. */\nfunction MdDetails({ summary, children }: { summary: React.ReactNode; children: React.ReactNode }) {\n const [open, setOpen] = React.useState(false);\n const id = React.useId();\n const body = React.useRef<HTMLDivElement>(null);\n React.useLayoutEffect(() => {\n const el = body.current;\n if (!el) return;\n if (open) {\n el.removeAttribute('hidden');\n return;\n }\n el.setAttribute('hidden', 'until-found');\n const found = () => setOpen(true);\n el.addEventListener('beforematch', found);\n return () => el.removeEventListener('beforematch', found);\n }, [open]);\n return (\n <div className={cx('ui-md-details', open && 'is-open')}>\n <button type=\"button\" className=\"ui-md-summary\" aria-expanded={open} aria-controls={id} onClick={() => setOpen(!open)}>\n <Icon name=\"caret-right\" size={16} className=\"ui-md-caret\" />\n <span>{summary}</span>\n </button>\n <div id={id} ref={body} className=\"ui-md-details-body\">\n {children}\n </div>\n </div>\n );\n}\n\n/** A Markdown table: column borders in the header drag; the corner button shows the whole table in a wide dialog.\n * Under 480 px every row is a card instead, without either. The border, the dialog and the copy icon are the same as\n * DataTable's (internal/tableTools). */\nfunction MdTable(p: {\n label: string;\n heads: React.ReactNode[];\n headText: string[];\n rows: React.ReactNode[][];\n numeric: boolean[];\n align: (j: number) => React.CSSProperties | undefined;\n}) {\n const [widths, setWidths] = React.useState<number[] | null>(null);\n const [big, setBig] = React.useState(false);\n const [dragging, setDragging] = React.useState(false);\n const table = React.useRef<HTMLTableElement>(null);\n // Rounded up: a fixed column a fraction of a pixel narrower than it was drawn would wrap its longest word.\n const measure = () => [...(table.current?.querySelectorAll<HTMLElement>('thead th') ?? [])].map((th) => Math.ceil(th.getBoundingClientRect().width));\n // The drawn widths, kept for the borders' aria-valuenow (refs are not read while rendering).\n const [measured, setMeasured] = React.useState<number[]>([]);\n React.useLayoutEffect(() => {\n const el = table.current;\n if (!el) return;\n const update = () => {\n const m = [...el.querySelectorAll<HTMLElement>('thead th')].map((th) => Math.ceil(th.getBoundingClientRect().width));\n setMeasured((old) => (old.length === m.length && old.every((v, i) => v === m[i]) ? old : m));\n };\n update();\n const ro = resizeObserver(update);\n ro?.observe(el);\n return () => ro?.disconnect();\n }, []);\n const body = (resize: boolean) => (\n <table\n ref={resize ? table : undefined}\n className=\"ui-md-table\"\n style={resize && widths ? { width: widths.reduce((a, b) => a + b, 0), tableLayout: 'fixed', minWidth: 0 } : undefined}\n >\n {resize && widths ? (\n <colgroup>\n {widths.map((w, j) => (\n <col key={j} style={{ width: w }} />\n ))}\n </colgroup>\n ) : null}\n <thead>\n <tr>\n {p.heads.map((h, j) => (\n <th key={j} style={p.align(j)}>\n {h}\n {resize ? (\n <ColResize\n name={p.headText[j]}\n width={widths?.[j] ?? measured[j] ?? 0}\n start={() => (widths ?? measure())[j]}\n onWidth={(w) => {\n const next = (widths ?? measure()).slice();\n next[j] = w;\n setWidths(next);\n }}\n onReset={() => setWidths(null)}\n onDragging={setDragging}\n />\n ) : null}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {p.rows.map((r, ri) => (\n <tr key={ri}>\n {r.map((cell, j) => (\n <td key={j} className={p.numeric[j] ? 'is-num' : undefined} style={p.align(j)} data-label={p.headText[j]}>\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n return (\n <div className={cx('ui-md-tablebox', dragging && 'is-resizing')}>\n <div className=\"ui-md-table-tools\">\n <ZoomButton onClick={() => setBig(true)} />\n </div>\n <div className=\"ui-md-table-wrap\" tabIndex={0} role=\"region\" aria-label={p.label}>\n {body(true)}\n </div>\n <TableDialog open={big} onClose={() => setBig(false)}>\n <div className=\"ui-md ui-md-table-wrap\" tabIndex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a,MAAM;IAAK,eAAe,OAAO,KAAK;IACjD,UAAA,oBAAC,OAAD;KAAK,WAAU;KAAyB,UAAU;KAAG,MAAK;KAAS,cAAY,EAAE;KAC9E,UAAA,KAAK,KAAK;IACR,CAAA;GACM,CAAA;EACV;;AAET"}
@@ -1,5 +1,6 @@
1
1
  import { IconSource } from "../../icons/Icon.js";
2
2
  import { DangerConfirm } from "../Button/Button.js";
3
+ import { OpenStateProps } from "../../internal/open.js";
3
4
  import * as React from "react";
4
5
  interface MenuItemBase {
5
6
  /** A verb: 重新命名, 複製連結. */
@@ -17,7 +18,8 @@ export type MenuItem = (MenuItemBase & {
17
18
  danger: true;
18
19
  confirm: DangerConfirm;
19
20
  });
20
- export interface MenuProps {
21
+ export interface MenuProps extends OpenStateProps {
22
+ /** The actions; danger ones go last, in red, and are confirmed. */
21
23
  items: MenuItem[];
22
24
  /** aria-label and tooltip of the ⋯ button. Default 「更多操作」. */
23
25
  label?: string;
@@ -29,5 +31,5 @@ export interface MenuProps {
29
31
  triggerClassName?: string;
30
32
  }
31
33
  /** The ⋯ button and its list of actions. Danger items go last, in red, after a divider, and are confirmed. */
32
- export declare function Menu({ items, label, icon, align, triggerClassName }: MenuProps): React.JSX.Element;
34
+ export declare function Menu({ items, label, icon, align, triggerClassName, open: openProp, defaultOpen, onOpenChange }: MenuProps): React.JSX.Element;
33
35
  export {};