mtxuilib 0.1.568 → 0.1.570

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 (455) hide show
  1. package/dist/common/DeleteComfirm.js +5 -5
  2. package/dist/common/MtErrorBoundary.js +3 -2
  3. package/dist/common/index.d.ts +3 -0
  4. package/dist/common/index.js +3 -0
  5. package/dist/common/pip/PipExamplePage.js +1 -1
  6. package/dist/common/table/data-table-pagination.js +2 -2
  7. package/dist/common/table/data-table-view-options.js +2 -2
  8. package/dist/common/tiptap/TiptapEditor.js +3 -3
  9. package/dist/common/tiptap/examples/Demo-Default.js +29 -29
  10. package/dist/components/ShowError.js +2 -2
  11. package/dist/components/index.d.ts +6 -0
  12. package/dist/components/index.js +6 -0
  13. package/dist/form/EditFormToolbar.js +5 -5
  14. package/dist/form/deleteConform.js +5 -6
  15. package/dist/hooks/use-can-back.d.ts +1 -1
  16. package/dist/hooks/use-can-back.js +1 -1
  17. package/dist/hooks/use-mounted.d.ts +2 -0
  18. package/dist/hooks/use-mounted.js +5 -0
  19. package/dist/hooks/use-scroll-to-bottom.d.ts +5 -0
  20. package/dist/hooks/use-scroll-to-bottom.js +22 -0
  21. package/dist/hooks/useLeaveConfirm.d.ts +1 -0
  22. package/dist/hooks/useLeaveConfirm.js +26 -0
  23. package/dist/icons/LoaderI3con.d.ts +3 -0
  24. package/dist/icons/LoaderI3con.js +4 -0
  25. package/dist/icons/icons-ai.d.ts +29 -29
  26. package/dist/icons/icons-ai.js +31 -31
  27. package/dist/icons/icons.d.ts +3 -1
  28. package/dist/icons/icons.js +3 -0
  29. package/dist/icons/index.d.ts +1 -4
  30. package/dist/icons/index.js +1 -4
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.js +3 -0
  33. package/dist/layouts/dash/DashLayout.d.ts +3 -0
  34. package/dist/layouts/dash/DashLayout.js +14 -0
  35. package/dist/layouts/dash/MainHeader.d.ts +1 -0
  36. package/dist/layouts/dash/MainHeader.js +11 -0
  37. package/dist/layouts/dash/nav.d.ts +1 -0
  38. package/dist/layouts/dash/nav.js +7 -0
  39. package/dist/layouts/web/WebLayout.d.ts +3 -0
  40. package/dist/layouts/web/WebLayout.js +6 -0
  41. package/dist/layouts/web/WebLayoutHeader.d.ts +1 -0
  42. package/dist/layouts/web/WebLayoutHeader.js +9 -0
  43. package/dist/lib/copyText.d.ts +1 -0
  44. package/dist/lib/copyText.js +22 -0
  45. package/dist/lib/htmlparse/components/ItemActionButton.js +2 -2
  46. package/dist/lib/htmlparse/htmlParse.js +1 -1
  47. package/dist/lib/index.d.ts +1 -0
  48. package/dist/lib/index.js +1 -0
  49. package/dist/lib/service-worker/ServiceWorkerMain.js +1 -1
  50. package/dist/lib/timeFormat.d.ts +3 -0
  51. package/dist/lib/timeFormat.js +19 -0
  52. package/dist/motion/mtmotion-variants.d.ts +16 -0
  53. package/dist/motion/mtmotion-variants.js +18 -0
  54. package/dist/{ui/mt → mt}/Button.d.ts +1 -1
  55. package/dist/{ui/mt → mt}/Button.js +1 -1
  56. package/dist/{ui/mt → mt}/DropdownMenuItemLink.d.ts +1 -1
  57. package/dist/{ui/mt → mt}/DropdownMenuItemLink.js +1 -1
  58. package/dist/mt/GoBackButton.d.ts +5 -0
  59. package/dist/mt/GoBackButton.js +19 -0
  60. package/dist/{ui/mt → mt}/IconButton.js +1 -1
  61. package/dist/{ui/mt → mt}/MtScrollArea copy.js +1 -1
  62. package/dist/{ui/mt → mt}/MtScrollArea.js +1 -1
  63. package/dist/{ui/mt → mt}/MtSlider.js +2 -2
  64. package/dist/{ui/mt → mt}/NavTag.js +4 -4
  65. package/dist/{ui/mt → mt}/ScreenPanel.d.ts +1 -1
  66. package/dist/{ui/mt → mt}/ScreenPanel.js +3 -3
  67. package/dist/{ui/mt → mt}/Separator.js +1 -1
  68. package/dist/{ui/mt → mt}/Slider.js +2 -2
  69. package/dist/{ui/mt → mt}/Tree.js +1 -1
  70. package/dist/mt/WithLinkIf.d.ts +4 -0
  71. package/dist/{ui/mt → mt}/dialog/MtDialog.d.ts +2 -2
  72. package/dist/{ui/mt → mt}/dialog/MtDialog.js +3 -3
  73. package/dist/mt/index.d.ts +1 -0
  74. package/dist/mt/index.js +1 -0
  75. package/dist/{ui/mt → mt}/input-field/InputField.js +3 -3
  76. package/dist/{ui/mt → mt}/input-field/TextArea.js +3 -3
  77. package/dist/{ui/mt → mt}/input-field/select/InputSelect.js +2 -2
  78. package/dist/{ui/mt → mt}/inputs/SearchInput.js +1 -1
  79. package/dist/{ui/mt → mt}/inputs/TagsInput.d.ts +1 -1
  80. package/dist/{ui/mt → mt}/inputs/TagsInput.js +1 -1
  81. package/dist/{ui/mt → mt}/inputs/TaskStatusInput.d.ts +1 -1
  82. package/dist/{ui/mt → mt}/inputs/UrlsInput.d.ts +1 -1
  83. package/dist/{ui/mt → mt}/inputs/UrlsInput.js +1 -1
  84. package/dist/mt/inputs/input.d.ts +1 -0
  85. package/dist/mt/inputs/input.js +2 -0
  86. package/dist/{ui/mt → mt}/mtlink.d.ts +1 -1
  87. package/dist/{ui/mt → mt}/mtlink.js +1 -1
  88. package/dist/{ui/mt → mt}/multi-select.d.ts +1 -1
  89. package/dist/{ui/mt → mt}/multi-select.js +6 -7
  90. package/dist/{ui/mt → mt}/skeleton/NewLoading.js +1 -1
  91. package/dist/{ui/mt → mt}/skeleton/SkeletonInput.d.ts +1 -1
  92. package/dist/{ui/mt → mt}/skeleton/SkeletonInput.js +1 -1
  93. package/dist/{ui/mt → mt}/skeleton/SkeletonLayout.js +1 -1
  94. package/dist/{ui/mt → mt}/skeleton/SkeletonLoading.js +1 -1
  95. package/dist/{ui/mt → mt}/skeleton/skeleton-card.js +1 -1
  96. package/dist/{ui/mt → mt}/skeleton/skeletons.js +2 -2
  97. package/dist/{ui/mt → mt}/skeleton.js +1 -1
  98. package/dist/mt/submit-button.d.ts +4 -0
  99. package/dist/mt/submit-button.js +9 -0
  100. package/dist/styles/globals.css +144 -144
  101. package/dist/ui/alert.d.ts +1 -1
  102. package/dist/ui/badge.d.ts +1 -1
  103. package/dist/ui/button.d.ts +2 -2
  104. package/dist/ui/codeblock.js +1 -1
  105. package/dist/ui/index.d.ts +1 -0
  106. package/dist/ui/index.js +1 -0
  107. package/dist/ui/resizable.d.ts +1 -1
  108. package/dist/ui/sidebar.d.ts +1 -1
  109. package/dist/ui/toast.d.ts +1 -1
  110. package/dist/ui/toggle.d.ts +2 -2
  111. package/dist/ui/tooltip.d.ts +4 -0
  112. package/dist/ui/tooltip.js +4 -1
  113. package/package.json +24 -31
  114. package/src/common/DebugFormState.tsx +16 -0
  115. package/src/common/DeleteComfirm.tsx +124 -0
  116. package/src/common/FullCenter.tsx +16 -0
  117. package/src/common/GlobalSearch.tsx +43 -0
  118. package/src/common/HtmlChangesObserver.tsx +71 -0
  119. package/src/common/MtErrorBoundary.tsx +52 -0
  120. package/src/common/MtImage.tsx +42 -0
  121. package/src/common/MtProgressBar.tsx +6 -0
  122. package/src/common/NotFoundGoBack.tsx +19 -0
  123. package/src/common/SlntTree/Slnt.z.tsx +19 -0
  124. package/src/common/SlntTree/SlntTreeNode.tsx +104 -0
  125. package/src/common/index.tsx +3 -0
  126. package/src/common/markdown.tsx +9 -0
  127. package/src/common/mtlink.tsx +61 -0
  128. package/src/common/pip/PipExamplePage.tsx +84 -0
  129. package/src/common/pip/ReactDocumentPictureInPicture.tsx +248 -0
  130. package/src/common/pip/globals.d.ts +8 -0
  131. package/src/common/react-markdown/Code.tsx +23 -0
  132. package/src/common/react-markdown/MarkdownToolbar.tsx +35 -0
  133. package/src/common/react-markdown/ReactMarkdownExample.tsx +42 -0
  134. package/src/common/schema-form/SchemaFormFieldsRender.tsx +38 -0
  135. package/src/common/schema-form/SchemaFormView.tsx +48 -0
  136. package/src/common/schema-form/schema-form.z.ts +25 -0
  137. package/src/common/table/SimpleTable.tsx +45 -0
  138. package/src/common/table/cells/ExpenderCell.tsx +20 -0
  139. package/src/common/table/cells/SelectCell.tsx +53 -0
  140. package/src/common/table/cells/SortOrderCell.tsx-- +29 -0
  141. package/src/common/table/cells/Text.tsx +29 -0
  142. package/src/common/table/cells/ViewLink.tsx +54 -0
  143. package/src/common/table/cells/container/cellWrapper.tsx +12 -0
  144. package/src/common/table/cells/number.tsx +15 -0
  145. package/src/common/table/cells/string.tsx +75 -0
  146. package/src/common/table/columns/columns-example.tsx-- +83 -0
  147. package/src/common/table/data-table-pagination.tsx +97 -0
  148. package/src/common/table/data-table-view-options.tsx +57 -0
  149. package/src/common/table/datatable-view-options.tsx +21 -0
  150. package/src/common/table/example/ExampleTable.tsx +149 -0
  151. package/src/common/table/header/SimpleHeader.tsx +77 -0
  152. package/src/common/table/header/header.tsx +29 -0
  153. package/src/common/table/index.ts +21 -0
  154. package/src/common/table/row/CommonRow.tsx-- +27 -0
  155. package/src/common/table/row/DraggableRow.tsx-- +56 -0
  156. package/src/common/table/table.z.ts +56 -0
  157. package/src/common/tailwind-indicator.tsx +16 -0
  158. package/src/common/tiptap/MenuBar.tsx +175 -0
  159. package/src/common/tiptap/TiptapEditor.tsx +99 -0
  160. package/src/common/tiptap/examples/Demo-Default.tsx +240 -0
  161. package/src/common/tiptap/examples/Demo-Tiptap.tsx +14 -0
  162. package/src/components/AutoResizingTextarea.tsx +51 -0
  163. package/src/components/ChatMessageBubble.tsx +55 -0
  164. package/src/components/ClipboardCopy.tsx +47 -0
  165. package/src/components/InlineCode.tsx +19 -0
  166. package/src/components/IntermediateStep.tsx +53 -0
  167. package/src/components/ShowError.tsx +21 -0
  168. package/src/components/button-scroll-to-bottom.tsx +35 -0
  169. package/src/components/confirm/ConfirmProvider.tsx +145 -0
  170. package/src/components/confirm/Confrom.tsx +52 -0
  171. package/src/components/devtools/DebugValue.tsx +57 -0
  172. package/src/components/devtools/DevTools.tsx +48 -0
  173. package/src/components/empty-screen.tsx +21 -0
  174. package/src/components/external-link.tsx +30 -0
  175. package/src/components/hidden-copyable-input.tsx +45 -0
  176. package/src/components/index.ts +8 -0
  177. package/src/components/skeletons/SkeletonListView.tsx +16 -0
  178. package/src/components/skeletons/SkeletonLoading.tsx +16 -0
  179. package/src/components/spinner.tsx +17 -0
  180. package/src/components/theme-toggle.tsx +42 -0
  181. package/src/components/themes/ThemeProvider.tsx +11 -0
  182. package/src/components/themes/theme-toggle.tsx +26 -0
  183. package/src/fonts.ts +62 -0
  184. package/src/form/EditFormToolbar.tsx +143 -0
  185. package/src/form/PopupFormV2.tsx +184 -0
  186. package/src/form/SchemaFormFieldRender.tsx +79 -0
  187. package/src/form/ZodForm.tsx +92 -0
  188. package/src/form/deleteConform.tsx +95 -0
  189. package/src/hooks/use-block-stream.tsx-- +95 -0
  190. package/src/hooks/use-can-back.ts +15 -0
  191. package/src/hooks/use-config.ts +21 -0
  192. package/src/hooks/use-copy-to-clipboard.tsx +33 -0
  193. package/src/hooks/use-enter-submit.tsx +17 -0
  194. package/src/hooks/use-local-storage.ts +21 -0
  195. package/src/hooks/use-lock-body.ts +12 -0
  196. package/src/hooks/use-media-query.ts +39 -0
  197. package/src/hooks/use-mobile.tsx +21 -0
  198. package/src/hooks/use-mounted.ts +18 -0
  199. package/src/hooks/use-mutation-observer.ts +20 -0
  200. package/src/hooks/use-router.ts +112 -0
  201. package/src/hooks/use-router.ts.backup +69 -0
  202. package/src/hooks/use-scroll-anchor.tsx +85 -0
  203. package/src/hooks/use-scroll-to-bottom.ts +31 -0
  204. package/src/hooks/use-streamable-text.ts +25 -0
  205. package/src/hooks/useAgentEventStream.ts +60 -0
  206. package/src/hooks/useHighlighter.tsx +34 -0
  207. package/src/hooks/useIsIntersecting.tsx +24 -0
  208. package/src/hooks/useLayoutPath.ts-- +27 -0
  209. package/src/hooks/useLeaveConfirm.ts +38 -0
  210. package/src/hooks/useScript.ts +107 -0
  211. package/src/hooks/useSnapScroll.ts +57 -0
  212. package/src/i18n/I18nProvider.tsx +12 -0
  213. package/src/i18n/i18n.tsx +60 -0
  214. package/src/icons/Auth0.tsx +14 -0
  215. package/src/icons/Cognito.tsx +44 -0
  216. package/src/icons/CopliotIcon.tsx +21 -0
  217. package/src/icons/Cross2Icon.tsx +1 -0
  218. package/src/icons/Descope.tsx +328 -0
  219. package/src/icons/GarbageIcon.tsx +26 -0
  220. package/src/icons/Gitlab.tsx +27 -0
  221. package/src/icons/IconSpinner.tsx +18 -0
  222. package/src/icons/Image.tsx-- +24 -0
  223. package/src/icons/LoaderI3con.tsx +74 -0
  224. package/src/icons/MessageCircle.tsx-- +21 -0
  225. package/src/icons/Okta.tsx +17 -0
  226. package/src/icons/SaveIcon.tsx +22 -0
  227. package/src/icons/Telegram.tsx +22 -0
  228. package/src/icons/attachment.tsx-- +21 -0
  229. package/src/icons/copy.tsx-- +22 -0
  230. package/src/icons/crazy-spinner.tsx +11 -0
  231. package/src/icons/font-default.tsx +20 -0
  232. package/src/icons/font-mono.tsx +21 -0
  233. package/src/icons/font-serif.tsx +21 -0
  234. package/src/icons/github.tsx +15 -0
  235. package/src/icons/icons-ai.tsx +507 -0
  236. package/src/icons/icons.tsx +495 -0
  237. package/src/icons/index.ts +1 -0
  238. package/src/icons/index.tsx +4 -0
  239. package/src/icons/loading-circle.tsx +22 -0
  240. package/src/icons/magic.tsx +30 -0
  241. package/src/icons/messageBubble.tsx-- +21 -0
  242. package/src/icons/microphone.tsx-- +23 -0
  243. package/src/icons/minimize.tsx-- +24 -0
  244. package/src/icons/pencil.tsx-- +22 -0
  245. package/src/icons/squarePen.tsx +21 -0
  246. package/src/icons/thumbs.tsx-- +73 -0
  247. package/src/icons/user.tsx-- +22 -0
  248. package/src/index.ts +4 -0
  249. package/src/layouts/dash/DashLayout.tsx +76 -0
  250. package/src/layouts/dash/MainHeader.tsx +104 -0
  251. package/src/layouts/dash/nav.tsx +46 -0
  252. package/src/layouts/dash5/DashBreadcrumb.tsx +78 -0
  253. package/src/layouts/dash5/DetailViewExample.tsx +9 -0
  254. package/src/layouts/dash5/ListViewExample.tsx +9 -0
  255. package/src/layouts/dash5/MainHeader.tsx +130 -0
  256. package/src/layouts/dash5/SiderDebug.tsx +9 -0
  257. package/src/layouts/dash5/SiderNavItem.tsx +104 -0
  258. package/src/layouts/dash5/SiderToggleButton.tsx +52 -0
  259. package/src/layouts/dash5/dash5.store.tsx +137 -0
  260. package/src/layouts/dash5/index.tsx +155 -0
  261. package/src/layouts/dash5/main-nav.tsx-- +51 -0
  262. package/src/layouts/dash5/nav.tsx-- +137 -0
  263. package/src/layouts/types.tsx +25 -0
  264. package/src/layouts/web/WebLayout.tsx +15 -0
  265. package/src/layouts/web/WebLayoutHeader.tsx +57 -0
  266. package/src/layouts//345/270/203/345/261/200/350/256/276/350/256/241/345/217/202/350/200/203.md +3 -0
  267. package/src/lib/clientlib.ts +57 -0
  268. package/src/lib/componentHelper.ts +79 -0
  269. package/src/lib/copyText.ts +26 -0
  270. package/src/lib/debounce.ts +21 -0
  271. package/src/lib/domutils.ts +29 -0
  272. package/src/lib/errors.ts +9 -0
  273. package/src/lib/highlight-code.ts +33 -0
  274. package/src/lib/htmlparse/components/ItemActionButton.tsx +103 -0
  275. package/src/lib/htmlparse/htmlParse.tsx +112 -0
  276. package/src/lib/index.ts +1 -0
  277. package/src/lib/logger.ts +120 -0
  278. package/src/lib/react-query/ReactQueryProvider.tsx +81 -0
  279. package/src/lib/react.ts +14 -0
  280. package/src/lib/render.tsx +55 -0
  281. package/src/lib/service-worker/ServiceWorkerMain.tsx +57 -0
  282. package/src/lib/service-worker/sw.ts +49 -0
  283. package/src/lib/service-worker.js-- +36 -0
  284. package/src/lib/timeFormat.ts +22 -0
  285. package/src/lib/types.ts +25 -0
  286. package/src/lib/utils.ts +425 -0
  287. package/src/lib/zustand.ts +45 -0
  288. package/src/motion/mtmotion-variants.tsx +21 -0
  289. package/src/mt/Boundary.tsx +37 -0
  290. package/src/mt/Button.tsx +7 -0
  291. package/src/mt/Dialog.tsx +154 -0
  292. package/src/mt/DropdownMenuItemLink.tsx +21 -0
  293. package/src/mt/ErrorMessage.tsx +12 -0
  294. package/src/mt/ExampleTree.tsx +100 -0
  295. package/src/mt/GoBackButton.tsx +46 -0
  296. package/src/mt/IconButton.tsx +100 -0
  297. package/src/mt/LoadingDots.tsx +27 -0
  298. package/src/mt/MtCollapse.tsx +15 -0
  299. package/src/mt/MtScrollArea copy.tsx +130 -0
  300. package/src/mt/MtScrollArea.tsx +142 -0
  301. package/src/mt/MtSlider.tsx +83 -0
  302. package/src/mt/NavTag.tsx +87 -0
  303. package/src/mt/ScreenPanel.tsx +65 -0
  304. package/src/mt/Separator.tsx +4 -0
  305. package/src/mt/SimpleTag.tsx +16 -0
  306. package/src/mt/Slider.tsx +91 -0
  307. package/src/mt/Tree.tsx +279 -0
  308. package/src/mt/WithLinkIf.tsx +14 -0
  309. package/src/mt/dialog/MtDialog.tsx +35 -0
  310. package/src/mt/headline.tsx +16 -0
  311. package/src/mt/index.ts +1 -0
  312. package/src/mt/input-field/InputField.tsx +85 -0
  313. package/src/mt/input-field/SingleUploadForm.tsx +151 -0
  314. package/src/mt/input-field/TextArea.tsx +67 -0
  315. package/src/mt/input-field/TextFileInput.tsx +89 -0
  316. package/src/mt/input-field/select/InputSelect.tsx +114 -0
  317. package/src/mt/inputs/SearchInput.tsx +28 -0
  318. package/src/mt/inputs/TagsInput.tsx +80 -0
  319. package/src/mt/inputs/TaskStatusInput.tsx +62 -0
  320. package/src/mt/inputs/UrlsInput.tsx +21 -0
  321. package/src/mt/inputs/input.tsx +3 -0
  322. package/src/mt/inputs/mui-chips-input.tsx +64 -0
  323. package/src/mt/mt-tree-view/mt-tree-view-api.tsx-- +398 -0
  324. package/src/mt/mt-tree-view/mt-treeview.tsx-- +135 -0
  325. package/src/mt/mtlink.tsx +63 -0
  326. package/src/mt/multi-select.tsx +361 -0
  327. package/src/mt/pagination.tsx +98 -0
  328. package/src/mt/skeleton/NewLoading.tsx +35 -0
  329. package/src/mt/skeleton/SkeletonInput.tsx +14 -0
  330. package/src/mt/skeleton/SkeletonLayout.tsx +38 -0
  331. package/src/mt/skeleton/SkeletonLoading.tsx +12 -0
  332. package/src/mt/skeleton/skeleton-card.tsx +13 -0
  333. package/src/mt/skeleton/skeleton2.tsx +10 -0
  334. package/src/mt/skeleton/skeletons.tsx +73 -0
  335. package/src/mt/skeleton.tsx +25 -0
  336. package/src/mt/spinner/Spinner1.tsx +32 -0
  337. package/src/mt/submit-button.tsx +40 -0
  338. package/src/mt/types.tsx +4 -0
  339. package/src/mt/utils/easings.ts +3 -0
  340. package/src/styles/CalSans-SemiBold.otf +0 -0
  341. package/src/styles/globals.css +144 -0
  342. package/src/tailwind.ts +76 -0
  343. package/src/types/common.ts +13 -0
  344. package/src/types/index.d.ts +312 -0
  345. package/src/ui/accordion.tsx +60 -0
  346. package/src/ui/alert-dialog.tsx +132 -0
  347. package/src/ui/alert.tsx +59 -0
  348. package/src/ui/aspect-ratio.tsx +7 -0
  349. package/src/ui/avatar.tsx +50 -0
  350. package/src/ui/badge.tsx +36 -0
  351. package/src/ui/breadcrumb.tsx +111 -0
  352. package/src/ui/button.tsx +59 -0
  353. package/src/ui/calendar.tsx +71 -0
  354. package/src/ui/card.tsx +76 -0
  355. package/src/ui/checkbox.tsx +31 -0
  356. package/src/ui/codeblock.tsx +144 -0
  357. package/src/ui/collapsible.tsx +11 -0
  358. package/src/ui/command.tsx +153 -0
  359. package/src/ui/context-menu.tsx +193 -0
  360. package/src/ui/dialog.tsx +97 -0
  361. package/src/ui/drawer.tsx +139 -0
  362. package/src/ui/dropdown-menu.tsx +194 -0
  363. package/src/ui/form.tsx +172 -0
  364. package/src/ui/hover-card.tsx +29 -0
  365. package/src/ui/index.ts +1 -0
  366. package/src/ui/input.tsx +25 -0
  367. package/src/ui/label.tsx +26 -0
  368. package/src/ui/menubar.tsx +240 -0
  369. package/src/ui/navigation-menu.tsx +122 -0
  370. package/src/ui/pagination.tsx +120 -0
  371. package/src/ui/popover.tsx +31 -0
  372. package/src/ui/progress.tsx +28 -0
  373. package/src/ui/radio-group.tsx +44 -0
  374. package/src/ui/resizable.tsx +43 -0
  375. package/src/ui/scroll-area.tsx +90 -0
  376. package/src/ui/select.tsx +151 -0
  377. package/src/ui/separator.tsx +31 -0
  378. package/src/ui/sheet.tsx +140 -0
  379. package/src/ui/sidebar.tsx +774 -0
  380. package/src/ui/skeleton.tsx +15 -0
  381. package/src/ui/slider.tsx +28 -0
  382. package/src/ui/sonner.tsx +44 -0
  383. package/src/ui/switch.tsx +29 -0
  384. package/src/ui/table.tsx +111 -0
  385. package/src/ui/tabs.tsx +55 -0
  386. package/src/ui/textarea.tsx +24 -0
  387. package/src/ui/toast.tsx +131 -0
  388. package/src/ui/toaster.tsx +41 -0
  389. package/src/ui/toggle.tsx +45 -0
  390. package/src/ui/tooltip.tsx +49 -0
  391. package/src/ui/use-toast.ts +203 -0
  392. package/src/video-player/video-player2/modal-video-player.tsx-- +128 -0
  393. package/dist/components/themes/useTheme.d.ts +0 -0
  394. package/dist/components/themes/useTheme.js +0 -1
  395. package/dist/hooks/useMounted.d.ts +0 -1
  396. package/dist/hooks/useMounted.js +0 -8
  397. package/dist/layouts/dash5/Dash5Debug.d.ts +0 -1
  398. package/dist/layouts/dash5/Dash5Debug.js +0 -6
  399. package/dist/ui/mt/MtForm.d.ts +0 -2
  400. package/dist/ui/mt/MtForm.js +0 -5
  401. package/dist/ui/mt/WithLinkIf.d.ts +0 -4
  402. package/dist/ui/mt/inputs/input.d.ts +0 -1
  403. package/dist/ui/mt/inputs/input.js +0 -2
  404. /package/dist/{ui/mt → mt}/Boundary.d.ts +0 -0
  405. /package/dist/{ui/mt → mt}/Boundary.js +0 -0
  406. /package/dist/{ui/mt → mt}/Dialog.d.ts +0 -0
  407. /package/dist/{ui/mt → mt}/Dialog.js +0 -0
  408. /package/dist/{ui/mt → mt}/ErrorMessage.d.ts +0 -0
  409. /package/dist/{ui/mt → mt}/ErrorMessage.js +0 -0
  410. /package/dist/{ui/mt → mt}/ExampleTree.d.ts +0 -0
  411. /package/dist/{ui/mt → mt}/ExampleTree.js +0 -0
  412. /package/dist/{ui/mt → mt}/IconButton.d.ts +0 -0
  413. /package/dist/{ui/mt → mt}/LoadingDots.d.ts +0 -0
  414. /package/dist/{ui/mt → mt}/LoadingDots.js +0 -0
  415. /package/dist/{ui/mt → mt}/MtCollapse.d.ts +0 -0
  416. /package/dist/{ui/mt → mt}/MtCollapse.js +0 -0
  417. /package/dist/{ui/mt → mt}/MtScrollArea copy.d.ts +0 -0
  418. /package/dist/{ui/mt → mt}/MtScrollArea.d.ts +0 -0
  419. /package/dist/{ui/mt → mt}/MtSlider.d.ts +0 -0
  420. /package/dist/{ui/mt → mt}/NavTag.d.ts +0 -0
  421. /package/dist/{ui/mt → mt}/Separator.d.ts +0 -0
  422. /package/dist/{ui/mt → mt}/SimpleTag.d.ts +0 -0
  423. /package/dist/{ui/mt → mt}/SimpleTag.js +0 -0
  424. /package/dist/{ui/mt → mt}/Slider.d.ts +0 -0
  425. /package/dist/{ui/mt → mt}/Tree.d.ts +0 -0
  426. /package/dist/{ui/mt → mt}/WithLinkIf.js +0 -0
  427. /package/dist/{ui/mt → mt}/headline.d.ts +0 -0
  428. /package/dist/{ui/mt → mt}/headline.js +0 -0
  429. /package/dist/{ui/mt → mt}/input-field/InputField.d.ts +0 -0
  430. /package/dist/{ui/mt → mt}/input-field/SingleUploadForm.d.ts +0 -0
  431. /package/dist/{ui/mt → mt}/input-field/SingleUploadForm.js +0 -0
  432. /package/dist/{ui/mt → mt}/input-field/TextArea.d.ts +0 -0
  433. /package/dist/{ui/mt → mt}/input-field/TextFileInput.d.ts +0 -0
  434. /package/dist/{ui/mt → mt}/input-field/TextFileInput.js +0 -0
  435. /package/dist/{ui/mt → mt}/input-field/select/InputSelect.d.ts +0 -0
  436. /package/dist/{ui/mt → mt}/inputs/SearchInput.d.ts +0 -0
  437. /package/dist/{ui/mt → mt}/inputs/TaskStatusInput.js +0 -0
  438. /package/dist/{ui/mt → mt}/inputs/mui-chips-input.d.ts +0 -0
  439. /package/dist/{ui/mt → mt}/inputs/mui-chips-input.js +0 -0
  440. /package/dist/{ui/mt → mt}/pagination.d.ts +0 -0
  441. /package/dist/{ui/mt → mt}/pagination.js +0 -0
  442. /package/dist/{ui/mt → mt}/skeleton/NewLoading.d.ts +0 -0
  443. /package/dist/{ui/mt → mt}/skeleton/SkeletonLayout.d.ts +0 -0
  444. /package/dist/{ui/mt → mt}/skeleton/SkeletonLoading.d.ts +0 -0
  445. /package/dist/{ui/mt → mt}/skeleton/skeleton-card.d.ts +0 -0
  446. /package/dist/{ui/mt → mt}/skeleton/skeleton2.d.ts +0 -0
  447. /package/dist/{ui/mt → mt}/skeleton/skeleton2.js +0 -0
  448. /package/dist/{ui/mt → mt}/skeleton/skeletons.d.ts +0 -0
  449. /package/dist/{ui/mt → mt}/skeleton.d.ts +0 -0
  450. /package/dist/{ui/mt → mt}/spinner/Spinner1.d.ts +0 -0
  451. /package/dist/{ui/mt → mt}/spinner/Spinner1.js +0 -0
  452. /package/dist/{ui/mt → mt}/types.d.ts +0 -0
  453. /package/dist/{ui/mt → mt}/types.js +0 -0
  454. /package/dist/{ui/mt → mt}/utils/easings.d.ts +0 -0
  455. /package/dist/{ui/mt → mt}/utils/easings.js +0 -0
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { createContext, useCallback, useContext, useMemo, } from "react";
4
4
  import { createStore, useStore } from "zustand";
