mtxuilib 0.0.781 → 0.1.1
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.jsx +65 -0
- package/dist/common/FullCenter.jsx +7 -0
- package/dist/common/GlobalSearch.jsx +27 -0
- package/dist/common/MtImage.jsx +27 -0
- package/dist/common/MtProgressBar.jsx +5 -0
- package/dist/common/NotFoundGoBack.jsx +15 -0
- package/dist/common/SlntTree/Slnt.z.jsx +13 -0
- package/dist/common/SlntTree/SlntChildrenTabs.jsx +33 -0
- package/dist/common/SlntTree/SlntTreeNode.jsx +47 -0
- package/dist/common/TrpcQuery.jsx +1 -0
- package/dist/common/devtools/DebugValue.jsx +16 -0
- package/dist/common/devtools/DevTools.jsx +26 -0
- package/dist/common/mtlink.jsx +16 -0
- package/dist/common/pip/PipExamplePage.jsx +42 -0
- package/dist/common/pip/ReactDocumentPictureInPicture.jsx +122 -0
- package/dist/common/react-markdown/Code.jsx +12 -0
- package/dist/common/react-markdown/MarkdownToolbar.jsx +15 -0
- package/dist/common/react-markdown/ReactMarkdownExample.jsx +27 -0
- package/dist/common/schema-form/SchemaFormFieldsRender.jsx +22 -0
- package/dist/common/schema-form/SchemaFormView.jsx +31 -0
- package/dist/common/schema-form/schema-form.z.js +19 -0
- package/dist/common/table/SimpleTable.jsx +26 -0
- package/dist/common/table/cells/ExpenderCell.jsx +10 -0
- package/dist/common/table/cells/SelectCell.jsx +32 -0
- package/dist/common/table/cells/Text.jsx +15 -0
- package/dist/common/table/cells/ViewLink.jsx +32 -0
- package/dist/common/table/cells/container/cellWrapper.jsx +6 -0
- package/dist/common/table/cells/number.jsx +11 -0
- package/dist/common/table/cells/string.jsx +18 -0
- package/dist/common/table/data-table-pagination.jsx +49 -0
- package/dist/common/table/data-table-view-options.jsx +26 -0
- package/dist/common/table/datatable-view-options.jsx +2 -0
- package/dist/common/table/example/ExampleTable.jsx +102 -0
- package/dist/common/table/header/SimpleHeader.jsx +39 -0
- package/dist/common/table/header/header.jsx +15 -0
- package/dist/common/table/table.z.js +35 -0
- package/dist/common/tailwind-indicator.jsx +13 -0
- package/dist/common/theme/mode-toggle.jsx +28 -0
- package/dist/common/theme/theme-toggle.jsx +12 -0
- package/dist/common/tiptap/MenuBar.jsx +100 -0
- package/dist/common/tiptap/TiptapEditor.jsx +56 -0
- package/dist/common/tiptap/examples/Demo-Default.jsx +152 -0
- package/dist/common/tiptap/examples/Demo-Tiptap.jsx +12 -0
- package/dist/demos/bigcode/BigCode.jsx +16 -0
- package/dist/demos/condition-type/serialize.jsx +32 -0
- package/dist/demos/demo-react-use.jsx +18 -0
- package/dist/demos/lib.jsx +20 -0
- package/dist/demos/scrollarea/LongListDemo.jsx +8 -0
- package/dist/demos/scrollarea/ScrollAreaDemo.jsx +43 -0
- package/dist/demos/suspense-ssr/ExampleOg.jsx +19 -0
- package/dist/demos/suspense-ssr/ExamplePage.jsx +55 -0
- package/dist/demos/suspense-ssr/ExampleProviderProviders.jsx +10 -0
- package/dist/demos/suspense-ssr/ReadMe.jsx +44 -0
- package/dist/demos/suspense-ssr/examplesPostDetail.jsx +28 -0
- package/dist/demos/suspense-ssr/examplesPosts.jsx +24 -0
- package/dist/form/EditFormToolbar.jsx +67 -0
- package/dist/form/ZodForm.jsx +35 -0
- package/dist/form/deleteConform.jsx +65 -0
- package/dist/hooks/use-config.js +8 -0
- package/dist/hooks/use-local-storage.js +16 -0
- package/dist/hooks/use-lock-body.js +8 -0
- package/dist/hooks/use-media-query.jsx +33 -0
- package/dist/hooks/use-mutation-observer.js +15 -0
- package/dist/hooks/use-router.js +51 -0
- package/dist/hooks/useIsIntersecting.jsx +17 -0
- package/dist/hooks/useLayoutPath.js +21 -0
- package/dist/hooks/useMounted.js +8 -0
- package/dist/hooks/useScript.js +66 -0
- package/dist/icons/crazy-spinner.jsx +8 -0
- package/dist/icons/font-default.jsx +6 -0
- package/dist/icons/font-mono.jsx +6 -0
- package/dist/icons/font-serif.jsx +6 -0
- package/dist/icons/github.jsx +5 -0
- package/dist/icons/icons.jsx +188 -0
- package/dist/icons/loading-circle.jsx +6 -0
- package/dist/icons/magic.jsx +7 -0
- package/dist/index.js +2 -0
- package/dist/lib/clientlib/clientlib.js +38 -0
- package/dist/lib/clientlib/domutils.js +11 -0
- package/dist/lib/clientlib/selectPath.js +44 -0
- package/dist/lib/componentHelper.js +43 -0
- package/dist/lib/errors.js +8 -0
- package/dist/lib/fetch-proxy/fetch-proxy.js +4 -0
- package/dist/lib/highlight-code.js +20 -0
- package/dist/lib/htmlparse/components/ItemActionButton.jsx +58 -0
- package/dist/lib/htmlparse/htmlParse.jsx +50 -0
- package/dist/lib/react-query/ReactQueryProvider.jsx +43 -0
- package/dist/lib/render.jsx +20 -0
- package/dist/lib/service-worker/ServiceWorkerMain.jsx +31 -0
- package/dist/lib/service-worker/lib.js +7 -0
- package/dist/lib/service-worker/worker.js +34 -0
- package/dist/lib/service-worker.js +29 -0
- package/dist/lib/trpc-query/TrpcComponents/TrpcDehydrate.jsx +11 -0
- package/dist/lib/url.js +67 -0
- package/dist/lib/useScript.js +66 -0
- package/dist/lib/utils.js +192 -0
- package/dist/lib/zod/common.z.js +37 -0
- package/dist/lib/zod/demo.z.js +3 -0
- package/dist/lib/zod/listView.z.js +131 -0
- package/dist/lib/zod/meta.js +16 -0
- package/dist/lib/zod/msg.z.js +4 -0
- package/dist/lib/zod/taskStatus.z.js +29 -0
- package/dist/lib/zustand.js +30 -0
- package/dist/misc/CustomErrorRetry.jsx +13 -0
- package/dist/misc/ExampleErrorDemo.jsx +17 -0
- package/dist/misc/MtErrorBoundary.jsx +32 -0
- package/dist/misc/MtErrorBoundary.stories.jsx +26 -0
- package/dist/misc/MtErrorBoundaryV2.jsx +13 -0
- package/dist/misc/MtErrorBoundaryV2.stories.jsx +24 -0
- package/dist/mtapp/History.jsx +60 -0
- package/dist/mtapp/MtAppProvider.jsx +73 -0
- package/dist/mtedtior/AiButtons.jsx +8 -0
- package/dist/mtedtior/MtEditor.jsx +148 -0
- package/dist/mtedtior/components/editor-bubble-item.jsx +15 -0
- package/dist/mtedtior/components/editor-bubble.jsx +44 -0
- package/dist/mtedtior/components/editor-command-item.jsx +17 -0
- package/dist/mtedtior/components/editor-command.jsx +54 -0
- package/dist/mtedtior/components/editor.jsx +21 -0
- package/dist/mtedtior/components/index.js +6 -0
- package/dist/mtedtior/content.js +248 -0
- package/dist/mtedtior/extensions/ai-highlight.js +84 -0
- package/dist/mtedtior/extensions/custom-keymap.js +38 -0
- package/dist/mtedtior/extensions/drag-and-drop.jsx +165 -0
- package/dist/mtedtior/extensions/image-resizer.jsx +29 -0
- package/dist/mtedtior/extensions/index.js +60 -0
- package/dist/mtedtior/extensions/slash-command.jsx +197 -0
- package/dist/mtedtior/extensions/updated-image.js +17 -0
- package/dist/mtedtior/generative/ai-completion-command.jsx +48 -0
- package/dist/mtedtior/generative/ai-selector-commands.jsx +55 -0
- package/dist/mtedtior/generative/ai-selector.jsx +72 -0
- package/dist/mtedtior/generative/generative-menu-switch.jsx +34 -0
- package/dist/mtedtior/mtextesions/DemoComponent.jsx +34 -0
- package/dist/mtedtior/plugins/index.js +1 -0
- package/dist/mtedtior/plugins/upload-images.jsx +98 -0
- package/dist/mtedtior/selectors/color-selector.jsx +138 -0
- package/dist/mtedtior/selectors/link-selector.jsx +68 -0
- package/dist/mtedtior/selectors/node-selector.jsx +92 -0
- package/dist/mtedtior/selectors/text-buttons.jsx +49 -0
- package/dist/mtedtior/tw_extensions.js +108 -0
- package/dist/mtedtior/utils/summary.js +8 -0
- package/dist/mtedtior/utils/utils.js +32 -0
- package/dist/mtedtior/utils.jsx +33 -0
- package/dist/scripts/build-registry.js +314 -0
- package/dist/service-worker/ServiceWorkerMain.jsx +31 -0
- package/dist/service-worker/lib.js +7 -0
- package/dist/service-worker/sw.js +32 -0
- package/dist/styled-system/css/conditions.mjs +30 -0
- package/dist/styled-system/css/css.mjs +37 -0
- package/dist/styled-system/css/cva.mjs +72 -0
- package/dist/styled-system/css/cx.mjs +11 -0
- package/dist/styled-system/css/index.mjs +4 -0
- package/dist/styled-system/css/sva.mjs +31 -0
- package/dist/styled-system/helpers.mjs +248 -0
- package/dist/styled-system/patterns/aspect-ratio.mjs +36 -0
- package/dist/styled-system/patterns/bleed.mjs +22 -0
- package/dist/styled-system/patterns/box.mjs +13 -0
- package/dist/styled-system/patterns/center.mjs +19 -0
- package/dist/styled-system/patterns/circle.mjs +23 -0
- package/dist/styled-system/patterns/container.mjs +19 -0
- package/dist/styled-system/patterns/cq.mjs +19 -0
- package/dist/styled-system/patterns/divider.mjs +23 -0
- package/dist/styled-system/patterns/flex.mjs +24 -0
- package/dist/styled-system/patterns/float.mjs +50 -0
- package/dist/styled-system/patterns/grid-item.mjs +23 -0
- package/dist/styled-system/patterns/grid.mjs +25 -0
- package/dist/styled-system/patterns/hstack.mjs +22 -0
- package/dist/styled-system/patterns/index.mjs +20 -0
- package/dist/styled-system/patterns/link-overlay.mjs +22 -0
- package/dist/styled-system/patterns/spacer.mjs +19 -0
- package/dist/styled-system/patterns/square.mjs +22 -0
- package/dist/styled-system/patterns/stack.mjs +22 -0
- package/dist/styled-system/patterns/visually-hidden.mjs +16 -0
- package/dist/styled-system/patterns/vstack.mjs +22 -0
- package/dist/styled-system/patterns/wrap.mjs +23 -0
- package/dist/styled-system/tokens/index.mjs +1885 -0
- package/dist/tailwind copy.cjs +76 -0
- package/dist/tailwind.js +72 -0
- package/dist/ui/accordion.jsx +20 -0
- package/dist/ui/alert-dialog.jsx +29 -0
- package/dist/ui/alert.jsx +21 -0
- package/dist/ui/aspect-ratio.jsx +4 -0
- package/dist/ui/avatar.jsx +11 -0
- package/dist/ui/badge.jsx +20 -0
- package/dist/ui/breadcrumb.jsx +27 -0
- package/dist/ui/button.jsx +32 -0
- package/dist/ui/calendar.jsx +40 -0
- package/dist/ui/card.jsx +15 -0
- package/dist/ui/checkbox.jsx +12 -0
- package/dist/ui/collapsible.jsx +6 -0
- package/dist/ui/command.jsx +37 -0
- package/dist/ui/context-menu.jsx +52 -0
- package/dist/ui/dialog.jsx +31 -0
- package/dist/ui/drawer.jsx +28 -0
- package/dist/ui/dropdown-menu.jsx +54 -0
- package/dist/ui/form.jsx +67 -0
- package/dist/ui/hover-card.jsx +9 -0
- package/dist/ui/input.jsx +7 -0
- package/dist/ui/label.jsx +9 -0
- package/dist/ui/menubar.jsx +54 -0
- package/dist/ui/navigation-menu.jsx +34 -0
- package/dist/ui/pagination.jsx +31 -0
- package/dist/ui/popover.jsx +11 -0
- package/dist/ui/progress.jsx +9 -0
- package/dist/ui/radio-group.jsx +18 -0
- package/dist/ui/resizable.jsx +12 -0
- package/dist/ui/scroll-area.jsx +19 -0
- package/dist/ui/select.jsx +39 -0
- package/dist/ui/separator.jsx +7 -0
- package/dist/ui/sheet.jsx +45 -0
- package/dist/ui/skeleton.jsx +5 -0
- package/dist/ui/slider.jsx +12 -0
- package/dist/ui/sonner.jsx +15 -0
- package/dist/ui/switch.jsx +9 -0
- package/dist/ui/table.jsx +21 -0
- package/dist/ui/tabs.jsx +12 -0
- package/dist/ui/textarea.jsx +7 -0
- package/dist/ui/toast.jsx +34 -0
- package/dist/ui/toaster.jsx +19 -0
- package/dist/ui/toggle.jsx +25 -0
- package/dist/ui/tooltip.jsx +10 -0
- package/dist/ui/use-toast.js +124 -0
- package/dist/ui-mt/Boundary.jsx +16 -0
- package/dist/ui-mt/Button.jsx +2 -0
- package/dist/ui-mt/DropdownMenuItemLink.jsx +9 -0
- package/dist/ui-mt/ErrorMessage.jsx +7 -0
- package/dist/ui-mt/ExampleTree.jsx +83 -0
- package/dist/ui-mt/MtDialog.jsx +39 -0
- package/dist/ui-mt/MtForm.jsx +3 -0
- package/dist/ui-mt/NavTag.jsx +35 -0
- package/dist/ui-mt/ScreenPanel.jsx +10 -0
- package/dist/ui-mt/Separator.jsx +3 -0
- package/dist/ui-mt/SimpleModel.jsx +30 -0
- package/dist/ui-mt/SimpleTag.jsx +7 -0
- package/dist/ui-mt/Tree.jsx +98 -0
- package/dist/ui-mt/WithLinkIf.jsx +9 -0
- package/dist/ui-mt/headline.jsx +8 -0
- package/dist/ui-mt/input-field/InputField.jsx +40 -0
- package/dist/ui-mt/input-field/RichEditorInput.jsx +19 -0
- package/dist/ui-mt/input-field/SingleUploadForm.jsx +83 -0
- package/dist/ui-mt/input-field/TextArea.jsx +20 -0
- package/dist/ui-mt/input-field/TextFileInput.jsx +39 -0
- package/dist/ui-mt/input-field/select/InputSelect.jsx +44 -0
- package/dist/ui-mt/inputs/SearchInput.jsx +12 -0
- package/dist/ui-mt/inputs/TaskStatusInput.jsx +38 -0
- package/dist/ui-mt/inputs/UrlsInput.jsx +16 -0
- package/dist/ui-mt/inputs/input.jsx +2 -0
- package/dist/ui-mt/modal/MtModal.jsx +58 -0
- package/dist/ui-mt/mt-tree-view/MtTreeViewExample.jsx +2 -0
- package/dist/ui-mt/mt-tree-view/mt-tree-view-api.jsx +158 -0
- package/dist/ui-mt/mt-tree-view/mt-treeview.jsx +40 -0
- package/dist/ui-mt/pagination.jsx +49 -0
- package/dist/ui-mt/skeleton/NewLoading.jsx +31 -0
- package/dist/ui-mt/skeleton/SkeletonDashboardShell.jsx +2 -0
- package/dist/ui-mt/skeleton/SkeletonInput.jsx +6 -0
- package/dist/ui-mt/skeleton/SkeletonLayout.jsx +8 -0
- package/dist/ui-mt/skeleton/SkeletonLoading.jsx +14 -0
- package/dist/ui-mt/skeleton/skeleton-card.jsx +10 -0
- package/dist/ui-mt/skeleton/skeleton2.jsx +8 -0
- package/dist/ui-mt/skeleton/skeletons.jsx +12 -0
- package/dist/ui-mt/skeleton.jsx +4 -0
- package/dist/ui-vamp/alert.jsx +45 -0
- package/dist/ui-vamp/button.jsx +34 -0
- package/dist/ui-vamp/card.jsx +32 -0
- package/dist/ui-vamp/chip.jsx +23 -0
- package/dist/ui-vamp/dropdown.jsx +25 -0
- package/dist/ui-vamp/external-link.jsx +6 -0
- package/dist/ui-vamp/input.jsx +31 -0
- package/dist/ui-vamp/keyvalue.jsx +6 -0
- package/dist/ui-vamp/mobile-nav-button.jsx +13 -0
- package/dist/ui-vamp/modal.jsx +22 -0
- package/dist/ui-vamp/textarea.jsx +21 -0
- package/dist/ui-vamp/toggle-group.jsx +10 -0
- package/dist/video-player/mt-video-player.jsx +37 -0
- package/dist/video-player/video-player2/modal-video-player.jsx +43 -0
- package/package.json +10 -10
- package/dist/browser/sw.min.js +0 -1
- package/dist/esm/common/DeleteComfirm.d.ts +0 -20
- package/dist/esm/common/DeleteComfirm.js +0 -1
- package/dist/esm/common/FullCenter.d.ts +0 -2
- package/dist/esm/common/FullCenter.js +0 -1
- package/dist/esm/common/GlobalSearch.d.ts +0 -11
- package/dist/esm/common/GlobalSearch.js +0 -1
- package/dist/esm/common/MtImage.d.ts +0 -5
- package/dist/esm/common/MtImage.js +0 -1
- package/dist/esm/common/MtProgressBar.d.ts +0 -2
- package/dist/esm/common/MtProgressBar.js +0 -1
- package/dist/esm/common/NotFoundGoBack.d.ts +0 -2
- package/dist/esm/common/NotFoundGoBack.js +0 -1
- package/dist/esm/common/SlntTree/Slnt.z.d.ts +0 -28
- package/dist/esm/common/SlntTree/Slnt.z.js +0 -1
- package/dist/esm/common/SlntTree/SlntChildrenTabs.d.ts +0 -2
- package/dist/esm/common/SlntTree/SlntChildrenTabs.js +0 -1
- package/dist/esm/common/SlntTree/SlntTreeNode.d.ts +0 -19
- package/dist/esm/common/SlntTree/SlntTreeNode.js +0 -1
- package/dist/esm/common/TrpcQuery.d.ts +0 -0
- package/dist/esm/common/TrpcQuery.js +0 -0
- package/dist/esm/common/devtools/DebugValue.d.ts +0 -6
- package/dist/esm/common/devtools/DebugValue.js +0 -1
- package/dist/esm/common/devtools/DevTools.d.ts +0 -3
- package/dist/esm/common/devtools/DevTools.js +0 -1
- package/dist/esm/common/mtlink.d.ts +0 -14
- package/dist/esm/common/mtlink.js +0 -1
- package/dist/esm/common/pip/PipExamplePage.d.ts +0 -2
- package/dist/esm/common/pip/PipExamplePage.js +0 -1
- package/dist/esm/common/pip/ReactDocumentPictureInPicture.d.ts +0 -28
- package/dist/esm/common/pip/ReactDocumentPictureInPicture.js +0 -1
- package/dist/esm/common/pip/globals.d.js +0 -0
- package/dist/esm/common/react-markdown/Code.d.ts +0 -7
- package/dist/esm/common/react-markdown/Code.js +0 -1
- package/dist/esm/common/react-markdown/MarkdownToolbar.d.ts +0 -5
- package/dist/esm/common/react-markdown/MarkdownToolbar.js +0 -1
- package/dist/esm/common/react-markdown/ReactMarkdownExample.d.ts +0 -2
- package/dist/esm/common/react-markdown/ReactMarkdownExample.js +0 -1
- package/dist/esm/common/schema-form/SchemaFormFieldsRender.d.ts +0 -5
- package/dist/esm/common/schema-form/SchemaFormFieldsRender.js +0 -1
- package/dist/esm/common/schema-form/SchemaFormView.d.ts +0 -13
- package/dist/esm/common/schema-form/SchemaFormView.js +0 -1
- package/dist/esm/common/schema-form/schema-form.z.d.ts +0 -90
- package/dist/esm/common/schema-form/schema-form.z.js +0 -1
- package/dist/esm/common/table/SimpleTable.d.ts +0 -5
- package/dist/esm/common/table/SimpleTable.js +0 -1
- package/dist/esm/common/table/cells/ExpenderCell.d.ts +0 -3
- package/dist/esm/common/table/cells/ExpenderCell.js +0 -1
- package/dist/esm/common/table/cells/SelectCell.d.ts +0 -13
- package/dist/esm/common/table/cells/SelectCell.js +0 -1
- package/dist/esm/common/table/cells/Text.d.ts +0 -9
- package/dist/esm/common/table/cells/Text.js +0 -1
- package/dist/esm/common/table/cells/ViewLink.d.ts +0 -13
- package/dist/esm/common/table/cells/ViewLink.js +0 -1
- package/dist/esm/common/table/cells/container/cellWrapper.d.ts +0 -6
- package/dist/esm/common/table/cells/container/cellWrapper.js +0 -1
- package/dist/esm/common/table/cells/number.d.ts +0 -3
- package/dist/esm/common/table/cells/number.js +0 -1
- package/dist/esm/common/table/cells/string.d.ts +0 -3
- package/dist/esm/common/table/cells/string.js +0 -1
- package/dist/esm/common/table/data-table-pagination.d.ts +0 -7
- package/dist/esm/common/table/data-table-pagination.js +0 -1
- package/dist/esm/common/table/data-table-view-options.d.ts +0 -7
- package/dist/esm/common/table/data-table-view-options.js +0 -1
- package/dist/esm/common/table/datatable-view-options.d.ts +0 -12
- package/dist/esm/common/table/datatable-view-options.js +0 -1
- package/dist/esm/common/table/example/ExampleTable.d.ts +0 -2
- package/dist/esm/common/table/example/ExampleTable.js +0 -1
- package/dist/esm/common/table/header/SimpleHeader.d.ts +0 -5
- package/dist/esm/common/table/header/SimpleHeader.js +0 -1
- package/dist/esm/common/table/header/header.d.ts +0 -6
- package/dist/esm/common/table/header/header.js +0 -1
- package/dist/esm/common/table/table.z.d.ts +0 -189
- package/dist/esm/common/table/table.z.js +0 -1
- package/dist/esm/common/table/types.d.js +0 -0
- package/dist/esm/common/tailwind-indicator.d.ts +0 -2
- package/dist/esm/common/tailwind-indicator.js +0 -1
- package/dist/esm/common/theme/mode-toggle.d.ts +0 -2
- package/dist/esm/common/theme/mode-toggle.js +0 -1
- package/dist/esm/common/theme/theme-toggle.d.ts +0 -2
- package/dist/esm/common/theme/theme-toggle.js +0 -1
- package/dist/esm/common/tiptap/MenuBar.d.ts +0 -2
- package/dist/esm/common/tiptap/MenuBar.js +0 -1
- package/dist/esm/common/tiptap/TiptapEditor.d.ts +0 -6
- package/dist/esm/common/tiptap/TiptapEditor.js +0 -1
- package/dist/esm/common/tiptap/examples/Demo-Default.d.ts +0 -2
- package/dist/esm/common/tiptap/examples/Demo-Default.js +0 -30
- package/dist/esm/common/tiptap/examples/Demo-Tiptap.d.ts +0 -2
- package/dist/esm/common/tiptap/examples/Demo-Tiptap.js +0 -1
- package/dist/esm/demos/bigcode/BigCode.d.ts +0 -4
- package/dist/esm/demos/bigcode/BigCode.js +0 -1
- package/dist/esm/demos/condition-type/serialize.d.ts +0 -4
- package/dist/esm/demos/condition-type/serialize.js +0 -1
- package/dist/esm/demos/demo-react-use.d.ts +0 -2
- package/dist/esm/demos/demo-react-use.js +0 -1
- package/dist/esm/demos/lib.d.ts +0 -3
- package/dist/esm/demos/lib.js +0 -1
- package/dist/esm/demos/scrollarea/LongListDemo.d.ts +0 -2
- package/dist/esm/demos/scrollarea/LongListDemo.js +0 -1
- package/dist/esm/demos/scrollarea/ScrollAreaDemo.d.ts +0 -2
- package/dist/esm/demos/scrollarea/ScrollAreaDemo.js +0 -1
- package/dist/esm/demos/suspense-ssr/ExampleOg.d.ts +0 -4
- package/dist/esm/demos/suspense-ssr/ExampleOg.js +0 -1
- package/dist/esm/demos/suspense-ssr/ExamplePage.d.ts +0 -3
- package/dist/esm/demos/suspense-ssr/ExamplePage.js +0 -1
- package/dist/esm/demos/suspense-ssr/ExampleProviderProviders.d.ts +0 -4
- package/dist/esm/demos/suspense-ssr/ExampleProviderProviders.js +0 -1
- package/dist/esm/demos/suspense-ssr/ReadMe.d.ts +0 -2
- package/dist/esm/demos/suspense-ssr/ReadMe.js +0 -1
- package/dist/esm/demos/suspense-ssr/examplesPostDetail.d.ts +0 -4
- package/dist/esm/demos/suspense-ssr/examplesPostDetail.js +0 -1
- package/dist/esm/demos/suspense-ssr/examplesPosts.d.ts +0 -2
- package/dist/esm/demos/suspense-ssr/examplesPosts.js +0 -1
- package/dist/esm/emails/SubmissionAccepted.d.ts +0 -5
- package/dist/esm/emails/SubmissionAccepted.js +0 -1
- package/dist/esm/emails/SubmissionReceived.d.ts +0 -6
- package/dist/esm/emails/SubmissionReceived.js +0 -1
- package/dist/esm/emails/WelcomeEmail.d.ts +0 -4
- package/dist/esm/emails/WelcomeEmail.js +0 -1
- package/dist/esm/emails/components/BaseLayout.d.ts +0 -8
- package/dist/esm/emails/components/BaseLayout.js +0 -85
- package/dist/esm/emails/components/Button.d.ts +0 -5
- package/dist/esm/emails/components/Button.js +0 -1
- package/dist/esm/emails/components/Divider.d.ts +0 -4
- package/dist/esm/emails/components/Divider.js +0 -1
- package/dist/esm/emails/components/Footer.d.ts +0 -5
- package/dist/esm/emails/components/Footer.js +0 -1
- package/dist/esm/emails/components/Head.d.ts +0 -2
- package/dist/esm/emails/components/Head.js +0 -95
- package/dist/esm/emails/components/Header.d.ts +0 -4
- package/dist/esm/emails/components/Header.js +0 -1
- package/dist/esm/emails/components/Heading.d.ts +0 -5
- package/dist/esm/emails/components/Heading.js +0 -1
- package/dist/esm/emails/components/List.d.ts +0 -7
- package/dist/esm/emails/components/List.js +0 -1
- package/dist/esm/emails/components/Text.d.ts +0 -7
- package/dist/esm/emails/components/Text.js +0 -1
- package/dist/esm/emails/components/theme.d.ts +0 -14
- package/dist/esm/emails/components/theme.js +0 -1
- package/dist/esm/emails/index.d.ts +0 -3
- package/dist/esm/emails/index.js +0 -1
- package/dist/esm/emails/previews/Account.d.ts +0 -2
- package/dist/esm/emails/previews/Account.js +0 -1
- package/dist/esm/emails/previews/Bounty.d.ts +0 -3
- package/dist/esm/emails/previews/Bounty.js +0 -1
- package/dist/esm/emails/theme.d.ts +0 -60
- package/dist/esm/emails/theme.js +0 -1
- package/dist/esm/form/EditFormToolbar.d.ts +0 -13
- package/dist/esm/form/EditFormToolbar.js +0 -1
- package/dist/esm/form/ZodForm.d.ts +0 -14
- package/dist/esm/form/ZodForm.js +0 -1
- package/dist/esm/form/deleteConform.d.ts +0 -8
- package/dist/esm/form/deleteConform.js +0 -1
- package/dist/esm/hooks/use-config.d.ts +0 -5
- package/dist/esm/hooks/use-config.js +0 -1
- package/dist/esm/hooks/use-local-storage.d.ts +0 -2
- package/dist/esm/hooks/use-local-storage.js +0 -1
- package/dist/esm/hooks/use-lock-body.d.ts +0 -1
- package/dist/esm/hooks/use-lock-body.js +0 -1
- package/dist/esm/hooks/use-media-query.d.ts +0 -7
- package/dist/esm/hooks/use-media-query.js +0 -1
- package/dist/esm/hooks/use-mutation-observer.d.ts +0 -7
- package/dist/esm/hooks/use-mutation-observer.js +0 -1
- package/dist/esm/hooks/use-router.d.ts +0 -18
- package/dist/esm/hooks/use-router.js +0 -1
- package/dist/esm/hooks/useIsIntersecting.d.ts +0 -2
- package/dist/esm/hooks/useIsIntersecting.js +0 -1
- package/dist/esm/hooks/useLayoutPath.d.ts +0 -2
- package/dist/esm/hooks/useLayoutPath.js +0 -1
- package/dist/esm/hooks/useMounted.d.ts +0 -1
- package/dist/esm/hooks/useMounted.js +0 -1
- package/dist/esm/hooks/useScript.d.ts +0 -3
- package/dist/esm/hooks/useScript.js +0 -1
- package/dist/esm/icons/Cross2Icon.js +0 -1
- package/dist/esm/icons/DotsHorizontalIcon.js +0 -1
- package/dist/esm/icons/MixerHorizontal.js +0 -1
- package/dist/esm/icons/crazy-spinner.d.ts +0 -3
- package/dist/esm/icons/crazy-spinner.js +0 -1
- package/dist/esm/icons/font-default.d.ts +0 -4
- package/dist/esm/icons/font-default.js +0 -1
- package/dist/esm/icons/font-mono.d.ts +0 -4
- package/dist/esm/icons/font-mono.js +0 -1
- package/dist/esm/icons/font-serif.d.ts +0 -4
- package/dist/esm/icons/font-serif.js +0 -1
- package/dist/esm/icons/github.d.ts +0 -4
- package/dist/esm/icons/github.js +0 -1
- package/dist/esm/icons/icons.d.ts +0 -133
- package/dist/esm/icons/icons.js +0 -1
- package/dist/esm/icons/index.js +0 -1
- package/dist/esm/icons/loading-circle.d.ts +0 -4
- package/dist/esm/icons/loading-circle.js +0 -1
- package/dist/esm/icons/magic.d.ts +0 -4
- package/dist/esm/icons/magic.js +0 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/lib/111.test.js +0 -0
- package/dist/esm/lib/blocks.d.ts +0 -3
- package/dist/esm/lib/blocks.js +0 -1
- package/dist/esm/lib/clientlib/clientlib.d.ts +0 -6
- package/dist/esm/lib/clientlib/clientlib.js +0 -1
- package/dist/esm/lib/clientlib/domutils.d.ts +0 -2
- package/dist/esm/lib/clientlib/domutils.js +0 -1
- package/dist/esm/lib/clientlib/selectPath.d.ts +0 -4
- package/dist/esm/lib/clientlib/selectPath.js +0 -1
- package/dist/esm/lib/componentHelper.d.ts +0 -7
- package/dist/esm/lib/componentHelper.js +0 -1
- package/dist/esm/lib/errors.d.ts +0 -4
- package/dist/esm/lib/errors.js +0 -1
- package/dist/esm/lib/fetch-proxy/fetch-proxy.d.ts +0 -1
- package/dist/esm/lib/fetch-proxy/fetch-proxy.js +0 -1
- package/dist/esm/lib/highlight-code.d.ts +0 -1
- package/dist/esm/lib/highlight-code.js +0 -1
- package/dist/esm/lib/htmlparse/components/ItemActionButton.d.ts +0 -2
- package/dist/esm/lib/htmlparse/components/ItemActionButton.js +0 -1
- package/dist/esm/lib/htmlparse/htmlParse.d.ts +0 -2
- package/dist/esm/lib/htmlparse/htmlParse.js +0 -1
- package/dist/esm/lib/react-query/ReactQueryProvider.d.ts +0 -4
- package/dist/esm/lib/react-query/ReactQueryProvider.js +0 -1
- package/dist/esm/lib/render.d.ts +0 -4
- package/dist/esm/lib/render.js +0 -1
- package/dist/esm/lib/service-worker/ServiceWorkerMain.d.ts +0 -2
- package/dist/esm/lib/service-worker/ServiceWorkerMain.js +0 -1
- package/dist/esm/lib/service-worker/lib.d.ts +0 -1
- package/dist/esm/lib/service-worker/lib.js +0 -1
- package/dist/esm/lib/service-worker/worker.js +0 -1
- package/dist/esm/lib/service-worker.d.ts +0 -5
- package/dist/esm/lib/service-worker.js +0 -1
- package/dist/esm/lib/trpc/types.d.ts +0 -6
- package/dist/esm/lib/trpc/types.js +0 -0
- package/dist/esm/lib/trpc-query/TrpcComponents/TrpcDehydrate.d.ts +0 -5
- package/dist/esm/lib/trpc-query/TrpcComponents/TrpcDehydrate.js +0 -1
- package/dist/esm/lib/url.d.ts +0 -2
- package/dist/esm/lib/url.js +0 -1
- package/dist/esm/lib/useScript.d.ts +0 -3
- package/dist/esm/lib/useScript.js +0 -1
- package/dist/esm/lib/useToastMessage.d.ts +0 -3
- package/dist/esm/lib/useToastMessage.js +0 -1
- package/dist/esm/lib/utils.d.ts +0 -27
- package/dist/esm/lib/utils.js +0 -1
- package/dist/esm/lib/zod/common.z.d.ts +0 -71
- package/dist/esm/lib/zod/common.z.js +0 -1
- package/dist/esm/lib/zod/demo.z.js +0 -1
- package/dist/esm/lib/zod/listView.z.d.ts +0 -7688
- package/dist/esm/lib/zod/listView.z.js +0 -1
- package/dist/esm/lib/zod/meta.d.ts +0 -51
- package/dist/esm/lib/zod/meta.js +0 -1
- package/dist/esm/lib/zod/msg.z.d.ts +0 -9
- package/dist/esm/lib/zod/msg.z.js +0 -1
- package/dist/esm/lib/zod/taskStatus.z.d.ts +0 -17
- package/dist/esm/lib/zod/taskStatus.z.js +0 -1
- package/dist/esm/lib/zustand.d.ts +0 -5
- package/dist/esm/lib/zustand.js +0 -1
- package/dist/esm/misc/CustomErrorRetry.d.ts +0 -5
- package/dist/esm/misc/CustomErrorRetry.js +0 -1
- package/dist/esm/misc/ExampleErrorDemo.d.ts +0 -4
- package/dist/esm/misc/ExampleErrorDemo.js +0 -1
- package/dist/esm/misc/MtErrorBoundary.d.ts +0 -16
- package/dist/esm/misc/MtErrorBoundary.js +0 -1
- package/dist/esm/misc/MtErrorBoundary.stories.d.ts +0 -15
- package/dist/esm/misc/MtErrorBoundary.stories.js +0 -1
- package/dist/esm/misc/MtErrorBoundaryV2.d.ts +0 -2
- package/dist/esm/misc/MtErrorBoundaryV2.js +0 -1
- package/dist/esm/misc/MtErrorBoundaryV2.stories.d.ts +0 -17
- package/dist/esm/misc/MtErrorBoundaryV2.stories.js +0 -1
- package/dist/esm/mtapp/History.d.ts +0 -24
- package/dist/esm/mtapp/History.js +0 -1
- package/dist/esm/mtapp/MtAppProvider.d.ts +0 -58
- package/dist/esm/mtapp/MtAppProvider.js +0 -1
- package/dist/esm/mtapp/ToastProvider.js +0 -1
- package/dist/esm/mtedtior/AiButtons.d.ts +0 -11
- package/dist/esm/mtedtior/AiButtons.js +0 -1
- package/dist/esm/mtedtior/MtEditor.d.ts +0 -29
- package/dist/esm/mtedtior/MtEditor.js +0 -1
- package/dist/esm/mtedtior/components/editor-bubble-item.d.ts +0 -9
- package/dist/esm/mtedtior/components/editor-bubble-item.js +0 -1
- package/dist/esm/mtedtior/components/editor-bubble.d.ts +0 -7
- package/dist/esm/mtedtior/components/editor-bubble.js +0 -1
- package/dist/esm/mtedtior/components/editor-command-item.d.ts +0 -20
- package/dist/esm/mtedtior/components/editor-command-item.js +0 -1
- package/dist/esm/mtedtior/components/editor-command.d.ts +0 -29
- package/dist/esm/mtedtior/components/editor-command.js +0 -1
- package/dist/esm/mtedtior/components/editor.d.ts +0 -21
- package/dist/esm/mtedtior/components/editor.js +0 -1
- package/dist/esm/mtedtior/components/index.d.ts +0 -8
- package/dist/esm/mtedtior/components/index.js +0 -1
- package/dist/esm/mtedtior/content.d.ts +0 -132
- package/dist/esm/mtedtior/content.js +0 -18
- package/dist/esm/mtedtior/extensions/ai-highlight.d.ts +0 -22
- package/dist/esm/mtedtior/extensions/ai-highlight.js +0 -1
- package/dist/esm/mtedtior/extensions/custom-keymap.d.ts +0 -10
- package/dist/esm/mtedtior/extensions/custom-keymap.js +0 -1
- package/dist/esm/mtedtior/extensions/drag-and-drop.d.ts +0 -6
- package/dist/esm/mtedtior/extensions/drag-and-drop.js +0 -1
- package/dist/esm/mtedtior/extensions/image-resizer.d.ts +0 -2
- package/dist/esm/mtedtior/extensions/image-resizer.js +0 -1
- package/dist/esm/mtedtior/extensions/index.d.ts +0 -12
- package/dist/esm/mtedtior/extensions/index.js +0 -1
- package/dist/esm/mtedtior/extensions/slash-command.d.ts +0 -33
- package/dist/esm/mtedtior/extensions/slash-command.js +0 -1
- package/dist/esm/mtedtior/extensions/updated-image.d.ts +0 -2
- package/dist/esm/mtedtior/extensions/updated-image.js +0 -1
- package/dist/esm/mtedtior/generative/ai-completion-command.d.ts +0 -6
- package/dist/esm/mtedtior/generative/ai-completion-command.js +0 -1
- package/dist/esm/mtedtior/generative/ai-selector-commands.d.ts +0 -6
- package/dist/esm/mtedtior/generative/ai-selector-commands.js +0 -1
- package/dist/esm/mtedtior/generative/ai-selector.d.ts +0 -7
- package/dist/esm/mtedtior/generative/ai-selector.js +0 -1
- package/dist/esm/mtedtior/generative/generative-menu-switch.d.ts +0 -8
- package/dist/esm/mtedtior/generative/generative-menu-switch.js +0 -1
- package/dist/esm/mtedtior/mtextesions/DemoComponent.d.ts +0 -2
- package/dist/esm/mtedtior/mtextesions/DemoComponent.js +0 -1
- package/dist/esm/mtedtior/plugins/index.d.ts +0 -1
- package/dist/esm/mtedtior/plugins/index.js +0 -1
- package/dist/esm/mtedtior/plugins/upload-images.d.ts +0 -13
- package/dist/esm/mtedtior/plugins/upload-images.js +0 -1
- package/dist/esm/mtedtior/selectors/color-selector.d.ts +0 -9
- package/dist/esm/mtedtior/selectors/color-selector.js +0 -1
- package/dist/esm/mtedtior/selectors/link-selector.d.ts +0 -9
- package/dist/esm/mtedtior/selectors/link-selector.js +0 -1
- package/dist/esm/mtedtior/selectors/node-selector.d.ts +0 -15
- package/dist/esm/mtedtior/selectors/node-selector.js +0 -1
- package/dist/esm/mtedtior/selectors/text-buttons.d.ts +0 -2
- package/dist/esm/mtedtior/selectors/text-buttons.js +0 -1
- package/dist/esm/mtedtior/tw_extensions.d.ts +0 -1
- package/dist/esm/mtedtior/tw_extensions.js +0 -1
- package/dist/esm/mtedtior/utils/summary.d.ts +0 -1
- package/dist/esm/mtedtior/utils/summary.js +0 -1
- package/dist/esm/mtedtior/utils/utils.d.ts +0 -9
- package/dist/esm/mtedtior/utils/utils.js +0 -1
- package/dist/esm/mtedtior/utils.d.ts +0 -9
- package/dist/esm/mtedtior/utils.js +0 -1
- package/dist/esm/scripts/build-registry.d.ts +0 -3
- package/dist/esm/service-worker/ServiceWorkerMain.d.ts +0 -2
- package/dist/esm/service-worker/ServiceWorkerMain.js +0 -1
- package/dist/esm/service-worker/lib.d.ts +0 -1
- package/dist/esm/service-worker/lib.js +0 -1
- package/dist/esm/service-worker/sw.js +0 -1
- package/dist/esm/stories/Header.js +0 -1
- package/dist/esm/stories/Header.stories.js +0 -1
- package/dist/esm/stories/MyServerComponent.js +0 -1
- package/dist/esm/stories/MyServerComponent.stories.js +0 -1
- package/dist/esm/stories/Page.js +0 -1
- package/dist/esm/stories/Page.stories.js +0 -1
- package/dist/esm/stories/StoryDemoButton.js +0 -5
- package/dist/esm/stories/StoryDemoButton.stories.js +0 -1
- package/dist/esm/styled-system/css/conditions.d.mts +0 -3
- package/dist/esm/styled-system/css/css.d.js +0 -0
- package/dist/esm/styled-system/css/css.d.mts +0 -6
- package/dist/esm/styled-system/css/cva.d.js +0 -0
- package/dist/esm/styled-system/css/cva.d.mts +0 -14
- package/dist/esm/styled-system/css/cx.d.js +0 -0
- package/dist/esm/styled-system/css/cx.d.mts +0 -1
- package/dist/esm/styled-system/css/index.d.js +0 -1
- package/dist/esm/styled-system/css/index.d.mts +0 -4
- package/dist/esm/styled-system/css/sva.d.js +0 -0
- package/dist/esm/styled-system/css/sva.d.mts +0 -10
- package/dist/esm/styled-system/helpers.d.mts +0 -39
- package/dist/esm/styled-system/patterns/aspect-ratio.d.js +0 -0
- package/dist/esm/styled-system/patterns/aspect-ratio.d.mts +0 -5
- package/dist/esm/styled-system/patterns/bleed.d.js +0 -0
- package/dist/esm/styled-system/patterns/bleed.d.mts +0 -5
- package/dist/esm/styled-system/patterns/box.d.js +0 -0
- package/dist/esm/styled-system/patterns/box.d.mts +0 -5
- package/dist/esm/styled-system/patterns/center.d.js +0 -0
- package/dist/esm/styled-system/patterns/center.d.mts +0 -5
- package/dist/esm/styled-system/patterns/circle.d.js +0 -0
- package/dist/esm/styled-system/patterns/circle.d.mts +0 -5
- package/dist/esm/styled-system/patterns/container.d.js +0 -0
- package/dist/esm/styled-system/patterns/container.d.mts +0 -5
- package/dist/esm/styled-system/patterns/cq.d.js +0 -0
- package/dist/esm/styled-system/patterns/cq.d.mts +0 -5
- package/dist/esm/styled-system/patterns/divider.d.js +0 -0
- package/dist/esm/styled-system/patterns/divider.d.mts +0 -5
- package/dist/esm/styled-system/patterns/flex.d.js +0 -0
- package/dist/esm/styled-system/patterns/flex.d.mts +0 -5
- package/dist/esm/styled-system/patterns/float.d.js +0 -0
- package/dist/esm/styled-system/patterns/float.d.mts +0 -5
- package/dist/esm/styled-system/patterns/grid-item.d.js +0 -0
- package/dist/esm/styled-system/patterns/grid-item.d.mts +0 -5
- package/dist/esm/styled-system/patterns/grid.d.js +0 -0
- package/dist/esm/styled-system/patterns/grid.d.mts +0 -5
- package/dist/esm/styled-system/patterns/hstack.d.js +0 -0
- package/dist/esm/styled-system/patterns/hstack.d.mts +0 -5
- package/dist/esm/styled-system/patterns/index.d.js +0 -1
- package/dist/esm/styled-system/patterns/index.d.mts +0 -20
- package/dist/esm/styled-system/patterns/link-overlay.d.js +0 -0
- package/dist/esm/styled-system/patterns/link-overlay.d.mts +0 -5
- package/dist/esm/styled-system/patterns/spacer.d.js +0 -0
- package/dist/esm/styled-system/patterns/spacer.d.mts +0 -5
- package/dist/esm/styled-system/patterns/square.d.js +0 -0
- package/dist/esm/styled-system/patterns/square.d.mts +0 -5
- package/dist/esm/styled-system/patterns/stack.d.js +0 -0
- package/dist/esm/styled-system/patterns/stack.d.mts +0 -5
- package/dist/esm/styled-system/patterns/visually-hidden.d.js +0 -0
- package/dist/esm/styled-system/patterns/visually-hidden.d.mts +0 -5
- package/dist/esm/styled-system/patterns/vstack.d.js +0 -0
- package/dist/esm/styled-system/patterns/vstack.d.mts +0 -5
- package/dist/esm/styled-system/patterns/wrap.d.js +0 -0
- package/dist/esm/styled-system/patterns/wrap.d.mts +0 -5
- package/dist/esm/styled-system/tokens/index.d.js +0 -1
- package/dist/esm/styled-system/tokens/index.d.mts +0 -6
- package/dist/esm/styled-system/tokens/tokens.d.js +0 -0
- package/dist/esm/styled-system/types/composition.d.js +0 -0
- package/dist/esm/styled-system/types/conditions.d.js +0 -0
- package/dist/esm/styled-system/types/csstype.d.js +0 -0
- package/dist/esm/styled-system/types/global.d.js +0 -0
- package/dist/esm/styled-system/types/index.d.js +0 -1
- package/dist/esm/styled-system/types/parts.d.js +0 -0
- package/dist/esm/styled-system/types/pattern.d.js +0 -0
- package/dist/esm/styled-system/types/prop-type.d.js +0 -0
- package/dist/esm/styled-system/types/recipe.d.js +0 -0
- package/dist/esm/styled-system/types/selectors.d.js +0 -0
- package/dist/esm/styled-system/types/static-css.d.js +0 -0
- package/dist/esm/styled-system/types/style-props.d.js +0 -0
- package/dist/esm/styled-system/types/system-types.d.js +0 -0
- package/dist/esm/tailwind copy.d.cts +0 -2
- package/dist/esm/tailwind.d.ts +0 -3
- package/dist/esm/tailwind.js +0 -1
- package/dist/esm/types/common.d.ts +0 -16
- package/dist/esm/types/common.js +0 -0
- package/dist/esm/types/index.d.js +0 -0
- package/dist/esm/ui/accordion.d.ts +0 -7
- package/dist/esm/ui/accordion.js +0 -1
- package/dist/esm/ui/alert-dialog.d.ts +0 -20
- package/dist/esm/ui/alert-dialog.js +0 -1
- package/dist/esm/ui/alert.d.ts +0 -8
- package/dist/esm/ui/alert.js +0 -1
- package/dist/esm/ui/aspect-ratio.d.ts +0 -4
- package/dist/esm/ui/aspect-ratio.js +0 -1
- package/dist/esm/ui/avatar.d.ts +0 -6
- package/dist/esm/ui/avatar.js +0 -1
- package/dist/esm/ui/badge.d.ts +0 -9
- package/dist/esm/ui/badge.js +0 -1
- package/dist/esm/ui/breadcrumb.d.ts +0 -19
- package/dist/esm/ui/breadcrumb.js +0 -1
- package/dist/esm/ui/button.d.ts +0 -11
- package/dist/esm/ui/button.js +0 -1
- package/dist/esm/ui/calendar.d.ts +0 -8
- package/dist/esm/ui/calendar.js +0 -1
- package/dist/esm/ui/card.d.ts +0 -8
- package/dist/esm/ui/card.js +0 -1
- package/dist/esm/ui/checkbox.d.ts +0 -4
- package/dist/esm/ui/checkbox.js +0 -1
- package/dist/esm/ui/collapsible.d.ts +0 -6
- package/dist/esm/ui/collapsible.js +0 -1
- package/dist/esm/ui/command.d.ts +0 -50
- package/dist/esm/ui/command.js +0 -1
- package/dist/esm/ui/context-menu.d.ts +0 -27
- package/dist/esm/ui/context-menu.js +0 -1
- package/dist/esm/ui/dialog.d.ts +0 -19
- package/dist/esm/ui/dialog.js +0 -1
- package/dist/esm/ui/drawer.d.ts +0 -24
- package/dist/esm/ui/drawer.js +0 -1
- package/dist/esm/ui/dropdown-menu.d.ts +0 -27
- package/dist/esm/ui/dropdown-menu.js +0 -1
- package/dist/esm/ui/form.d.ts +0 -23
- package/dist/esm/ui/form.js +0 -1
- package/dist/esm/ui/hover-card.d.ts +0 -6
- package/dist/esm/ui/hover-card.js +0 -1
- package/dist/esm/ui/input.d.ts +0 -5
- package/dist/esm/ui/input.js +0 -1
- package/dist/esm/ui/label.d.ts +0 -5
- package/dist/esm/ui/label.js +0 -1
- package/dist/esm/ui/menubar.d.ts +0 -31
- package/dist/esm/ui/menubar.js +0 -1
- package/dist/esm/ui/navigation-menu.d.ts +0 -12
- package/dist/esm/ui/navigation-menu.js +0 -1
- package/dist/esm/ui/pagination.d.ts +0 -28
- package/dist/esm/ui/pagination.js +0 -1
- package/dist/esm/ui/popover.d.ts +0 -6
- package/dist/esm/ui/popover.js +0 -1
- package/dist/esm/ui/progress.d.ts +0 -4
- package/dist/esm/ui/progress.js +0 -1
- package/dist/esm/ui/radio-group.d.ts +0 -5
- package/dist/esm/ui/radio-group.js +0 -1
- package/dist/esm/ui/resizable.d.ts +0 -24
- package/dist/esm/ui/resizable.js +0 -1
- package/dist/esm/ui/scroll-area.d.ts +0 -5
- package/dist/esm/ui/scroll-area.js +0 -1
- package/dist/esm/ui/select.d.ts +0 -11
- package/dist/esm/ui/select.js +0 -1
- package/dist/esm/ui/separator.d.ts +0 -4
- package/dist/esm/ui/separator.js +0 -1
- package/dist/esm/ui/sheet.d.ts +0 -25
- package/dist/esm/ui/sheet.js +0 -1
- package/dist/esm/ui/skeleton.d.ts +0 -3
- package/dist/esm/ui/skeleton.js +0 -1
- package/dist/esm/ui/slider.d.ts +0 -4
- package/dist/esm/ui/slider.js +0 -1
- package/dist/esm/ui/sonner.d.ts +0 -5
- package/dist/esm/ui/sonner.js +0 -1
- package/dist/esm/ui/switch.d.ts +0 -4
- package/dist/esm/ui/switch.js +0 -1
- package/dist/esm/ui/table.d.ts +0 -10
- package/dist/esm/ui/table.js +0 -1
- package/dist/esm/ui/tabs.d.ts +0 -7
- package/dist/esm/ui/tabs.js +0 -1
- package/dist/esm/ui/textarea.d.ts +0 -5
- package/dist/esm/ui/textarea.js +0 -1
- package/dist/esm/ui/toast.d.ts +0 -15
- package/dist/esm/ui/toast.js +0 -1
- package/dist/esm/ui/toaster.d.ts +0 -2
- package/dist/esm/ui/toaster.js +0 -1
- package/dist/esm/ui/toggle.d.ts +0 -12
- package/dist/esm/ui/toggle.js +0 -1
- package/dist/esm/ui/tooltip.d.ts +0 -7
- package/dist/esm/ui/tooltip.js +0 -1
- package/dist/esm/ui/use-toast.d.ts +0 -44
- package/dist/esm/ui/use-toast.js +0 -1
- package/dist/esm/ui-mt/Boundary.d.ts +0 -9
- package/dist/esm/ui-mt/Boundary.js +0 -1
- package/dist/esm/ui-mt/Button.d.ts +0 -2
- package/dist/esm/ui-mt/Button.js +0 -1
- package/dist/esm/ui-mt/DropdownMenuItemLink.d.ts +0 -7
- package/dist/esm/ui-mt/DropdownMenuItemLink.js +0 -1
- package/dist/esm/ui-mt/ErrorMessage.d.ts +0 -2
- package/dist/esm/ui-mt/ErrorMessage.js +0 -1
- package/dist/esm/ui-mt/ExampleTree.d.ts +0 -2
- package/dist/esm/ui-mt/ExampleTree.js +0 -1
- package/dist/esm/ui-mt/MtDialog.d.ts +0 -19
- package/dist/esm/ui-mt/MtDialog.js +0 -1
- package/dist/esm/ui-mt/MtForm.d.ts +0 -2
- package/dist/esm/ui-mt/MtForm.js +0 -1
- package/dist/esm/ui-mt/NavTag.d.ts +0 -11
- package/dist/esm/ui-mt/NavTag.js +0 -1
- package/dist/esm/ui-mt/ScreenPanel.d.ts +0 -4
- package/dist/esm/ui-mt/ScreenPanel.js +0 -1
- package/dist/esm/ui-mt/Separator.d.ts +0 -2
- package/dist/esm/ui-mt/Separator.js +0 -1
- package/dist/esm/ui-mt/SimpleModel.d.ts +0 -4
- package/dist/esm/ui-mt/SimpleModel.js +0 -1
- package/dist/esm/ui-mt/SimpleTag.d.ts +0 -6
- package/dist/esm/ui-mt/SimpleTag.js +0 -1
- package/dist/esm/ui-mt/Slot.js +0 -1
- package/dist/esm/ui-mt/Tree.d.ts +0 -14
- package/dist/esm/ui-mt/Tree.js +0 -1
- package/dist/esm/ui-mt/WithLinkIf.d.ts +0 -4
- package/dist/esm/ui-mt/WithLinkIf.js +0 -1
- package/dist/esm/ui-mt/headline.d.ts +0 -8
- package/dist/esm/ui-mt/headline.js +0 -1
- package/dist/esm/ui-mt/input-field/InputField.d.ts +0 -4
- package/dist/esm/ui-mt/input-field/InputField.js +0 -1
- package/dist/esm/ui-mt/input-field/RichEditorInput.d.ts +0 -6
- package/dist/esm/ui-mt/input-field/RichEditorInput.js +0 -1
- package/dist/esm/ui-mt/input-field/SingleUploadForm.d.ts +0 -3
- package/dist/esm/ui-mt/input-field/SingleUploadForm.js +0 -1
- package/dist/esm/ui-mt/input-field/TextArea.d.ts +0 -4
- package/dist/esm/ui-mt/input-field/TextArea.js +0 -1
- package/dist/esm/ui-mt/input-field/TextFileInput.d.ts +0 -8
- package/dist/esm/ui-mt/input-field/TextFileInput.js +0 -1
- package/dist/esm/ui-mt/input-field/select/InputSelect.d.ts +0 -8
- package/dist/esm/ui-mt/input-field/select/InputSelect.js +0 -1
- package/dist/esm/ui-mt/inputs/SearchInput.d.ts +0 -3
- package/dist/esm/ui-mt/inputs/SearchInput.js +0 -1
- package/dist/esm/ui-mt/inputs/TaskStatusInput.d.ts +0 -3
- package/dist/esm/ui-mt/inputs/TaskStatusInput.js +0 -1
- package/dist/esm/ui-mt/inputs/UrlsInput.d.ts +0 -3
- package/dist/esm/ui-mt/inputs/UrlsInput.js +0 -1
- package/dist/esm/ui-mt/inputs/input.d.ts +0 -2
- package/dist/esm/ui-mt/inputs/input.js +0 -1
- package/dist/esm/ui-mt/modal/MtModal.d.ts +0 -30
- package/dist/esm/ui-mt/modal/MtModal.js +0 -1
- package/dist/esm/ui-mt/mt-tree-view/MtTreeViewExample.js +0 -1
- package/dist/esm/ui-mt/mt-tree-view/mt-tree-view-api.d.ts +0 -38
- package/dist/esm/ui-mt/mt-tree-view/mt-tree-view-api.js +0 -1
- package/dist/esm/ui-mt/mt-tree-view/mt-treeview.d.ts +0 -24
- package/dist/esm/ui-mt/mt-tree-view/mt-treeview.js +0 -1
- package/dist/esm/ui-mt/pagination.d.ts +0 -8
- package/dist/esm/ui-mt/pagination.js +0 -1
- package/dist/esm/ui-mt/skeleton/NewLoading.d.ts +0 -2
- package/dist/esm/ui-mt/skeleton/NewLoading.js +0 -1
- package/dist/esm/ui-mt/skeleton/SkeletonDashboardShell.d.ts +0 -0
- package/dist/esm/ui-mt/skeleton/SkeletonDashboardShell.js +0 -1
- package/dist/esm/ui-mt/skeleton/SkeletonInput.d.ts +0 -2
- package/dist/esm/ui-mt/skeleton/SkeletonInput.js +0 -1
- package/dist/esm/ui-mt/skeleton/SkeletonLayout.d.ts +0 -2
- package/dist/esm/ui-mt/skeleton/SkeletonLayout.js +0 -1
- package/dist/esm/ui-mt/skeleton/SkeletonLoading.d.ts +0 -3
- package/dist/esm/ui-mt/skeleton/SkeletonLoading.js +0 -1
- package/dist/esm/ui-mt/skeleton/skeleton-card.d.ts +0 -4
- package/dist/esm/ui-mt/skeleton/skeleton-card.js +0 -1
- package/dist/esm/ui-mt/skeleton/skeleton2.d.ts +0 -2
- package/dist/esm/ui-mt/skeleton/skeleton2.js +0 -1
- package/dist/esm/ui-mt/skeleton/skeletons.d.ts +0 -6
- package/dist/esm/ui-mt/skeleton/skeletons.js +0 -1
- package/dist/esm/ui-mt/skeleton.d.ts +0 -5
- package/dist/esm/ui-mt/skeleton.js +0 -1
- package/dist/esm/ui-mt/types.d.ts +0 -5
- package/dist/esm/ui-mt/types.js +0 -0
- package/dist/esm/ui-vamp/alert.d.ts +0 -17
- package/dist/esm/ui-vamp/alert.js +0 -1
- package/dist/esm/ui-vamp/button.d.ts +0 -13
- package/dist/esm/ui-vamp/button.js +0 -1
- package/dist/esm/ui-vamp/card.d.ts +0 -23
- package/dist/esm/ui-vamp/card.js +0 -1
- package/dist/esm/ui-vamp/chip.d.ts +0 -11
- package/dist/esm/ui-vamp/chip.js +0 -1
- package/dist/esm/ui-vamp/dropdown.d.ts +0 -12
- package/dist/esm/ui-vamp/dropdown.js +0 -1
- package/dist/esm/ui-vamp/external-link.d.ts +0 -7
- package/dist/esm/ui-vamp/external-link.js +0 -1
- package/dist/esm/ui-vamp/input.d.ts +0 -13
- package/dist/esm/ui-vamp/input.js +0 -1
- package/dist/esm/ui-vamp/keyvalue.d.ts +0 -7
- package/dist/esm/ui-vamp/keyvalue.js +0 -1
- package/dist/esm/ui-vamp/mobile-nav-button.d.ts +0 -2
- package/dist/esm/ui-vamp/mobile-nav-button.js +0 -1
- package/dist/esm/ui-vamp/modal.d.ts +0 -11
- package/dist/esm/ui-vamp/modal.js +0 -1
- package/dist/esm/ui-vamp/textarea.d.ts +0 -12
- package/dist/esm/ui-vamp/textarea.js +0 -1
- package/dist/esm/ui-vamp/toggle-group.d.ts +0 -8
- package/dist/esm/ui-vamp/toggle-group.js +0 -1
- package/dist/esm/video-player/mt-video-player.d.ts +0 -7
- package/dist/esm/video-player/mt-video-player.js +0 -1
- package/dist/esm/video-player/video-player2/modal-video-player.d.ts +0 -13
- package/dist/esm/video-player/video-player2/modal-video-player.js +0 -1
- package/dist/styles/globals.css +0 -219
- package/dist/styles/prosemirror.css +0 -171
- package/dist/tsconfig.type.tsbuildinfo +0 -1
- /package/dist/{esm/icons/Cross2Icon.d.ts → icons/Cross2Icon.jsx} +0 -0
- /package/dist/{esm/icons/DotsHorizontalIcon.d.ts → icons/DotsHorizontalIcon.jsx} +0 -0
- /package/dist/{esm/icons/MixerHorizontal.d.ts → icons/MixerHorizontal.jsx} +0 -0
- /package/dist/{esm/icons/index.d.ts → icons/index.jsx} +0 -0
- /package/dist/{esm/lib/service-worker/worker.d.ts → lib/111.test.js} +0 -0
- /package/dist/{esm/lib/zod/demo.z.d.ts → lib/trpc/types.js} +0 -0
- /package/dist/{esm/service-worker/sw.d.ts → types/common.js} +0 -0
- /package/dist/{esm/ui-mt/Slot.d.ts → ui-mt/Slot.jsx} +0 -0
- /package/dist/{esm/ui-mt/mt-tree-view/MtTreeViewExample.d.ts → ui-mt/types.jsx} +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useCallback, useContext, useMemo } from "react";
|
|
3
|
+
import { createStore, useStore } from "zustand";
|
|
4
|
+
import { immer } from "zustand/middleware/immer";
|
|
5
|
+
import { MtButton } from "../ui-mt/Button";
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../ui/dialog";
|
|
7
|
+
export const createFormSlice = (set, get) => ({
|
|
8
|
+
setOpen: (open) => set({ open }),
|
|
9
|
+
setConfirmCallback: (confirmCallback) => set({ confirmCallback }),
|
|
10
|
+
});
|
|
11
|
+
const createDeleteConformStore = (initProps) => {
|
|
12
|
+
return createStore()(immer((...a) => ({
|
|
13
|
+
...createFormSlice(...a),
|
|
14
|
+
...initProps,
|
|
15
|
+
})));
|
|
16
|
+
};
|
|
17
|
+
const formContext = createContext(null);
|
|
18
|
+
export const DeleteConfirmProvider = (props) => {
|
|
19
|
+
const { children, ...etc } = props;
|
|
20
|
+
const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
|
|
21
|
+
return (<formContext.Provider value={mystore}>
|
|
22
|
+
{children}
|
|
23
|
+
<DeleteConfirmDlg />
|
|
24
|
+
</formContext.Provider>);
|
|
25
|
+
};
|
|
26
|
+
function useDeleteConfirmStore(selector) {
|
|
27
|
+
const store = useContext(formContext);
|
|
28
|
+
if (!store)
|
|
29
|
+
throw new Error("useDeleteConfirm Missing MtxFormProvider");
|
|
30
|
+
return useStore(store, selector);
|
|
31
|
+
}
|
|
32
|
+
export const useDeleteConfirm = () => {
|
|
33
|
+
const setOpen = useDeleteConfirmStore((x) => x.setOpen);
|
|
34
|
+
const setConfirmCallback = useDeleteConfirmStore((x) => x.setConfirmCallback);
|
|
35
|
+
const show = useCallback((props) => {
|
|
36
|
+
setConfirmCallback(props.callback);
|
|
37
|
+
setOpen(true);
|
|
38
|
+
}, [setConfirmCallback, setOpen]);
|
|
39
|
+
return {
|
|
40
|
+
show,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export const DeleteConfirmDlg = () => {
|
|
44
|
+
const open = useDeleteConfirmStore((x) => x.open);
|
|
45
|
+
const setOpen = useDeleteConfirmStore((x) => x.setOpen);
|
|
46
|
+
const confirmCallback = useDeleteConfirmStore((x) => x.confirmCallback);
|
|
47
|
+
return (<Dialog open={open} onOpenChange={setOpen}>
|
|
48
|
+
<DialogContent>
|
|
49
|
+
<DialogTitle>delete confirm</DialogTitle>
|
|
50
|
+
<DialogDescription>will delete item, continue?</DialogDescription>
|
|
51
|
+
<MtButton variant={"destructive"} onClick={async () => {
|
|
52
|
+
setOpen(false);
|
|
53
|
+
confirmCallback && confirmCallback();
|
|
54
|
+
}}>
|
|
55
|
+
Continue
|
|
56
|
+
</MtButton>
|
|
57
|
+
<MtButton variant={"outline"} onClick={() => {
|
|
58
|
+
setOpen(false);
|
|
59
|
+
confirmCallback && confirmCallback();
|
|
60
|
+
}}>
|
|
61
|
+
Cancel
|
|
62
|
+
</MtButton>
|
|
63
|
+
</DialogContent>
|
|
64
|
+
</Dialog>);
|
|
65
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useContext, useMemo } from "react";
|
|
3
|
+
import { createStore, useStore } from "zustand";
|
|
4
|
+
export const createFormSlice = (set, get) => ({
|
|
5
|
+
setQ: (q) => set({ q }),
|
|
6
|
+
});
|
|
7
|
+
const createDeleteConformStore = (initProps) => {
|
|
8
|
+
return createStore()((...a) => ({
|
|
9
|
+
...createFormSlice(...a),
|
|
10
|
+
...initProps,
|
|
11
|
+
}));
|
|
12
|
+
};
|
|
13
|
+
const formContext = createContext(null);
|
|
14
|
+
export const GlobalSearchProvider = (props) => {
|
|
15
|
+
const { children, ...etc } = props;
|
|
16
|
+
const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
|
|
17
|
+
return (<formContext.Provider value={mystore}>
|
|
18
|
+
{children}
|
|
19
|
+
|
|
20
|
+
</formContext.Provider>);
|
|
21
|
+
};
|
|
22
|
+
export function useGlobalSearch(selector) {
|
|
23
|
+
const store = useContext(formContext);
|
|
24
|
+
if (!store)
|
|
25
|
+
throw new Error("useGlobalSearch Missing GlobalSearchProvider");
|
|
26
|
+
return useStore(store, selector);
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isCloudflarePage } from 'mtxlib/utils';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
const normalizeSrc = (src) => {
|
|
4
|
+
return src.startsWith('/') ? src.slice(1) : src;
|
|
5
|
+
};
|
|
6
|
+
const cloudflareLoader = ({ src, width, quality }) => {
|
|
7
|
+
const params = [`width=${width}`];
|
|
8
|
+
if (quality) {
|
|
9
|
+
params.push(`quality=${quality}`);
|
|
10
|
+
}
|
|
11
|
+
const paramsString = params.join(',');
|
|
12
|
+
return `https://cfgomtm.yuepa8.com/cdn-cgi/image/${paramsString}/${normalizeSrc(src)}`;
|
|
13
|
+
};
|
|
14
|
+
const exampleImageLoader = ({ src, width, quality }) => {
|
|
15
|
+
return `https://example.com/${src}?w=${width}&q=${quality || 75}`;
|
|
16
|
+
};
|
|
17
|
+
function getImageLoader() {
|
|
18
|
+
if (isCloudflarePage()) {
|
|
19
|
+
return cloudflareLoader;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
exampleImageLoader;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export const MtImage = (props) => {
|
|
26
|
+
return <Image {...props} loader={getImageLoader()}/>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useRouter } from "next/navigation";
|
|
3
|
+
import { Button } from "../ui/button";
|
|
4
|
+
export const NotFoundGoBack = () => {
|
|
5
|
+
const router = useRouter();
|
|
6
|
+
return (<div className="container flex flex-col">
|
|
7
|
+
<div className="mx-auto p-8">
|
|
8
|
+
not found
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<Button className="mx-auto p-8" onClick={() => {
|
|
12
|
+
router.back();
|
|
13
|
+
}}>Go back</Button>
|
|
14
|
+
</div>);
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const DashMenuTreeItemRouteType = ["default", "list", "detail"];
|
|
3
|
+
const slntTreeNodeBaseSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
pid: z.string().optional(),
|
|
6
|
+
label: z.string().optional(),
|
|
7
|
+
icon: z.string().optional(),
|
|
8
|
+
routeName: z.string().optional(),
|
|
9
|
+
routeType: z.enum(DashMenuTreeItemRouteType).optional(),
|
|
10
|
+
});
|
|
11
|
+
export const treeNodeSchema = slntTreeNodeBaseSchema.extend({
|
|
12
|
+
children: z.lazy(() => treeNodeSchema.array()).optional(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { urlJoinPaths } from "mtxlib/http/url";
|
|
3
|
+
import { usePathname, useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
import { MtLink } from "../mtlink";
|
|
6
|
+
import { useMenuTreeStore } from "./SlntTreeNode";
|
|
7
|
+
export const SlntChildrenTabs = () => {
|
|
8
|
+
const parentData = useMenuTreeStore((x) => x.menuNode);
|
|
9
|
+
const pathName = usePathname();
|
|
10
|
+
const segments = useSelectedLayoutSegments();
|
|
11
|
+
const segment = useSelectedLayoutSegment();
|
|
12
|
+
const basePath = pathName.slice(0, -segments.join("/").length);
|
|
13
|
+
const basePath3 = "/" + segments.join("/");
|
|
14
|
+
return (<div className="flex gap-1 ">
|
|
15
|
+
|
|
16
|
+
{parentData?.children?.map((item, i) => {
|
|
17
|
+
let href = `${urlJoinPaths(basePath, item.routeName || "")}`;
|
|
18
|
+
if (!segments?.length) {
|
|
19
|
+
href = urlJoinPaths(pathName, item.routeName || "");
|
|
20
|
+
}
|
|
21
|
+
return (<TabItem key={i} activate={segment == item.routeName}>
|
|
22
|
+
<MtLink key={i} variant={"ghost"} href={href}>
|
|
23
|
+
{item.label}
|
|
24
|
+
</MtLink>
|
|
25
|
+
|
|
26
|
+
</TabItem>);
|
|
27
|
+
})}
|
|
28
|
+
</div>);
|
|
29
|
+
};
|
|
30
|
+
const TabItem = (props) => {
|
|
31
|
+
const { activate, ...etc } = props;
|
|
32
|
+
return (<div data-state={activate && "active"} className={cn("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow")} {...etc}/>);
|
|
33
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
|
|
3
|
+
import { createContext, useContext, useMemo } from "react";
|
|
4
|
+
import { useStore } from "zustand";
|
|
5
|
+
import { immer } from "zustand/middleware/immer";
|
|
6
|
+
import { useShallow } from "zustand/react/shallow";
|
|
7
|
+
import { createStore } from "zustand/vanilla";
|
|
8
|
+
const createModalStore = (initProps) => {
|
|
9
|
+
return createStore()(immer((set, get) => ({
|
|
10
|
+
...initProps,
|
|
11
|
+
})));
|
|
12
|
+
};
|
|
13
|
+
export const slntContext = createContext(null);
|
|
14
|
+
export const MenuTreeProvider = (props) => {
|
|
15
|
+
const { children, ...etc } = props;
|
|
16
|
+
const mystore = useMemo(() => createModalStore(etc), [etc]);
|
|
17
|
+
return (<slntContext.Provider value={mystore}>{children}</slntContext.Provider>);
|
|
18
|
+
};
|
|
19
|
+
export const DEFAULT_USE_SHALLOW = true;
|
|
20
|
+
export function useMenuTreeStore(selector) {
|
|
21
|
+
const store = useContext(slntContext);
|
|
22
|
+
if (!store)
|
|
23
|
+
return null;
|
|
24
|
+
if (selector) {
|
|
25
|
+
return useStore(store, DEFAULT_USE_SHALLOW ? useShallow(selector) : selector);
|
|
26
|
+
}
|
|
27
|
+
return useStore(store);
|
|
28
|
+
}
|
|
29
|
+
export const SlntTreeNode = (props) => {
|
|
30
|
+
const { children, treeData } = props;
|
|
31
|
+
const parentData = useMenuTreeStore((x) => x?.menuNode);
|
|
32
|
+
const segment = useSelectedLayoutSegment();
|
|
33
|
+
const segments = useSelectedLayoutSegments();
|
|
34
|
+
const parent = parentData || treeData;
|
|
35
|
+
if (!parent) {
|
|
36
|
+
throw new Error("must within parentNodes or rootNodes ");
|
|
37
|
+
}
|
|
38
|
+
const currNode = useMemo(() => {
|
|
39
|
+
const fined = parent.children?.find((x) => x.routeName == segment);
|
|
40
|
+
console.log({ message: `(SlntTreeNode)${segment}`, fined, parent });
|
|
41
|
+
return fined;
|
|
42
|
+
}, [parent, segment]);
|
|
43
|
+
return (<MenuTreeProvider menuNode={currNode}>
|
|
44
|
+
|
|
45
|
+
{children}
|
|
46
|
+
</MenuTreeProvider>);
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { MtButton } from "../../ui-mt/Button";
|
|
3
|
+
import { Dialog, DialogContent, DialogTrigger } from "../../ui/dialog";
|
|
4
|
+
export const DebugValue = (props) => {
|
|
5
|
+
const { title, data, className } = props;
|
|
6
|
+
return (<Dialog>
|
|
7
|
+
<DialogTrigger asChild>
|
|
8
|
+
<MtButton variant={"outline"} className={className}>
|
|
9
|
+
{title || "debug"}
|
|
10
|
+
</MtButton>
|
|
11
|
+
</DialogTrigger>
|
|
12
|
+
<DialogContent className="max-h-lvh w-full overflow-scroll bg-red-100">
|
|
13
|
+
<pre className=" text-xs">{JSON.stringify(data, null, 2)}</pre>
|
|
14
|
+
</DialogContent>
|
|
15
|
+
</Dialog>);
|
|
16
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import dynamic from "next/dynamic";
|
|
3
|
+
import { useHotkeys } from "react-hotkeys-hook";
|
|
4
|
+
import { useMtapp } from "../../mtapp/MtAppProvider";
|
|
5
|
+
import { TailwindIndicator } from "../tailwind-indicator";
|
|
6
|
+
const ReactQueryDevtoolsProduction = dynamic(() => import("@tanstack/react-query-devtools/build/modern/production.js").then((d) => ({
|
|
7
|
+
default: d.ReactQueryDevtools,
|
|
8
|
+
})), {
|
|
9
|
+
ssr: false,
|
|
10
|
+
});
|
|
11
|
+
export const HOTKEY_Debug = "alt+.";
|
|
12
|
+
export const DevTools = () => {
|
|
13
|
+
const debug = useMtapp((x) => x.debug);
|
|
14
|
+
const setDebug = useMtapp((x) => x.setDebug);
|
|
15
|
+
useHotkeys(HOTKEY_Debug, () => {
|
|
16
|
+
console.log("debug2:%o", !debug);
|
|
17
|
+
setDebug(!debug);
|
|
18
|
+
}, [debug, setDebug]);
|
|
19
|
+
if (!debug) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return (<>
|
|
23
|
+
<ReactQueryDevtoolsProduction buttonPosition="bottom-right"/>
|
|
24
|
+
<TailwindIndicator />
|
|
25
|
+
</>);
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
import { buttonVariants } from "../ui/button";
|
|
7
|
+
export const MtLink = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
8
|
+
const Comp = asChild ? Slot : Link;
|
|
9
|
+
return (<Comp className={cn(((variant) && buttonVariants({ variant: variant, className })))} ref={ref} {...props}/>);
|
|
10
|
+
});
|
|
11
|
+
MtLink.displayName = "MtLink";
|
|
12
|
+
export function MtExternalLink({ children, className, ...props }) {
|
|
13
|
+
return (<a className={cn(className, "hover:text-brandtext-500 hover:underline hover:brightness-150")} rel="noopener noreferrer" {...props}>
|
|
14
|
+
{children}
|
|
15
|
+
</a>);
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import ReactDocumentPictureInPicture from "mtxuilib/common/pip/ReactDocumentPictureInPicture";
|
|
3
|
+
import { MtButton } from "mtxuilib/ui-mt/Button";
|
|
4
|
+
import { useRef, useState } from "react";
|
|
5
|
+
export default function PipExamplePage() {
|
|
6
|
+
const pipWindowRef = useRef(null);
|
|
7
|
+
return (<>
|
|
8
|
+
<ReactDocumentPictureInPicture ref={pipWindowRef} width="50%" height="100%" buttonRenderer={({ open, close, toggle, isOpen }) => (<div className="flex gap-2">
|
|
9
|
+
<b>Is {isOpen ? "Open" : "Closed"} </b>
|
|
10
|
+
<MtButton onClick={open}>Open</MtButton>
|
|
11
|
+
<MtButton onClick={close}>Close</MtButton>
|
|
12
|
+
<MtButton onClick={toggle}>Toggle</MtButton>
|
|
13
|
+
</div>)}>
|
|
14
|
+
<Comp pipWindowRef={pipWindowRef}/>
|
|
15
|
+
</ReactDocumentPictureInPicture>
|
|
16
|
+
</>);
|
|
17
|
+
}
|
|
18
|
+
const Comp = (props) => {
|
|
19
|
+
const { pipWindowRef } = props;
|
|
20
|
+
const [text, setText] = useState("tet1");
|
|
21
|
+
return (<div className="prose">
|
|
22
|
+
<h1>画中画显示(范例)</h1>
|
|
23
|
+
<div>
|
|
24
|
+
<button onClick={() => {
|
|
25
|
+
console.log("关闭");
|
|
26
|
+
setText("ssssssssssssssss");
|
|
27
|
+
}}>
|
|
28
|
+
sssss
|
|
29
|
+
</button>
|
|
30
|
+
<MtButton onClick={() => {
|
|
31
|
+
console.log("关闭");
|
|
32
|
+
setText("ssssssssssssssss");
|
|
33
|
+
}}>
|
|
34
|
+
关闭333 {text}
|
|
35
|
+
</MtButton>
|
|
36
|
+
</div>
|
|
37
|
+
<i>
|
|
38
|
+
This text should be displayed in a Document Picture in Picture filling the maximum allow height and 50% of the
|
|
39
|
+
width of the original window
|
|
40
|
+
</i>
|
|
41
|
+
</div>);
|
|
42
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
3
|
+
export var FeatureUnavailableReasonEnum;
|
|
4
|
+
(function (FeatureUnavailableReasonEnum) {
|
|
5
|
+
FeatureUnavailableReasonEnum["USING_UNSECURE_PROTOCOL"] = "USING_UNSECURE_PROTOCOL";
|
|
6
|
+
FeatureUnavailableReasonEnum["API_NOT_SUPPORTED"] = "API_NOT_SUPPORTED";
|
|
7
|
+
})(FeatureUnavailableReasonEnum || (FeatureUnavailableReasonEnum = {}));
|
|
8
|
+
;
|
|
9
|
+
const ReactDocumentPictureInPicture = forwardRef((props, ref) => {
|
|
10
|
+
const contentRef = useRef();
|
|
11
|
+
const pipWindow = useRef();
|
|
12
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
13
|
+
const absoluteDimensions = useMemo(() => {
|
|
14
|
+
if (typeof window != "undefined") {
|
|
15
|
+
let absoluteWidth = 500;
|
|
16
|
+
let absoluteHeight = 400;
|
|
17
|
+
if (typeof props.width === "number")
|
|
18
|
+
absoluteWidth = props.width;
|
|
19
|
+
else if (typeof props.width === "string") {
|
|
20
|
+
if (props.width.endsWith('px'))
|
|
21
|
+
absoluteWidth = parseInt(props.width);
|
|
22
|
+
else if (props.width.endsWith('%'))
|
|
23
|
+
absoluteWidth = window?.innerWidth * (parseInt(props.width) / 100);
|
|
24
|
+
}
|
|
25
|
+
if (typeof props.height === "number")
|
|
26
|
+
absoluteHeight = props.height;
|
|
27
|
+
else if (typeof props.height === "string") {
|
|
28
|
+
if (props.height.endsWith('px'))
|
|
29
|
+
absoluteHeight = parseInt(props.height);
|
|
30
|
+
else if (props.height.endsWith('%'))
|
|
31
|
+
absoluteHeight = window?.innerHeight * (parseInt(props.height) / 100);
|
|
32
|
+
}
|
|
33
|
+
return { width: absoluteWidth, height: absoluteHeight };
|
|
34
|
+
}
|
|
35
|
+
}, [props.width, props.height]);
|
|
36
|
+
const close = useCallback(() => {
|
|
37
|
+
if (pipWindow.current == null)
|
|
38
|
+
return;
|
|
39
|
+
pipWindow.current?.close();
|
|
40
|
+
setIsOpen(false);
|
|
41
|
+
if (props.onClose)
|
|
42
|
+
props.onClose();
|
|
43
|
+
}, [contentRef, pipWindow, setIsOpen]);
|
|
44
|
+
const open = useCallback(async () => {
|
|
45
|
+
if (contentRef.current == null)
|
|
46
|
+
return;
|
|
47
|
+
if (typeof window != "undefined") {
|
|
48
|
+
const contentElement = contentRef.current;
|
|
49
|
+
pipWindow.current = await window?.documentPictureInPicture.requestWindow({ ...absoluteDimensions });
|
|
50
|
+
if (props.shareStyles === true) {
|
|
51
|
+
[...document.styleSheets].forEach((styleSheet) => {
|
|
52
|
+
try {
|
|
53
|
+
const cssRules = [...styleSheet.cssRules].map((rule) => rule.cssText).join('');
|
|
54
|
+
const style = document.createElement('style');
|
|
55
|
+
style.textContent = cssRules;
|
|
56
|
+
pipWindow?.current.document.head.appendChild(style);
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
const link = document.createElement('link');
|
|
60
|
+
link.rel = 'stylesheet';
|
|
61
|
+
link.type = styleSheet.type;
|
|
62
|
+
if (styleSheet.media.length > 0) {
|
|
63
|
+
link.media = styleSheet.media.mediaText;
|
|
64
|
+
}
|
|
65
|
+
link.href = styleSheet.href || "";
|
|
66
|
+
pipWindow.current?.document.head.appendChild(link);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
pipWindow.current.document.body.append(contentElement);
|
|
71
|
+
pipWindow.current.addEventListener('pagehide', () => close());
|
|
72
|
+
pipWindow.current.addEventListener('resize', (event) => {
|
|
73
|
+
if (props.onResize)
|
|
74
|
+
props.onResize(event.target.innerWidth, event.target.innerHeight);
|
|
75
|
+
});
|
|
76
|
+
setIsOpen(true);
|
|
77
|
+
if (props.onOpen)
|
|
78
|
+
props.onOpen();
|
|
79
|
+
}
|
|
80
|
+
}, [contentRef, pipWindow, setIsOpen, close, absoluteDimensions, props.shareStyles]);
|
|
81
|
+
const toggle = useCallback(() => isOpen ? close() : open(), [isOpen]);
|
|
82
|
+
useImperativeHandle(ref, () => ({
|
|
83
|
+
window: () => pipWindow.current,
|
|
84
|
+
isOpen,
|
|
85
|
+
close,
|
|
86
|
+
}), [
|
|
87
|
+
pipWindow,
|
|
88
|
+
isOpen,
|
|
89
|
+
close,
|
|
90
|
+
]);
|
|
91
|
+
const featureUnavailableReason = (() => {
|
|
92
|
+
if (typeof window != "undefined") {
|
|
93
|
+
const isUsingSecureProtocol = window?.location.protocol === 'https:';
|
|
94
|
+
if (isUsingSecureProtocol === false)
|
|
95
|
+
return FeatureUnavailableReasonEnum.USING_UNSECURE_PROTOCOL;
|
|
96
|
+
const featureIsAvailable = 'documentPictureInPicture' in window;
|
|
97
|
+
if (featureIsAvailable === false)
|
|
98
|
+
return FeatureUnavailableReasonEnum.API_NOT_SUPPORTED;
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
})();
|
|
102
|
+
if (featureUnavailableReason != null && props.featureUnavailableRenderer == null)
|
|
103
|
+
return;
|
|
104
|
+
if (featureUnavailableReason != null) {
|
|
105
|
+
const featureUnavailableRenderer = typeof props.featureUnavailableRenderer === "function" ? props.featureUnavailableRenderer(featureUnavailableReason) : props.featureUnavailableRenderer;
|
|
106
|
+
return featureUnavailableRenderer;
|
|
107
|
+
}
|
|
108
|
+
const buttonRenderer = typeof props.buttonRenderer === "function" ? props.buttonRenderer({ open, close, toggle, isOpen }) : props.buttonRenderer;
|
|
109
|
+
return (<div>
|
|
110
|
+
{buttonRenderer}
|
|
111
|
+
|
|
112
|
+
<div ref={contentRef} style={{
|
|
113
|
+
display: isOpen ? 'block' : 'none',
|
|
114
|
+
width: '100%',
|
|
115
|
+
height: '100%',
|
|
116
|
+
}}>
|
|
117
|
+
{props.children}
|
|
118
|
+
</div>
|
|
119
|
+
</div>);
|
|
120
|
+
});
|
|
121
|
+
ReactDocumentPictureInPicture.displayName = "ReactDocumentPictureInPicture";
|
|
122
|
+
export default ReactDocumentPictureInPicture;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
2
|
+
import { materialOceanic } from 'react-syntax-highlighter/dist/cjs/styles/prism';
|
|
3
|
+
export const CodeBlock = ({ ...props }) => {
|
|
4
|
+
return (<SyntaxHighlighter language={props.className?.replace(/(?:lang(?:uage)?-)/, '')} style={materialOceanic} wrapLines={true} className='not-prose rounded-md'>
|
|
5
|
+
{props.children}
|
|
6
|
+
</SyntaxHighlighter>);
|
|
7
|
+
};
|
|
8
|
+
export const Pre = ({ ...props }) => {
|
|
9
|
+
return (<div className='not-prose'>
|
|
10
|
+
{props.children}
|
|
11
|
+
</div>);
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Button } from "../../ui/button";
|
|
2
|
+
const MarkdownToolbar = ({ feedElement }) => {
|
|
3
|
+
const btns = [
|
|
4
|
+
{ name: 'B', syntax: '**Bold**' },
|
|
5
|
+
{ name: 'I', syntax: '*Italic*' },
|
|
6
|
+
{ name: 'S', syntax: '~Strikethrough~' },
|
|
7
|
+
{ name: 'H1', syntax: '# ' },
|
|
8
|
+
];
|
|
9
|
+
return (<header className=" flex gap-1 bg-[#253237]">
|
|
10
|
+
{btns.map(btn => (<Button key={btn.syntax} className="flex rounded-md" onClick={() => feedElement(btn.syntax)}>
|
|
11
|
+
{btn.name}
|
|
12
|
+
</Button>))}
|
|
13
|
+
</header>);
|
|
14
|
+
};
|
|
15
|
+
export default MarkdownToolbar;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import Markdown from 'react-markdown';
|
|
3
|
+
import rehypeExternalLinks from 'rehype-external-links';
|
|
4
|
+
import rehypeSanitize from 'rehype-sanitize';
|
|
5
|
+
import remarkGfm from 'remark-gfm';
|
|
6
|
+
import { CodeBlock, Pre } from "./Code";
|
|
7
|
+
export const ReactMarkdownExample = () => {
|
|
8
|
+
const options = {
|
|
9
|
+
code: CodeBlock,
|
|
10
|
+
pre: Pre,
|
|
11
|
+
};
|
|
12
|
+
return (<div className='bg-slate-500'>
|
|
13
|
+
|
|
14
|
+
<div className='flex h-screen justify-between'>
|
|
15
|
+
<article className='w-full pl-6 pt-5'>
|
|
16
|
+
<Markdown className='prose prose-invert min-w-full' remarkPlugins={[remarkGfm]} rehypePlugins={[
|
|
17
|
+
rehypeSanitize,
|
|
18
|
+
[rehypeExternalLinks,
|
|
19
|
+
{ content: { type: 'text', value: '🔗' } }
|
|
20
|
+
],
|
|
21
|
+
]} components={options}>
|
|
22
|
+
|
|
23
|
+
</Markdown>
|
|
24
|
+
</article>
|
|
25
|
+
</div>
|
|
26
|
+
</div>);
|
|
27
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "mtxuilib/ui/form";
|
|
3
|
+
import { Input } from "mtxuilib/ui/input";
|
|
4
|
+
import { useFormContext } from "react-hook-form";
|
|
5
|
+
export const SchemaFormFieldsRender = (props) => {
|
|
6
|
+
const { schema } = props;
|
|
7
|
+
const form = useFormContext();
|
|
8
|
+
return (<>
|
|
9
|
+
{schema.fields?.map((formField, i) => {
|
|
10
|
+
return (<FormField key={i} control={form.control} name={formField.name} defaultValue={formField.defaultValue || ""} render={({ field }) => (<FormItem>
|
|
11
|
+
{formField.label && <FormLabel>{formField.label}</FormLabel>}
|
|
12
|
+
<FormControl>
|
|
13
|
+
<>
|
|
14
|
+
<Input placeholder={formField.placeholder} {...field}/>
|
|
15
|
+
</>
|
|
16
|
+
</FormControl>
|
|
17
|
+
{formField.description && <FormDescription>{formField.description}</FormDescription>}
|
|
18
|
+
<FormMessage />
|
|
19
|
+
</FormItem>)}/>);
|
|
20
|
+
})}
|
|
21
|
+
</>);
|
|
22
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { FormProvider, useForm } from "react-hook-form";
|
|
4
|
+
import { EditFormToolbar } from "mtxuilib/form/EditFormToolbar";
|
|
5
|
+
import { Card, CardContent } from "mtxuilib/ui/card";
|
|
6
|
+
import { DialogFooter } from "mtxuilib/ui/dialog";
|
|
7
|
+
import { SchemaFormFieldsRender } from "./SchemaFormFieldsRender";
|
|
8
|
+
export const SchemaFormView = (props) => {
|
|
9
|
+
const { formSchema, onSubmit, onCancel, variants } = props;
|
|
10
|
+
const [defaultValues, setDefaultValues] = useState({});
|
|
11
|
+
const form = useForm({
|
|
12
|
+
defaultValues: defaultValues,
|
|
13
|
+
});
|
|
14
|
+
if (!formSchema) {
|
|
15
|
+
return <div className="border p-8">missing formSchema params</div>;
|
|
16
|
+
}
|
|
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
|
+
</>);
|
|
31
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const schemaFieldValueType = z.enum(["string", "number", "date", "email"]);
|
|
3
|
+
export const schemaField = z.object({
|
|
4
|
+
name: z.string(),
|
|
5
|
+
label: z.string().optional(),
|
|
6
|
+
type: z.string().optional(),
|
|
7
|
+
valueType: schemaFieldValueType.optional(),
|
|
8
|
+
defaultValue: z.any().optional(),
|
|
9
|
+
placeholder: z.string().optional(),
|
|
10
|
+
description: z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
export const schemaFormSchema = z.object({
|
|
13
|
+
title: z.string().optional(),
|
|
14
|
+
description: z.string().optional(),
|
|
15
|
+
action: z.string().optional(),
|
|
16
|
+
fields: schemaField.array(),
|
|
17
|
+
loadingDetailDataProcedure: z.string().optional(),
|
|
18
|
+
loadingDetailDataParams: z.any().optional(),
|
|
19
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { flexRender } from "@tanstack/react-table";
|
|
3
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../../ui/table";
|
|
4
|
+
export function SimpleTable(props) {
|
|
5
|
+
const { table } = props;
|
|
6
|
+
return (<div className="rounded-md border">
|
|
7
|
+
<Table>
|
|
8
|
+
<TableHeader>
|
|
9
|
+
{table.getHeaderGroups().map((headerGroup) => (<TableRow key={headerGroup.id}>
|
|
10
|
+
{headerGroup.headers.map((header) => {
|
|
11
|
+
return (<TableHead key={header.id}>
|
|
12
|
+
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
|
|
13
|
+
</TableHead>);
|
|
14
|
+
})}
|
|
15
|
+
</TableRow>))}
|
|
16
|
+
</TableHeader>
|
|
17
|
+
<TableBody>
|
|
18
|
+
{table.getRowModel().rows?.length ? (table.getRowModel().rows.map((row) => (<TableRow key={row.id} data-state={row.getIsSelected() && "selected"}>
|
|
19
|
+
{row.getVisibleCells().map((cell) => (<TableCell key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TableCell>))}
|
|
20
|
+
</TableRow>))) : (<TableRow>
|
|
21
|
+
|
|
22
|
+
</TableRow>)}
|
|
23
|
+
</TableBody>
|
|
24
|
+
</Table>
|
|
25
|
+
</div>);
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { ChevronRight } from 'lucide-react';
|
|
3
|
+
import { cn } from "../../../lib/utils";
|
|
4
|
+
export const ExpenderCell = (info) => {
|
|
5
|
+
return info.row.getCanExpand() ? (<button className="pointer" {...{
|
|
6
|
+
onClick: info.row.getToggleExpandedHandler(),
|
|
7
|
+
}}>
|
|
8
|
+
<ChevronRight className={cn(info.row.getIsExpanded() && "rotate-90")}></ChevronRight>
|
|
9
|
+
</button>) : ('🔵');
|
|
10
|
+
};
|