mtxuilib 0.1.183 → 0.1.184

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