mtxuilib 0.1.172 → 0.1.176

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 (186) hide show
  1. package/dist/common/DeleteComfirm.d.ts +3 -1
  2. package/dist/common/DeleteComfirm.js +3 -3
  3. package/dist/common/HtmlChangesObserver.js +1 -1
  4. package/dist/common/devtools/DebugValue.js +1 -1
  5. package/dist/common/pip/PipExamplePage.js +1 -1
  6. package/dist/common/table/data-table-pagination.d.ts +1 -1
  7. package/dist/common/table/data-table-pagination.js +6 -6
  8. package/dist/common/table/data-table-view-options.d.ts +1 -1
  9. package/dist/common/table/data-table-view-options.js +2 -2
  10. package/dist/common/tiptap/TiptapEditor.js +2 -2
  11. package/dist/common/tiptap/examples/Demo-Default.js +29 -29
  12. package/dist/components/tool-ui/BlogHomePage.z.d.ts +2 -2
  13. package/dist/components/tool-ui/OpenBrowser.js +2 -7
  14. package/dist/demos/suspense-ssr/ExamplePage.js +1 -1
  15. package/dist/form/EditFormToolbar.js +6 -3
  16. package/dist/form/deleteConform.js +2 -2
  17. package/dist/lib/htmlparse/components/ItemActionButton.js +11 -3
  18. package/dist/lib/htmlparse/htmlParse.js +2 -2
  19. package/dist/lib/service-worker/ServiceWorkerMain.js +1 -1
  20. package/dist/misc/CustomErrorRetry.js +1 -1
  21. package/dist/misc/MtErrorBoundaryV2.js +2 -2
  22. package/dist/mtedtior/LzMtEditor.js +1 -1
  23. package/dist/mtedtior/content.js +11 -11
  24. package/dist/mtedtior/selectors/math-selector.js +1 -1
  25. package/dist/tools/devTools/cloudflareTunnel.js +1 -1
  26. package/dist/tools/devTools/docker-compose.js +2 -5
  27. package/dist/tools/devTools/dpMtCfWorkerTool.js +1 -2
  28. package/dist/tools/devTools/installOsPackages.js +3 -3
  29. package/dist/tools/rag/addResoure.js +1 -1
  30. package/dist/tools/rag/ui/RagInput.js +2 -2
  31. package/dist/tools/webbot/callAdminBot.js +1 -1
  32. package/dist/ui/codeblock.d.ts +1 -1
  33. package/dist/ui/codeblock.js +46 -46
  34. package/dist/ui/command.d.ts +2 -2
  35. package/dist/ui/command.js +1 -1
  36. package/dist/ui/mt/Button.d.ts +1 -0
  37. package/dist/ui/mt/Button.js +2 -0
  38. package/dist/{ui-mt → ui/mt}/DropdownMenuItemLink.d.ts +1 -1
  39. package/dist/{ui-mt → ui/mt}/DropdownMenuItemLink.js +2 -2
  40. package/dist/{ui-mt → ui/mt}/MtDialog.d.ts +1 -1
  41. package/dist/{ui-mt → ui/mt}/MtDialog.js +1 -1
  42. package/dist/ui/mt/MtForm.js +3 -0
  43. package/dist/{ui-mt → ui/mt}/NavTag.js +5 -5
  44. package/dist/{ui-mt → ui/mt}/ScreenPanel.js +1 -1
  45. package/dist/{ui-mt → ui/mt}/Separator.js +1 -1
  46. package/dist/{ui-mt → ui/mt}/Tree.d.ts +1 -1
  47. package/dist/{ui-mt → ui/mt}/Tree.js +5 -5
  48. package/dist/ui/mt/input-field/InputField.js +19 -0
  49. package/dist/{ui-mt → ui/mt}/input-field/TextArea.js +1 -1
  50. package/dist/{ui-mt → ui/mt}/input-field/select/InputSelect.js +2 -2
  51. package/dist/{ui-mt → ui/mt}/inputs/SearchInput.js +2 -2
  52. package/dist/{ui-mt → ui/mt}/inputs/TaskStatusInput.d.ts +1 -1
  53. package/dist/{ui-mt → ui/mt}/inputs/UrlsInput.d.ts +1 -1
  54. package/dist/{ui-mt → ui/mt}/inputs/UrlsInput.js +1 -1
  55. package/dist/ui/mt/inputs/input.d.ts +1 -0
  56. package/dist/ui/mt/inputs/input.js +2 -0
  57. package/dist/{ui-mt → ui/mt}/mt-tree-view/mt-tree-view-api.d.ts +2 -1
  58. package/dist/{ui-mt → ui/mt}/mt-tree-view/mt-tree-view-api.js +3 -3
  59. package/dist/{ui-mt → ui/mt}/mt-tree-view/mt-treeview.d.ts +2 -2
  60. package/dist/{ui-mt → ui/mt}/mt-tree-view/mt-treeview.js +2 -3
  61. package/dist/ui/mt/mtlink.d.ts +14 -0
  62. package/dist/ui/mt/mtlink.js +15 -0
  63. package/dist/{ui-mt → ui/mt}/pagination.js +6 -6
  64. package/dist/{ui-mt → ui/mt}/skeleton/NewLoading.js +1 -1
  65. package/dist/{ui-mt → ui/mt}/skeleton/SkeletonInput.js +1 -1
  66. package/dist/{ui-mt → ui/mt}/skeleton/SkeletonLayout.js +1 -1
  67. package/dist/{ui-mt → ui/mt}/skeleton/SkeletonLoading.js +1 -1
  68. package/dist/{ui-mt → ui/mt}/skeleton/skeletons.d.ts +1 -1
  69. package/dist/{ui-mt → ui/mt}/skeleton/skeletons.js +1 -1
  70. package/dist/{ui-mt → ui/mt}/skeleton.js +1 -1
  71. package/package.json +2 -1
  72. package/dist/components/dev-bot/DevBot.d.ts +0 -8
  73. package/dist/components/dev-bot/DevBot.js +0 -43
  74. package/dist/components/dev-bot/DevBotActions.d.ts +0 -13
  75. package/dist/components/dev-bot/DevBotActions.js +0 -157
  76. package/dist/components/dev-bot/actions.d.ts +0 -2
  77. package/dist/components/dev-bot/actions.js +0 -9
  78. package/dist/components/dev-bot/chat-list.d.ts +0 -8
  79. package/dist/components/dev-bot/chat-list.js +0 -10
  80. package/dist/components/dev-bot/chat-panel.d.ts +0 -9
  81. package/dist/components/dev-bot/chat-panel.js +0 -43
  82. package/dist/components/dev-bot/prompt-form.d.ts +0 -4
  83. package/dist/components/dev-bot/prompt-form.js +0 -46
  84. package/dist/components/tool-ui/DpCfWorker.d.ts +0 -1
  85. package/dist/components/tool-ui/DpCfWorker.js +0 -12
  86. package/dist/components/tool-ui/DpMtxEdge.d.ts +0 -1
  87. package/dist/components/tool-ui/DpMtxEdge.js +0 -12
  88. package/dist/components/tool-ui/ExtractArticle.d.ts +0 -1
  89. package/dist/components/tool-ui/ExtractArticle.js +0 -30
  90. package/dist/components/tool-ui/vcDeploy.d.ts +0 -1
  91. package/dist/components/tool-ui/vcDeploy.js +0 -12
  92. package/dist/lib/auth/auth.config.d.ts +0 -1
  93. package/dist/lib/auth/auth.config.js +0 -35
  94. package/dist/lib/auth/auth.d.ts +0 -5
  95. package/dist/lib/auth/auth.js +0 -7
  96. package/dist/lib/auth/authActions.d.ts +0 -9
  97. package/dist/lib/auth/authActions.js +0 -50
  98. package/dist/lib/chat/chatActions.d.ts +0 -27
  99. package/dist/lib/chat/chatActions.js +0 -120
  100. package/dist/tools/devTools/bash.d.ts +0 -14
  101. package/dist/tools/devTools/bash.js +0 -28
  102. package/dist/tools/devTools/clean.d.ts +0 -8
  103. package/dist/tools/devTools/clean.js +0 -26
  104. package/dist/tools/devTools/dockerBuildMtm.d.ts +0 -8
  105. package/dist/tools/devTools/dockerBuildMtm.js +0 -33
  106. package/dist/tools/devTools/dpMtxedge.d.ts +0 -8
  107. package/dist/tools/devTools/dpMtxedge.js +0 -79
  108. package/dist/tools/devTools/packageRelease.d.ts +0 -8
  109. package/dist/tools/devTools/packageRelease.js +0 -43
  110. package/dist/tools/devTools/vcDeploytool.d.ts +0 -8
  111. package/dist/tools/devTools/vcDeploytool.js +0 -66
  112. package/dist/ui-mt/Button.d.ts +0 -1
  113. package/dist/ui-mt/Button.js +0 -2
  114. package/dist/ui-mt/MtForm.js +0 -3
  115. package/dist/ui-mt/input-field/InputField.js +0 -21
  116. package/dist/ui-mt/inputs/input.d.ts +0 -1
  117. package/dist/ui-mt/inputs/input.js +0 -2
  118. package/dist/ui-mt/skeleton/SkeletonDashboardShell.d.ts +0 -0
  119. package/dist/ui-mt/skeleton/SkeletonDashboardShell.js +0 -2
  120. package/dist/ui-vamp/alert.d.ts +0 -17
  121. package/dist/ui-vamp/alert.js +0 -37
  122. package/dist/ui-vamp/button.d.ts +0 -13
  123. package/dist/ui-vamp/button.js +0 -35
  124. package/dist/ui-vamp/card.d.ts +0 -23
  125. package/dist/ui-vamp/card.js +0 -24
  126. package/dist/ui-vamp/chip.d.ts +0 -11
  127. package/dist/ui-vamp/chip.js +0 -24
  128. package/dist/ui-vamp/external-link.d.ts +0 -7
  129. package/dist/ui-vamp/external-link.js +0 -5
  130. package/dist/ui-vamp/input.d.ts +0 -13
  131. package/dist/ui-vamp/input.js +0 -22
  132. package/dist/ui-vamp/keyvalue.d.ts +0 -7
  133. package/dist/ui-vamp/keyvalue.js +0 -4
  134. package/dist/ui-vamp/mobile-nav-button.d.ts +0 -1
  135. package/dist/ui-vamp/mobile-nav-button.js +0 -9
  136. package/dist/ui-vamp/modal.d.ts +0 -11
  137. package/dist/ui-vamp/modal.js +0 -18
  138. package/dist/ui-vamp/textarea.d.ts +0 -12
  139. package/dist/ui-vamp/textarea.js +0 -19
  140. package/dist/ui-vamp/toggle-group.d.ts +0 -8
  141. package/dist/ui-vamp/toggle-group.js +0 -11
  142. /package/dist/{ui-mt → ui/mt}/Boundary.d.ts +0 -0
  143. /package/dist/{ui-mt → ui/mt}/Boundary.js +0 -0
  144. /package/dist/{ui-mt → ui/mt}/ErrorMessage.d.ts +0 -0
  145. /package/dist/{ui-mt → ui/mt}/ErrorMessage.js +0 -0
  146. /package/dist/{ui-mt → ui/mt}/ExampleTree.d.ts +0 -0
  147. /package/dist/{ui-mt → ui/mt}/ExampleTree.js +0 -0
  148. /package/dist/{ui-mt → ui/mt}/MtForm.d.ts +0 -0
  149. /package/dist/{ui-mt → ui/mt}/NavTag.d.ts +0 -0
  150. /package/dist/{ui-mt → ui/mt}/ScreenPanel.d.ts +0 -0
  151. /package/dist/{ui-mt → ui/mt}/Separator.d.ts +0 -0
  152. /package/dist/{ui-mt → ui/mt}/SimpleModel.d.ts +0 -0
  153. /package/dist/{ui-mt → ui/mt}/SimpleModel.js +0 -0
  154. /package/dist/{ui-mt → ui/mt}/SimpleTag.d.ts +0 -0
  155. /package/dist/{ui-mt → ui/mt}/SimpleTag.js +0 -0
  156. /package/dist/{ui-mt → ui/mt}/Slot.d.ts +0 -0
  157. /package/dist/{ui-mt → ui/mt}/Slot.js +0 -0
  158. /package/dist/{ui-mt → ui/mt}/WithLinkIf.d.ts +0 -0
  159. /package/dist/{ui-mt → ui/mt}/WithLinkIf.js +0 -0
  160. /package/dist/{ui-mt → ui/mt}/headline.d.ts +0 -0
  161. /package/dist/{ui-mt → ui/mt}/headline.js +0 -0
  162. /package/dist/{ui-mt → ui/mt}/input-field/InputField.d.ts +0 -0
  163. /package/dist/{ui-mt → ui/mt}/input-field/SingleUploadForm.d.ts +0 -0
  164. /package/dist/{ui-mt → ui/mt}/input-field/SingleUploadForm.js +0 -0
  165. /package/dist/{ui-mt → ui/mt}/input-field/TextArea.d.ts +0 -0
  166. /package/dist/{ui-mt → ui/mt}/input-field/TextFileInput.d.ts +0 -0
  167. /package/dist/{ui-mt → ui/mt}/input-field/TextFileInput.js +0 -0
  168. /package/dist/{ui-mt → ui/mt}/input-field/select/InputSelect.d.ts +0 -0
  169. /package/dist/{ui-mt → ui/mt}/inputs/SearchInput.d.ts +0 -0
  170. /package/dist/{ui-mt → ui/mt}/inputs/TaskStatusInput.js +0 -0
  171. /package/dist/{ui-mt → ui/mt}/modal/MtModal.d.ts +0 -0
  172. /package/dist/{ui-mt → ui/mt}/modal/MtModal.js +0 -0
  173. /package/dist/{ui-mt → ui/mt}/mt-tree-view/MtTreeViewExample.d.ts +0 -0
  174. /package/dist/{ui-mt → ui/mt}/mt-tree-view/MtTreeViewExample.js +0 -0
  175. /package/dist/{ui-mt → ui/mt}/pagination.d.ts +0 -0
  176. /package/dist/{ui-mt → ui/mt}/skeleton/NewLoading.d.ts +0 -0
  177. /package/dist/{ui-mt → ui/mt}/skeleton/SkeletonInput.d.ts +0 -0
  178. /package/dist/{ui-mt → ui/mt}/skeleton/SkeletonLayout.d.ts +0 -0
  179. /package/dist/{ui-mt → ui/mt}/skeleton/SkeletonLoading.d.ts +0 -0
  180. /package/dist/{ui-mt → ui/mt}/skeleton/skeleton-card.d.ts +0 -0
  181. /package/dist/{ui-mt → ui/mt}/skeleton/skeleton-card.js +0 -0
  182. /package/dist/{ui-mt → ui/mt}/skeleton/skeleton2.d.ts +0 -0
  183. /package/dist/{ui-mt → ui/mt}/skeleton/skeleton2.js +0 -0
  184. /package/dist/{ui-mt → ui/mt}/skeleton.d.ts +0 -0
  185. /package/dist/{ui-mt → ui/mt}/types.d.ts +0 -0
  186. /package/dist/{ui-mt → ui/mt}/types.js +0 -0