5
5
  import { immer } from "zustand/middleware/immer";
6
- import { MtButton } from "../ui/mt/Button";
6
+ import { Button } from "../ui";
7
7
  import { Dialog, DialogContent, DialogDescription, DialogTitle, } from "../ui/dialog";
8
8
  export const createFormSlice = (set, get) => ({
9
9
  setOpen: (open) => set({ open }),
@@ -42,11 +42,11 @@ export const DeleteConfirmDlg = () => {
42
42
  const open = useDeleteConfirmStore((x) => x.open);
43
43
  const setOpen = useDeleteConfirmStore((x) => x.setOpen);
44
44
  const confirmCallback = useDeleteConfirmStore((x) => x.confirmCallback);
45
- return (_jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { children: [_jsx(DialogTitle, { children: "delete confirm" }), _jsx(DialogDescription, { children: "will delete item, continue?" }), _jsx(MtButton, { variant: "destructive", onClick: async () => {
45
+ return (_jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { children: [_jsx(DialogTitle, { children: "delete confirm" }), _jsx(DialogDescription, { children: "will delete item, continue?" }), _jsx(Button, { variant: "destructive", onClick: async () => {
46
46
  setOpen(false);
47
- confirmCallback && confirmCallback();
48
- }, children: "Continue" }), _jsx(MtButton, { variant: "outline", onClick: () => {
47
+ confirmCallback?.();
48
+ }, children: "Continue" }), _jsx(Button, { variant: "outline", onClick: () => {
49
49
  setOpen(false);
50
- confirmCallback && confirmCallback();
50
+ confirmCallback?.();
51
51
  }, children: "Cancel" })] }) }));
52
52
  };
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ErrorBoundary } from "react-error-boundary";
3
- import { MtButton } from "../ui/mt/Button";
3
+ import { MtButton } from "../mt";
4
+ import { Button } from "../ui";
4
5
  export const MtErrorBoundary = (props) => {
5
6
  const { children } = props;
6
7
  return (_jsx(ErrorBoundary, { fallbackRender: ({ error, resetErrorBoundary }) => {
7
8
  console.log("💥💥💥", error);
8
- return (_jsx("div", { className: "flex items-center justify-center h-full w-full", children: _jsx(MtButton, { onClick: () => resetErrorBoundary(), className: "min-w-24 p-4", children: "\u91CD\u8BD5" }) }));
9
+ return (_jsx("div", { className: "flex items-center justify-center h-full w-full", children: _jsx(Button, { onClick: () => resetErrorBoundary(), className: "min-w-24 p-4", children: "\u91CD\u8BD5" }) }));
9
10
  }, onReset: () => { }, children: children }));
10
11
  };
11
12
  const CustomErrorRetry = (props) => {
@@ -0,0 +1,3 @@
1
+ export * from "./mtlink";
2
+ export * from "./MtErrorBoundary";
3
+ export * from "./markdown";
@@ -0,0 +1,3 @@
1
+ export * from "./mtlink";
2
+ export * from "./MtErrorBoundary";
3
+ export * from "./markdown";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import ReactDocumentPictureInPicture from "mtxuilib/common/pip/ReactDocumentPictureInPicture";
4
- import { MtButton } from "mtxuilib/ui/mt/Button";
4
+ import { MtButton } from "mtxuilib/mt/Button";
5
5
  import { useRef, useState } from "react";
6
6
  export default function PipExamplePage() {
7
7
  const pipWindowRef = useRef(null);
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
3
  import { ChevronLeftIcon, ChevronRightIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon, } from "@radix-ui/react-icons";
4
- import { MtButton } from "../../ui/mt/Button";
5
4
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../../ui/select";
5
+ import { Button } from "../../ui";
6
6
  export function DataTablePagination({ table, }) {
7
7
  return (_jsxs("div", { className: "flex items-center justify-between px-2", children: [_jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [table.getFilteredSelectedRowModel().rows.length, " of", " ", table.getFilteredRowModel().rows.length, " row(s) selected."] }), _jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-sm font-medium", children: "Rows per page" }), _jsxs(Select, { value: `${table.getState().pagination.pageSize}`, onValueChange: (value) => {
8
8
  table.setPageSize(Number(value));
9
- }, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: ["Page ", table.getState().pagination.pageIndex + 1, " of", " ", table.getPageCount()] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs(MtButton, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to first page" }), _jsx(DoubleArrowLeftIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to previous page" }), _jsx(ChevronLeftIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to next page" }), _jsx(ChevronRightIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to last page" }), _jsx(DoubleArrowRightIcon, { className: "h-4 w-4" })] })] })] })] }));
9
+ }, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: ["Page ", table.getState().pagination.pageIndex + 1, " of", " ", table.getPageCount()] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs(Button, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to first page" }), _jsx(DoubleArrowLeftIcon, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to previous page" }), _jsx(ChevronLeftIcon, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to next page" }), _jsx(ChevronRightIcon, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to last page" }), _jsx(DoubleArrowRightIcon, { className: "h-4 w-4" })] })] })] })] }));
10
10
  }
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { MixerHorizontalIcon } from "@radix-ui/react-icons";
4
- import { MtButton } from "../../ui/mt/Button";
5
4
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../../ui/dropdown-menu";
5
+ import { Button } from "../../ui";
6
6
  export function DataTableViewOptions({ table, }) {
7
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(MtButton, { variant: "outline", size: "sm", className: "ml-auto hidden h-8 lg:flex", children: [_jsx(MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }), "View"] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [_jsx(DropdownMenuLabel, { children: "Toggle columns" }), _jsx(DropdownMenuSeparator, {}), table
7
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", className: "ml-auto hidden h-8 lg:flex", children: [_jsx(MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }), "View"] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [_jsx(DropdownMenuLabel, { children: "Toggle columns" }), _jsx(DropdownMenuSeparator, {}), table
8
8
  .getAllColumns()
9
9
  .filter((column) => typeof column.accessorFn !== "undefined" && column.getCanHide())
10
10
  .map((column) => {
@@ -6,8 +6,8 @@ import TextStyle from "@tiptap/extension-text-style";
6
6
  import { EditorProvider, useCurrentEditor, } from "@tiptap/react";
7
7
  import StarterKit from "@tiptap/starter-kit";
8
8
  import { cn } from "../../lib/utils";
9
- import { MtButton } from "../../ui/mt/Button";
10
9
  import { MenuBar } from "./MenuBar";
10
+ import { Button } from "../../ui";
11
11
  const SaveButton = (props) => {
12
12
  const { onSave } = props;
13
13
  const { editor } = useCurrentEditor();
@@ -18,10 +18,10 @@ const SaveButton = (props) => {
18
18
  const html = editor?.getHTML();
19
19
  console.log("html", html);
20
20
  if (html) {
21
- onSave && onSave(html);
21
+ onSave?.(html);
22
22
  }
23
23
  };
24
- return (_jsx(_Fragment, { children: _jsx("div", { children: _jsx(MtButton, { onClick: handleSave, children: "Save" }) }) }));
24
+ return (_jsx(_Fragment, { children: _jsx("div", { children: _jsx(Button, { onClick: handleSave, children: "Save" }) }) }));
25
25
  };
26
26
  const extensions = [
27
27
  Color.configure({ types: [TextStyle.name, ListItem.name] }),
@@ -49,35 +49,35 @@ const extensions = [
49
49
  },
50
50
  }),
51
51
  ];
52
- const content = `
53
- <h2>
54
- Hi there,
55
- </h2>
56
- <p>
57
- this is a <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
58
- </p>
59
- <ul>
60
- <li>
61
- That’s a bullet list with one …
62
- </li>
63
- <li>
64
- … or two list items.
65
- </li>
66
- </ul>
67
- <p>
68
- Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
69
- </p>
70
- <pre><code class="language-css">body {
71
- display: none;
72
- }</code></pre>
73
- <p>
74
- I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.
75
- </p>
76
- <blockquote>
77
- Wow, that’s amazing. Good work, boy! 👏
78
- <br />
79
- — Mom
80
- </blockquote>
52
+ const content = `
53
+ <h2>
54
+ Hi there,
55
+ </h2>
56
+ <p>
57
+ this is a <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
58
+ </p>
59
+ <ul>
60
+ <li>
61
+ That’s a bullet list with one …
62
+ </li>
63
+ <li>
64
+ … or two list items.
65
+ </li>
66
+ </ul>
67
+ <p>
68
+ Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
69
+ </p>
70
+ <pre><code class="language-css">body {
71
+ display: none;
72
+ }</code></pre>
73
+ <p>
74
+ I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.
75
+ </p>
76
+ <blockquote>
77
+ Wow, that’s amazing. Good work, boy! 👏
78
+ <br />
79
+ — Mom
80
+ </blockquote>
81
81
  `;
82
82
  export default function TiptapDemo1() {
83
83
  return (_jsx(EditorProvider, { slotBefore: _jsx(MenuBar, {}), extensions: extensions, content: content, children: _jsx(_Fragment, {}) }));
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { MtButton } from "../ui/mt/Button";
3
+ import { Button } from "../ui";
4
4
  export const ShowError = (props) => {
5
- return (_jsxs("div", { className: "bg-orange-400 p-4 flex items-center justify-center flex-col", children: [_jsx("h3", { children: "\u5185\u90E8\u51FA\u9519" }), _jsx(MtButton, { type: "button", onClick: () => props.reset(), children: "\u91CD\u8BD5" })] }));
5
+ return (_jsxs("div", { className: "bg-orange-400 p-4 flex items-center justify-center flex-col", children: [_jsx("h3", { children: "\u5185\u90E8\u51FA\u9519" }), _jsx(Button, { type: "button", onClick: () => props.reset(), children: "\u91CD\u8BD5" })] }));
6
6
  };
@@ -0,0 +1,6 @@
1
+ export * from "./themes/theme-toggle";
2
+ export * from "./themes/ThemeProvider";
3
+ export * from "./skeletons/SkeletonListView";
4
+ export * from "./skeletons/SkeletonLoading";
5
+ export * from "./devtools/DebugValue";
6
+ export * from "./devtools/DevTools";
@@ -0,0 +1,6 @@
1
+ export * from "./themes/theme-toggle";
2
+ export * from "./themes/ThemeProvider";
3
+ export * from "./skeletons/SkeletonListView";
4
+ export * from "./skeletons/SkeletonLoading";
5
+ export * from "./devtools/DebugValue";
6
+ export * from "./devtools/DevTools";
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { forwardRef, useMemo, useState } from "react";
4
4
  import { useFormContext } from "react-hook-form";
5
5
  import { cn } from "../lib/utils";
6
- import { MtButton } from "../ui/mt/Button";
7
6
  import { ConformDeleteBtn } from "./deleteConform";
7
+ import { Button } from "../ui";
8
8
  export const EditFormToolbar = forwardRef((props, forwardedRef) => {
9
9
  const { submitText, onSubmit, onCancel, children, enableCancelConform, enableDeleteButton, onDelete, } = props;
10
10
  const [openConform, setOpenConform] = useState(false);
@@ -22,7 +22,7 @@ export const EditFormToolbar = forwardRef((props, forwardedRef) => {
22
22
  if (!form) {
23
23
  throw new Error("SubmitButton must be used within a Form or have a form prop");
24
24
  }
25
- return (_jsxs("div", { className: "flex w-full flex-col p-1", children: [!openConform && (_jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(MtButton, { variant: "outline", className: " min-w-24", onClick: (e) => {
25
+ return (_jsxs("div", { className: "flex w-full flex-col p-1", children: [!openConform && (_jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "outline", className: " min-w-24", onClick: (e) => {
26
26
  e.preventDefault();
27
27
  if (enableCancelConform && form?.formState?.isDirty) {
28
28
  setOpenConform(true);
@@ -30,7 +30,7 @@ export const EditFormToolbar = forwardRef((props, forwardedRef) => {
30
30
  else {
31
31
  onCancel?.();
32
32
  }
33
- }, children: "\u53D6\u6D88" }), _jsx(MtButton, { form: props.form?.id, type: "submit", disabled: formState.isSubmitting, className: "min-w-24", children: formState.isSubmitting ? "Loading" : submitText || "确定" }), enableDeleteButton && (_jsx(ConformDeleteBtn, { callback: async () => {
33
+ }, children: "\u53D6\u6D88" }), _jsx(Button, { form: props.form?.id, type: "submit", disabled: formState.isSubmitting, className: "min-w-24", children: formState.isSubmitting ? "Loading" : submitText || "确定" }), enableDeleteButton && (_jsx(ConformDeleteBtn, { callback: async () => {
34
34
  onDelete?.();
35
35
  }, disabled: form.formState.isSubmitting, variant: "destructive", children: "\u5220\u9664" }))] })), openConform && (_jsx(ComformCancel, { onBack: () => {
36
36
  setOpenConform(false);
@@ -41,10 +41,10 @@ export const EditFormToolbar = forwardRef((props, forwardedRef) => {
41
41
  EditFormToolbar.displayName = "EditFormToolbar";
42
42
  const ComformCancel = (props) => {
43
43
  const { onContinue, onBack } = props;
44
- return (_jsxs("div", { className: "flex gap-2", children: ["\u672A\u4FDD\u5B58\u66F4\u6539\uFF0C\u786E\u5B9A\u7EE7\u7EED\u5417\uFF1F", _jsx(MtButton, { onClick: (e) => {
44
+ return (_jsxs("div", { className: "flex gap-2", children: ["\u672A\u4FDD\u5B58\u66F4\u6539\uFF0C\u786E\u5B9A\u7EE7\u7EED\u5417\uFF1F", _jsx(Button, { onClick: (e) => {
45
45
  e.preventDefault();
46
46
  onBack();
47
- }, children: "\u7EE7\u7EED\u7F16\u8F91" }), _jsx(MtButton, { variant: "destructive", className: cn(""), onClick: (e) => {
47
+ }, children: "\u7EE7\u7EED\u7F16\u8F91" }), _jsx(Button, { variant: "destructive", className: cn(""), onClick: (e) => {
48
48
  e.preventDefault();
49
49
  onContinue();
50
50
  }, children: "\u5173\u95ED" })] }));
@@ -1,21 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Dialog, DialogContent, DialogDescription, DialogTitle, } from "@radix-ui/react-dialog";
3
2
  import { Slot } from "@radix-ui/react-slot";
4
3
  import React, { useState } from "react";
5
4
  import { cn } from "../lib/utils";
6
- import { MtButton } from "../ui/mt/Button";
7
- import { buttonVariants } from "../ui/button";
8
- import { DialogTrigger } from "../ui/dialog";
5
+ import { Button, buttonVariants } from "../ui/button";
6
+ import { Dialog, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "../ui/dialog";
7
+ import { MtButton } from "../mt";
9
8
  export const DeleteConformDlg = (props) => {
10
9
  const { handleOk } = props;
11
10
  const [open, setOpen] = useState(false);
12
11
  return (_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, onClick: (e) => {
13
12
  e.preventDefault();
14
13
  setOpen(true);
15
- }, children: _jsx(MtButton, { children: "\u5220\u9664" }) }), _jsx(DialogContent, { children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MtButton, { onClick: (e) => {
14
+ }, children: _jsx(Button, { children: "\u5220\u9664" }) }), _jsx(DialogContent, { children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { onClick: (e) => {
16
15
  e.preventDefault();
17
16
  handleOk && handleOk();
18
- }, children: "\u786E\u5B9A\u5220\u9664" }), _jsx(MtButton, { onClick: (e) => {
17
+ }, children: "\u786E\u5B9A\u5220\u9664" }), _jsx(Button, { onClick: (e) => {
19
18
  e.preventDefault();
20
19
  setOpen(false);
21
20
  }, children: "cancel" })] }) })] }));
@@ -1 +1 @@
1
- export declare function useCanBack(): boolean;
1
+ export declare function useCanGoBack(): boolean;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useEffect, useState } from "react";
3
- export function useCanBack() {
3
+ export function useCanGoBack() {
4
4
  const [canGoBack, setCanGoBack] = useState(false);
5
5
  useEffect(() => {
6
6
  if (typeof window !== "undefined") {
@@ -1 +1,3 @@
1
+ import * as React from "react";
1
2
  export declare function useMounted(): boolean;
3
+ export declare function useMountedEffect(effect: React.EffectCallback): void;
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { useEffect } from "react";
2
3
  export function useMounted() {
3
4
  const [mounted, setMounted] = React.useState(false);
4
5
  React.useEffect(() => {
@@ -6,3 +7,7 @@ export function useMounted() {
6
7
  }, []);
7
8
  return mounted;
8
9
  }
10
+ export function useMountedEffect(effect) {
11
+ const mounted = useMounted();
12
+ useEffect(effect, [mounted]);
13
+ }
@@ -0,0 +1,5 @@
1
+ import { type RefObject } from "react";
2
+ export declare function useScrollToBottom<T extends HTMLElement>(): [
3
+ RefObject<T>,
4
+ RefObject<T>
5
+ ];
@@ -0,0 +1,22 @@
1
+ import { useEffect, useRef } from "react";
2
+ export function useScrollToBottom() {
3
+ const containerRef = useRef(null);
4
+ const endRef = useRef(null);
5
+ useEffect(() => {
6
+ const container = containerRef.current;
7
+ const end = endRef.current;
8
+ if (container && end) {
9
+ const observer = new MutationObserver(() => {
10
+ end.scrollIntoView({ behavior: "instant", block: "end" });
11
+ });
12
+ observer.observe(container, {
13
+ childList: true,
14
+ subtree: true,
15
+ attributes: true,
16
+ characterData: true,
17
+ });
18
+ return () => observer.disconnect();
19
+ }
20
+ }, []);
21
+ return [containerRef, endRef];
22
+ }
@@ -0,0 +1 @@
1
+ export declare const useLeaveConfirm: (shouldPreventLeave: boolean) => void;
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { useEffect } from "react";
3
+ export const useLeaveConfirm = (shouldPreventLeave) => {
4
+ useEffect(() => {
5
+ const handleWindowClose = (e) => {
6
+ if (!shouldPreventLeave)
7
+ return;
8
+ e.preventDefault();
9
+ return (e.returnValue = "");
10
+ };
11
+ const handleBrowseAway = () => {
12
+ if (!shouldPreventLeave)
13
+ return;
14
+ if (window.confirm("You have unsaved changes. Are you sure you want to leave?")) {
15
+ return;
16
+ }
17
+ throw new Error("Route change was aborted");
18
+ };
19
+ window.addEventListener("beforeunload", handleWindowClose);
20
+ window.addEventListener("popstate", handleBrowseAway);
21
+ return () => {
22
+ window.removeEventListener("beforeunload", handleWindowClose);
23
+ window.removeEventListener("popstate", handleBrowseAway);
24
+ };
25
+ }, [shouldPreventLeave]);
26
+ };
@@ -0,0 +1,3 @@
1
+ export declare const LoaderI3con: ({ size }: {
2
+ size?: number;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const LoaderI3con = ({ size = 16 }) => {
3
+ return (_jsxs("svg", { height: size, strokeLinejoin: "round", viewBox: "0 0 16 16", width: size, style: { color: "currentcolor" }, children: [_jsxs("g", { clipPath: "url(#clip0_2393_1490)", children: [_jsx("path", { d: "M8 0V4", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.5", d: "M8 16V12", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.9", d: "M3.29773 1.52783L5.64887 4.7639", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.1", d: "M12.7023 1.52783L10.3511 4.7639", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.4", d: "M12.7023 14.472L10.3511 11.236", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.6", d: "M3.29773 14.472L5.64887 11.236", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.2", d: "M15.6085 5.52783L11.8043 6.7639", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.7", d: "M0.391602 10.472L4.19583 9.23598", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.3", d: "M15.6085 10.4722L11.8043 9.2361", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.8", d: "M0.391602 5.52783L4.19583 6.7639", stroke: "currentColor", strokeWidth: "1.5" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_2393_1490", children: _jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }));
4
+ };
@@ -1,31 +1,31 @@
1
- import * as React from 'react';
2
- declare function IconNextChat({ className, inverted, ...props }: React.ComponentProps<'svg'> & {
1
+ import * as React from "react";
2
+ declare function IconNextChat({ className, inverted, ...props }: React.ComponentProps<"svg"> & {
3
3
  inverted?: boolean;
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
- declare function IconOpenAI({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
6
- declare function IconVercel({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
7
- declare function IconGitHub({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
8
- declare function IconSeparator({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
9
- declare function IconArrowDown({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
10
- declare function IconArrowRight({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
11
- declare function IconUser({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
12
- declare function IconPlus({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
13
- declare function IconArrowElbow({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
14
- declare function IconSpinner({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
15
- declare function IconMessage({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
16
- declare function IconTrash({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
17
- declare function IconRefresh({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
18
- declare function IconStop({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
19
- declare function IconSidebar({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
20
- declare function IconMoon({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
21
- declare function IconSun({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
22
- declare function IconCopy({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
23
- declare function IconCheck({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
24
- declare function IconDownload({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
25
- declare function IconClose({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
26
- declare function IconEdit({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
27
- declare function IconShare({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
28
- declare function IconUsers({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
29
- declare function IconExternalLink({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
30
- declare function IconChevronUpDown({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
31
- export { IconEdit, IconNextChat, IconOpenAI, IconVercel, IconGitHub, IconSeparator, IconArrowDown, IconArrowRight, IconUser, IconPlus, IconArrowElbow, IconSpinner, IconMessage, IconTrash, IconRefresh, IconStop, IconSidebar, IconMoon, IconSun, IconCopy, IconCheck, IconDownload, IconClose, IconShare, IconUsers, IconExternalLink, IconChevronUpDown };
5
+ declare function IconOpenAI({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
6
+ declare function IconVercel({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
7
+ declare function IconGitHub({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
8
+ declare function IconSeparator({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
9
+ declare function IconArrowDown({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
10
+ declare function IconArrowRight({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
11
+ declare function IconUser({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
12
+ declare function IconPlus({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
13
+ declare function IconArrowElbow({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
14
+ declare function IconSpinner({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
15
+ declare function IconMessage({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
16
+ declare function IconTrash({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
17
+ declare function IconRefresh({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
18
+ declare function IconStop({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
19
+ declare function IconSidebar({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
20
+ declare function IconMoon({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
21
+ declare function IconSun({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
22
+ declare function IconCopy({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
23
+ declare function IconCheck({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
24
+ declare function IconDownload({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
25
+ declare function IconClose({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
26
+ declare function IconEdit({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
27
+ declare function IconShare({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
28
+ declare function IconUsers({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
29
+ declare function IconExternalLink({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
30
+ declare function IconChevronUpDown({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
31
+ export { IconEdit, IconNextChat, IconOpenAI, IconVercel, IconGitHub, IconSeparator, IconArrowDown, IconArrowRight, IconUser, IconPlus, IconArrowElbow, IconSpinner, IconMessage, IconTrash, IconRefresh, IconStop, IconSidebar, IconMoon, IconSun, IconCopy, IconCheck, IconDownload, IconClose, IconShare, IconUsers, IconExternalLink, IconChevronUpDown, };