mtxuilib 0.1.165 → 0.1.167
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.
- package/dist/common/DeleteComfirm.d.ts +2 -2
- package/dist/common/{DeleteComfirm.jsx → DeleteComfirm.js} +9 -22
- package/dist/common/FullCenter.d.ts +1 -1
- package/dist/common/FullCenter.js +6 -0
- package/dist/common/GlobalSearch.d.ts +1 -1
- package/dist/common/{GlobalSearch.jsx → GlobalSearch.js} +2 -4
- package/dist/common/HtmlChangesObserver.d.ts +1 -1
- package/dist/common/{HtmlChangesObserver.jsx → HtmlChangesObserver.js} +2 -1
- package/dist/common/MtImage.d.ts +1 -1
- package/dist/common/{MtImage.jsx → MtImage.js} +2 -1
- package/dist/common/MtProgressBar.d.ts +1 -1
- package/dist/common/MtProgressBar.js +6 -0
- package/dist/common/NotFoundGoBack.d.ts +1 -1
- package/dist/common/NotFoundGoBack.js +10 -0
- package/dist/common/SlntTree/SlntChildrenTabs.d.ts +1 -1
- package/dist/common/SlntTree/{SlntChildrenTabs.jsx → SlntChildrenTabs.js} +5 -12
- package/dist/common/SlntTree/SlntTreeNode.d.ts +2 -2
- package/dist/common/SlntTree/{SlntTreeNode.jsx → SlntTreeNode.js} +3 -5
- package/dist/common/devtools/DebugValue.d.ts +1 -1
- package/dist/common/devtools/DebugValue.js +8 -0
- package/dist/common/devtools/DevTools.d.ts +1 -1
- package/dist/common/devtools/{DevTools.jsx → DevTools.js} +2 -4
- package/dist/common/mtlink.d.ts +1 -1
- package/dist/common/{mtlink.jsx → mtlink.js} +3 -4
- package/dist/common/pip/PipExamplePage.d.ts +1 -1
- package/dist/common/pip/PipExamplePage.js +20 -0
- package/dist/common/pip/{ReactDocumentPictureInPicture.jsx → ReactDocumentPictureInPicture.js} +6 -11
- package/dist/common/react-markdown/Code.d.ts +2 -2
- package/dist/common/react-markdown/Code.js +9 -0
- package/dist/common/react-markdown/MarkdownToolbar.d.ts +1 -1
- package/dist/common/react-markdown/{MarkdownToolbar.jsx → MarkdownToolbar.js} +2 -5
- package/dist/common/react-markdown/ReactMarkdownExample.d.ts +1 -1
- package/dist/common/react-markdown/ReactMarkdownExample.js +19 -0
- package/dist/common/schema-form/SchemaFormFieldsRender.d.ts +1 -1
- package/dist/common/schema-form/SchemaFormFieldsRender.js +12 -0
- package/dist/common/schema-form/SchemaFormView.d.ts +1 -1
- package/dist/common/schema-form/{SchemaFormView.jsx → SchemaFormView.js} +3 -15
- package/dist/common/table/SimpleTable.d.ts +1 -1
- package/dist/common/table/SimpleTable.js +10 -0
- package/dist/common/table/cells/ExpenderCell.d.ts +1 -1
- package/dist/common/table/cells/ExpenderCell.js +7 -0
- package/dist/common/table/cells/SelectCell.d.ts +2 -3
- package/dist/common/table/cells/SelectCell.js +19 -0
- package/dist/common/table/cells/Text.d.ts +1 -2
- package/dist/common/table/cells/{Text.jsx → Text.js} +2 -4
- package/dist/common/table/cells/ViewLink.d.ts +2 -3
- package/dist/common/table/cells/ViewLink.js +19 -0
- package/dist/common/table/cells/container/cellWrapper.d.ts +1 -1
- package/dist/common/table/cells/container/cellWrapper.js +5 -0
- package/dist/common/table/cells/number.d.ts +1 -2
- package/dist/common/table/cells/number.js +10 -0
- package/dist/common/table/cells/string.d.ts +1 -2
- package/dist/common/table/cells/{string.jsx → string.js} +2 -4
- package/dist/common/table/data-table-pagination.d.ts +1 -1
- package/dist/common/table/data-table-pagination.js +10 -0
- package/dist/common/table/data-table-view-options.d.ts +1 -1
- package/dist/common/table/data-table-view-options.js +13 -0
- package/dist/common/table/example/ExampleTable.d.ts +1 -1
- package/dist/common/table/example/{ExampleTable.jsx → ExampleTable.js} +7 -25
- package/dist/common/table/header/SimpleHeader.d.ts +2 -2
- package/dist/common/table/header/SimpleHeader.js +16 -0
- package/dist/common/table/header/header.d.ts +1 -1
- package/dist/common/table/header/header.js +16 -0
- package/dist/common/tailwind-indicator.d.ts +1 -1
- package/dist/common/tailwind-indicator.js +7 -0
- package/dist/common/theme/mode-toggle.d.ts +1 -1
- package/dist/common/theme/mode-toggle.js +10 -0
- package/dist/common/theme/theme-toggle.d.ts +1 -1
- package/dist/common/theme/theme-toggle.js +9 -0
- package/dist/common/tiptap/MenuBar.d.ts +1 -1
- package/dist/common/tiptap/MenuBar.js +34 -0
- package/dist/common/tiptap/TiptapEditor.d.ts +1 -1
- package/dist/common/tiptap/{TiptapEditor.jsx → TiptapEditor.js} +7 -17
- package/dist/common/tiptap/examples/Demo-Default.d.ts +1 -1
- package/dist/common/tiptap/examples/Demo-Default.js +84 -0
- package/dist/common/tiptap/examples/Demo-Tiptap.d.ts +1 -1
- package/dist/common/tiptap/examples/{Demo-Tiptap.jsx → Demo-Tiptap.js} +2 -1
- package/dist/components/ChatMessageBubble.d.ts +1 -1
- package/dist/components/ChatMessageBubble.js +7 -0
- package/dist/components/IntermediateStep.d.ts +1 -1
- package/dist/components/IntermediateStep.js +9 -0
- package/dist/components/UploadDocumentsForm.d.ts +1 -1
- package/dist/components/UploadDocumentsForm.js +28 -0
- package/dist/components/button-scroll-to-bottom.d.ts +1 -2
- package/dist/components/button-scroll-to-bottom.js +8 -0
- package/dist/components/chat-share-dialog.d.ts +1 -2
- package/dist/components/chat-share-dialog.js +33 -0
- package/dist/components/dev-bot/DevBot.d.ts +1 -1
- package/dist/components/dev-bot/{DevBot.jsx → DevBot.js} +2 -7
- package/dist/components/dev-bot/DevBotActions.d.ts +1 -1
- package/dist/components/dev-bot/{DevBotActions.jsx → DevBotActions.js} +6 -13
- package/dist/components/dev-bot/chat-list.d.ts +1 -1
- package/dist/components/dev-bot/chat-list.js +10 -0
- package/dist/components/dev-bot/chat-panel.d.ts +1 -2
- package/dist/components/dev-bot/chat-panel.js +43 -0
- package/dist/components/dev-bot/prompt-form.d.ts +1 -2
- package/dist/components/dev-bot/{prompt-form.jsx → prompt-form.js} +6 -29
- package/dist/components/empty-screen.d.ts +1 -1
- package/dist/components/empty-screen.js +4 -0
- package/dist/components/external-link.d.ts +1 -1
- package/dist/components/external-link.js +4 -0
- package/dist/components/message.d.ts +5 -5
- package/dist/components/message.js +43 -0
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +3 -0
- package/dist/components/tool-ui/BlogHomePage.d.ts +1 -1
- package/dist/components/tool-ui/BlogHomePage.js +8 -0
- package/dist/components/tool-ui/DemoCategoryGen.d.ts +1 -1
- package/dist/components/tool-ui/DemoCategoryGen.js +8 -0
- package/dist/components/tool-ui/DpCfWorker.d.ts +1 -1
- package/dist/components/tool-ui/DpCfWorker.js +12 -0
- package/dist/components/tool-ui/DpMtxEdge.d.ts +1 -1
- package/dist/components/tool-ui/DpMtxEdge.js +12 -0
- package/dist/components/tool-ui/ExtractArticle.d.ts +1 -1
- package/dist/components/tool-ui/{ExtractArticle.jsx → ExtractArticle.js} +4 -15
- package/dist/components/tool-ui/OpenBrowser.d.ts +1 -1
- package/dist/components/tool-ui/{OpenBrowser.jsx → OpenBrowser.js} +4 -15
- package/dist/components/tool-ui/vcDeploy.d.ts +1 -1
- package/dist/components/tool-ui/vcDeploy.js +12 -0
- package/dist/demos/bigcode/BigCode.d.ts +1 -1
- package/dist/demos/bigcode/BigCode.js +11 -0
- package/dist/demos/condition-type/serialize.d.ts +1 -1
- package/dist/demos/condition-type/{serialize.jsx → serialize.js} +2 -3
- package/dist/demos/scrollarea/LongListDemo.d.ts +1 -1
- package/dist/demos/scrollarea/LongListDemo.js +7 -0
- package/dist/demos/scrollarea/ScrollAreaDemo.d.ts +1 -1
- package/dist/demos/scrollarea/ScrollAreaDemo.js +14 -0
- package/dist/demos/suspense-ssr/ExampleOg.d.ts +1 -1
- package/dist/demos/suspense-ssr/ExampleOg.js +7 -0
- package/dist/demos/suspense-ssr/ExamplePage.d.ts +2 -2
- package/dist/demos/suspense-ssr/ExamplePage.js +13 -0
- package/dist/demos/suspense-ssr/ExampleProviderProviders.d.ts +1 -1
- package/dist/demos/suspense-ssr/{ExampleProviderProviders.jsx → ExampleProviderProviders.js} +2 -3
- package/dist/demos/suspense-ssr/ReadMe.d.ts +1 -1
- package/dist/demos/suspense-ssr/ReadMe.js +6 -0
- package/dist/demos/suspense-ssr/examplesPostDetail.d.ts +1 -1
- package/dist/demos/suspense-ssr/{examplesPostDetail.jsx → examplesPostDetail.js} +3 -11
- package/dist/demos/suspense-ssr/examplesPosts.d.ts +1 -1
- package/dist/demos/suspense-ssr/examplesPosts.js +17 -0
- package/dist/form/EditFormToolbar.js +48 -0
- package/dist/form/PopupFormV2.d.ts +3 -3
- package/dist/form/{PopupFormV2.jsx → PopupFormV2.js} +4 -18
- package/dist/form/SchemaFormFieldRender.d.ts +1 -1
- package/dist/form/SchemaFormFieldRender.js +28 -0
- package/dist/form/ZodForm.d.ts +1 -1
- package/dist/form/{ZodForm.jsx → ZodForm.js} +12 -15
- package/dist/form/deleteConform.d.ts +1 -1
- package/dist/form/deleteConform.js +38 -0
- package/dist/icons/crazy-spinner.d.ts +1 -1
- package/dist/icons/crazy-spinner.js +5 -0
- package/dist/icons/font-default.d.ts +1 -1
- package/dist/icons/font-default.js +4 -0
- package/dist/icons/font-mono.d.ts +1 -1
- package/dist/icons/font-mono.js +4 -0
- package/dist/icons/font-serif.d.ts +1 -1
- package/dist/icons/font-serif.js +4 -0
- package/dist/icons/github.d.ts +1 -1
- package/dist/icons/github.js +4 -0
- package/dist/icons/icons-ai.d.ts +27 -27
- package/dist/icons/icons-ai.js +87 -0
- package/dist/icons/icons.d.ts +20 -20
- package/dist/icons/icons.js +147 -0
- package/dist/icons/loading-circle.d.ts +1 -1
- package/dist/icons/loading-circle.js +4 -0
- package/dist/icons/magic.d.ts +1 -1
- package/dist/icons/magic.js +4 -0
- package/dist/lib/htmlparse/components/ItemActionButton.d.ts +1 -1
- package/dist/lib/htmlparse/components/ItemActionButton.js +17 -0
- package/dist/lib/htmlparse/htmlParse.js +32 -0
- package/dist/lib/react-query/ReactQueryProvider.d.ts +3 -3
- package/dist/lib/react-query/{ReactQueryProvider.jsx → ReactQueryProvider.js} +4 -17
- package/dist/lib/{render.jsx → render.js} +2 -1
- package/dist/lib/service-worker/ServiceWorkerMain.d.ts +1 -1
- package/dist/lib/service-worker/{ServiceWorkerMain.jsx → ServiceWorkerMain.js} +5 -11
- package/dist/misc/CustomErrorRetry.d.ts +1 -1
- package/dist/misc/CustomErrorRetry.js +9 -0
- package/dist/misc/ExampleErrorDemo.d.ts +1 -1
- package/dist/misc/{ExampleErrorDemo.jsx → ExampleErrorDemo.js} +3 -6
- package/dist/misc/MtErrorBoundary.d.ts +1 -1
- package/dist/misc/{MtErrorBoundary.jsx → MtErrorBoundary.js} +3 -12
- package/dist/misc/{MtErrorBoundary.stories.jsx → MtErrorBoundary.stories.js} +4 -3
- package/dist/misc/MtErrorBoundaryV2.d.ts +1 -1
- package/dist/misc/MtErrorBoundaryV2.js +7 -0
- package/dist/misc/MtErrorBoundaryV2.stories.d.ts +1 -1
- package/dist/misc/{MtErrorBoundaryV2.stories.jsx → MtErrorBoundaryV2.stories.js} +4 -3
- package/dist/mtapp/History.d.ts +1 -1
- package/dist/mtapp/{History.jsx → History.js} +2 -3
- package/dist/mtapp/MtAppProvider.d.ts +1 -1
- package/dist/mtapp/{MtAppProvider.jsx → MtAppProvider.js} +2 -1
- package/dist/mtedtior/MtEditor.d.ts +3 -3
- package/dist/mtedtior/{MtEditor.jsx → MtEditor.js} +16 -59
- package/dist/mtedtior/components/{editor-bubble-item.jsx → editor-bubble-item.js} +2 -3
- package/dist/mtedtior/components/{editor-bubble.jsx → editor-bubble.js} +2 -6
- package/dist/mtedtior/components/{editor-command-item.jsx → editor-command-item.js} +2 -3
- package/dist/mtedtior/components/{editor-command.jsx → editor-command.js} +5 -13
- package/dist/mtedtior/components/{editor.jsx → editor.js} +3 -8
- package/dist/mtedtior/extensions/{image-resizer.jsx → image-resizer.js} +5 -4
- package/dist/mtedtior/extensions/{slash-command.jsx → slash-command.js} +12 -11
- package/dist/mtedtior/extensions/{twitter.jsx → twitter.js} +2 -5
- package/dist/mtedtior/generative/ai-completion-command.d.ts +1 -1
- package/dist/mtedtior/generative/ai-completion-command.js +30 -0
- package/dist/mtedtior/generative/ai-selector-commands.d.ts +1 -1
- package/dist/mtedtior/generative/ai-selector-commands.js +42 -0
- package/dist/mtedtior/generative/ai-selector.d.ts +1 -1
- package/dist/mtedtior/generative/ai-selector.js +50 -0
- package/dist/mtedtior/generative/generative-menu-switch.d.ts +1 -1
- package/dist/mtedtior/generative/{generative-menu-switch.jsx → generative-menu-switch.js} +3 -11
- package/dist/mtedtior/mtextesions/{DemoComponent.jsx → DemoComponent.js} +2 -4
- package/dist/mtedtior/mtextesions/{slash-command.jsx → slash-command.js} +14 -13
- package/dist/mtedtior/selectors/color-selector.d.ts +1 -1
- package/dist/mtedtior/selectors/color-selector.js +104 -0
- package/dist/mtedtior/selectors/link-selector.d.ts +1 -1
- package/dist/mtedtior/selectors/link-selector.js +50 -0
- package/dist/mtedtior/selectors/math-selector.d.ts +1 -2
- package/dist/mtedtior/selectors/{math-selector.jsx → math-selector.js} +3 -5
- package/dist/mtedtior/selectors/node-selector.d.ts +1 -1
- package/dist/mtedtior/selectors/{node-selector.jsx → node-selector.js} +5 -22
- package/dist/mtedtior/selectors/text-buttons.d.ts +1 -1
- package/dist/mtedtior/selectors/{text-buttons.jsx → text-buttons.js} +5 -10
- package/dist/tools/countDown.d.ts +1 -1
- package/dist/tools/{countDown.jsx → countDown.js} +4 -7
- package/dist/tools/devTools/bash.d.ts +1 -1
- package/dist/tools/devTools/bash.js +28 -0
- package/dist/tools/devTools/clean.d.ts +1 -1
- package/dist/tools/devTools/{clean.jsx → clean.js} +5 -12
- package/dist/tools/devTools/cloudflareTunnel.d.ts +1 -1
- package/dist/tools/devTools/{cloudflareTunnel.jsx → cloudflareTunnel.js} +5 -12
- package/dist/tools/devTools/docker-compose.d.ts +1 -1
- package/dist/tools/devTools/{docker-compose.jsx → docker-compose.js} +3 -8
- package/dist/tools/devTools/dockerBuildMtm.d.ts +1 -1
- package/dist/tools/devTools/{dockerBuildMtm.jsx → dockerBuildMtm.js} +6 -13
- package/dist/tools/devTools/dpMtCfWorkerTool.d.ts +1 -1
- package/dist/tools/devTools/{dpMtCfWorkerTool.jsx → dpMtCfWorkerTool.js} +3 -6
- package/dist/tools/devTools/dpMtxedge.d.ts +1 -1
- package/dist/tools/devTools/{dpMtxedge.jsx → dpMtxedge.js} +9 -24
- package/dist/tools/devTools/getIp.d.ts +1 -1
- package/dist/tools/devTools/{getIp.jsx → getIp.js} +5 -10
- package/dist/tools/devTools/installOsPackages.d.ts +1 -1
- package/dist/tools/devTools/{installOsPackages.jsx → installOsPackages.js} +5 -10
- package/dist/tools/devTools/ollamaService.d.ts +1 -1
- package/dist/tools/devTools/{ollamaService.jsx → ollamaService.js} +4 -9
- package/dist/tools/devTools/packageRelease.d.ts +1 -1
- package/dist/tools/devTools/{packageRelease.jsx → packageRelease.js} +7 -14
- package/dist/tools/devTools/vcDeploytool.d.ts +1 -1
- package/dist/tools/devTools/{vcDeploytool.jsx → vcDeploytool.js} +7 -21
- package/dist/tools/genSiteHeaderBarsTool.d.ts +1 -1
- package/dist/tools/{genSiteHeaderBarsTool.jsx → genSiteHeaderBarsTool.js} +3 -4
- package/dist/tools/hello1Tool.d.ts +1 -1
- package/dist/tools/{hello1Tool.jsx → hello1Tool.js} +3 -6
- package/dist/tools/rag/RagHello.d.ts +1 -1
- package/dist/tools/rag/{RagHello.jsx → RagHello.js} +3 -4
- package/dist/tools/rag/ui/RagInput.d.ts +2 -2
- package/dist/tools/rag/ui/RagInput.js +29 -0
- package/dist/tools/search/exampleSearchTool.d.ts +1 -1
- package/dist/tools/search/{exampleSearchTool.jsx → exampleSearchTool.js} +3 -5
- package/dist/tools/webbot/callAdminBot.d.ts +1 -1
- package/dist/tools/webbot/{callAdminBot.jsx → callAdminBot.js} +3 -4
- package/dist/tools/welcomeAdminTool.d.ts +1 -1
- package/dist/tools/{welcomeAdminTool.jsx → welcomeAdminTool.js} +3 -4
- package/dist/ui/accordion.js +14 -0
- package/dist/ui/alert-dialog.d.ts +2 -2
- package/dist/ui/alert-dialog.js +27 -0
- package/dist/ui/{alert.jsx → alert.js} +4 -3
- package/dist/ui/{avatar.jsx → avatar.js} +4 -3
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/{badge.jsx → badge.js} +2 -2
- package/dist/ui/breadcrumb.d.ts +2 -2
- package/dist/ui/breadcrumb.js +23 -0
- package/dist/ui/{button.jsx → button.js} +2 -1
- package/dist/ui/calendar.d.ts +1 -1
- package/dist/ui/{calendar.jsx → calendar.js} +6 -6
- package/dist/ui/{card.jsx → card.js} +7 -6
- package/dist/ui/checkbox.js +9 -0
- package/dist/ui/{codeblock.jsx → codeblock.js} +14 -30
- package/dist/ui/command.d.ts +2 -2
- package/dist/ui/command.js +29 -0
- package/dist/ui/context-menu.d.ts +1 -1
- package/dist/ui/context-menu.js +34 -0
- package/dist/ui/dialog.d.ts +2 -2
- package/dist/ui/dialog.js +23 -0
- package/dist/ui/drawer.d.ts +3 -3
- package/dist/ui/drawer.js +23 -0
- package/dist/ui/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown-menu.js +36 -0
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/{form.jsx → form.js} +8 -13
- package/dist/ui/hover-card.js +10 -0
- package/dist/ui/input.js +8 -0
- package/dist/ui/{label.jsx → label.js} +2 -1
- package/dist/ui/menubar.d.ts +1 -1
- package/dist/ui/menubar.js +36 -0
- package/dist/ui/navigation-menu.js +25 -0
- package/dist/ui/pagination.d.ts +5 -5
- package/dist/ui/pagination.js +23 -0
- package/dist/ui/popover.js +10 -0
- package/dist/ui/progress.js +8 -0
- package/dist/ui/radio-group.js +15 -0
- package/dist/ui/resizable.d.ts +2 -2
- package/dist/ui/resizable.js +9 -0
- package/dist/ui/scroll-area.js +12 -0
- package/dist/ui/select.js +22 -0
- package/dist/ui/separator.js +8 -0
- package/dist/ui/sheet.d.ts +2 -2
- package/dist/ui/{sheet.jsx → sheet.js} +7 -15
- package/dist/ui/skeleton.d.ts +1 -1
- package/dist/ui/skeleton.js +6 -0
- package/dist/ui/slider.js +8 -0
- package/dist/ui/sonner.d.ts +1 -1
- package/dist/ui/{sonner.jsx → sonner.js} +3 -2
- package/dist/ui/switch.js +8 -0
- package/dist/ui/table.js +20 -0
- package/dist/ui/tabs.js +13 -0
- package/dist/ui/textarea.js +8 -0
- package/dist/ui/{toast.jsx → toast.js} +7 -8
- package/dist/ui/toaster.d.ts +1 -1
- package/dist/ui/toaster.js +10 -0
- package/dist/ui/{toggle.jsx → toggle.js} +2 -1
- package/dist/ui/tooltip.js +11 -0
- package/dist/ui-mt/Boundary.d.ts +1 -1
- package/dist/ui-mt/Boundary.js +10 -0
- package/dist/ui-mt/DropdownMenuItemLink.d.ts +1 -1
- package/dist/ui-mt/{DropdownMenuItemLink.jsx → DropdownMenuItemLink.js} +2 -3
- package/dist/ui-mt/ErrorMessage.d.ts +1 -1
- package/dist/ui-mt/ErrorMessage.js +6 -0
- package/dist/ui-mt/ExampleTree.d.ts +1 -2
- package/dist/ui-mt/{ExampleTree.jsx → ExampleTree.js} +2 -6
- package/dist/ui-mt/MtDialog.d.ts +3 -3
- package/dist/ui-mt/{MtDialog.jsx → MtDialog.js} +4 -5
- package/dist/ui-mt/NavTag.d.ts +1 -1
- package/dist/ui-mt/NavTag.js +28 -0
- package/dist/ui-mt/ScreenPanel.d.ts +1 -1
- package/dist/ui-mt/ScreenPanel.js +9 -0
- package/dist/ui-mt/SimpleModel.d.ts +1 -1
- package/dist/ui-mt/{SimpleModel.jsx → SimpleModel.js} +2 -5
- package/dist/ui-mt/SimpleTag.d.ts +1 -1
- package/dist/ui-mt/SimpleTag.js +6 -0
- package/dist/ui-mt/Tree.js +63 -0
- package/dist/ui-mt/WithLinkIf.d.ts +1 -1
- package/dist/ui-mt/{WithLinkIf.jsx → WithLinkIf.js} +2 -1
- package/dist/ui-mt/headline.d.ts +1 -1
- package/dist/ui-mt/headline.js +4 -0
- package/dist/ui-mt/input-field/InputField.js +21 -0
- package/dist/ui-mt/input-field/SingleUploadForm.d.ts +1 -1
- package/dist/ui-mt/input-field/SingleUploadForm.js +62 -0
- package/dist/ui-mt/input-field/TextArea.js +13 -0
- package/dist/ui-mt/input-field/TextFileInput.d.ts +1 -1
- package/dist/ui-mt/input-field/{TextFileInput.jsx → TextFileInput.js} +5 -7
- package/dist/ui-mt/input-field/select/InputSelect.js +16 -0
- package/dist/ui-mt/inputs/SearchInput.d.ts +1 -1
- package/dist/ui-mt/inputs/SearchInput.js +10 -0
- package/dist/ui-mt/inputs/TaskStatusInput.d.ts +1 -1
- package/dist/ui-mt/inputs/TaskStatusInput.js +22 -0
- package/dist/ui-mt/inputs/UrlsInput.d.ts +1 -1
- package/dist/ui-mt/inputs/{UrlsInput.jsx → UrlsInput.js} +2 -3
- package/dist/ui-mt/modal/MtModal.d.ts +1 -1
- package/dist/ui-mt/modal/{MtModal.jsx → MtModal.js} +3 -9
- package/dist/ui-mt/mt-tree-view/{mt-tree-view-api.jsx → mt-tree-view-api.js} +19 -45
- package/dist/ui-mt/mt-tree-view/mt-treeview.d.ts +1 -1
- package/dist/ui-mt/mt-tree-view/mt-treeview.js +26 -0
- package/dist/ui-mt/pagination.d.ts +1 -1
- package/dist/ui-mt/pagination.js +30 -0
- package/dist/ui-mt/skeleton/NewLoading.d.ts +1 -1
- package/dist/ui-mt/skeleton/NewLoading.js +6 -0
- package/dist/ui-mt/skeleton/SkeletonInput.d.ts +1 -1
- package/dist/ui-mt/skeleton/SkeletonInput.js +5 -0
- package/dist/ui-mt/skeleton/SkeletonLayout.d.ts +1 -1
- package/dist/ui-mt/skeleton/SkeletonLayout.js +6 -0
- package/dist/ui-mt/skeleton/SkeletonLoading.d.ts +2 -2
- package/dist/ui-mt/skeleton/SkeletonLoading.js +10 -0
- package/dist/ui-mt/skeleton/skeleton-card.d.ts +1 -1
- package/dist/ui-mt/skeleton/skeleton-card.js +5 -0
- package/dist/ui-mt/skeleton/skeleton2.d.ts +1 -1
- package/dist/ui-mt/skeleton/skeleton2.js +4 -0
- package/dist/ui-mt/skeleton/skeletons.d.ts +1 -1
- package/dist/ui-mt/skeleton/skeletons.js +6 -0
- package/dist/ui-mt/skeleton.d.ts +1 -1
- package/dist/ui-mt/skeleton.js +5 -0
- package/dist/ui-vamp/alert.d.ts +3 -3
- package/dist/ui-vamp/alert.js +37 -0
- package/dist/ui-vamp/button.d.ts +1 -1
- package/dist/ui-vamp/{button.jsx → button.js} +2 -1
- package/dist/ui-vamp/card.d.ts +7 -7
- package/dist/ui-vamp/card.js +24 -0
- package/dist/ui-vamp/chip.d.ts +1 -1
- package/dist/ui-vamp/{chip.jsx → chip.js} +2 -1
- package/dist/ui-vamp/external-link.d.ts +1 -1
- package/dist/ui-vamp/external-link.js +5 -0
- package/dist/ui-vamp/input.d.ts +1 -1
- package/dist/ui-vamp/{input.jsx → input.js} +4 -13
- package/dist/ui-vamp/keyvalue.d.ts +1 -1
- package/dist/ui-vamp/keyvalue.js +4 -0
- package/dist/ui-vamp/mobile-nav-button.d.ts +1 -2
- package/dist/ui-vamp/mobile-nav-button.js +9 -0
- package/dist/ui-vamp/modal.d.ts +1 -1
- package/dist/ui-vamp/modal.js +18 -0
- package/dist/ui-vamp/textarea.d.ts +1 -1
- package/dist/ui-vamp/{textarea.jsx → textarea.js} +2 -4
- package/dist/ui-vamp/toggle-group.d.ts +1 -1
- package/dist/ui-vamp/toggle-group.js +11 -0
- package/dist/video-player/mt-video-player.d.ts +1 -2
- package/dist/video-player/{mt-video-player.jsx → mt-video-player.js} +2 -11
- package/dist/video-player/video-player2/modal-video-player.d.ts +1 -1
- package/dist/video-player/video-player2/modal-video-player.js +12 -0
- package/package.json +2 -2
- package/dist/common/FullCenter.jsx +0 -7
- package/dist/common/MtProgressBar.jsx +0 -5
- package/dist/common/NotFoundGoBack.jsx +0 -15
- package/dist/common/devtools/DebugValue.jsx +0 -16
- package/dist/common/pip/PipExamplePage.jsx +0 -42
- package/dist/common/react-markdown/Code.jsx +0 -12
- package/dist/common/react-markdown/ReactMarkdownExample.jsx +0 -27
- package/dist/common/schema-form/SchemaFormFieldsRender.jsx +0 -22
- package/dist/common/table/SimpleTable.jsx +0 -26
- package/dist/common/table/cells/ExpenderCell.jsx +0 -10
- package/dist/common/table/cells/SelectCell.jsx +0 -32
- package/dist/common/table/cells/ViewLink.jsx +0 -32
- package/dist/common/table/cells/container/cellWrapper.jsx +0 -6
- package/dist/common/table/cells/number.jsx +0 -11
- package/dist/common/table/data-table-pagination.jsx +0 -49
- package/dist/common/table/data-table-view-options.jsx +0 -26
- package/dist/common/table/header/SimpleHeader.jsx +0 -39
- package/dist/common/table/header/header.jsx +0 -15
- package/dist/common/tailwind-indicator.jsx +0 -13
- package/dist/common/theme/mode-toggle.jsx +0 -28
- package/dist/common/theme/theme-toggle.jsx +0 -12
- package/dist/common/tiptap/MenuBar.jsx +0 -100
- package/dist/common/tiptap/examples/Demo-Default.jsx +0 -152
- package/dist/components/ChatMessageBubble.jsx +0 -26
- package/dist/components/IntermediateStep.jsx +0 -32
- package/dist/components/UploadDocumentsForm.jsx +0 -39
- package/dist/components/button-scroll-to-bottom.jsx +0 -11
- package/dist/components/chat-share-dialog.jsx +0 -55
- package/dist/components/dev-bot/chat-list.jsx +0 -36
- package/dist/components/dev-bot/chat-panel.jsx +0 -71
- package/dist/components/empty-screen.jsx +0 -19
- package/dist/components/external-link.jsx +0 -8
- package/dist/components/message.jsx +0 -74
- package/dist/components/spinner.jsx +0 -4
- package/dist/components/tool-ui/BlogHomePage.jsx +0 -12
- package/dist/components/tool-ui/DemoCategoryGen.jsx +0 -9
- package/dist/components/tool-ui/DpCfWorker.jsx +0 -15
- package/dist/components/tool-ui/DpMtxEdge.jsx +0 -15
- package/dist/components/tool-ui/vcDeploy.jsx +0 -15
- package/dist/demos/bigcode/BigCode.jsx +0 -16
- package/dist/demos/scrollarea/LongListDemo.jsx +0 -8
- package/dist/demos/scrollarea/ScrollAreaDemo.jsx +0 -43
- package/dist/demos/suspense-ssr/ExampleOg.jsx +0 -19
- package/dist/demos/suspense-ssr/ExamplePage.jsx +0 -55
- package/dist/demos/suspense-ssr/ReadMe.jsx +0 -44
- package/dist/demos/suspense-ssr/examplesPosts.jsx +0 -24
- package/dist/form/EditFormToolbar.jsx +0 -72
- package/dist/form/SchemaFormFieldRender.jsx +0 -42
- package/dist/form/deleteConform.jsx +0 -65
- package/dist/icons/crazy-spinner.jsx +0 -8
- package/dist/icons/font-default.jsx +0 -6
- package/dist/icons/font-mono.jsx +0 -6
- package/dist/icons/font-serif.jsx +0 -6
- package/dist/icons/github.jsx +0 -5
- package/dist/icons/icons-ai.jsx +0 -160
- package/dist/icons/icons.jsx +0 -188
- package/dist/icons/loading-circle.jsx +0 -6
- package/dist/icons/magic.jsx +0 -7
- package/dist/lib/htmlparse/components/ItemActionButton.jsx +0 -58
- package/dist/lib/htmlparse/htmlParse.jsx +0 -50
- package/dist/misc/CustomErrorRetry.jsx +0 -13
- package/dist/misc/MtErrorBoundaryV2.jsx +0 -13
- package/dist/mtedtior/generative/ai-completion-command.jsx +0 -48
- package/dist/mtedtior/generative/ai-selector-commands.jsx +0 -55
- package/dist/mtedtior/generative/ai-selector.jsx +0 -74
- package/dist/mtedtior/selectors/color-selector.jsx +0 -142
- package/dist/mtedtior/selectors/link-selector.jsx +0 -68
- package/dist/tools/devTools/bash.jsx +0 -38
- package/dist/tools/rag/ui/RagInput.jsx +0 -51
- package/dist/ui/accordion.jsx +0 -20
- package/dist/ui/alert-dialog.jsx +0 -29
- package/dist/ui/breadcrumb.jsx +0 -27
- package/dist/ui/checkbox.jsx +0 -12
- package/dist/ui/command.jsx +0 -37
- package/dist/ui/context-menu.jsx +0 -52
- package/dist/ui/dialog.jsx +0 -31
- package/dist/ui/drawer.jsx +0 -28
- package/dist/ui/dropdown-menu.jsx +0 -54
- package/dist/ui/hover-card.jsx +0 -9
- package/dist/ui/input.jsx +0 -7
- package/dist/ui/menubar.jsx +0 -54
- package/dist/ui/navigation-menu.jsx +0 -34
- package/dist/ui/pagination.jsx +0 -31
- package/dist/ui/popover.jsx +0 -11
- package/dist/ui/progress.jsx +0 -9
- package/dist/ui/radio-group.jsx +0 -18
- package/dist/ui/resizable.jsx +0 -12
- package/dist/ui/scroll-area.jsx +0 -19
- package/dist/ui/select.jsx +0 -39
- package/dist/ui/separator.jsx +0 -7
- package/dist/ui/skeleton.jsx +0 -5
- package/dist/ui/slider.jsx +0 -12
- package/dist/ui/switch.jsx +0 -9
- package/dist/ui/table.jsx +0 -21
- package/dist/ui/tabs.jsx +0 -12
- package/dist/ui/textarea.jsx +0 -7
- package/dist/ui/toaster.jsx +0 -19
- package/dist/ui/tooltip.jsx +0 -10
- package/dist/ui-mt/Boundary.jsx +0 -16
- package/dist/ui-mt/ErrorMessage.jsx +0 -7
- package/dist/ui-mt/NavTag.jsx +0 -35
- package/dist/ui-mt/ScreenPanel.jsx +0 -10
- package/dist/ui-mt/SimpleTag.jsx +0 -7
- package/dist/ui-mt/Tree.jsx +0 -98
- package/dist/ui-mt/headline.jsx +0 -8
- package/dist/ui-mt/input-field/InputField.jsx +0 -40
- package/dist/ui-mt/input-field/SingleUploadForm.jsx +0 -83
- package/dist/ui-mt/input-field/TextArea.jsx +0 -20
- package/dist/ui-mt/input-field/select/InputSelect.jsx +0 -44
- package/dist/ui-mt/inputs/SearchInput.jsx +0 -12
- package/dist/ui-mt/inputs/TaskStatusInput.jsx +0 -37
- package/dist/ui-mt/mt-tree-view/mt-treeview.jsx +0 -40
- package/dist/ui-mt/pagination.jsx +0 -49
- package/dist/ui-mt/skeleton/NewLoading.jsx +0 -31
- package/dist/ui-mt/skeleton/SkeletonInput.jsx +0 -6
- package/dist/ui-mt/skeleton/SkeletonLayout.jsx +0 -8
- package/dist/ui-mt/skeleton/SkeletonLoading.jsx +0 -14
- package/dist/ui-mt/skeleton/skeleton-card.jsx +0 -10
- package/dist/ui-mt/skeleton/skeleton2.jsx +0 -8
- package/dist/ui-mt/skeleton/skeletons.jsx +0 -12
- package/dist/ui-mt/skeleton.jsx +0 -4
- package/dist/ui-vamp/alert.jsx +0 -45
- package/dist/ui-vamp/card.jsx +0 -32
- package/dist/ui-vamp/external-link.jsx +0 -6
- package/dist/ui-vamp/keyvalue.jsx +0 -6
- package/dist/ui-vamp/mobile-nav-button.jsx +0 -13
- package/dist/ui-vamp/modal.jsx +0 -22
- package/dist/ui-vamp/toggle-group.jsx +0 -10
- package/dist/video-player/video-player2/modal-video-player.jsx +0 -43
- /package/dist/common/{DebugFormState.jsx → DebugFormState.js} +0 -0
- /package/dist/common/SlntTree/{Slnt.z.jsx → Slnt.z.js} +0 -0
- /package/dist/common/{TrpcQuery.jsx → TrpcQuery.js} +0 -0
- /package/dist/common/{markdown.jsx → markdown.js} +0 -0
- /package/dist/common/table/{datatable-view-options.jsx → datatable-view-options.js} +0 -0
- /package/dist/components/auth/{LoginDlg.jsx → LoginDlg.js} +0 -0
- /package/dist/components/dev-bot/{actions.jsx → actions.js} +0 -0
- /package/dist/demos/{lib.jsx → lib.js} +0 -0
- /package/dist/hooks/{use-copy-to-clipboard.jsx → use-copy-to-clipboard.js} +0 -0
- /package/dist/hooks/{use-enter-submit.jsx → use-enter-submit.js} +0 -0
- /package/dist/hooks/{use-scroll-anchor.jsx → use-scroll-anchor.js} +0 -0
- /package/dist/hooks/{useIsIntersecting.jsx → useIsIntersecting.js} +0 -0
- /package/dist/icons/{Cross2Icon.jsx → Cross2Icon.js} +0 -0
- /package/dist/icons/{DotsHorizontalIcon.jsx → DotsHorizontalIcon.js} +0 -0
- /package/dist/icons/{MixerHorizontal.jsx → MixerHorizontal.js} +0 -0
- /package/dist/icons/{index.jsx → index.js} +0 -0
- /package/dist/lib/auth/{authActions.jsx → authActions.js} +0 -0
- /package/dist/lib/chat/{chatActions.jsx → chatActions.js} +0 -0
- /package/dist/mtedtior/{LzMtEditor.jsx → LzMtEditor.js} +0 -0
- /package/dist/mtedtior/extensions/{drag-and-drop.jsx → drag-and-drop.js} +0 -0
- /package/dist/mtedtior/plugins/{upload-images.jsx → upload-images.js} +0 -0
- /package/dist/mtedtior/{utils.jsx → utils.js} +0 -0
- /package/dist/tools/devTools/{vncServer.jsx → vncServer.js} +0 -0
- /package/dist/tools/rag/{addResoure.jsx → addResoure.js} +0 -0
- /package/dist/tools/rag/{getInformation.jsx → getInformation.js} +0 -0
- /package/dist/ui/{aspect-ratio.jsx → aspect-ratio.js} +0 -0
- /package/dist/ui/{collapsible.jsx → collapsible.js} +0 -0
- /package/dist/ui-mt/{Button.jsx → Button.js} +0 -0
- /package/dist/ui-mt/{MtForm.jsx → MtForm.js} +0 -0
- /package/dist/ui-mt/{Separator.jsx → Separator.js} +0 -0
- /package/dist/ui-mt/{Slot.jsx → Slot.js} +0 -0
- /package/dist/ui-mt/inputs/{input.jsx → input.js} +0 -0
- /package/dist/ui-mt/mt-tree-view/{MtTreeViewExample.jsx → MtTreeViewExample.js} +0 -0
- /package/dist/ui-mt/skeleton/{SkeletonDashboardShell.jsx → SkeletonDashboardShell.js} +0 -0
- /package/dist/ui-mt/{types.jsx → types.js} +0 -0
|
@@ -10,11 +10,11 @@ export interface DeleteConformState extends MtxFormProps {
|
|
|
10
10
|
setConfirmCallback: (confirmCallback: ConfirmCallbackFnType) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare const createFormSlice: StateCreator<DeleteConformState, [], [], DeleteConformState>;
|
|
13
|
-
export declare const DeleteConfirmProvider: (props: PropsWithChildren<MtxFormProps>) => import("react").JSX.Element;
|
|
13
|
+
export declare const DeleteConfirmProvider: (props: PropsWithChildren<MtxFormProps>) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare const useDeleteConfirm: () => {
|
|
15
15
|
show: (props: {
|
|
16
16
|
callback: () => void;
|
|
17
17
|
}) => void;
|
|
18
18
|
};
|
|
19
|
-
export declare const DeleteConfirmDlg: () => import("react").JSX.Element;
|
|
19
|
+
export declare const DeleteConfirmDlg: () => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { createContext, useCallback, useContext, useMemo } from "react";
|
|
3
4
|
import { createStore, useStore } from "zustand";
|
|
4
5
|
import { immer } from "zustand/middleware/immer";
|
|
@@ -18,10 +19,7 @@ const formContext = createContext(null);
|
|
|
18
19
|
export const DeleteConfirmProvider = (props) => {
|
|
19
20
|
const { children, ...etc } = props;
|
|
20
21
|
const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
|
|
21
|
-
return (
|
|
22
|
-
{children}
|
|
23
|
-
<DeleteConfirmDlg />
|
|
24
|
-
</formContext.Provider>);
|
|
22
|
+
return (_jsxs(formContext.Provider, { value: mystore, children: [children, _jsx(DeleteConfirmDlg, {})] }));
|
|
25
23
|
};
|
|
26
24
|
function useDeleteConfirmStore(selector) {
|
|
27
25
|
const store = useContext(formContext);
|
|
@@ -44,22 +42,11 @@ export const DeleteConfirmDlg = () => {
|
|
|
44
42
|
const open = useDeleteConfirmStore((x) => x.open);
|
|
45
43
|
const setOpen = useDeleteConfirmStore((x) => x.setOpen);
|
|
46
44
|
const confirmCallback = useDeleteConfirmStore((x) => x.confirmCallback);
|
|
47
|
-
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}}>
|
|
55
|
-
Continue
|
|
56
|
-
</MtButton>
|
|
57
|
-
<MtButton variant={"outline"} onClick={() => {
|
|
58
|
-
setOpen(false);
|
|
59
|
-
confirmCallback && confirmCallback();
|
|
60
|
-
}}>
|
|
61
|
-
Cancel
|
|
62
|
-
</MtButton>
|
|
63
|
-
</DialogContent>
|
|
64
|
-
</Dialog>);
|
|
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" })] }) }));
|
|
65
52
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
|
-
export declare const FullCenter: (props: PropsWithChildren) => import("react").JSX.Element;
|
|
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
|
+
};
|
|
@@ -6,6 +6,6 @@ export interface GlobalSearchState extends GlobalSearchProps {
|
|
|
6
6
|
setQ?: (q: string) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const createFormSlice: StateCreator<GlobalSearchState, [], [], GlobalSearchState>;
|
|
9
|
-
export declare const GlobalSearchProvider: (props: PropsWithChildren<GlobalSearchProps>) => import("react").JSX.Element;
|
|
9
|
+
export declare const GlobalSearchProvider: (props: PropsWithChildren<GlobalSearchProps>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare function useGlobalSearch<T>(selector: (state: GlobalSearchState) => T): T;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { createContext, useContext, useMemo } from "react";
|
|
3
4
|
import { createStore, useStore } from "zustand";
|
|
4
5
|
export const createFormSlice = (set, get) => ({
|
|
@@ -14,10 +15,7 @@ const formContext = createContext(null);
|
|
|
14
15
|
export const GlobalSearchProvider = (props) => {
|
|
15
16
|
const { children, ...etc } = props;
|
|
16
17
|
const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
|
|
17
|
-
return (
|
|
18
|
-
{children}
|
|
19
|
-
|
|
20
|
-
</formContext.Provider>);
|
|
18
|
+
return (_jsx(formContext.Provider, { value: mystore, children: children }));
|
|
21
19
|
};
|
|
22
20
|
export function useGlobalSearch(selector) {
|
|
23
21
|
const store = useContext(formContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function HtmlChangesObserver({ children }: React.PropsWithChildren): import("react").JSX.Element;
|
|
1
|
+
export declare function HtmlChangesObserver({ children }: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { HtmlDiffer } from "html-differ";
|
|
3
4
|
import { useEffect, useRef } from "react";
|
|
4
5
|
const styles = {
|
|
@@ -29,7 +30,7 @@ export function HtmlChangesObserver({ children }) {
|
|
|
29
30
|
running = false;
|
|
30
31
|
};
|
|
31
32
|
}, []);
|
|
32
|
-
return
|
|
33
|
+
return _jsx("div", { ref: targetNode, children: children });
|
|
33
34
|
}
|
|
34
35
|
function logDiff(diff) {
|
|
35
36
|
let output = "", styleArr = [];
|
package/dist/common/MtImage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Image from 'next/image';
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
type Props = ComponentProps<typeof Image>;
|
|
4
|
-
export declare const MtImage: (props: Props) => import("react").JSX.Element;
|
|
4
|
+
export declare const MtImage: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { isCloudflarePage } from 'mtxlib/utils';
|
|
2
3
|
import Image from 'next/image';
|
|
3
4
|
const normalizeSrc = (src) => {
|
|
@@ -23,5 +24,5 @@ function getImageLoader() {
|
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
export const MtImage = (props) => {
|
|
26
|
-
return
|
|
27
|
+
return _jsx(Image, { ...props, loader: getImageLoader() });
|
|
27
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MtProgressBar: () => import("react").JSX.Element;
|
|
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
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const NotFoundGoBack: () => import("react").JSX.Element;
|
|
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
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SlntChildrenTabs: () => import("react").JSX.Element;
|
|
1
|
+
export declare const SlntChildrenTabs: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { urlJoinPaths } from "mtxlib/http/url";
|
|
3
4
|
import { usePathname, useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
|
|
4
5
|
import { cn } from "../../lib/utils";
|
|
@@ -11,23 +12,15 @@ export const SlntChildrenTabs = () => {
|
|
|
11
12
|
const segment = useSelectedLayoutSegment();
|
|
12
13
|
const basePath = pathName.slice(0, -segments.join("/").length);
|
|
13
14
|
const basePath3 = "/" + segments.join("/");
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
{parentData?.children?.map((item, i) => {
|
|
15
|
+
return (_jsx("div", { className: "flex gap-1 ", children: parentData?.children?.map((item, i) => {
|
|
17
16
|
let href = `${urlJoinPaths(basePath, item.routeName || "")}`;
|
|
18
17
|
if (!segments?.length) {
|
|
19
18
|
href = urlJoinPaths(pathName, item.routeName || "");
|
|
20
19
|
}
|
|
21
|
-
return (
|
|
22
|
-
|
|
23
|
-
{item.label}
|
|
24
|
-
</MtLink>
|
|
25
|
-
|
|
26
|
-
</TabItem>);
|
|
27
|
-
})}
|
|
28
|
-
</div>);
|
|
20
|
+
return (_jsx(TabItem, { activate: segment == item.routeName, children: _jsx(MtLink, { variant: "ghost", href: href, children: item.label }, i) }, i));
|
|
21
|
+
}) }));
|
|
29
22
|
};
|
|
30
23
|
const TabItem = (props) => {
|
|
31
24
|
const { activate, ...etc } = props;
|
|
32
|
-
return (
|
|
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 }));
|
|
33
26
|
};
|
|
@@ -9,11 +9,11 @@ export declare const slntContext: import("react").Context<(Omit<import("zustand"
|
|
|
9
9
|
setState(nextStateOrUpdater: SlntState | Partial<SlntState> | ((state: import("immer").WritableDraft<SlntState>) => void), shouldReplace?: boolean | undefined): void;
|
|
10
10
|
}) | null>;
|
|
11
11
|
type ModalProviderProps = React.PropsWithChildren<SLNTProps>;
|
|
12
|
-
export declare const MenuTreeProvider: (props: ModalProviderProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const MenuTreeProvider: (props: ModalProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export declare const DEFAULT_USE_SHALLOW = true;
|
|
14
14
|
export declare function useMenuTreeStore(): SlntState;
|
|
15
15
|
export declare function useMenuTreeStore<T>(selector: (state: SlntState) => T): T;
|
|
16
16
|
export declare const SlntTreeNode: (props: {
|
|
17
17
|
treeData?: DashMenuTreeItem;
|
|
18
|
-
} & PropsWithChildren) => import("react").JSX.Element;
|
|
18
|
+
} & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
|
|
3
4
|
import { createContext, useContext, useMemo } from "react";
|
|
4
5
|
import { useStore } from "zustand";
|
|
@@ -14,7 +15,7 @@ export const slntContext = createContext(null);
|
|
|
14
15
|
export const MenuTreeProvider = (props) => {
|
|
15
16
|
const { children, ...etc } = props;
|
|
16
17
|
const mystore = useMemo(() => createModalStore(etc), [etc]);
|
|
17
|
-
return (
|
|
18
|
+
return (_jsx(slntContext.Provider, { value: mystore, children: children }));
|
|
18
19
|
};
|
|
19
20
|
export const DEFAULT_USE_SHALLOW = true;
|
|
20
21
|
export function useMenuTreeStore(selector) {
|
|
@@ -40,8 +41,5 @@ export const SlntTreeNode = (props) => {
|
|
|
40
41
|
console.log({ message: `(SlntTreeNode)${segment}`, fined, parent });
|
|
41
42
|
return fined;
|
|
42
43
|
}, [parent, segment]);
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
{children}
|
|
46
|
-
</MenuTreeProvider>);
|
|
44
|
+
return (_jsx(MenuTreeProvider, { menuNode: currNode, children: children }));
|
|
47
45
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MtButton } from "../../ui-mt/Button";
|
|
4
|
+
import { Dialog, DialogContent, DialogTrigger } from "../../ui/dialog";
|
|
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
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const HOTKEY_Debug = "alt+.";
|
|
2
|
-
export declare const DevTools: () => import("react").JSX.Element | null;
|
|
2
|
+
export declare const DevTools: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import dynamic from "next/dynamic";
|
|
3
4
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
4
5
|
import { useMtapp } from "../../mtapp/MtAppProvider";
|
|
@@ -19,8 +20,5 @@ export const DevTools = () => {
|
|
|
19
20
|
if (!debug) {
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
22
|
-
return (
|
|
23
|
-
<ReactQueryDevtoolsProduction buttonPosition="bottom-right"/>
|
|
24
|
-
<TailwindIndicator />
|
|
25
|
-
</>);
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsx(ReactQueryDevtoolsProduction, { buttonPosition: "bottom-right" }), _jsx(TailwindIndicator, {})] }));
|
|
26
24
|
};
|
package/dist/common/mtlink.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ type ExternalLinkProps = ComponentProps<"a">;
|
|
|
10
10
|
interface TExternalLink extends ExternalLinkProps {
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
export declare function MtExternalLink({ children, className, ...props }: TExternalLink):
|
|
13
|
+
export declare function MtExternalLink({ children, className, ...props }: TExternalLink): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
4
|
import Link from "next/link";
|
|
4
5
|
import React from "react";
|
|
@@ -6,11 +7,9 @@ import { cn } from "../lib/utils";
|
|
|
6
7
|
import { buttonVariants } from "../ui/button";
|
|
7
8
|
export const MtLink = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
8
9
|
const Comp = asChild ? Slot : Link;
|
|
9
|
-
return (
|
|
10
|
+
return (_jsx(Comp, { className: cn(((variant) && buttonVariants({ variant: variant, className }))), ref: ref, ...props }));
|
|
10
11
|
});
|
|
11
12
|
MtLink.displayName = "MtLink";
|
|
12
13
|
export function MtExternalLink({ children, className, ...props }) {
|
|
13
|
-
return (
|
|
14
|
-
{children}
|
|
15
|
-
</a>);
|
|
14
|
+
return (_jsx("a", { className: cn(className, "hover:text-brandtext-500 hover:underline hover:brightness-150"), rel: "noopener noreferrer", ...props, children: children }));
|
|
16
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function PipExamplePage(): import("react").JSX.Element;
|
|
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
|
+
};
|
package/dist/common/pip/{ReactDocumentPictureInPicture.jsx → ReactDocumentPictureInPicture.js}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
3
4
|
export var FeatureUnavailableReasonEnum;
|
|
4
5
|
(function (FeatureUnavailableReasonEnum) {
|
|
@@ -106,17 +107,11 @@ const ReactDocumentPictureInPicture = forwardRef((props, ref) => {
|
|
|
106
107
|
return featureUnavailableRenderer;
|
|
107
108
|
}
|
|
108
109
|
const buttonRenderer = typeof props.buttonRenderer === "function" ? props.buttonRenderer({ open, close, toggle, isOpen }) : props.buttonRenderer;
|
|
109
|
-
return (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
width: '100%',
|
|
115
|
-
height: '100%',
|
|
116
|
-
}}>
|
|
117
|
-
{props.children}
|
|
118
|
-
</div>
|
|
119
|
-
</div>);
|
|
110
|
+
return (_jsxs("div", { children: [buttonRenderer, _jsx("div", { ref: contentRef, style: {
|
|
111
|
+
display: isOpen ? 'block' : 'none',
|
|
112
|
+
width: '100%',
|
|
113
|
+
height: '100%',
|
|
114
|
+
}, children: props.children })] }));
|
|
120
115
|
});
|
|
121
116
|
ReactDocumentPictureInPicture.displayName = "ReactDocumentPictureInPicture";
|
|
122
117
|
export default ReactDocumentPictureInPicture;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const CodeBlock: ({ ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
|
-
}) => import("react").JSX.Element;
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const Pre: ({ ...props }: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
}) => import("react").JSX.Element;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
3
|
+
import { materialOceanic } from 'react-syntax-highlighter/dist/cjs/styles/prism';
|
|
4
|
+
export const CodeBlock = ({ ...props }) => {
|
|
5
|
+
return (_jsx(SyntaxHighlighter, { language: props.className?.replace(/(?:lang(?:uage)?-)/, ''), style: materialOceanic, wrapLines: true, className: 'not-prose rounded-md', children: props.children }));
|
|
6
|
+
};
|
|
7
|
+
export const Pre = ({ ...props }) => {
|
|
8
|
+
return (_jsx("div", { className: 'not-prose', children: props.children }));
|
|
9
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Button } from "../../ui/button";
|
|
2
3
|
const MarkdownToolbar = ({ feedElement }) => {
|
|
3
4
|
const btns = [
|
|
@@ -6,10 +7,6 @@ const MarkdownToolbar = ({ feedElement }) => {
|
|
|
6
7
|
{ name: 'S', syntax: '~Strikethrough~' },
|
|
7
8
|
{ name: 'H1', syntax: '# ' },
|
|
8
9
|
];
|
|
9
|
-
return (
|
|
10
|
-
{btns.map(btn => (<Button key={btn.syntax} className="flex rounded-md" onClick={() => feedElement(btn.syntax)}>
|
|
11
|
-
{btn.name}
|
|
12
|
-
</Button>))}
|
|
13
|
-
</header>);
|
|
10
|
+
return (_jsx("header", { className: " flex gap-1 bg-[#253237]", children: btns.map(btn => (_jsx(Button, { className: "flex rounded-md", onClick: () => feedElement(btn.syntax), children: btn.name }, btn.syntax))) }));
|
|
14
11
|
};
|
|
15
12
|
export default MarkdownToolbar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ReactMarkdownExample: () => import("react").JSX.Element;
|
|
1
|
+
export declare const ReactMarkdownExample: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import Markdown from 'react-markdown';
|
|
4
|
+
import rehypeExternalLinks from 'rehype-external-links';
|
|
5
|
+
import rehypeSanitize from 'rehype-sanitize';
|
|
6
|
+
import remarkGfm from 'remark-gfm';
|
|
7
|
+
import { CodeBlock, Pre } from "./Code";
|
|
8
|
+
export const ReactMarkdownExample = () => {
|
|
9
|
+
const options = {
|
|
10
|
+
code: CodeBlock,
|
|
11
|
+
pre: Pre,
|
|
12
|
+
};
|
|
13
|
+
return (_jsx("div", { className: 'bg-slate-500', children: _jsx("div", { className: 'flex h-screen justify-between', children: _jsx("article", { className: 'w-full pl-6 pt-5', children: _jsx(Markdown, { className: 'prose prose-invert min-w-full', remarkPlugins: [remarkGfm], rehypePlugins: [
|
|
14
|
+
rehypeSanitize,
|
|
15
|
+
[rehypeExternalLinks,
|
|
16
|
+
{ content: { type: 'text', value: '🔗' } }
|
|
17
|
+
],
|
|
18
|
+
], components: options }) }) }) }));
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "mtxuilib/ui/form";
|
|
4
|
+
import { Input } from "mtxuilib/ui/input";
|
|
5
|
+
import { useFormContext } from "react-hook-form";
|
|
6
|
+
export const SchemaFormFieldsRender = (props) => {
|
|
7
|
+
const { schema } = props;
|
|
8
|
+
const form = useFormContext();
|
|
9
|
+
return (_jsx(_Fragment, { children: schema.fields?.map((formField, i) => {
|
|
10
|
+
return (_jsx(FormField, { control: form.control, name: formField.name, defaultValue: formField.defaultValue || "", render: ({ field }) => (_jsxs(FormItem, { children: [formField.label && _jsx(FormLabel, { children: formField.label }), _jsx(FormControl, { children: _jsx(_Fragment, { children: _jsx(Input, { placeholder: formField.placeholder, ...field }) }) }), formField.description && _jsx(FormDescription, { children: formField.description }), _jsx(FormMessage, {})] })) }, i));
|
|
11
|
+
}) }));
|
|
12
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
3
|
import { useState } from "react";
|
|
3
4
|
import { FormProvider, useForm } from "react-hook-form";
|
|
4
5
|
import { EditFormToolbar } from "mtxuilib/form/EditFormToolbar";
|
|
@@ -12,20 +13,7 @@ export const SchemaFormView = (props) => {
|
|
|
12
13
|
defaultValues: defaultValues,
|
|
13
14
|
});
|
|
14
15
|
if (!formSchema) {
|
|
15
|
-
return
|
|
16
|
+
return _jsx("div", { className: "border p-8", children: "missing formSchema params" });
|
|
16
17
|
}
|
|
17
|
-
return (
|
|
18
|
-
<FormProvider {...form}>
|
|
19
|
-
<Card className="p-2">
|
|
20
|
-
<CardContent>
|
|
21
|
-
<form onSubmit={form.handleSubmit(onSubmit)}>
|
|
22
|
-
<SchemaFormFieldsRender schema={formSchema}/>
|
|
23
|
-
<DialogFooter>
|
|
24
|
-
<EditFormToolbar onCancel={() => onCancel && onCancel()}/>
|
|
25
|
-
</DialogFooter>
|
|
26
|
-
</form>
|
|
27
|
-
</CardContent>
|
|
28
|
-
</Card>
|
|
29
|
-
</FormProvider>
|
|
30
|
-
</>);
|
|
18
|
+
return (_jsx(_Fragment, { children: _jsx(FormProvider, { ...form, children: _jsx(Card, { className: "p-2", children: _jsx(CardContent, { children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsx(SchemaFormFieldsRender, { schema: formSchema }), _jsx(DialogFooter, { children: _jsx(EditFormToolbar, { onCancel: () => onCancel && onCancel() }) })] }) }) }) }) }));
|
|
31
19
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { flexRender } from "@tanstack/react-table";
|
|
4
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../../ui/table";
|
|
5
|
+
export function SimpleTable(props) {
|
|
6
|
+
const { table } = props;
|
|
7
|
+
return (_jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => (_jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
8
|
+
return (_jsx(TableHead, { children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id));
|
|
9
|
+
}) }, headerGroup.id))) }), _jsx(TableBody, { children: table.getRowModel().rows?.length ? (table.getRowModel().rows.map((row) => (_jsx(TableRow, { "data-state": row.getIsSelected() && "selected", children: row.getVisibleCells().map((cell) => (_jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) : (_jsx(TableRow, {})) })] }) }));
|
|
10
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CellContext } from "@tanstack/react-table";
|
|
2
|
-
export declare const ExpenderCell: (info: CellContext<any, any>) => import("react").JSX.Element | "🔵";
|
|
2
|
+
export declare const ExpenderCell: (info: CellContext<any, any>) => import("react/jsx-runtime").JSX.Element | "🔵";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight } from 'lucide-react';
|
|
4
|
+
import { cn } from "../../../lib/utils";
|
|
5
|
+
export const ExpenderCell = (info) => {
|
|
6
|
+
return info.row.getCanExpand() ? (_jsx("button", { className: "pointer", onClick: info.row.getToggleExpandedHandler(), children: _jsx(ChevronRight, { className: cn(info.row.getIsExpanded() && "rotate-90") }) })) : ('🔵');
|
|
7
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CellContext } from "@tanstack/react-table";
|
|
2
|
-
|
|
3
|
-
export declare const SelectCell: (info: CellContext<any, any>) => React.JSX.Element;
|
|
2
|
+
export declare const SelectCell: (info: CellContext<any, any>) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
interface SelectCellItem {
|
|
5
4
|
label: string;
|
|
6
5
|
value: string;
|
|
@@ -9,5 +8,5 @@ interface NewSelectCellOptions {
|
|
|
9
8
|
placeholder?: string;
|
|
10
9
|
items: SelectCellItem[];
|
|
11
10
|
}
|
|
12
|
-
export declare const NewSelectCell: ({ placeholder, items }: NewSelectCellOptions) => (_info: CellContext<any, any>) =>
|
|
11
|
+
export declare const NewSelectCell: ({ placeholder, items }: NewSelectCellOptions) => (_info: CellContext<any, any>) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../../../ui/select";
|
|
5
|
+
export const SelectCell = (info) => {
|
|
6
|
+
const [value, setValue] = React.useState(info.cell.getValue());
|
|
7
|
+
const onBlur = () => {
|
|
8
|
+
const numValue = parseInt(value);
|
|
9
|
+
};
|
|
10
|
+
return _jsx("div", { className: "flex w-full", children: _jsx("input", { type: "number", value: value, onChange: e => setValue(e.target.value), onBlur: onBlur, className: "grow" }) });
|
|
11
|
+
};
|
|
12
|
+
export const NewSelectCell = ({ placeholder, items }) => {
|
|
13
|
+
const component = (_info) => {
|
|
14
|
+
return _jsx(_Fragment, { children: _jsxs(Select, { children: [_jsx(SelectTrigger, { className: "w-[180px]", children: _jsx(SelectValue, { placeholder: placeholder || "--" }) }), _jsx(SelectContent, { children: _jsx(SelectGroup, { children: items?.map((item, i) => {
|
|
15
|
+
return _jsx(SelectItem, { value: item.value, children: item.label }, i);
|
|
16
|
+
}) }) })] }) });
|
|
17
|
+
};
|
|
18
|
+
return component;
|
|
19
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CellContext } from "@tanstack/react-table";
|
|
2
|
-
import React from "react";
|
|
3
2
|
interface NewTextCellOptions {
|
|
4
3
|
popup?: boolean;
|
|
5
4
|
enableEdit?: boolean;
|
|
6
5
|
placeholder?: string;
|
|
7
6
|
}
|
|
8
|
-
export declare const NewTextCell: ({ enableEdit, placeholder, popup }: NewTextCellOptions) => (info: CellContext<any, any>) =>
|
|
7
|
+
export declare const NewTextCell: ({ enableEdit, placeholder, popup }: NewTextCellOptions) => (info: CellContext<any, any>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from "react";
|
|
3
4
|
export const NewTextCell = ({ enableEdit, placeholder, popup }) => (info) => {
|
|
4
5
|
const initialValue = info.cell.getValue();
|
|
@@ -8,8 +9,5 @@ export const NewTextCell = ({ enableEdit, placeholder, popup }) => (info) => {
|
|
|
8
9
|
}, [initialValue]);
|
|
9
10
|
const onBlur = () => {
|
|
10
11
|
};
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
{value}
|
|
14
|
-
</>;
|
|
12
|
+
return _jsx(_Fragment, { children: value });
|
|
15
13
|
};
|