@@ -9,7 +9,9 @@ export interface DeleteConformState extends MtxFormProps {
9
9
  confirmCallback?: ConfirmCallbackFnType;
10
10
  setConfirmCallback: (confirmCallback: ConfirmCallbackFnType) => void;
11
11
  }
12
- export declare const createFormSlice: StateCreator<DeleteConformState, [], [], DeleteConformState>;
12
+ export declare const createFormSlice: StateCreator<DeleteConformState, [
13
+ ], [
14
+ ], DeleteConformState>;
13
15
  export declare const DeleteConfirmProvider: (props: PropsWithChildren<MtxFormProps>) => import("react/jsx-runtime").JSX.Element;
14
16
  export declare const useDeleteConfirm: () => {
15
17
  show: (props: {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { createContext, useCallback, useContext, useMemo } from "react";
3
+ import { createContext, useCallback, useContext, useMemo, } from "react";
4
4
  import { createStore, useStore } from "zustand";
5
5
  import { immer } from "zustand/middleware/immer";
6
- import { MtButton } from "../ui-mt/Button";
7
- import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../ui/dialog";
6
+ import { MtButton } from "../ui/mt/Button";
7
+ import { Dialog, DialogContent, DialogDescription, DialogTitle, } from "../ui/dialog";
8
8
  export const createFormSlice = (set, get) => ({
9
9
  setOpen: (open) => set({ open }),
10
10
  setConfirmCallback: (confirmCallback) => set({ confirmCallback }),
@@ -15,7 +15,7 @@ export function HtmlChangesObserver({ children }) {
15
15
  let lastHtml = targetNode.current.innerHTML;
16
16
  function observeChanges() {
17
17
  const newHtml = targetNode.current.innerHTML;
18
- if (newHtml != lastHtml) {
18
+ if (newHtml !== lastHtml) {
19
19
  const diff = differ.diffHtml(lastHtml, newHtml);
20
20
  lastHtml = newHtml;
21
21
  logDiff(diff);
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { MtButton } from "../../ui-mt/Button";
4
3
  import { Dialog, DialogContent, DialogTrigger } from "../../ui/dialog";
4
+ import { MtButton } from "../../ui/mt/Button";
5
5
  export const DebugValue = (props) => {
6
6
  const { title, data, className } = props;
7
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) }) })] }));
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import ReactDocumentPictureInPicture from "mtxuilib/common/pip/ReactDocumentPictureInPicture";
4
- import { MtButton } from "mtxuilib/ui-mt/Button";
4
+ import { MtButton } from "mtxuilib/ui/mt/Button";
5
5
  import { useRef, useState } from "react";
6
6
  export default function PipExamplePage() {
7
7
  const pipWindowRef = useRef(null);
@@ -2,5 +2,5 @@ import type { Table } from "@tanstack/react-table";
2
2
  interface DataTablePaginationProps<TData> {
3
3
  table: Table<TData>;
4
4
  }
5
- export declare function DataTablePagination<TData>({ table }: DataTablePaginationProps<TData>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function DataTablePagination<TData>({ table, }: DataTablePaginationProps<TData>): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
- import { ChevronLeftIcon, ChevronRightIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon } from "@radix-ui/react-icons";
4
- import { MtButton } from "../../ui-mt/Button";
5
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../ui/select";
6
- export function DataTablePagination({ table }) {
7
- return (_jsxs("div", { className: "flex items-center justify-between px-2", children: [_jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [table.getFilteredSelectedRowModel().rows.length, " of ", table.getFilteredRowModel().rows.length, " row(s) selected."] }), _jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-sm font-medium", children: "Rows per page" }), _jsxs(Select, { value: `${table.getState().pagination.pageSize}`, onValueChange: (value) => {
3
+ import { ChevronLeftIcon, ChevronRightIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon, } from "@radix-ui/react-icons";
4
+ import { MtButton } from "../../ui/mt/Button";
5
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../../ui/select";
6
+ export function DataTablePagination({ table, }) {
7
+ return (_jsxs("div", { className: "flex items-center justify-between px-2", children: [_jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [table.getFilteredSelectedRowModel().rows.length, " of", " ", table.getFilteredRowModel().rows.length, " row(s) selected."] }), _jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-sm font-medium", children: "Rows per page" }), _jsxs(Select, { value: `${table.getState().pagination.pageSize}`, onValueChange: (value) => {
8
8
  table.setPageSize(Number(value));
9
- }, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: ["Page ", table.getState().pagination.pageIndex + 1, " of ", table.getPageCount()] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs(MtButton, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to first page" }), _jsx(DoubleArrowLeftIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to previous page" }), _jsx(ChevronLeftIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to next page" }), _jsx(ChevronRightIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to last page" }), _jsx(DoubleArrowRightIcon, { className: "h-4 w-4" })] })] })] })] }));
9
+ }, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: ["Page ", table.getState().pagination.pageIndex + 1, " of", " ", table.getPageCount()] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs(MtButton, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to first page" }), _jsx(DoubleArrowLeftIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to previous page" }), _jsx(ChevronLeftIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to next page" }), _jsx(ChevronRightIcon, { className: "h-4 w-4" })] }), _jsxs(MtButton, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to last page" }), _jsx(DoubleArrowRightIcon, { className: "h-4 w-4" })] })] })] })] }));
10
10
  }
