mtxuilib 0.1.158 → 0.1.160

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 (655) hide show
  1. package/dist/common/DebugFormState.d.ts +4 -0
  2. package/dist/common/DebugFormState.jsx +11 -0
  3. package/dist/common/DeleteComfirm.d.ts +20 -0
  4. package/dist/common/DeleteComfirm.jsx +65 -0
  5. package/dist/common/FullCenter.d.ts +2 -0
  6. package/dist/common/FullCenter.jsx +7 -0
  7. package/dist/common/GlobalSearch.d.ts +11 -0
  8. package/dist/common/GlobalSearch.jsx +27 -0
  9. package/dist/common/HtmlChangesObserver.d.ts +1 -0
  10. package/dist/common/HtmlChangesObserver.jsx +52 -0
  11. package/dist/common/MtImage.d.ts +5 -0
  12. package/dist/common/MtImage.jsx +27 -0
  13. package/dist/common/MtProgressBar.d.ts +1 -0
  14. package/dist/common/MtProgressBar.jsx +5 -0
  15. package/dist/common/NotFoundGoBack.d.ts +1 -0
  16. package/dist/common/NotFoundGoBack.jsx +15 -0
  17. package/dist/common/SlntTree/Slnt.z.d.ts +28 -0
  18. package/dist/common/SlntTree/Slnt.z.jsx +13 -0
  19. package/dist/common/SlntTree/SlntChildrenTabs.d.ts +1 -0
  20. package/dist/common/SlntTree/SlntChildrenTabs.jsx +33 -0
  21. package/dist/common/SlntTree/SlntTreeNode.d.ts +19 -0
  22. package/dist/common/SlntTree/SlntTreeNode.jsx +47 -0
  23. package/dist/common/TrpcQuery.d.ts +0 -0
  24. package/dist/common/TrpcQuery.jsx +1 -0
  25. package/dist/common/devtools/DebugValue.d.ts +5 -0
  26. package/dist/common/devtools/DebugValue.jsx +16 -0
  27. package/dist/common/devtools/DevTools.d.ts +2 -0
  28. package/dist/common/devtools/DevTools.jsx +26 -0
  29. package/dist/common/markdown.d.ts +3 -0
  30. package/dist/common/markdown.jsx +4 -0
  31. package/dist/common/mtlink.d.ts +14 -0
  32. package/dist/common/mtlink.jsx +16 -0
  33. package/dist/common/pip/PipExamplePage.d.ts +1 -0
  34. package/dist/common/pip/PipExamplePage.jsx +42 -0
  35. package/dist/common/pip/ReactDocumentPictureInPicture.d.ts +28 -0
  36. package/dist/common/pip/ReactDocumentPictureInPicture.jsx +122 -0
  37. package/dist/common/react-markdown/Code.d.ts +6 -0
  38. package/dist/common/react-markdown/Code.jsx +12 -0
  39. package/dist/common/react-markdown/MarkdownToolbar.d.ts +4 -0
  40. package/dist/common/react-markdown/MarkdownToolbar.jsx +15 -0
  41. package/dist/common/react-markdown/ReactMarkdownExample.d.ts +1 -0
  42. package/dist/common/react-markdown/ReactMarkdownExample.jsx +27 -0
  43. package/dist/common/schema-form/SchemaFormFieldsRender.d.ts +4 -0
  44. package/dist/common/schema-form/SchemaFormFieldsRender.jsx +22 -0
  45. package/dist/common/schema-form/SchemaFormView.d.ts +12 -0
  46. package/dist/common/schema-form/SchemaFormView.jsx +31 -0
  47. package/dist/common/schema-form/schema-form.z.d.ts +90 -0
  48. package/dist/common/schema-form/schema-form.z.js +19 -0
  49. package/dist/common/table/SimpleTable.d.ts +4 -0
  50. package/dist/common/table/SimpleTable.jsx +26 -0
  51. package/dist/common/table/cells/ExpenderCell.d.ts +2 -0
  52. package/dist/common/table/cells/ExpenderCell.jsx +10 -0
  53. package/dist/common/table/cells/SelectCell.d.ts +13 -0
  54. package/dist/common/table/cells/SelectCell.jsx +32 -0
  55. package/dist/common/table/cells/Text.d.ts +9 -0
  56. package/dist/common/table/cells/Text.jsx +15 -0
  57. package/dist/common/table/cells/ViewLink.d.ts +13 -0
  58. package/dist/common/table/cells/ViewLink.jsx +32 -0
  59. package/dist/common/table/cells/container/cellWrapper.d.ts +6 -0
  60. package/dist/common/table/cells/container/cellWrapper.jsx +6 -0
  61. package/dist/common/table/cells/number.d.ts +3 -0
  62. package/dist/common/table/cells/number.jsx +11 -0
  63. package/dist/common/table/cells/string.d.ts +3 -0
  64. package/dist/common/table/cells/string.jsx +17 -0
  65. package/dist/common/table/data-table-pagination.d.ts +6 -0
  66. package/dist/common/table/data-table-pagination.jsx +49 -0
  67. package/dist/common/table/data-table-view-options.d.ts +6 -0
  68. package/dist/common/table/data-table-view-options.jsx +26 -0
  69. package/dist/common/table/datatable-view-options.d.ts +12 -0
  70. package/dist/common/table/datatable-view-options.jsx +2 -0
  71. package/dist/common/table/example/ExampleTable.d.ts +1 -0
  72. package/dist/common/table/example/ExampleTable.jsx +102 -0
  73. package/dist/common/table/header/SimpleHeader.d.ts +4 -0
  74. package/dist/common/table/header/SimpleHeader.jsx +39 -0
  75. package/dist/common/table/header/header.d.ts +5 -0
  76. package/dist/common/table/header/header.jsx +15 -0
  77. package/dist/common/table/table.z.d.ts +189 -0
  78. package/dist/common/table/table.z.js +35 -0
  79. package/dist/common/tailwind-indicator.d.ts +1 -0
  80. package/dist/common/tailwind-indicator.jsx +13 -0
  81. package/dist/common/theme/mode-toggle.d.ts +1 -0
  82. package/dist/common/theme/mode-toggle.jsx +28 -0
  83. package/dist/common/theme/theme-toggle.d.ts +1 -0
  84. package/dist/common/theme/theme-toggle.jsx +12 -0
  85. package/dist/common/tiptap/MenuBar.d.ts +1 -0
  86. package/dist/common/tiptap/MenuBar.jsx +100 -0
  87. package/dist/common/tiptap/TiptapEditor.d.ts +5 -0
  88. package/dist/common/tiptap/TiptapEditor.jsx +56 -0
  89. package/dist/common/tiptap/examples/Demo-Default.d.ts +1 -0
  90. package/dist/common/tiptap/examples/Demo-Default.jsx +152 -0
  91. package/dist/common/tiptap/examples/Demo-Tiptap.d.ts +1 -0
  92. package/dist/common/tiptap/examples/Demo-Tiptap.jsx +12 -0
  93. package/dist/components/ChatMessageBubble.d.ts +6 -0
  94. package/dist/components/ChatMessageBubble.jsx +26 -0
  95. package/dist/components/IntermediateStep.d.ts +4 -0
  96. package/dist/components/IntermediateStep.jsx +32 -0
  97. package/dist/components/UploadDocumentsForm.d.ts +1 -0
  98. package/dist/components/UploadDocumentsForm.jsx +40 -0
  99. package/dist/components/auth/LoginDlg.d.ts +0 -0
  100. package/dist/components/auth/LoginDlg.jsx +1 -0
  101. package/dist/components/button-scroll-to-bottom.d.ts +8 -0
  102. package/dist/components/button-scroll-to-bottom.jsx +11 -0
  103. package/dist/components/chat-share-dialog.d.ts +10 -0
  104. package/dist/components/chat-share-dialog.jsx +55 -0
  105. package/dist/components/dev-bot/DevBot.d.ts +8 -0
  106. package/dist/components/dev-bot/DevBot.jsx +48 -0
  107. package/dist/components/dev-bot/DevBotActions.d.ts +13 -0
  108. package/dist/components/dev-bot/DevBotActions.jsx +164 -0
  109. package/dist/components/dev-bot/actions.d.ts +2 -0
  110. package/dist/components/dev-bot/actions.jsx +9 -0
  111. package/dist/components/dev-bot/chat-list.d.ts +8 -0
  112. package/dist/components/dev-bot/chat-list.jsx +36 -0
  113. package/dist/components/dev-bot/chat-panel.d.ts +10 -0
  114. package/dist/components/dev-bot/chat-panel.jsx +71 -0
  115. package/dist/components/dev-bot/prompt-form.d.ts +5 -0
  116. package/dist/components/dev-bot/prompt-form.jsx +69 -0
  117. package/dist/components/empty-screen.d.ts +1 -0
  118. package/dist/components/empty-screen.jsx +19 -0
  119. package/dist/components/external-link.d.ts +4 -0
  120. package/dist/components/external-link.jsx +8 -0
  121. package/dist/components/message.d.ts +16 -0
  122. package/dist/components/message.jsx +74 -0
  123. package/dist/components/spinner.d.ts +1 -0
  124. package/dist/components/spinner.jsx +4 -0
  125. package/dist/components/tool-ui/BlogHomePage.d.ts +5 -0
  126. package/dist/components/tool-ui/BlogHomePage.jsx +12 -0
  127. package/dist/components/tool-ui/BlogHomePage.z.d.ts +60 -0
  128. package/dist/components/tool-ui/BlogHomePage.z.js +20 -0
  129. package/dist/components/tool-ui/DemoCategoryGen.d.ts +3 -0
  130. package/dist/components/tool-ui/DemoCategoryGen.jsx +9 -0
  131. package/dist/components/tool-ui/DpCfWorker.d.ts +1 -0
  132. package/dist/components/tool-ui/DpCfWorker.jsx +15 -0
  133. package/dist/components/tool-ui/DpMtxEdge.d.ts +1 -0
  134. package/dist/components/tool-ui/DpMtxEdge.jsx +15 -0
  135. package/dist/components/tool-ui/ExtractArticle.d.ts +1 -0
  136. package/dist/components/tool-ui/ExtractArticle.jsx +41 -0
  137. package/dist/components/tool-ui/OpenBrowser.d.ts +1 -0
  138. package/dist/components/tool-ui/OpenBrowser.jsx +41 -0
  139. package/dist/components/tool-ui/vcDeploy.d.ts +1 -0
  140. package/dist/components/tool-ui/vcDeploy.jsx +15 -0
  141. package/dist/demos/bigcode/BigCode.d.ts +4 -0
  142. package/dist/demos/bigcode/BigCode.jsx +16 -0
  143. package/dist/demos/condition-type/serialize.d.ts +3 -0
  144. package/dist/demos/condition-type/serialize.jsx +32 -0
  145. package/dist/demos/lib.d.ts +3 -0
  146. package/dist/demos/lib.jsx +20 -0
  147. package/dist/demos/scrollarea/LongListDemo.d.ts +1 -0
  148. package/dist/demos/scrollarea/LongListDemo.jsx +8 -0
  149. package/dist/demos/scrollarea/ScrollAreaDemo.d.ts +1 -0
  150. package/dist/demos/scrollarea/ScrollAreaDemo.jsx +43 -0
  151. package/dist/demos/suspense-ssr/ExampleOg.d.ts +4 -0
  152. package/dist/demos/suspense-ssr/ExampleOg.jsx +19 -0
  153. package/dist/demos/suspense-ssr/ExamplePage.d.ts +3 -0
  154. package/dist/demos/suspense-ssr/ExamplePage.jsx +55 -0
  155. package/dist/demos/suspense-ssr/ExampleProviderProviders.d.ts +3 -0
  156. package/dist/demos/suspense-ssr/ExampleProviderProviders.jsx +10 -0
  157. package/dist/demos/suspense-ssr/ReadMe.d.ts +1 -0
  158. package/dist/demos/suspense-ssr/ReadMe.jsx +44 -0
  159. package/dist/demos/suspense-ssr/examplesPostDetail.d.ts +3 -0
  160. package/dist/demos/suspense-ssr/examplesPostDetail.jsx +28 -0
  161. package/dist/demos/suspense-ssr/examplesPosts.d.ts +1 -0
  162. package/dist/demos/suspense-ssr/examplesPosts.jsx +24 -0
  163. package/dist/form/EditFormToolbar.d.ts +13 -0
  164. package/dist/form/EditFormToolbar.jsx +72 -0
  165. package/dist/form/PopupFormV2.d.ts +46 -0
  166. package/dist/form/PopupFormV2.jsx +88 -0
  167. package/dist/form/SchemaFormFieldRender.d.ts +6 -0
  168. package/dist/form/SchemaFormFieldRender.jsx +42 -0
  169. package/dist/form/ZodForm.d.ts +13 -0
  170. package/dist/form/ZodForm.jsx +35 -0
  171. package/dist/form/deleteConform.d.ts +8 -0
  172. package/dist/form/deleteConform.jsx +65 -0
  173. package/dist/hooks/use-config.d.ts +5 -0
  174. package/dist/hooks/use-config.js +8 -0
  175. package/dist/hooks/use-copy-to-clipboard.d.ts +7 -0
  176. package/dist/hooks/use-copy-to-clipboard.jsx +20 -0
  177. package/dist/hooks/use-enter-submit.d.ts +5 -0
  178. package/dist/hooks/use-enter-submit.jsx +11 -0
  179. package/dist/hooks/use-local-storage.d.ts +1 -0
  180. package/dist/hooks/use-local-storage.js +15 -0
  181. package/dist/hooks/use-lock-body.d.ts +1 -0
  182. package/dist/hooks/use-lock-body.js +8 -0
  183. package/dist/hooks/use-media-query.d.ts +7 -0
  184. package/dist/hooks/use-media-query.js +33 -0
  185. package/dist/hooks/use-mutation-observer.d.ts +7 -0
  186. package/dist/hooks/use-mutation-observer.js +15 -0
  187. package/dist/hooks/use-router.d.ts +18 -0
  188. package/dist/hooks/use-router.js +51 -0
  189. package/dist/hooks/use-scroll-anchor.d.ts +8 -0
  190. package/dist/hooks/use-scroll-anchor.jsx +70 -0
  191. package/dist/hooks/use-streamable-text.d.ts +2 -0
  192. package/dist/hooks/use-streamable-text.js +19 -0
  193. package/dist/hooks/useIsIntersecting.d.ts +2 -0
  194. package/dist/hooks/useIsIntersecting.jsx +17 -0
  195. package/dist/hooks/useLayoutPath.d.ts +2 -0
  196. package/dist/hooks/useLayoutPath.js +21 -0
  197. package/dist/hooks/useMounted.d.ts +1 -0
  198. package/dist/hooks/useMounted.js +8 -0
  199. package/dist/hooks/useScript.d.ts +3 -0
  200. package/dist/hooks/useScript.js +66 -0
  201. package/dist/icons/Cross2Icon.d.ts +1 -0
  202. package/dist/icons/Cross2Icon.jsx +1 -0
  203. package/dist/icons/DotsHorizontalIcon.d.ts +1 -0
  204. package/dist/icons/DotsHorizontalIcon.jsx +1 -0
  205. package/dist/icons/MixerHorizontal.d.ts +1 -0
  206. package/dist/icons/MixerHorizontal.jsx +1 -0
  207. package/dist/icons/crazy-spinner.d.ts +2 -0
  208. package/dist/icons/crazy-spinner.jsx +8 -0
  209. package/dist/icons/font-default.d.ts +3 -0
  210. package/dist/icons/font-default.jsx +6 -0
  211. package/dist/icons/font-mono.d.ts +3 -0
  212. package/dist/icons/font-mono.jsx +6 -0
  213. package/dist/icons/font-serif.d.ts +3 -0
  214. package/dist/icons/font-serif.jsx +6 -0
  215. package/dist/icons/github.d.ts +3 -0
  216. package/dist/icons/github.jsx +5 -0
  217. package/dist/icons/icons-ai.d.ts +31 -0
  218. package/dist/icons/icons-ai.jsx +160 -0
  219. package/dist/icons/icons.d.ts +132 -0
  220. package/dist/icons/icons.jsx +188 -0
  221. package/dist/icons/index.d.ts +4 -0
  222. package/dist/icons/index.jsx +4 -0
  223. package/dist/icons/loading-circle.d.ts +3 -0
  224. package/dist/icons/loading-circle.jsx +6 -0
  225. package/dist/icons/magic.d.ts +3 -0
  226. package/dist/icons/magic.jsx +7 -0
  227. package/dist/lib/auth/auth.config.d.ts +1 -0
  228. package/dist/lib/auth/auth.config.js +35 -0
  229. package/dist/lib/auth/auth.d.ts +5 -0
  230. package/dist/lib/auth/auth.js +7 -0
  231. package/dist/lib/auth/authActions.d.ts +9 -0
  232. package/dist/lib/auth/authActions.jsx +50 -0
  233. package/dist/lib/chat/chatActions.d.ts +27 -0
  234. package/dist/lib/chat/chatActions.jsx +120 -0
  235. package/dist/lib/clientlib.d.ts +5 -0
  236. package/dist/lib/clientlib.js +37 -0
  237. package/dist/lib/componentHelper.d.ts +7 -0
  238. package/dist/lib/componentHelper.js +43 -0
  239. package/dist/lib/domutils.d.ts +2 -0
  240. package/dist/lib/domutils.js +11 -0
  241. package/dist/lib/errors.d.ts +4 -0
  242. package/dist/lib/errors.js +8 -0
  243. package/dist/lib/highlight-code.d.ts +1 -0
  244. package/dist/lib/highlight-code.js +20 -0
  245. package/dist/lib/htmlparse/components/ItemActionButton.d.ts +2 -0
  246. package/dist/lib/htmlparse/components/ItemActionButton.jsx +58 -0
  247. package/dist/lib/htmlparse/htmlParse.d.ts +2 -0
  248. package/dist/lib/htmlparse/htmlParse.jsx +50 -0
  249. package/dist/lib/react-query/ReactQueryProvider.d.ts +4 -0
  250. package/dist/lib/react-query/ReactQueryProvider.jsx +44 -0
  251. package/dist/lib/render.d.ts +3 -0
  252. package/dist/lib/render.jsx +20 -0
  253. package/dist/lib/service-worker/ServiceWorkerMain.d.ts +1 -0
  254. package/dist/lib/service-worker/ServiceWorkerMain.jsx +31 -0
  255. package/dist/lib/service-worker/sw.d.ts +5 -0
  256. package/dist/lib/service-worker/sw.js +31 -0
  257. package/dist/lib/types.d.ts +32 -0
  258. package/dist/lib/types.js +1 -0
  259. package/dist/lib/utils.d.ts +38 -0
  260. package/dist/lib/utils.js +206 -0
  261. package/dist/lib/zustand.d.ts +9 -0
  262. package/dist/lib/zustand.js +30 -0
  263. package/dist/misc/CustomErrorRetry.d.ts +4 -0
  264. package/dist/misc/CustomErrorRetry.jsx +13 -0
  265. package/dist/misc/ExampleErrorDemo.d.ts +3 -0
  266. package/dist/misc/ExampleErrorDemo.jsx +17 -0
  267. package/dist/misc/MtErrorBoundary.d.ts +16 -0
  268. package/dist/misc/MtErrorBoundary.jsx +32 -0
  269. package/dist/misc/MtErrorBoundary.stories.d.ts +15 -0
  270. package/dist/misc/MtErrorBoundary.stories.jsx +26 -0
  271. package/dist/misc/MtErrorBoundaryV2.d.ts +2 -0
  272. package/dist/misc/MtErrorBoundaryV2.jsx +13 -0
  273. package/dist/misc/MtErrorBoundaryV2.stories.d.ts +14 -0
  274. package/dist/misc/MtErrorBoundaryV2.stories.jsx +24 -0
  275. package/dist/mtapp/History.d.ts +23 -0
  276. package/dist/mtapp/History.jsx +59 -0
  277. package/dist/mtapp/MtAppProvider.d.ts +53 -0
  278. package/dist/mtapp/MtAppProvider.jsx +61 -0
  279. package/dist/mtedtior/LzMtEditor.d.ts +6 -0
  280. package/dist/mtedtior/LzMtEditor.jsx +7 -0
  281. package/dist/mtedtior/MtEditor.d.ts +29 -0
  282. package/dist/mtedtior/MtEditor.jsx +149 -0
  283. package/dist/mtedtior/components/editor-bubble-item.d.ts +9 -0
  284. package/dist/mtedtior/components/editor-bubble-item.jsx +15 -0
  285. package/dist/mtedtior/components/editor-bubble.d.ts +7 -0
  286. package/dist/mtedtior/components/editor-bubble.jsx +47 -0
  287. package/dist/mtedtior/components/editor-command-item.d.ts +19 -0
  288. package/dist/mtedtior/components/editor-command-item.jsx +17 -0
  289. package/dist/mtedtior/components/editor-command.d.ts +29 -0
  290. package/dist/mtedtior/components/editor-command.jsx +54 -0
  291. package/dist/mtedtior/components/editor.d.ts +21 -0
  292. package/dist/mtedtior/components/editor.jsx +17 -0
  293. package/dist/mtedtior/components/index.d.ts +8 -0
  294. package/dist/mtedtior/components/index.js +6 -0
  295. package/dist/mtedtior/content.d.ts +132 -0
  296. package/dist/mtedtior/content.js +248 -0
  297. package/dist/mtedtior/extensions/ai-highlight.d.ts +22 -0
  298. package/dist/mtedtior/extensions/ai-highlight.js +88 -0
  299. package/dist/mtedtior/extensions/custom-keymap.d.ts +10 -0
  300. package/dist/mtedtior/extensions/custom-keymap.js +38 -0
  301. package/dist/mtedtior/extensions/drag-and-drop.d.ts +6 -0
  302. package/dist/mtedtior/extensions/drag-and-drop.jsx +165 -0
  303. package/dist/mtedtior/extensions/image-resizer.d.ts +2 -0
  304. package/dist/mtedtior/extensions/image-resizer.jsx +30 -0
  305. package/dist/mtedtior/extensions/index.d.ts +23 -0
  306. package/dist/mtedtior/extensions/index.js +73 -0
  307. package/dist/mtedtior/extensions/mathematics.d.ts +20 -0
  308. package/dist/mtedtior/extensions/mathematics.js +110 -0
  309. package/dist/mtedtior/extensions/slash-command.d.ts +33 -0
  310. package/dist/mtedtior/extensions/slash-command.jsx +223 -0
  311. package/dist/mtedtior/extensions/twitter.d.ts +22 -0
  312. package/dist/mtedtior/extensions/twitter.jsx +87 -0
  313. package/dist/mtedtior/extensions/updated-image.d.ts +2 -0
  314. package/dist/mtedtior/extensions/updated-image.js +17 -0
  315. package/dist/mtedtior/generative/ai-completion-command.d.ts +5 -0
  316. package/dist/mtedtior/generative/ai-completion-command.jsx +48 -0
  317. package/dist/mtedtior/generative/ai-selector-commands.d.ts +5 -0
  318. package/dist/mtedtior/generative/ai-selector-commands.jsx +55 -0
  319. package/dist/mtedtior/generative/ai-selector.d.ts +6 -0
  320. package/dist/mtedtior/generative/ai-selector.jsx +74 -0
  321. package/dist/mtedtior/generative/generative-menu-switch.d.ts +8 -0
  322. package/dist/mtedtior/generative/generative-menu-switch.jsx +34 -0
  323. package/dist/mtedtior/mtextesions/DemoComponent.d.ts +2 -0
  324. package/dist/mtedtior/mtextesions/DemoComponent.jsx +34 -0
  325. package/dist/mtedtior/mtextesions/image-upload.d.ts +1 -0
  326. package/dist/mtedtior/mtextesions/image-upload.js +52 -0
  327. package/dist/mtedtior/mtextesions/slash-command.d.ts +2 -0
  328. package/dist/mtedtior/mtextesions/slash-command.jsx +193 -0
  329. package/dist/mtedtior/mtextesions/tw_extensions.d.ts +1 -0
  330. package/dist/mtedtior/mtextesions/tw_extensions.js +137 -0
  331. package/dist/mtedtior/plugins/index.d.ts +1 -0
  332. package/dist/mtedtior/plugins/index.js +1 -0
  333. package/dist/mtedtior/plugins/upload-images.d.ts +13 -0
  334. package/dist/mtedtior/plugins/upload-images.jsx +98 -0
  335. package/dist/mtedtior/selectors/color-selector.d.ts +8 -0
  336. package/dist/mtedtior/selectors/color-selector.jsx +142 -0
  337. package/dist/mtedtior/selectors/link-selector.d.ts +8 -0
  338. package/dist/mtedtior/selectors/link-selector.jsx +68 -0
  339. package/dist/mtedtior/selectors/math-selector.d.ts +2 -0
  340. package/dist/mtedtior/selectors/math-selector.jsx +24 -0
  341. package/dist/mtedtior/selectors/node-selector.d.ts +14 -0
  342. package/dist/mtedtior/selectors/node-selector.jsx +94 -0
  343. package/dist/mtedtior/selectors/text-buttons.d.ts +1 -0
  344. package/dist/mtedtior/selectors/text-buttons.jsx +49 -0
  345. package/dist/mtedtior/utils/summary.d.ts +1 -0
  346. package/dist/mtedtior/utils/summary.js +8 -0
  347. package/dist/mtedtior/utils/utils.d.ts +9 -0
  348. package/dist/mtedtior/utils/utils.js +32 -0
  349. package/dist/mtedtior/utils.d.ts +9 -0
  350. package/dist/mtedtior/utils.jsx +33 -0
  351. package/dist/styled-system/css/conditions.d.mts +3 -0
  352. package/dist/styled-system/css/conditions.mjs +30 -0
  353. package/dist/styled-system/css/css.d.mts +6 -0
  354. package/dist/styled-system/css/css.mjs +37 -0
  355. package/dist/styled-system/css/cva.d.mts +14 -0
  356. package/dist/styled-system/css/cva.mjs +72 -0
  357. package/dist/styled-system/css/cx.d.mts +1 -0
  358. package/dist/styled-system/css/cx.mjs +11 -0
  359. package/dist/styled-system/css/index.d.mts +4 -0
  360. package/dist/styled-system/css/index.mjs +4 -0
  361. package/dist/styled-system/css/sva.d.mts +10 -0
  362. package/dist/styled-system/css/sva.mjs +31 -0
  363. package/dist/styled-system/helpers.d.mts +39 -0
  364. package/dist/styled-system/helpers.mjs +248 -0
  365. package/dist/styled-system/patterns/aspect-ratio.d.mts +5 -0
  366. package/dist/styled-system/patterns/aspect-ratio.mjs +36 -0
  367. package/dist/styled-system/patterns/bleed.d.mts +5 -0
  368. package/dist/styled-system/patterns/bleed.mjs +22 -0
  369. package/dist/styled-system/patterns/box.d.mts +5 -0
  370. package/dist/styled-system/patterns/box.mjs +13 -0
  371. package/dist/styled-system/patterns/center.d.mts +5 -0
  372. package/dist/styled-system/patterns/center.mjs +19 -0
  373. package/dist/styled-system/patterns/circle.d.mts +5 -0
  374. package/dist/styled-system/patterns/circle.mjs +23 -0
  375. package/dist/styled-system/patterns/container.d.mts +5 -0
  376. package/dist/styled-system/patterns/container.mjs +19 -0
  377. package/dist/styled-system/patterns/cq.d.mts +5 -0
  378. package/dist/styled-system/patterns/cq.mjs +19 -0
  379. package/dist/styled-system/patterns/divider.d.mts +5 -0
  380. package/dist/styled-system/patterns/divider.mjs +23 -0
  381. package/dist/styled-system/patterns/flex.d.mts +5 -0
  382. package/dist/styled-system/patterns/flex.mjs +24 -0
  383. package/dist/styled-system/patterns/float.d.mts +5 -0
  384. package/dist/styled-system/patterns/float.mjs +50 -0
  385. package/dist/styled-system/patterns/grid-item.d.mts +5 -0
  386. package/dist/styled-system/patterns/grid-item.mjs +23 -0
  387. package/dist/styled-system/patterns/grid.d.mts +5 -0
  388. package/dist/styled-system/patterns/grid.mjs +25 -0
  389. package/dist/styled-system/patterns/hstack.d.mts +5 -0
  390. package/dist/styled-system/patterns/hstack.mjs +22 -0
  391. package/dist/styled-system/patterns/index.d.mts +20 -0
  392. package/dist/styled-system/patterns/index.mjs +20 -0
  393. package/dist/styled-system/patterns/link-overlay.d.mts +5 -0
  394. package/dist/styled-system/patterns/link-overlay.mjs +22 -0
  395. package/dist/styled-system/patterns/spacer.d.mts +5 -0
  396. package/dist/styled-system/patterns/spacer.mjs +19 -0
  397. package/dist/styled-system/patterns/square.d.mts +5 -0
  398. package/dist/styled-system/patterns/square.mjs +22 -0
  399. package/dist/styled-system/patterns/stack.d.mts +5 -0
  400. package/dist/styled-system/patterns/stack.mjs +22 -0
  401. package/dist/styled-system/patterns/visually-hidden.d.mts +5 -0
  402. package/dist/styled-system/patterns/visually-hidden.mjs +16 -0
  403. package/dist/styled-system/patterns/vstack.d.mts +5 -0
  404. package/dist/styled-system/patterns/vstack.mjs +22 -0
  405. package/dist/styled-system/patterns/wrap.d.mts +5 -0
  406. package/dist/styled-system/patterns/wrap.mjs +23 -0
  407. package/dist/styled-system/tokens/index.d.mts +6 -0
  408. package/dist/styled-system/tokens/index.mjs +1885 -0
  409. package/dist/tailwind.d.ts +3 -0
  410. package/dist/tailwind.js +72 -0
  411. package/dist/tools/countDown.d.ts +32 -0
  412. package/dist/tools/countDown.jsx +38 -0
  413. package/dist/tools/devTools/bash.d.ts +14 -0
  414. package/dist/tools/devTools/bash.jsx +38 -0
  415. package/dist/tools/devTools/clean.d.ts +8 -0
  416. package/dist/tools/devTools/clean.jsx +33 -0
  417. package/dist/tools/devTools/cloudflareTunnel.d.ts +17 -0
  418. package/dist/tools/devTools/cloudflareTunnel.jsx +50 -0
  419. package/dist/tools/devTools/docker-compose.d.ts +8 -0
  420. package/dist/tools/devTools/docker-compose.jsx +21 -0
  421. package/dist/tools/devTools/dockerBuildMtm.d.ts +8 -0
  422. package/dist/tools/devTools/dockerBuildMtm.jsx +40 -0
  423. package/dist/tools/devTools/dpMtCfWorkerTool.d.ts +8 -0
  424. package/dist/tools/devTools/dpMtCfWorkerTool.jsx +17 -0
  425. package/dist/tools/devTools/dpMtxedge.d.ts +8 -0
  426. package/dist/tools/devTools/dpMtxedge.jsx +94 -0
  427. package/dist/tools/devTools/getIp.d.ts +14 -0
  428. package/dist/tools/devTools/getIp.jsx +34 -0
  429. package/dist/tools/devTools/installOsPackages.d.ts +8 -0
  430. package/dist/tools/devTools/installOsPackages.jsx +34 -0
  431. package/dist/tools/devTools/ollamaService.d.ts +14 -0
  432. package/dist/tools/devTools/ollamaService.jsx +33 -0
  433. package/dist/tools/devTools/packageRelease.d.ts +8 -0
  434. package/dist/tools/devTools/packageRelease.jsx +50 -0
  435. package/dist/tools/devTools/vcDeploytool.d.ts +8 -0
  436. package/dist/tools/devTools/vcDeploytool.jsx +80 -0
  437. package/dist/tools/devTools/vncServer.d.ts +1 -0
  438. package/dist/tools/devTools/vncServer.jsx +1 -0
  439. package/dist/tools/genSiteHeaderBarsTool.d.ts +14 -0
  440. package/dist/tools/genSiteHeaderBarsTool.jsx +17 -0
  441. package/dist/tools/hello1Tool.d.ts +14 -0
  442. package/dist/tools/hello1Tool.jsx +18 -0
  443. package/dist/tools/rag/RagHello.d.ts +8 -0
  444. package/dist/tools/rag/RagHello.jsx +15 -0
  445. package/dist/tools/rag/addResoure.d.ts +18 -0
  446. package/dist/tools/rag/addResoure.jsx +27 -0
  447. package/dist/tools/rag/getInformation.d.ts +18 -0
  448. package/dist/tools/rag/getInformation.jsx +15 -0
  449. package/dist/tools/rag/ui/RagInput.d.ts +2 -0
  450. package/dist/tools/rag/ui/RagInput.jsx +51 -0
  451. package/dist/tools/search/exampleSearchTool.d.ts +8 -0
  452. package/dist/tools/search/exampleSearchTool.jsx +15 -0
  453. package/dist/tools/webbot/callAdminBot.d.ts +8 -0
  454. package/dist/tools/webbot/callAdminBot.jsx +15 -0
  455. package/dist/tools/welcomeAdminTool.d.ts +8 -0
  456. package/dist/tools/welcomeAdminTool.jsx +14 -0
  457. package/dist/types/common.d.ts +15 -0
  458. package/dist/types/common.js +1 -0
  459. package/dist/ui/accordion.d.ts +7 -0
  460. package/dist/ui/accordion.jsx +20 -0
  461. package/dist/ui/alert-dialog.d.ts +20 -0
  462. package/dist/ui/alert-dialog.jsx +29 -0
  463. package/dist/ui/alert.d.ts +8 -0
  464. package/dist/ui/alert.jsx +21 -0
  465. package/dist/ui/aspect-ratio.d.ts +3 -0
  466. package/dist/ui/aspect-ratio.jsx +4 -0
  467. package/dist/ui/avatar.d.ts +6 -0
  468. package/dist/ui/avatar.jsx +11 -0
  469. package/dist/ui/badge.d.ts +9 -0
  470. package/dist/ui/badge.jsx +20 -0
  471. package/dist/ui/breadcrumb.d.ts +19 -0
  472. package/dist/ui/breadcrumb.jsx +27 -0
  473. package/dist/ui/button.d.ts +11 -0
  474. package/dist/ui/button.jsx +32 -0
  475. package/dist/ui/calendar.d.ts +8 -0
  476. package/dist/ui/calendar.jsx +40 -0
  477. package/dist/ui/card.d.ts +8 -0
  478. package/dist/ui/card.jsx +15 -0
  479. package/dist/ui/checkbox.d.ts +4 -0
  480. package/dist/ui/checkbox.jsx +12 -0
  481. package/dist/ui/codeblock.d.ts +12 -0
  482. package/dist/ui/codeblock.jsx +101 -0
  483. package/dist/ui/collapsible.d.ts +5 -0
  484. package/dist/ui/collapsible.jsx +6 -0
  485. package/dist/ui/command.d.ts +50 -0
  486. package/dist/ui/command.jsx +37 -0
  487. package/dist/ui/context-menu.d.ts +27 -0
  488. package/dist/ui/context-menu.jsx +52 -0
  489. package/dist/ui/dialog.d.ts +19 -0
  490. package/dist/ui/dialog.jsx +31 -0
  491. package/dist/ui/drawer.d.ts +24 -0
  492. package/dist/ui/drawer.jsx +28 -0
  493. package/dist/ui/dropdown-menu.d.ts +27 -0
  494. package/dist/ui/dropdown-menu.jsx +54 -0
  495. package/dist/ui/form.d.ts +23 -0
  496. package/dist/ui/form.jsx +67 -0
  497. package/dist/ui/hover-card.d.ts +6 -0
  498. package/dist/ui/hover-card.jsx +9 -0
  499. package/dist/ui/input.d.ts +5 -0
  500. package/dist/ui/input.jsx +7 -0
  501. package/dist/ui/label.d.ts +5 -0
  502. package/dist/ui/label.jsx +9 -0
  503. package/dist/ui/menubar.d.ts +33 -0
  504. package/dist/ui/menubar.jsx +54 -0
  505. package/dist/ui/navigation-menu.d.ts +12 -0
  506. package/dist/ui/navigation-menu.jsx +34 -0
  507. package/dist/ui/pagination.d.ts +28 -0
  508. package/dist/ui/pagination.jsx +31 -0
  509. package/dist/ui/popover.d.ts +6 -0
  510. package/dist/ui/popover.jsx +11 -0
  511. package/dist/ui/progress.d.ts +4 -0
  512. package/dist/ui/progress.jsx +9 -0
  513. package/dist/ui/radio-group.d.ts +5 -0
  514. package/dist/ui/radio-group.jsx +18 -0
  515. package/dist/ui/resizable.d.ts +23 -0
  516. package/dist/ui/resizable.jsx +12 -0
  517. package/dist/ui/scroll-area.d.ts +5 -0
  518. package/dist/ui/scroll-area.jsx +19 -0
  519. package/dist/ui/select.d.ts +11 -0
  520. package/dist/ui/select.jsx +39 -0
  521. package/dist/ui/separator.d.ts +4 -0
  522. package/dist/ui/separator.jsx +7 -0
  523. package/dist/ui/sheet.d.ts +25 -0
  524. package/dist/ui/sheet.jsx +45 -0
  525. package/dist/ui/skeleton.d.ts +2 -0
  526. package/dist/ui/skeleton.jsx +5 -0
  527. package/dist/ui/slider.d.ts +4 -0
  528. package/dist/ui/slider.jsx +12 -0
  529. package/dist/ui/sonner.d.ts +4 -0
  530. package/dist/ui/sonner.jsx +15 -0
  531. package/dist/ui/switch.d.ts +4 -0
  532. package/dist/ui/switch.jsx +9 -0
  533. package/dist/ui/table.d.ts +10 -0
  534. package/dist/ui/table.jsx +21 -0
  535. package/dist/ui/tabs.d.ts +7 -0
  536. package/dist/ui/tabs.jsx +12 -0
  537. package/dist/ui/textarea.d.ts +5 -0
  538. package/dist/ui/textarea.jsx +7 -0
  539. package/dist/ui/toast.d.ts +15 -0
  540. package/dist/ui/toast.jsx +34 -0
  541. package/dist/ui/toaster.d.ts +1 -0
  542. package/dist/ui/toaster.jsx +19 -0
  543. package/dist/ui/toggle.d.ts +12 -0
  544. package/dist/ui/toggle.jsx +25 -0
  545. package/dist/ui/tooltip.d.ts +7 -0
  546. package/dist/ui/tooltip.jsx +10 -0
  547. package/dist/ui/use-toast.d.ts +44 -0
  548. package/dist/ui/use-toast.js +124 -0
  549. package/dist/ui-mt/Boundary.d.ts +9 -0
  550. package/dist/ui-mt/Boundary.jsx +16 -0
  551. package/dist/ui-mt/Button.d.ts +1 -0
  552. package/dist/ui-mt/Button.jsx +2 -0
  553. package/dist/ui-mt/DropdownMenuItemLink.d.ts +7 -0
  554. package/dist/ui-mt/DropdownMenuItemLink.jsx +9 -0
  555. package/dist/ui-mt/ErrorMessage.d.ts +2 -0
  556. package/dist/ui-mt/ErrorMessage.jsx +7 -0
  557. package/dist/ui-mt/ExampleTree.d.ts +2 -0
  558. package/dist/ui-mt/ExampleTree.jsx +83 -0
  559. package/dist/ui-mt/MtDialog.d.ts +19 -0
  560. package/dist/ui-mt/MtDialog.jsx +39 -0
  561. package/dist/ui-mt/MtForm.d.ts +1 -0
  562. package/dist/ui-mt/MtForm.jsx +3 -0
  563. package/dist/ui-mt/NavTag.d.ts +10 -0
  564. package/dist/ui-mt/NavTag.jsx +35 -0
  565. package/dist/ui-mt/ScreenPanel.d.ts +4 -0
  566. package/dist/ui-mt/ScreenPanel.jsx +10 -0
  567. package/dist/ui-mt/Separator.d.ts +1 -0
  568. package/dist/ui-mt/Separator.jsx +3 -0
  569. package/dist/ui-mt/SimpleModel.d.ts +3 -0
  570. package/dist/ui-mt/SimpleModel.jsx +30 -0
  571. package/dist/ui-mt/SimpleTag.d.ts +5 -0
  572. package/dist/ui-mt/SimpleTag.jsx +7 -0
  573. package/dist/ui-mt/Slot.d.ts +1 -0
  574. package/dist/ui-mt/Slot.jsx +1 -0
  575. package/dist/ui-mt/Tree.d.ts +14 -0
  576. package/dist/ui-mt/Tree.jsx +98 -0
  577. package/dist/ui-mt/WithLinkIf.d.ts +4 -0
  578. package/dist/ui-mt/WithLinkIf.jsx +9 -0
  579. package/dist/ui-mt/headline.d.ts +7 -0
  580. package/dist/ui-mt/headline.jsx +8 -0
  581. package/dist/ui-mt/input-field/InputField.d.ts +4 -0
  582. package/dist/ui-mt/input-field/InputField.jsx +40 -0
  583. package/dist/ui-mt/input-field/SingleUploadForm.d.ts +2 -0
  584. package/dist/ui-mt/input-field/SingleUploadForm.jsx +83 -0
  585. package/dist/ui-mt/input-field/TextArea.d.ts +4 -0
  586. package/dist/ui-mt/input-field/TextArea.jsx +20 -0
  587. package/dist/ui-mt/input-field/TextFileInput.d.ts +8 -0
  588. package/dist/ui-mt/input-field/TextFileInput.jsx +38 -0
  589. package/dist/ui-mt/input-field/select/InputSelect.d.ts +8 -0
  590. package/dist/ui-mt/input-field/select/InputSelect.jsx +44 -0
  591. package/dist/ui-mt/inputs/SearchInput.d.ts +2 -0
  592. package/dist/ui-mt/inputs/SearchInput.jsx +12 -0
  593. package/dist/ui-mt/inputs/TaskStatusInput.d.ts +2 -0
  594. package/dist/ui-mt/inputs/TaskStatusInput.jsx +37 -0
  595. package/dist/ui-mt/inputs/UrlsInput.d.ts +2 -0
  596. package/dist/ui-mt/inputs/UrlsInput.jsx +16 -0
  597. package/dist/ui-mt/inputs/input.d.ts +1 -0
  598. package/dist/ui-mt/inputs/input.jsx +2 -0
  599. package/dist/ui-mt/modal/MtModal.d.ts +29 -0
  600. package/dist/ui-mt/modal/MtModal.jsx +58 -0
  601. package/dist/ui-mt/mt-tree-view/MtTreeViewExample.d.ts +1 -0
  602. package/dist/ui-mt/mt-tree-view/MtTreeViewExample.jsx +2 -0
  603. package/dist/ui-mt/mt-tree-view/mt-tree-view-api.d.ts +38 -0
  604. package/dist/ui-mt/mt-tree-view/mt-tree-view-api.jsx +158 -0
  605. package/dist/ui-mt/mt-tree-view/mt-treeview.d.ts +24 -0
  606. package/dist/ui-mt/mt-tree-view/mt-treeview.jsx +40 -0
  607. package/dist/ui-mt/pagination.d.ts +7 -0
  608. package/dist/ui-mt/pagination.jsx +49 -0
  609. package/dist/ui-mt/skeleton/NewLoading.d.ts +1 -0
  610. package/dist/ui-mt/skeleton/NewLoading.jsx +31 -0
  611. package/dist/ui-mt/skeleton/SkeletonDashboardShell.d.ts +0 -0
  612. package/dist/ui-mt/skeleton/SkeletonDashboardShell.jsx +2 -0
  613. package/dist/ui-mt/skeleton/SkeletonInput.d.ts +1 -0
  614. package/dist/ui-mt/skeleton/SkeletonInput.jsx +6 -0
  615. package/dist/ui-mt/skeleton/SkeletonLayout.d.ts +1 -0
  616. package/dist/ui-mt/skeleton/SkeletonLayout.jsx +8 -0
  617. package/dist/ui-mt/skeleton/SkeletonLoading.d.ts +3 -0
  618. package/dist/ui-mt/skeleton/SkeletonLoading.jsx +14 -0
  619. package/dist/ui-mt/skeleton/skeleton-card.d.ts +3 -0
  620. package/dist/ui-mt/skeleton/skeleton-card.jsx +10 -0
  621. package/dist/ui-mt/skeleton/skeleton2.d.ts +1 -0
  622. package/dist/ui-mt/skeleton/skeleton2.jsx +8 -0
  623. package/dist/ui-mt/skeleton/skeletons.d.ts +6 -0
  624. package/dist/ui-mt/skeleton/skeletons.jsx +12 -0
  625. package/dist/ui-mt/skeleton.d.ts +5 -0
  626. package/dist/ui-mt/skeleton.jsx +4 -0
  627. package/dist/ui-mt/types.d.ts +4 -0
  628. package/dist/ui-mt/types.jsx +1 -0
  629. package/dist/ui-vamp/alert.d.ts +17 -0
  630. package/dist/ui-vamp/alert.jsx +45 -0
  631. package/dist/ui-vamp/button.d.ts +13 -0
  632. package/dist/ui-vamp/button.jsx +34 -0
  633. package/dist/ui-vamp/card.d.ts +23 -0
  634. package/dist/ui-vamp/card.jsx +32 -0
  635. package/dist/ui-vamp/chip.d.ts +11 -0
  636. package/dist/ui-vamp/chip.jsx +23 -0
  637. package/dist/ui-vamp/external-link.d.ts +7 -0
  638. package/dist/ui-vamp/external-link.jsx +6 -0
  639. package/dist/ui-vamp/input.d.ts +13 -0
  640. package/dist/ui-vamp/input.jsx +31 -0
  641. package/dist/ui-vamp/keyvalue.d.ts +7 -0
  642. package/dist/ui-vamp/keyvalue.jsx +6 -0
  643. package/dist/ui-vamp/mobile-nav-button.d.ts +2 -0
  644. package/dist/ui-vamp/mobile-nav-button.jsx +13 -0
  645. package/dist/ui-vamp/modal.d.ts +11 -0
  646. package/dist/ui-vamp/modal.jsx +22 -0
  647. package/dist/ui-vamp/textarea.d.ts +12 -0
  648. package/dist/ui-vamp/textarea.jsx +21 -0
  649. package/dist/ui-vamp/toggle-group.d.ts +8 -0
  650. package/dist/ui-vamp/toggle-group.jsx +10 -0
  651. package/dist/video-player/mt-video-player.d.ts +7 -0
  652. package/dist/video-player/mt-video-player.jsx +37 -0
  653. package/dist/video-player/video-player2/modal-video-player.d.ts +12 -0
  654. package/dist/video-player/video-player2/modal-video-player.jsx +43 -0
  655. package/package.json +3 -2
@@ -0,0 +1,4 @@
1
+ import { UseFormReturn } from "react-hook-form";
2
+ export declare const DebugFormState: (props: {
3
+ form: UseFormReturn<any>;
4
+ }) => null;
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { useMemo } from "react";
3
+ export const DebugFormState = (props) => {
4
+ const { form } = props;
5
+ useMemo(() => {
6
+ if (form?.formState?.errors && Object.keys(form?.formState?.errors).length > 0) {
7
+ console.warn("DebugFormState", form?.formState?.errors);
8
+ }
9
+ }, [form?.formState?.errors]);
10
+ return null;
11
+ };
@@ -0,0 +1,20 @@
1
+ import { type PropsWithChildren } from "react";
2
+ import { type StateCreator } from "zustand";
3
+ type MtxFormProps = {
4
+ open?: boolean;
5
+ };
6
+ type ConfirmCallbackFnType = () => void;
7
+ export interface DeleteConformState extends MtxFormProps {
8
+ setOpen: (open: boolean) => void;
9
+ confirmCallback?: ConfirmCallbackFnType;
10
+ setConfirmCallback: (confirmCallback: ConfirmCallbackFnType) => void;
11
+ }
12
+ export declare const createFormSlice: StateCreator<DeleteConformState, [], [], DeleteConformState>;
13
+ export declare const DeleteConfirmProvider: (props: PropsWithChildren<MtxFormProps>) => import("react").JSX.Element;
14
+ export declare const useDeleteConfirm: () => {
15
+ show: (props: {
16
+ callback: () => void;
17
+ }) => void;
18
+ };
19
+ export declare const DeleteConfirmDlg: () => import("react").JSX.Element;
20
+ export {};
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { createContext, useCallback, useContext, useMemo } from "react";
3
+ import { createStore, useStore } from "zustand";
4
+ import { immer } from "zustand/middleware/immer";
5
+ import { MtButton } from "../ui-mt/Button";
6
+ import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../ui/dialog";
7
+ export const createFormSlice = (set, get) => ({
8
+ setOpen: (open) => set({ open }),
9
+ setConfirmCallback: (confirmCallback) => set({ confirmCallback }),
10
+ });
11
+ const createDeleteConformStore = (initProps) => {
12
+ return createStore()(immer((...a) => ({
13
+ ...createFormSlice(...a),
14
+ ...initProps,
15
+ })));
16
+ };
17
+ const formContext = createContext(null);
18
+ export const DeleteConfirmProvider = (props) => {
19
+ const { children, ...etc } = props;
20
+ const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
21
+ return (<formContext.Provider value={mystore}>
22
+ {children}
23
+ <DeleteConfirmDlg />
24
+ </formContext.Provider>);
25
+ };
26
+ function useDeleteConfirmStore(selector) {
27
+ const store = useContext(formContext);
28
+ if (!store)
29
+ throw new Error("useDeleteConfirm Missing MtxFormProvider");
30
+ return useStore(store, selector);
31
+ }
32
+ export const useDeleteConfirm = () => {
33
+ const setOpen = useDeleteConfirmStore((x) => x.setOpen);
34
+ const setConfirmCallback = useDeleteConfirmStore((x) => x.setConfirmCallback);
35
+ const show = useCallback((props) => {
36
+ setConfirmCallback(props.callback);
37
+ setOpen(true);
38
+ }, [setConfirmCallback, setOpen]);
39
+ return {
40
+ show,
41
+ };
42
+ };
43
+ export const DeleteConfirmDlg = () => {
44
+ const open = useDeleteConfirmStore((x) => x.open);
45
+ const setOpen = useDeleteConfirmStore((x) => x.setOpen);
46
+ const confirmCallback = useDeleteConfirmStore((x) => x.confirmCallback);
47
+ return (<Dialog open={open} onOpenChange={setOpen}>
48
+ <DialogContent>
49
+ <DialogTitle>delete confirm</DialogTitle>
50
+ <DialogDescription>will delete item, continue?</DialogDescription>
51
+ <MtButton variant={"destructive"} onClick={async () => {
52
+ setOpen(false);
53
+ confirmCallback && confirmCallback();
54
+ }}>
55
+ Continue
56
+ </MtButton>
57
+ <MtButton variant={"outline"} onClick={() => {
58
+ setOpen(false);
59
+ confirmCallback && confirmCallback();
60
+ }}>
61
+ Cancel
62
+ </MtButton>
63
+ </DialogContent>
64
+ </Dialog>);
65
+ };
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from "react";
2
+ export declare const FullCenter: (props: PropsWithChildren) => import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ export const FullCenter = (props) => {
3
+ const { children } = props;
4
+ return (<div className="flex h-full w-full items-center justify-center">
5
+ <div className="flex-1">{children}</div>
6
+ </div>);
7
+ };
@@ -0,0 +1,11 @@
1
+ import { type PropsWithChildren } from "react";
2
+ import { type StateCreator } from "zustand";
3
+ type GlobalSearchProps = {};
4
+ export interface GlobalSearchState extends GlobalSearchProps {
5
+ q?: string;
6
+ setQ?: (q: string) => void;
7
+ }
8
+ export declare const createFormSlice: StateCreator<GlobalSearchState, [], [], GlobalSearchState>;
9
+ export declare const GlobalSearchProvider: (props: PropsWithChildren<GlobalSearchProps>) => import("react").JSX.Element;
10
+ export declare function useGlobalSearch<T>(selector: (state: GlobalSearchState) => T): T;
11
+ export {};
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { createContext, useContext, useMemo } from "react";
3
+ import { createStore, useStore } from "zustand";
4
+ export const createFormSlice = (set, get) => ({
5
+ setQ: (q) => set({ q }),
6
+ });
7
+ const createDeleteConformStore = (initProps) => {
8
+ return createStore()((...a) => ({
9
+ ...createFormSlice(...a),
10
+ ...initProps,
11
+ }));
12
+ };
13
+ const formContext = createContext(null);
14
+ export const GlobalSearchProvider = (props) => {
15
+ const { children, ...etc } = props;
16
+ const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
17
+ return (<formContext.Provider value={mystore}>
18
+ {children}
19
+
20
+ </formContext.Provider>);
21
+ };
22
+ export function useGlobalSearch(selector) {
23
+ const store = useContext(formContext);
24
+ if (!store)
25
+ throw new Error("useGlobalSearch Missing GlobalSearchProvider");
26
+ return useStore(store, selector);
27
+ }
@@ -0,0 +1 @@
1
+ export declare function HtmlChangesObserver({ children }: React.PropsWithChildren): import("react").JSX.Element;
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ import { HtmlDiffer } from "html-differ";
3
+ import { useEffect, useRef } from "react";
4
+ const styles = {
5
+ none: "background: transparent; color:black",
6
+ gray: "background: transparent; color: gray",
7
+ bgGreen: "background: green; color:black",
8
+ bgRed: "background: red; color:black",
9
+ };
10
+ export function HtmlChangesObserver({ children }) {
11
+ const targetNode = useRef(null);
12
+ useEffect(() => {
13
+ const differ = new HtmlDiffer();
14
+ let lastHtml = targetNode.current.innerHTML;
15
+ function observeChanges() {
16
+ const newHtml = targetNode.current.innerHTML;
17
+ if (newHtml != lastHtml) {
18
+ const diff = differ.diffHtml(lastHtml, newHtml);
19
+ lastHtml = newHtml;
20
+ logDiff(diff);
21
+ }
22
+ if (running) {
23
+ requestAnimationFrame(observeChanges);
24
+ }
25
+ }
26
+ let running = true;
27
+ requestAnimationFrame(observeChanges);
28
+ return () => {
29
+ running = false;
30
+ };
31
+ }, []);
32
+ return <div ref={targetNode}>{children}</div>;
33
+ }
34
+ function logDiff(diff) {
35
+ let output = "", styleArr = [];
36
+ if (diff.length === 1 && !diff[0].added && !diff[0].removed)
37
+ return output;
38
+ for (const part of diff) {
39
+ var index = diff.indexOf(part), partValue = part.value;
40
+ if (part.added || part.removed) {
41
+ output += index === 0 ? "\n" : "";
42
+ output += "%c" + partValue;
43
+ styleArr.push(part.added ? styles.bgGreen : styles.bgRed);
44
+ }
45
+ else {
46
+ output += index !== 0 ? "" : "\n";
47
+ output += "%c" + partValue;
48
+ styleArr.push(styles.gray);
49
+ }
50
+ }
51
+ console.log(performance.now() + "ms DOM changes: " + output, ...styleArr);
52
+ }
@@ -0,0 +1,5 @@
1
+ import Image from 'next/image';
2
+ import { ComponentProps } from "react";
3
+ type Props = ComponentProps<typeof Image>;
4
+ export declare const MtImage: (props: Props) => import("react").JSX.Element;
5
+ export {};
@@ -0,0 +1,27 @@
1
+ import { isCloudflarePage } from 'mtxlib/utils';
2
+ import Image from 'next/image';
3
+ const normalizeSrc = (src) => {
4
+ return src.startsWith('/') ? src.slice(1) : src;
5
+ };
6
+ const cloudflareLoader = ({ src, width, quality }) => {
7
+ const params = [`width=${width}`];
8
+ if (quality) {
9
+ params.push(`quality=${quality}`);
10
+ }
11
+ const paramsString = params.join(',');
12
+ return `https://cfgomtm.yuepa8.com/cdn-cgi/image/${paramsString}/${normalizeSrc(src)}`;
13
+ };
14
+ const exampleImageLoader = ({ src, width, quality }) => {
15
+ return `https://example.com/${src}?w=${width}&q=${quality || 75}`;
16
+ };
17
+ function getImageLoader() {
18
+ if (isCloudflarePage()) {
19
+ return cloudflareLoader;
20
+ }
21
+ else {
22
+ exampleImageLoader;
23
+ }
24
+ }
25
+ export const MtImage = (props) => {
26
+ return <Image {...props} loader={getImageLoader()}/>;
27
+ };
@@ -0,0 +1 @@
1
+ export declare const MtProgressBar: () => import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ import { AppProgressBar } from "next-nprogress-bar";
3
+ export const MtProgressBar = () => {
4
+ return <AppProgressBar height="4px" color="#4934eb" options={{ showSpinner: false }} shallowRouting/>;
5
+ };
@@ -0,0 +1 @@
1
+ export declare const NotFoundGoBack: () => import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ 'use client';
2
+ import { useRouter } from "next/navigation";
3
+ import { Button } from "../ui/button";
4
+ export const NotFoundGoBack = () => {
5
+ const router = useRouter();
6
+ return (<div className="container flex flex-col">
7
+ <div className="mx-auto p-8">
8
+ not found
9
+ </div>
10
+
11
+ <Button className="mx-auto p-8" onClick={() => {
12
+ router.back();
13
+ }}>Go back</Button>
14
+ </div>);
15
+ };
@@ -0,0 +1,28 @@
1
+ import { z } from "zod";
2
+ declare const slntTreeNodeBaseSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ pid: z.ZodOptional<z.ZodString>;
5
+ label: z.ZodOptional<z.ZodString>;
6
+ icon: z.ZodOptional<z.ZodString>;
7
+ routeName: z.ZodOptional<z.ZodString>;
8
+ routeType: z.ZodOptional<z.ZodEnum<["default", "list", "detail"]>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ id: string;
11
+ label?: string | undefined;
12
+ icon?: string | undefined;
13
+ pid?: string | undefined;
14
+ routeName?: string | undefined;
15
+ routeType?: "default" | "list" | "detail" | undefined;
16
+ }, {
17
+ id: string;
18
+ label?: string | undefined;
19
+ icon?: string | undefined;
20
+ pid?: string | undefined;
21
+ routeName?: string | undefined;
22
+ routeType?: "default" | "list" | "detail" | undefined;
23
+ }>;
24
+ export type DashMenuTreeItem = z.infer<typeof slntTreeNodeBaseSchema> & {
25
+ children?: DashMenuTreeItem[];
26
+ };
27
+ export declare const treeNodeSchema: z.ZodType<DashMenuTreeItem>;
28
+ export {};
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ const DashMenuTreeItemRouteType = ["default", "list", "detail"];
3
+ const slntTreeNodeBaseSchema = z.object({
4
+ id: z.string(),
5
+ pid: z.string().optional(),
6
+ label: z.string().optional(),
7
+ icon: z.string().optional(),
8
+ routeName: z.string().optional(),
9
+ routeType: z.enum(DashMenuTreeItemRouteType).optional(),
10
+ });
11
+ export const treeNodeSchema = slntTreeNodeBaseSchema.extend({
12
+ children: z.lazy(() => treeNodeSchema.array()).optional(),
13
+ });
@@ -0,0 +1 @@
1
+ export declare const SlntChildrenTabs: () => import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { urlJoinPaths } from "mtxlib/http/url";
3
+ import { usePathname, useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
4
+ import { cn } from "../../lib/utils";
5
+ import { MtLink } from "../mtlink";
6
+ import { useMenuTreeStore } from "./SlntTreeNode";
7
+ export const SlntChildrenTabs = () => {
8
+ const parentData = useMenuTreeStore((x) => x.menuNode);
9
+ const pathName = usePathname();
10
+ const segments = useSelectedLayoutSegments();
11
+ const segment = useSelectedLayoutSegment();
12
+ const basePath = pathName.slice(0, -segments.join("/").length);
13
+ const basePath3 = "/" + segments.join("/");
14
+ return (<div className="flex gap-1 ">
15
+
16
+ {parentData?.children?.map((item, i) => {
17
+ let href = `${urlJoinPaths(basePath, item.routeName || "")}`;
18
+ if (!segments?.length) {
19
+ href = urlJoinPaths(pathName, item.routeName || "");
20
+ }
21
+ return (<TabItem key={i} activate={segment == item.routeName}>
22
+ <MtLink key={i} variant={"ghost"} href={href}>
23
+ {item.label}
24
+ </MtLink>
25
+
26
+ </TabItem>);
27
+ })}
28
+ </div>);
29
+ };
30
+ const TabItem = (props) => {
31
+ const { activate, ...etc } = props;
32
+ return (<div data-state={activate && "active"} className={cn("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow")} {...etc}/>);
33
+ };
@@ -0,0 +1,19 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { DashMenuTreeItem } from "./Slnt.z";
3
+ export type SLNTProps = {
4
+ menuNode?: DashMenuTreeItem;
5
+ };
6
+ export interface SlntState extends SLNTProps {
7
+ }
8
+ export declare const slntContext: import("react").Context<(Omit<import("zustand").StoreApi<SlntState>, "setState"> & {
9
+ setState(nextStateOrUpdater: SlntState | Partial<SlntState> | ((state: import("immer").WritableDraft<SlntState>) => void), shouldReplace?: boolean | undefined): void;
10
+ }) | null>;
11
+ type ModalProviderProps = React.PropsWithChildren<SLNTProps>;
12
+ export declare const MenuTreeProvider: (props: ModalProviderProps) => import("react").JSX.Element;
13
+ export declare const DEFAULT_USE_SHALLOW = true;
14
+ export declare function useMenuTreeStore(): SlntState;
15
+ export declare function useMenuTreeStore<T>(selector: (state: SlntState) => T): T;
16
+ export declare const SlntTreeNode: (props: {
17
+ treeData?: DashMenuTreeItem;
18
+ } & PropsWithChildren) => import("react").JSX.Element;
19
+ export {};
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
3
+ import { createContext, useContext, useMemo } from "react";
4
+ import { useStore } from "zustand";
5
+ import { immer } from "zustand/middleware/immer";
6
+ import { useShallow } from "zustand/react/shallow";
7
+ import { createStore } from "zustand/vanilla";
8
+ const createModalStore = (initProps) => {
9
+ return createStore()(immer((set, get) => ({
10
+ ...initProps,
11
+ })));
12
+ };
13
+ export const slntContext = createContext(null);
14
+ export const MenuTreeProvider = (props) => {
15
+ const { children, ...etc } = props;
16
+ const mystore = useMemo(() => createModalStore(etc), [etc]);
17
+ return (<slntContext.Provider value={mystore}>{children}</slntContext.Provider>);
18
+ };
19
+ export const DEFAULT_USE_SHALLOW = true;
20
+ export function useMenuTreeStore(selector) {
21
+ const store = useContext(slntContext);
22
+ if (!store)
23
+ return null;
24
+ if (selector) {
25
+ return useStore(store, DEFAULT_USE_SHALLOW ? useShallow(selector) : selector);
26
+ }
27
+ return useStore(store);
28
+ }
29
+ export const SlntTreeNode = (props) => {
30
+ const { children, treeData } = props;
31
+ const parentData = useMenuTreeStore((x) => x?.menuNode);
32
+ const segment = useSelectedLayoutSegment();
33
+ const segments = useSelectedLayoutSegments();
34
+ const parent = parentData || treeData;
35
+ if (!parent) {
36
+ throw new Error("must within parentNodes or rootNodes ");
37
+ }
38
+ const currNode = useMemo(() => {
39
+ const fined = parent.children?.find((x) => x.routeName == segment);
40
+ console.log({ message: `(SlntTreeNode)${segment}`, fined, parent });
41
+ return fined;
42
+ }, [parent, segment]);
43
+ return (<MenuTreeProvider menuNode={currNode}>
44
+
45
+ {children}
46
+ </MenuTreeProvider>);
47
+ };
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,5 @@
1
+ export declare const DebugValue: (props: {
2
+ title?: string;
3
+ data: any;
4
+ className?: string;
5
+ }) => import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { MtButton } from "../../ui-mt/Button";
3
+ import { Dialog, DialogContent, DialogTrigger } from "../../ui/dialog";
4
+ export const DebugValue = (props) => {
5
+ const { title, data, className } = props;
6
+ return (<Dialog>
7
+ <DialogTrigger asChild>
8
+ <MtButton variant={"outline"} className={className}>
9
+ {title || "debug"}
10
+ </MtButton>
11
+ </DialogTrigger>
12
+ <DialogContent className="max-h-lvh w-full overflow-scroll bg-red-100">
13
+ <pre className=" text-xs">{JSON.stringify(data, null, 2)}</pre>
14
+ </DialogContent>
15
+ </Dialog>);
16
+ };
@@ -0,0 +1,2 @@
1
+ export declare const HOTKEY_Debug = "alt+.";
2
+ export declare const DevTools: () => import("react").JSX.Element | null;
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import dynamic from "next/dynamic";
3
+ import { useHotkeys } from "react-hotkeys-hook";
4
+ import { useMtapp } from "../../mtapp/MtAppProvider";
5
+ import { TailwindIndicator } from "../tailwind-indicator";
6
+ const ReactQueryDevtoolsProduction = dynamic(() => import("@tanstack/react-query-devtools/build/modern/production.js").then((d) => ({
7
+ default: d.ReactQueryDevtools,
8
+ })), {
9
+ ssr: false,
10
+ });
11
+ export const HOTKEY_Debug = "alt+.";
12
+ export const DevTools = () => {
13
+ const debug = useMtapp((x) => x.debug);
14
+ const setDebug = useMtapp((x) => x.setDebug);
15
+ useHotkeys(HOTKEY_Debug, () => {
16
+ console.log("debug2:%o", !debug);
17
+ setDebug(!debug);
18
+ }, [debug, setDebug]);
19
+ if (!debug) {
20
+ return null;
21
+ }
22
+ return (<>
23
+ <ReactQueryDevtoolsProduction buttonPosition="bottom-right"/>
24
+ <TailwindIndicator />
25
+ </>);
26
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { Options } from 'react-markdown';
3
+ export declare const MemoizedReactMarkdown: FC<Options>;
@@ -0,0 +1,4 @@
1
+ import { memo } from 'react';
2
+ import ReactMarkdown from 'react-markdown';
3
+ export const MemoizedReactMarkdown = memo(ReactMarkdown, (prevProps, nextProps) => prevProps.children === nextProps.children &&
4
+ prevProps.className === nextProps.className);
@@ -0,0 +1,14 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import Link from "next/link";
3
+ import React, { ComponentProps } from "react";
4
+ import { buttonVariants } from "../ui/button";
5
+ export interface TMtLinkProps extends ComponentProps<typeof Link>, VariantProps<typeof buttonVariants> {
6
+ asChild?: boolean;
7
+ }
8
+ export declare const MtLink: React.ForwardRefExoticComponent<Omit<TMtLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
9
+ type ExternalLinkProps = ComponentProps<"a">;
10
+ interface TExternalLink extends ExternalLinkProps {
11
+ children?: React.ReactNode;
12
+ }
13
+ export declare function MtExternalLink({ children, className, ...props }: TExternalLink): React.JSX.Element;
14
+ export {};
@@ -0,0 +1,16 @@
1
+ 'use client';
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import Link from "next/link";
4
+ import React from "react";
5
+ import { cn } from "../lib/utils";
6
+ import { buttonVariants } from "../ui/button";
7
+ export const MtLink = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
8
+ const Comp = asChild ? Slot : Link;
9
+ return (<Comp className={cn(((variant) && buttonVariants({ variant: variant, className })))} ref={ref} {...props}/>);
10
+ });
11
+ MtLink.displayName = "MtLink";
12
+ export function MtExternalLink({ children, className, ...props }) {
13
+ return (<a className={cn(className, "hover:text-brandtext-500 hover:underline hover:brightness-150")} rel="noopener noreferrer" {...props}>
14
+ {children}
15
+ </a>);
16
+ }
@@ -0,0 +1 @@
1
+ export default function PipExamplePage(): import("react").JSX.Element;
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import ReactDocumentPictureInPicture from "mtxuilib/common/pip/ReactDocumentPictureInPicture";
3
+ import { MtButton } from "mtxuilib/ui-mt/Button";
4
+ import { useRef, useState } from "react";
5
+ export default function PipExamplePage() {
6
+ const pipWindowRef = useRef(null);
7
+ return (<>
8
+ <ReactDocumentPictureInPicture ref={pipWindowRef} width="50%" height="100%" buttonRenderer={({ open, close, toggle, isOpen }) => (<div className="flex gap-2">
9
+ <b>Is {isOpen ? "Open" : "Closed"} </b>
10
+ <MtButton onClick={open}>Open</MtButton>
11
+ <MtButton onClick={close}>Close</MtButton>
12
+ <MtButton onClick={toggle}>Toggle</MtButton>
13
+ </div>)}>
14
+ <Comp pipWindowRef={pipWindowRef}/>
15
+ </ReactDocumentPictureInPicture>
16
+ </>);
17
+ }
18
+ const Comp = (props) => {
19
+ const { pipWindowRef } = props;
20
+ const [text, setText] = useState("tet1");
21
+ return (<div className="prose">
22
+ <h1>画中画显示(范例)</h1>
23
+ <div>
24
+ <button onClick={() => {
25
+ console.log("关闭");
26
+ setText("ssssssssssssssss");
27
+ }}>
28
+ sssss
29
+ </button>
30
+ <MtButton onClick={() => {
31
+ console.log("关闭");
32
+ setText("ssssssssssssssss");
33
+ }}>
34
+ 关闭333 {text}
35
+ </MtButton>
36
+ </div>
37
+ <i>
38
+ This text should be displayed in a Document Picture in Picture filling the maximum allow height and 50% of the
39
+ width of the original window
40
+ </i>
41
+ </div>);
42
+ };
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from "react";
2
+ export type ReactDocumentPictureInPictureForwardRefType = {
3
+ window: () => Window | undefined;
4
+ isOpen: boolean;
5
+ close: () => void;
6
+ };
7
+ export declare enum FeatureUnavailableReasonEnum {
8
+ USING_UNSECURE_PROTOCOL = "USING_UNSECURE_PROTOCOL",
9
+ API_NOT_SUPPORTED = "API_NOT_SUPPORTED"
10
+ }
11
+ export type ReactDocumentPictureInPicturePropsType = {
12
+ width?: string | number;
13
+ height?: string | number;
14
+ shareStyles?: boolean;
15
+ onOpen?: () => void;
16
+ onClose?: () => void;
17
+ onResize?: (width: number, height: number) => void;
18
+ featureUnavailableRenderer?: ReactNode | ((reason: FeatureUnavailableReasonEnum) => ReactNode);
19
+ buttonRenderer?: ReactNode | ((props: {
20
+ open: () => void;
21
+ close: () => void;
22
+ toggle: () => void;
23
+ isOpen: boolean;
24
+ }) => ReactNode);
25
+ children?: ReactNode;
26
+ };
27
+ declare const ReactDocumentPictureInPicture: import("react").ForwardRefExoticComponent<ReactDocumentPictureInPicturePropsType & import("react").RefAttributes<ReactDocumentPictureInPictureForwardRefType>>;
28
+ export default ReactDocumentPictureInPicture;