@@ -2,5 +2,5 @@ import type { Table } from "@tanstack/react-table";
2
2
  interface DataTableViewOptionsProps<TData> {
3
3
  table: Table<TData>;
4
4
  }
5
- export declare function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function DataTableViewOptions<TData>({ table, }: DataTableViewOptionsProps<TData>): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { MixerHorizontalIcon } from "@radix-ui/react-icons";
4
- import { MtButton } from "../../ui-mt/Button";
4
+ import { MtButton } from "../../ui/mt/Button";
5
5
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../../ui/dropdown-menu";
6
- export function DataTableViewOptions({ table }) {
6
+ export function DataTableViewOptions({ table, }) {
7
7
  return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(MtButton, { variant: "outline", size: "sm", className: "ml-auto hidden h-8 lg:flex", children: [_jsx(MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }), "View"] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [_jsx(DropdownMenuLabel, { children: "Toggle columns" }), _jsx(DropdownMenuSeparator, {}), table
8
8
  .getAllColumns()
9
9
  .filter((column) => typeof column.accessorFn !== "undefined" && column.getCanHide())
@@ -3,10 +3,10 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Color } from "@tiptap/extension-color";
4
4
  import ListItem from "@tiptap/extension-list-item";
5
5
  import TextStyle from "@tiptap/extension-text-style";
6
- import { EditorProvider, useCurrentEditor } from "@tiptap/react";
6
+ import { EditorProvider, useCurrentEditor, } from "@tiptap/react";
7
7
  import StarterKit from "@tiptap/starter-kit";
8
8
  import { cn } from "../../lib/utils";
9
- import { MtButton } from "../../ui-mt/Button";
9
+ import { MtButton } from "../../ui/mt/Button";
10
10
  import { MenuBar } from "./MenuBar";
11
11
  const SaveButton = (props) => {
12
12
  const { onSave } = props;
@@ -49,35 +49,35 @@ const extensions = [
49
49
  },
50
50
  }),
51
51
  ];
52
- const content = `
53
- <h2>
54
- Hi there,
55
- </h2>
56
- <p>
57
- this is a <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
58
- </p>
59
- <ul>
60
- <li>
61
- That’s a bullet list with one …
62
- </li>
63
- <li>
64
- … or two list items.
65
- </li>
66
- </ul>
67
- <p>
68
- Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
69
- </p>
70
- <pre><code class="language-css">body {
71
- display: none;
72
- }</code></pre>
73
- <p>
74
- I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.
75
- </p>
76
- <blockquote>
77
- Wow, that’s amazing. Good work, boy! 👏
78
- <br />
79
- — Mom
80
- </blockquote>
52
+ const content = `
53
+ <h2>
54
+ Hi there,
55
+ </h2>
56
+ <p>
57
+ this is a <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
58
+ </p>
59
+ <ul>
60
+ <li>
61
+ That’s a bullet list with one …
62
+ </li>
63
+ <li>
64
+ … or two list items.
65
+ </li>
66
+ </ul>
67
+ <p>
68
+ Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
69
+ </p>
70
+ <pre><code class="language-css">body {
71
+ display: none;
72
+ }</code></pre>
73
+ <p>
74
+ I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.
75
+ </p>
76
+ <blockquote>
77
+ Wow, that’s amazing. Good work, boy! 👏
78
+ <br />
79
+ — Mom
80
+ </blockquote>
81
81
  `;
82
82
  export default function TiptapDemo1() {
83
83
  return (_jsx(EditorProvider, { slotBefore: _jsx(MenuBar, {}), extensions: extensions, content: content, children: _jsx(_Fragment, {}) }));
@@ -31,11 +31,11 @@ export declare const homePageSchema: z.ZodObject<{
31
31
  footHtml: z.ZodString;
32
32
  }, "strip", z.ZodTypeAny, {
33
33
  theme: string;
34
+ htmlTitle: string;
34
35
  categories: {
35
36
  label: string;
36
37
  href: string;
37
38
  }[];
38
- htmlTitle: string;
39
39
  blogCardItems: {
40
40
  summary: string;
41
41
  title: string;
@@ -45,11 +45,11 @@ export declare const homePageSchema: z.ZodObject<{
45
45
  footHtml: string;
46
46
  }, {
47
47
  theme: string;
48
+ htmlTitle: string;
48
49
  categories: {
49
50
  label: string;
50
51
  href: string;
51
52
  }[];
52
- htmlTitle: string;
53
53
  blogCardItems: {
54
54
  summary: string;
55
55
  title: string;
@@ -3,10 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { EditFormToolbar } from "mtxuilib/form/EditFormToolbar";
4
4
  import { ZForm, useZodForm } from "mtxuilib/form/ZodForm";
5
5
  import { useMtRouter } from "mtxuilib/hooks/use-router";
6
- import { MtInput } from "mtxuilib/ui-mt/inputs/input";
7
- import { FormControl, FormField, FormItem, FormLabel, FormMessage } from "mtxuilib/ui/form";
6
+ import { FormControl, FormField, FormItem, FormLabel, FormMessage, } from "mtxuilib/ui/form";
8
7
  import { z } from "zod";
9
- import { sendEvent } from "../dev-bot/actions";
8
+ import { MtInput } from "../../ui/mt/inputs/input";
10
9
  export function OpenBrowserActionForm() {
11
10
  const router = useMtRouter();
12
11
  const form = useZodForm({
@@ -18,10 +17,6 @@ export function OpenBrowserActionForm() {
18
17
  },
19
18
  });
20
19
  const handleSubmit = async (values) => {
21
- sendEvent({
22
- name: "mtxcli/openBrowser",
23
- data: values,
24
- });
25
20
  form.reset();
26
21
  };
27
22
  return (_jsxs(_Fragment, { children: [_jsx(ZForm, { form: form, handleSubmit: handleSubmit, className: "space-y-2", children: _jsx(FormField, { control: form.control, name: "url", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "url" }), _jsx(FormControl, { children: _jsx(MtInput, { placeholder: "url", ...form.register("url") }) }), _jsx(FormMessage, {})] })) }) }), _jsx(EditFormToolbar, { form: form, onCancel: () => {
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { Card, CardContent, CardTitle } from "../../ui/card";
4
4
  import { QueryErrorResetBoundary } from "@tanstack/react-query";
5
5
  import { ErrorBoundary } from "react-error-boundary";
6
- import { MtButton } from "../../ui-mt/Button";
6
+ import { MtButton } from "../../ui/mt/Button";
7
7
  export const ExamplePage = () => {
8
8
  return (_jsxs(_Fragment, { children: [_jsx("h3", { children: "with AutoSuspense" }), _jsxs(Card, { children: [_jsx(CardTitle, { children: "lazy example" }), _jsx(CardContent, {})] }), _jsxs(Card, { children: [_jsx(CardTitle, { children: "lazy example" }), _jsx(CardContent, {})] }), _jsx(Card, { children: _jsx(CardContent, {}) })] }));
9
9
  };
@@ -3,17 +3,20 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
3
3
  import { forwardRef, useMemo, useState } from "react";
4
4
  import { useFormContext } from "react-hook-form";
5
5
  import { cn } from "../lib/utils";
6
- import { MtButton } from "../ui-mt/Button";
6
+ import { MtButton } from "../ui/mt/Button";
7
7
  import { ConformDeleteBtn } from "./deleteConform";
8
8
  export const EditFormToolbar = forwardRef((props, forwardedRef) => {
9
- const { submitText, onSubmit, onCancel, children, enableCancelConform, enableDeleteButton, onDelete } = props;
9
+ const { submitText, onSubmit, onCancel, children, enableCancelConform, enableDeleteButton, onDelete, } = props;
10
10
  const [openConform, setOpenConform] = useState(false);
11
11
  const context = useFormContext();
12
12
  const form = props.form ?? context;
13
13
  const { formState } = form;
14
14
  useMemo(() => {
15
15
  if (form.formState.errors && Object.keys(form.formState.errors).length) {
16
- console.log("表单不正确", { errors: form.formState.errors, values: form.getValues() });
16
+ console.log("表单不正确", {
17
+ errors: form.formState.errors,
18
+ values: form.getValues(),
19
+ });
17
20
  }
18
21
  }, [form.formState.errors]);
19
22
  if (!form) {
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Dialog, DialogContent, DialogDescription, DialogTitle } from "@radix-ui/react-dialog";
2
+ import { Dialog, DialogContent, DialogDescription, DialogTitle, } from "@radix-ui/react-dialog";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
  import React, { useState } from "react";
5
5
  import { cn } from "../lib/utils";
6
- import { MtButton } from "../ui-mt/Button";
6
+ import { MtButton } from "../ui/mt/Button";
7
7
  import { buttonVariants } from "../ui/button";
8
8
  import { DialogTrigger } from "../ui/dialog";
9
9
  export const DeleteConformDlg = (props) => {
@@ -2,10 +2,18 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { DotsHorizontalIcon } from "@radix-ui/react-icons";
4
4
  import * as React from "react";
5
- import { MtButton } from "../../../ui-mt/Button";
6
- import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../../../ui/command";
5
+ import { MtButton } from "../../../ui/mt/Button";
6
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../../../ui/command";
7
7
  import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "../../../ui/dropdown-menu";
8
- const labels = ["feature", "bug", "enhancement", "documentation", "design", "question", "maintenance"];
8
+ const labels = [
9
+ "feature",
10
+ "bug",
11
+ "enhancement",
12
+ "documentation",
13
+ "design",
14
+ "question",
15
+ "maintenance",
16
+ ];
9
17
  export function MtComboboxDropdownMenu(props) {
10
18
  const { children } = props;
11
19
  const [label, setLabel] = React.useState("feature");
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Element } from "html-react-parser";
4
4
  import { useForm } from "react-hook-form";
5
5
  import { Icons } from "../../icons/icons";
6
- import { MtButton } from "../../ui-mt/Button";
6
+ import { MtButton } from "../../ui/mt/Button";
7
7
  import { Input } from "../../ui/input";
8
8
  export const newToolbarParseOptions = () => {
9
9
  const parseOption = {
@@ -11,7 +11,7 @@ export const newToolbarParseOptions = () => {
11
11
  if (domNode instanceof Element) {
12
12
  switch (domNode.attribs?.class) {
13
13
  case "list_view_action_new_button":
14
- return _jsx("div", { className: "bg-red-200 p-2", children: "TODO:list_view_action_new_button" });
14
+ return (_jsx("div", { className: "bg-red-200 p-2", children: "TODO:list_view_action_new_button" }));
15
15
  case "mtm_dash_list_view":
16
16
  return (_jsx("div", { className: "bg-red-300 p-2", children: _jsx(ListViewToolbar, { children: reactNode }) }));
17
17
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useRef } from "react";
4
- import { MtButton } from "../../ui-mt/Button";
4
+ import { MtButton } from "../../ui/mt/Button";
5
5
  export const ServiceWorkerMain = () => {
6
6
  const workerRef = useRef();
7
7
  useEffect(() => {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { MtButton } from "../ui-mt/Button";
3
+ import { MtButton } from "../ui/mt/Button";
4
4
  export const CustomErrorRetry = (props) => {
5
5
  const { message, onRetry } = props;
6
6
  return (_jsxs("div", { className: "flex flex-col space-y-4 bg-red-200 p-2", children: [message && _jsx("h2", { children: message }), _jsx(MtButton, { onClick: () => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ErrorBoundary } from "react-error-boundary";
3
- import { MtButton } from "../ui-mt/Button";
3
+ import { MtButton } from "../ui/mt/Button";
4
4
  export const MtErrorBoundaryV2 = (props) => {
5
5
  const { children } = props;
6
- return (_jsx("div", { className: "bg-red-300 p-2", children: _jsx(ErrorBoundary, { fallbackRender: ({ error, resetErrorBoundary }) => (_jsxs("div", { children: ["There was an error! ", _jsx(MtButton, { onClick: () => resetErrorBoundary(), children: "Try again" }), _jsx("pre", { style: { whiteSpace: "normal" }, children: error.message })] })), onReset: () => { }, children: children }) }));
6
+ return (_jsx("div", { className: "bg-red-300 p-2", children: _jsx(ErrorBoundary, { fallbackRender: ({ error, resetErrorBoundary }) => (_jsxs("div", { children: ["There was an error!", " ", _jsx(MtButton, { onClick: () => resetErrorBoundary(), children: "Try again" }), _jsx("pre", { style: { whiteSpace: "normal" }, children: error.message })] })), onReset: () => { }, children: children }) }));
7
7
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import dynamic from "next/dynamic";
3
- import { SkeletonInput } from "../ui-mt/skeleton/SkeletonInput";
3
+ import { SkeletonInput } from "../ui/mt/skeleton/SkeletonInput";
4
4
  export const LzMtEditor = dynamic(() => import("./MtEditor").then((x) => x.MtEditor), {
5
5
  ssr: false,
6
6
  loading: SkeletonInput,
@@ -1,14 +1,14 @@
1
- export const exampleHtml = `
2
- <h1>exampleHtml</h1>
3
- <p>
4
- This is still the text editor you’re used to, but enriched with node views.
5
- </p>
6
- <react-component>
7
- <p>This is editable. You can create a new component by pressing Mod+Enter.</p>
8
- </react-component>
9
- <p>
10
- Did you see that? That’s a React component. We are really living in the future.
11
- </p>
1
+ export const exampleHtml = `
2
+ <h1>exampleHtml</h1>
3
+ <p>
4
+ This is still the text editor you’re used to, but enriched with node views.
5
+ </p>
6
+ <react-component>
7
+ <p>This is editable. You can create a new component by pressing Mod+Enter.</p>
8
+ </react-component>
9
+ <p>
10
+ Did you see that? That’s a React component. We are really living in the future.
11
+ </p>
12
12
  `;
13
13
  export const defaultEditorContent = {
14
14
  type: "doc",
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SigmaIcon } from "lucide-react";
3
3
  import { cn } from "../../lib/utils";
4
- import { MtButton } from "../../ui-mt/Button";
4
+ import { MtButton } from "../../ui/mt/Button";
5
5
  import { useEditor } from "../components";
6
6
  export const MathSelector = () => {
7
7
  const { editor } = useEditor();
@@ -25,7 +25,7 @@ export const netTunnelTool = {
25
25
  async function cftunnel_gitpod(action) {
26
26
  if (action === "start") {
27
27
  console.log("启动 cftunnel_gitpod");
28
- await exec(`command -v cloudflared || (curl -o /usr/bin/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 \
28
+ await exec(`command -v cloudflared || (curl -o /usr/bin/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 \
29
29
  && chmod +x /usr/bin/cloudflared)`, {
30
30
  shell: true,
31
31
  env: { ...process.env },
@@ -1,16 +1,13 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { z } from "zod";
3
3
  import { BotCard } from "../../components/message";
4
- import { DpMtCfWorker } from "../../components/tool-ui/DpCfWorker";
5
- import { DpMtxEdge } from "../../components/tool-ui/DpMtxEdge";
6
- import { VcDeploy } from "../../components/tool-ui/vcDeploy";
7
4
  export const dockerComposeTool = {
8
5
  dockerCompose: {
9
6
  description: "调用 docker-compose up",
10
7
  parameters: z.any(),
11
8
  generate: async function* (params) {
12
9
  yield _jsx(BotCard, { children: "\u52A0\u8F7D\u4E2D" });
13
- return (_jsx(BotCard, { children: _jsxs("div", { className: "bg-blue-100 p-2 flex gap-2", children: [_jsx(VcDeploy, {}), _jsx(DpMtCfWorker, {}), _jsx(DpMtxEdge, {})] }) }));
10
+ return (_jsx(BotCard, { children: _jsx("div", { className: "bg-blue-100 p-2 flex gap-2" }) }));
14
11
  },
15
12
  },
16
13
  };
@@ -1,14 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { z } from "zod";
3
3
  import { BotCard } from "../../components/message";
4
- import { DpMtCfWorker } from "../../components/tool-ui/DpCfWorker";
5
4
  export const deployMtcfWorkerTool = {
6
5
  deployMtcfWorker: {
7
6
  description: "调用本地脚本,将 mtcf 项目部署到 cloudflare worker",
8
7
  parameters: z.any(),
9
8
  generate: async function* (params) {
10
9
  yield _jsx(BotCard, { children: "\u52A0\u8F7D\u4E2D" });
11
- return (_jsx(BotCard, { children: _jsx("div", { className: "bg-blue-100 p-2 flex gap-2", children: _jsx(DpMtCfWorker, {}) }) }));
10
+ return (_jsx(BotCard, { children: _jsx("div", { className: "bg-blue-100 p-2 flex gap-2" }) }));
12
11
  },
13
12
  },
14
13
  };
@@ -22,8 +22,8 @@ export const installOsPackagesTool = {
22
22
  },
23
23
  };
24
24
  async function installOsPackages() {
25
- await exec(` if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
26
- echo "Running apt-get update..."
27
- sudo apt update
25
+ await exec(` if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
26
+ echo "Running apt-get update..."
27
+ sudo apt update
28
28
  fi`, { shell: true });
29
29
  }
@@ -3,7 +3,7 @@ import { createResource } from "mtxlib/lib/ai/actions/resources";
3
3
  import { z } from "zod";
4
4
  export const addResourceTool = {
5
5
  addResource: tool({
6
- description: `add a resource to your knowledge base.
6
+ description: `add a resource to your knowledge base.
7
7
  If the user provides a random piece of knowledge unprompted, use this tool without asking for confirmation.`,
8
8
  parameters: z.object({
9
9
  content: z
@@ -5,8 +5,8 @@ import Textarea from "react-textarea-autosize";
5
5
  import { z } from "zod";
6
6
  import { EditFormToolbar } from "../../../form/EditFormToolbar";
7
7
  import { ZForm, useZodForm } from "../../../form/ZodForm";
8
- import { MtButton } from "../../../ui-mt/Button";
9
- import { MtInput } from "../../../ui-mt/inputs/input";
8
+ import { MtButton } from "../../../ui/mt/Button";
9
+ import { MtInput } from "../../../ui/mt/inputs/input";
10
10
  import { Dialog, DialogContent, DialogTrigger } from "../../../ui/dialog";
11
11
  import { useRef, useState } from "react";
12
12
  import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from "../../../ui/form";
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { z } from "zod";
3
3
  import { BotCard } from "../../components/message";
4
- import { MtButton } from "../../ui-mt/Button";
4
+ import { MtButton } from "../../ui/mt/Button";
5
5
  export const callAdminBotTool = {
6
6
  adminBot: {
7
7
  description: "调用“高级机器人”,能让用户在界面上看到具有更高前线的机器人的按钮",
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from "react";
2
2
  interface Props {
3
3
  language: string;
4
4
  value: string;