mtxuilib 0.1.183 → 0.1.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/DebugFormState.d.ts +4 -0
- package/dist/common/DebugFormState.js +11 -0
- package/dist/common/DeleteComfirm.d.ts +22 -0
- package/dist/common/DeleteComfirm.js +52 -0
- package/dist/common/FullCenter.d.ts +2 -0
- package/dist/common/FullCenter.js +6 -0
- package/dist/common/GlobalSearch.d.ts +11 -0
- package/dist/common/GlobalSearch.js +25 -0
- package/dist/common/HtmlChangesObserver.d.ts +1 -0
- package/dist/common/HtmlChangesObserver.js +53 -0
- package/dist/common/MtImage.d.ts +5 -0
- package/dist/common/MtImage.js +28 -0
- package/dist/common/MtProgressBar.d.ts +1 -0
- package/dist/common/MtProgressBar.js +6 -0
- package/dist/common/NotFoundGoBack.d.ts +1 -0
- package/dist/common/NotFoundGoBack.js +10 -0
- package/dist/common/SlntTree/Slnt.z.d.ts +28 -0
- package/dist/common/SlntTree/Slnt.z.js +13 -0
- package/dist/common/SlntTree/SlntChildrenTabs.d.ts +1 -0
- package/dist/common/SlntTree/SlntChildrenTabs.js +26 -0
- package/dist/common/SlntTree/SlntTreeNode.d.ts +19 -0
- package/dist/common/SlntTree/SlntTreeNode.js +45 -0
- package/dist/common/TrpcQuery.d.ts +0 -0
- package/dist/common/TrpcQuery.js +1 -0
- package/dist/common/devtools/DebugValue.d.ts +5 -0
- package/dist/common/devtools/DebugValue.js +8 -0
- package/dist/common/devtools/DevTools.d.ts +2 -0
- package/dist/common/devtools/DevTools.js +24 -0
- package/dist/common/markdown.d.ts +3 -0
- package/dist/common/markdown.js +4 -0
- package/dist/common/mtlink.d.ts +14 -0
- package/dist/common/mtlink.js +15 -0
- package/dist/common/pip/PipExamplePage.d.ts +1 -0
- package/dist/common/pip/PipExamplePage.js +20 -0
- package/dist/common/pip/ReactDocumentPictureInPicture.d.ts +28 -0
- package/dist/common/pip/ReactDocumentPictureInPicture.js +117 -0
- package/dist/common/react-markdown/Code.d.ts +6 -0
- package/dist/common/react-markdown/Code.js +9 -0
- package/dist/common/react-markdown/MarkdownToolbar.d.ts +4 -0
- package/dist/common/react-markdown/MarkdownToolbar.js +12 -0
- package/dist/common/react-markdown/ReactMarkdownExample.d.ts +1 -0
- package/dist/common/react-markdown/ReactMarkdownExample.js +19 -0
- package/dist/common/schema-form/SchemaFormFieldsRender.d.ts +4 -0
- package/dist/common/schema-form/SchemaFormFieldsRender.js +12 -0
- package/dist/common/schema-form/SchemaFormView.d.ts +12 -0
- package/dist/common/schema-form/SchemaFormView.js +19 -0
- package/dist/common/schema-form/schema-form.z.d.ts +90 -0
- package/dist/common/schema-form/schema-form.z.js +19 -0
- package/dist/common/table/SimpleTable.d.ts +4 -0
- package/dist/common/table/SimpleTable.js +10 -0
- package/dist/common/table/cells/ExpenderCell.d.ts +2 -0
- package/dist/common/table/cells/ExpenderCell.js +7 -0
- package/dist/common/table/cells/SelectCell.d.ts +12 -0
- package/dist/common/table/cells/SelectCell.js +19 -0
- package/dist/common/table/cells/Text.d.ts +8 -0
- package/dist/common/table/cells/Text.js +13 -0
- package/dist/common/table/cells/ViewLink.d.ts +12 -0
- package/dist/common/table/cells/ViewLink.js +19 -0
- package/dist/common/table/cells/container/cellWrapper.d.ts +6 -0
- package/dist/common/table/cells/container/cellWrapper.js +5 -0
- package/dist/common/table/cells/number.d.ts +2 -0
- package/dist/common/table/cells/number.js +10 -0
- package/dist/common/table/cells/string.d.ts +2 -0
- package/dist/common/table/cells/string.js +15 -0
- package/dist/common/table/data-table-pagination.d.ts +6 -0
- package/dist/common/table/data-table-pagination.js +10 -0
- package/dist/common/table/data-table-view-options.d.ts +6 -0
- package/dist/common/table/data-table-view-options.js +13 -0
- package/dist/common/table/datatable-view-options.d.ts +12 -0
- package/dist/common/table/datatable-view-options.js +2 -0
- package/dist/common/table/example/ExampleTable.d.ts +1 -0
- package/dist/common/table/example/ExampleTable.js +84 -0
- package/dist/common/table/header/SimpleHeader.d.ts +4 -0
- package/dist/common/table/header/SimpleHeader.js +16 -0
- package/dist/common/table/header/header.d.ts +5 -0
- package/dist/common/table/header/header.js +16 -0
- package/dist/common/table/table.z.d.ts +189 -0
- package/dist/common/table/table.z.js +35 -0
- package/dist/common/tailwind-indicator.d.ts +1 -0
- package/dist/common/tailwind-indicator.js +7 -0
- package/dist/common/theme/mode-toggle.d.ts +1 -0
- package/dist/common/theme/mode-toggle.js +10 -0
- package/dist/common/theme/theme-toggle.d.ts +1 -0
- package/dist/common/theme/theme-toggle.js +9 -0
- package/dist/common/tiptap/MenuBar.d.ts +1 -0
- package/dist/common/tiptap/MenuBar.js +34 -0
- package/dist/common/tiptap/TiptapEditor.d.ts +5 -0
- package/dist/common/tiptap/TiptapEditor.js +46 -0
- package/dist/common/tiptap/examples/Demo-Default.d.ts +1 -0
- package/dist/common/tiptap/examples/Demo-Default.js +84 -0
- package/dist/common/tiptap/examples/Demo-Tiptap.d.ts +1 -0
- package/dist/common/tiptap/examples/Demo-Tiptap.js +13 -0
- package/dist/components/ChatMessageBubble.d.ts +6 -0
- package/dist/components/ChatMessageBubble.js +7 -0
- package/dist/components/IntermediateStep.d.ts +4 -0
- package/dist/components/IntermediateStep.js +9 -0
- package/dist/components/UploadDocumentsForm.d.ts +1 -0
- package/dist/components/UploadDocumentsForm.js +28 -0
- package/dist/components/auth/LoginDlg.d.ts +0 -0
- package/dist/components/auth/LoginDlg.js +1 -0
- package/dist/components/button-scroll-to-bottom.d.ts +7 -0
- package/dist/components/button-scroll-to-bottom.js +8 -0
- package/dist/components/chat-share-dialog.d.ts +9 -0
- package/dist/components/chat-share-dialog.js +33 -0
- package/dist/components/empty-screen.d.ts +1 -0
- package/dist/components/empty-screen.js +4 -0
- package/dist/components/external-link.d.ts +4 -0
- package/dist/components/external-link.js +4 -0
- package/dist/components/message.d.ts +16 -0
- package/dist/components/message.js +43 -0
- package/dist/components/spinner.d.ts +1 -0
- package/dist/components/spinner.js +3 -0
- package/dist/components/tool-ui/BlogHomePage.d.ts +5 -0
- package/dist/components/tool-ui/BlogHomePage.js +8 -0
- package/dist/components/tool-ui/BlogHomePage.z.d.ts +60 -0
- package/dist/components/tool-ui/BlogHomePage.z.js +20 -0
- package/dist/components/tool-ui/DemoCategoryGen.d.ts +3 -0
- package/dist/components/tool-ui/DemoCategoryGen.js +8 -0
- package/dist/components/tool-ui/OpenBrowser.d.ts +1 -0
- package/dist/components/tool-ui/OpenBrowser.js +25 -0
- package/dist/demos/bigcode/BigCode.d.ts +4 -0
- package/dist/demos/bigcode/BigCode.js +11 -0
- package/dist/demos/condition-type/serialize.d.ts +3 -0
- package/dist/demos/condition-type/serialize.js +31 -0
- package/dist/demos/lib.d.ts +3 -0
- package/dist/demos/lib.js +20 -0
- package/dist/demos/scrollarea/LongListDemo.d.ts +1 -0
- package/dist/demos/scrollarea/LongListDemo.js +7 -0
- package/dist/demos/scrollarea/ScrollAreaDemo.d.ts +1 -0
- package/dist/demos/scrollarea/ScrollAreaDemo.js +14 -0
- package/dist/demos/suspense-ssr/ExampleOg.d.ts +4 -0
- package/dist/demos/suspense-ssr/ExampleOg.js +7 -0
- package/dist/demos/suspense-ssr/ExamplePage.d.ts +3 -0
- package/dist/demos/suspense-ssr/ExamplePage.js +13 -0
- package/dist/demos/suspense-ssr/ExampleProviderProviders.d.ts +3 -0
- package/dist/demos/suspense-ssr/ExampleProviderProviders.js +9 -0
- package/dist/demos/suspense-ssr/ReadMe.d.ts +1 -0
- package/dist/demos/suspense-ssr/ReadMe.js +6 -0
- package/dist/demos/suspense-ssr/examplesPostDetail.d.ts +3 -0
- package/dist/demos/suspense-ssr/examplesPostDetail.js +20 -0
- package/dist/demos/suspense-ssr/examplesPosts.d.ts +1 -0
- package/dist/demos/suspense-ssr/examplesPosts.js +17 -0
- package/dist/form/EditFormToolbar.d.ts +13 -0
- package/dist/form/EditFormToolbar.js +51 -0
- package/dist/form/PopupFormV2.d.ts +46 -0
- package/dist/form/PopupFormV2.js +74 -0
- package/dist/form/SchemaFormFieldRender.d.ts +6 -0
- package/dist/form/SchemaFormFieldRender.js +28 -0
- package/dist/form/ZodForm.d.ts +13 -0
- package/dist/form/ZodForm.js +32 -0
- package/dist/form/deleteConform.d.ts +8 -0
- package/dist/form/deleteConform.js +38 -0
- package/dist/hooks/use-config.d.ts +5 -0
- package/dist/hooks/use-config.js +8 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +7 -0
- package/dist/hooks/use-copy-to-clipboard.js +20 -0
- package/dist/hooks/use-enter-submit.d.ts +5 -0
- package/dist/hooks/use-enter-submit.js +11 -0
- package/dist/hooks/use-local-storage.d.ts +1 -0
- package/dist/hooks/use-local-storage.js +15 -0
- package/dist/hooks/use-lock-body.d.ts +1 -0
- package/dist/hooks/use-lock-body.js +8 -0
- package/dist/hooks/use-media-query.d.ts +7 -0
- package/dist/hooks/use-media-query.js +33 -0
- package/dist/hooks/use-mutation-observer.d.ts +7 -0
- package/dist/hooks/use-mutation-observer.js +15 -0
- package/dist/hooks/use-router.d.ts +18 -0
- package/dist/hooks/use-router.js +51 -0
- package/dist/hooks/use-scroll-anchor.d.ts +8 -0
- package/dist/hooks/use-scroll-anchor.js +70 -0
- package/dist/hooks/use-streamable-text.d.ts +2 -0
- package/dist/hooks/use-streamable-text.js +19 -0
- package/dist/hooks/useIsIntersecting.d.ts +2 -0
- package/dist/hooks/useIsIntersecting.js +17 -0
- package/dist/hooks/useLayoutPath.d.ts +2 -0
- package/dist/hooks/useLayoutPath.js +21 -0
- package/dist/hooks/useMounted.d.ts +1 -0
- package/dist/hooks/useMounted.js +8 -0
- package/dist/hooks/useScript.d.ts +3 -0
- package/dist/hooks/useScript.js +66 -0
- package/dist/icons/Cross2Icon.d.ts +1 -0
- package/dist/icons/Cross2Icon.js +1 -0
- package/dist/icons/DotsHorizontalIcon.d.ts +1 -0
- package/dist/icons/DotsHorizontalIcon.js +1 -0
- package/dist/icons/MixerHorizontal.d.ts +1 -0
- package/dist/icons/MixerHorizontal.js +1 -0
- package/dist/icons/crazy-spinner.d.ts +2 -0
- package/dist/icons/crazy-spinner.js +5 -0
- package/dist/icons/font-default.d.ts +3 -0
- package/dist/icons/font-default.js +4 -0
- package/dist/icons/font-mono.d.ts +3 -0
- package/dist/icons/font-mono.js +4 -0
- package/dist/icons/font-serif.d.ts +3 -0
- package/dist/icons/font-serif.js +4 -0
- package/dist/icons/github.d.ts +3 -0
- package/dist/icons/github.js +4 -0
- package/dist/icons/icons-ai.d.ts +31 -0
- package/dist/icons/icons-ai.js +87 -0
- package/dist/icons/icons.d.ts +132 -0
- package/dist/icons/icons.js +147 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/loading-circle.d.ts +3 -0
- package/dist/icons/loading-circle.js +4 -0
- package/dist/icons/magic.d.ts +3 -0
- package/dist/icons/magic.js +4 -0
- package/dist/lib/clientlib.d.ts +5 -0
- package/dist/lib/clientlib.js +37 -0
- package/dist/lib/componentHelper.d.ts +7 -0
- package/dist/lib/componentHelper.js +43 -0
- package/dist/lib/domutils.d.ts +2 -0
- package/dist/lib/domutils.js +11 -0
- package/dist/lib/errors.d.ts +4 -0
- package/dist/lib/errors.js +8 -0
- package/dist/lib/highlight-code.d.ts +1 -0
- package/dist/lib/highlight-code.js +20 -0
- package/dist/lib/htmlparse/components/ItemActionButton.d.ts +2 -0
- package/dist/lib/htmlparse/components/ItemActionButton.js +25 -0
- package/dist/lib/htmlparse/htmlParse.d.ts +2 -0
- package/dist/lib/htmlparse/htmlParse.js +32 -0
- package/dist/lib/react-query/ReactQueryProvider.d.ts +4 -0
- package/dist/lib/react-query/ReactQueryProvider.js +31 -0
- package/dist/lib/render.d.ts +3 -0
- package/dist/lib/render.js +21 -0
- package/dist/lib/service-worker/ServiceWorkerMain.d.ts +1 -0
- package/dist/lib/service-worker/ServiceWorkerMain.js +25 -0
- package/dist/lib/service-worker/sw.d.ts +5 -0
- package/dist/lib/service-worker/sw.js +31 -0
- package/dist/lib/types.d.ts +32 -0
- package/dist/lib/types.js +1 -0
- package/dist/lib/utils.d.ts +38 -0
- package/dist/lib/utils.js +206 -0
- package/dist/lib/zustand.d.ts +9 -0
- package/dist/lib/zustand.js +30 -0
- package/dist/misc/CustomErrorRetry.d.ts +4 -0
- package/dist/misc/CustomErrorRetry.js +9 -0
- package/dist/misc/ExampleErrorDemo.d.ts +3 -0
- package/dist/misc/ExampleErrorDemo.js +14 -0
- package/dist/misc/MtErrorBoundary.d.ts +16 -0
- package/dist/misc/MtErrorBoundary.js +23 -0
- package/dist/misc/MtErrorBoundary.stories.d.ts +15 -0
- package/dist/misc/MtErrorBoundary.stories.js +27 -0
- package/dist/misc/MtErrorBoundaryV2.d.ts +2 -0
- package/dist/misc/MtErrorBoundaryV2.js +7 -0
- package/dist/misc/MtErrorBoundaryV2.stories.d.ts +14 -0
- package/dist/misc/MtErrorBoundaryV2.stories.js +25 -0
- package/dist/mtapp/History.d.ts +23 -0
- package/dist/mtapp/History.js +58 -0
- package/dist/mtapp/MtAppProvider.d.ts +53 -0
- package/dist/mtapp/MtAppProvider.js +62 -0
- package/dist/mtedtior/LzMtEditor.d.ts +6 -0
- package/dist/mtedtior/LzMtEditor.js +7 -0
- package/dist/mtedtior/MtEditor.d.ts +29 -0
- package/dist/mtedtior/MtEditor.js +106 -0
- package/dist/mtedtior/components/editor-bubble-item.d.ts +9 -0
- package/dist/mtedtior/components/editor-bubble-item.js +14 -0
- package/dist/mtedtior/components/editor-bubble.d.ts +7 -0
- package/dist/mtedtior/components/editor-bubble.js +43 -0
- package/dist/mtedtior/components/editor-command-item.d.ts +19 -0
- package/dist/mtedtior/components/editor-command-item.js +16 -0
- package/dist/mtedtior/components/editor-command.d.ts +29 -0
- package/dist/mtedtior/components/editor-command.js +46 -0
- package/dist/mtedtior/components/editor.d.ts +21 -0
- package/dist/mtedtior/components/editor.js +12 -0
- package/dist/mtedtior/components/index.d.ts +8 -0
- package/dist/mtedtior/components/index.js +6 -0
- package/dist/mtedtior/content.d.ts +132 -0
- package/dist/mtedtior/content.js +248 -0
- package/dist/mtedtior/extensions/ai-highlight.d.ts +22 -0
- package/dist/mtedtior/extensions/ai-highlight.js +88 -0
- package/dist/mtedtior/extensions/custom-keymap.d.ts +10 -0
- package/dist/mtedtior/extensions/custom-keymap.js +38 -0
- package/dist/mtedtior/extensions/drag-and-drop.d.ts +6 -0
- package/dist/mtedtior/extensions/drag-and-drop.js +165 -0
- package/dist/mtedtior/extensions/image-resizer.d.ts +2 -0
- package/dist/mtedtior/extensions/image-resizer.js +31 -0
- package/dist/mtedtior/extensions/index.d.ts +23 -0
- package/dist/mtedtior/extensions/index.js +73 -0
- package/dist/mtedtior/extensions/mathematics.d.ts +20 -0
- package/dist/mtedtior/extensions/mathematics.js +110 -0
- package/dist/mtedtior/extensions/slash-command.d.ts +33 -0
- package/dist/mtedtior/extensions/slash-command.js +224 -0
- package/dist/mtedtior/extensions/twitter.d.ts +22 -0
- package/dist/mtedtior/extensions/twitter.js +84 -0
- package/dist/mtedtior/extensions/updated-image.d.ts +2 -0
- package/dist/mtedtior/extensions/updated-image.js +17 -0
- package/dist/mtedtior/generative/ai-completion-command.d.ts +5 -0
- package/dist/mtedtior/generative/ai-completion-command.js +30 -0
- package/dist/mtedtior/generative/ai-selector-commands.d.ts +5 -0
- package/dist/mtedtior/generative/ai-selector-commands.js +42 -0
- package/dist/mtedtior/generative/ai-selector.d.ts +6 -0
- package/dist/mtedtior/generative/ai-selector.js +50 -0
- package/dist/mtedtior/generative/generative-menu-switch.d.ts +8 -0
- package/dist/mtedtior/generative/generative-menu-switch.js +26 -0
- package/dist/mtedtior/mtextesions/DemoComponent.d.ts +2 -0
- package/dist/mtedtior/mtextesions/DemoComponent.js +32 -0
- package/dist/mtedtior/mtextesions/image-upload.d.ts +1 -0
- package/dist/mtedtior/mtextesions/image-upload.js +52 -0
- package/dist/mtedtior/mtextesions/slash-command.d.ts +2 -0
- package/dist/mtedtior/mtextesions/slash-command.js +194 -0
- package/dist/mtedtior/mtextesions/tw_extensions.d.ts +1 -0
- package/dist/mtedtior/mtextesions/tw_extensions.js +137 -0
- package/dist/mtedtior/plugins/index.d.ts +1 -0
- package/dist/mtedtior/plugins/index.js +1 -0
- package/dist/mtedtior/plugins/upload-images.d.ts +13 -0
- package/dist/mtedtior/plugins/upload-images.js +98 -0
- package/dist/mtedtior/selectors/color-selector.d.ts +8 -0
- package/dist/mtedtior/selectors/color-selector.js +104 -0
- package/dist/mtedtior/selectors/link-selector.d.ts +8 -0
- package/dist/mtedtior/selectors/link-selector.js +50 -0
- package/dist/mtedtior/selectors/math-selector.d.ts +1 -0
- package/dist/mtedtior/selectors/math-selector.js +22 -0
- package/dist/mtedtior/selectors/node-selector.d.ts +14 -0
- package/dist/mtedtior/selectors/node-selector.js +77 -0
- package/dist/mtedtior/selectors/text-buttons.d.ts +1 -0
- package/dist/mtedtior/selectors/text-buttons.js +44 -0
- package/dist/mtedtior/utils/summary.d.ts +1 -0
- package/dist/mtedtior/utils/summary.js +8 -0
- package/dist/mtedtior/utils/utils.d.ts +9 -0
- package/dist/mtedtior/utils/utils.js +32 -0
- package/dist/mtedtior/utils.d.ts +9 -0
- package/dist/mtedtior/utils.js +33 -0
- package/dist/styled-system/css/conditions.d.mts +3 -0
- package/dist/styled-system/css/conditions.mjs +30 -0
- package/dist/styled-system/css/css.d.mts +6 -0
- package/dist/styled-system/css/css.mjs +37 -0
- package/dist/styled-system/css/cva.d.mts +14 -0
- package/dist/styled-system/css/cva.mjs +72 -0
- package/dist/styled-system/css/cx.d.mts +1 -0
- package/dist/styled-system/css/cx.mjs +11 -0
- package/dist/styled-system/css/index.d.mts +4 -0
- package/dist/styled-system/css/index.mjs +4 -0
- package/dist/styled-system/css/sva.d.mts +10 -0
- package/dist/styled-system/css/sva.mjs +31 -0
- package/dist/styled-system/helpers.d.mts +39 -0
- package/dist/styled-system/helpers.mjs +248 -0
- package/dist/styled-system/patterns/aspect-ratio.d.mts +5 -0
- package/dist/styled-system/patterns/aspect-ratio.mjs +36 -0
- package/dist/styled-system/patterns/bleed.d.mts +5 -0
- package/dist/styled-system/patterns/bleed.mjs +22 -0
- package/dist/styled-system/patterns/box.d.mts +5 -0
- package/dist/styled-system/patterns/box.mjs +13 -0
- package/dist/styled-system/patterns/center.d.mts +5 -0
- package/dist/styled-system/patterns/center.mjs +19 -0
- package/dist/styled-system/patterns/circle.d.mts +5 -0
- package/dist/styled-system/patterns/circle.mjs +23 -0
- package/dist/styled-system/patterns/container.d.mts +5 -0
- package/dist/styled-system/patterns/container.mjs +19 -0
- package/dist/styled-system/patterns/cq.d.mts +5 -0
- package/dist/styled-system/patterns/cq.mjs +19 -0
- package/dist/styled-system/patterns/divider.d.mts +5 -0
- package/dist/styled-system/patterns/divider.mjs +23 -0
- package/dist/styled-system/patterns/flex.d.mts +5 -0
- package/dist/styled-system/patterns/flex.mjs +24 -0
- package/dist/styled-system/patterns/float.d.mts +5 -0
- package/dist/styled-system/patterns/float.mjs +50 -0
- package/dist/styled-system/patterns/grid-item.d.mts +5 -0
- package/dist/styled-system/patterns/grid-item.mjs +23 -0
- package/dist/styled-system/patterns/grid.d.mts +5 -0
- package/dist/styled-system/patterns/grid.mjs +25 -0
- package/dist/styled-system/patterns/hstack.d.mts +5 -0
- package/dist/styled-system/patterns/hstack.mjs +22 -0
- package/dist/styled-system/patterns/index.d.mts +20 -0
- package/dist/styled-system/patterns/index.mjs +20 -0
- package/dist/styled-system/patterns/link-overlay.d.mts +5 -0
- package/dist/styled-system/patterns/link-overlay.mjs +22 -0
- package/dist/styled-system/patterns/spacer.d.mts +5 -0
- package/dist/styled-system/patterns/spacer.mjs +19 -0
- package/dist/styled-system/patterns/square.d.mts +5 -0
- package/dist/styled-system/patterns/square.mjs +22 -0
- package/dist/styled-system/patterns/stack.d.mts +5 -0
- package/dist/styled-system/patterns/stack.mjs +22 -0
- package/dist/styled-system/patterns/visually-hidden.d.mts +5 -0
- package/dist/styled-system/patterns/visually-hidden.mjs +16 -0
- package/dist/styled-system/patterns/vstack.d.mts +5 -0
- package/dist/styled-system/patterns/vstack.mjs +22 -0
- package/dist/styled-system/patterns/wrap.d.mts +5 -0
- package/dist/styled-system/patterns/wrap.mjs +23 -0
- package/dist/styled-system/tokens/index.d.mts +6 -0
- package/dist/styled-system/tokens/index.mjs +1885 -0
- package/dist/tailwind.d.ts +3 -0
- package/dist/tailwind.js +72 -0
- package/dist/tools/countDown.d.ts +32 -0
- package/dist/tools/countDown.js +35 -0
- package/dist/tools/devTools/cloudflareTunnel.d.ts +17 -0
- package/dist/tools/devTools/cloudflareTunnel.js +43 -0
- package/dist/tools/devTools/docker-compose.d.ts +8 -0
- package/dist/tools/devTools/docker-compose.js +13 -0
- package/dist/tools/devTools/dpMtCfWorkerTool.d.ts +8 -0
- package/dist/tools/devTools/dpMtCfWorkerTool.js +13 -0
- package/dist/tools/devTools/getIp.d.ts +14 -0
- package/dist/tools/devTools/getIp.js +29 -0
- package/dist/tools/devTools/installOsPackages.d.ts +8 -0
- package/dist/tools/devTools/installOsPackages.js +29 -0
- package/dist/tools/devTools/ollamaService.d.ts +14 -0
- package/dist/tools/devTools/ollamaService.js +28 -0
- package/dist/tools/devTools/vncServer.d.ts +1 -0
- package/dist/tools/devTools/vncServer.js +1 -0
- package/dist/tools/genSiteHeaderBarsTool.d.ts +14 -0
- package/dist/tools/genSiteHeaderBarsTool.js +16 -0
- package/dist/tools/hello1Tool.d.ts +14 -0
- package/dist/tools/hello1Tool.js +15 -0
- package/dist/tools/rag/RagHello.d.ts +8 -0
- package/dist/tools/rag/RagHello.js +14 -0
- package/dist/tools/rag/addResoure.d.ts +18 -0
- package/dist/tools/rag/addResoure.js +27 -0
- package/dist/tools/rag/getInformation.d.ts +18 -0
- package/dist/tools/rag/getInformation.js +15 -0
- package/dist/tools/rag/ui/RagInput.d.ts +2 -0
- package/dist/tools/rag/ui/RagInput.js +29 -0
- package/dist/tools/search/exampleSearchTool.d.ts +8 -0
- package/dist/tools/search/exampleSearchTool.js +13 -0
- package/dist/tools/webbot/callAdminBot.d.ts +8 -0
- package/dist/tools/webbot/callAdminBot.js +14 -0
- package/dist/tools/welcomeAdminTool.d.ts +8 -0
- package/dist/tools/welcomeAdminTool.js +13 -0
- package/dist/types/common.d.ts +15 -0
- package/dist/types/common.js +1 -0
- package/dist/ui/accordion.d.ts +7 -0
- package/dist/ui/accordion.js +14 -0
- package/dist/ui/alert-dialog.d.ts +20 -0
- package/dist/ui/alert-dialog.js +27 -0
- package/dist/ui/alert.d.ts +8 -0
- package/dist/ui/alert.js +22 -0
- package/dist/ui/aspect-ratio.d.ts +3 -0
- package/dist/ui/aspect-ratio.js +4 -0
- package/dist/ui/avatar.d.ts +6 -0
- package/dist/ui/avatar.js +12 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/badge.js +20 -0
- package/dist/ui/breadcrumb.d.ts +19 -0
- package/dist/ui/breadcrumb.js +23 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/button.js +33 -0
- package/dist/ui/calendar.d.ts +8 -0
- package/dist/ui/calendar.js +40 -0
- package/dist/ui/card.d.ts +8 -0
- package/dist/ui/card.js +16 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/checkbox.js +9 -0
- package/dist/ui/codeblock.d.ts +12 -0
- package/dist/ui/codeblock.js +85 -0
- package/dist/ui/collapsible.d.ts +5 -0
- package/dist/ui/collapsible.js +6 -0
- package/dist/ui/command.d.ts +50 -0
- package/dist/ui/command.js +29 -0
- package/dist/ui/context-menu.d.ts +27 -0
- package/dist/ui/context-menu.js +34 -0
- package/dist/ui/dialog.d.ts +19 -0
- package/dist/ui/dialog.js +23 -0
- package/dist/ui/drawer.d.ts +24 -0
- package/dist/ui/drawer.js +23 -0
- package/dist/ui/dropdown-menu.d.ts +27 -0
- package/dist/ui/dropdown-menu.js +36 -0
- package/dist/ui/form.d.ts +23 -0
- package/dist/ui/form.js +62 -0
- package/dist/ui/hover-card.d.ts +6 -0
- package/dist/ui/hover-card.js +10 -0
- package/dist/ui/input.d.ts +5 -0
- package/dist/ui/input.js +8 -0
- package/dist/ui/label.d.ts +5 -0
- package/dist/ui/label.js +10 -0
- package/dist/ui/menubar.d.ts +33 -0
- package/dist/ui/menubar.js +36 -0
- package/dist/ui/mt/Boundary.d.ts +9 -0
- package/dist/ui/mt/Boundary.js +10 -0
- package/dist/ui/mt/Button.d.ts +1 -0
- package/dist/ui/mt/Button.js +2 -0
- package/dist/ui/mt/DropdownMenuItemLink.d.ts +7 -0
- package/dist/ui/mt/DropdownMenuItemLink.js +8 -0
- package/dist/ui/mt/ErrorMessage.d.ts +2 -0
- package/dist/ui/mt/ErrorMessage.js +6 -0
- package/dist/ui/mt/ExampleTree.d.ts +1 -0
- package/dist/ui/mt/ExampleTree.js +79 -0
- package/dist/ui/mt/MtDialog.d.ts +19 -0
- package/dist/ui/mt/MtDialog.js +38 -0
- package/dist/ui/mt/MtForm.d.ts +1 -0
- package/dist/ui/mt/MtForm.js +3 -0
- package/dist/ui/mt/NavTag.d.ts +10 -0
- package/dist/ui/mt/NavTag.js +28 -0
- package/dist/ui/mt/ScreenPanel.d.ts +4 -0
- package/dist/ui/mt/ScreenPanel.js +9 -0
- package/dist/ui/mt/Separator.d.ts +1 -0
- package/dist/ui/mt/Separator.js +3 -0
- package/dist/ui/mt/SimpleModel.d.ts +3 -0
- package/dist/ui/mt/SimpleModel.js +27 -0
- package/dist/ui/mt/SimpleTag.d.ts +5 -0
- package/dist/ui/mt/SimpleTag.js +6 -0
- package/dist/ui/mt/Slot.d.ts +1 -0
- package/dist/ui/mt/Slot.js +1 -0
- package/dist/ui/mt/Tree.d.ts +14 -0
- package/dist/ui/mt/Tree.js +63 -0
- package/dist/ui/mt/WithLinkIf.d.ts +4 -0
- package/dist/ui/mt/WithLinkIf.js +10 -0
- package/dist/ui/mt/headline.d.ts +7 -0
- package/dist/ui/mt/headline.js +4 -0
- package/dist/ui/mt/input-field/InputField.d.ts +4 -0
- package/dist/ui/mt/input-field/InputField.js +19 -0
- package/dist/ui/mt/input-field/SingleUploadForm.d.ts +2 -0
- package/dist/ui/mt/input-field/SingleUploadForm.js +62 -0
- package/dist/ui/mt/input-field/TextArea.d.ts +4 -0
- package/dist/ui/mt/input-field/TextArea.js +13 -0
- package/dist/ui/mt/input-field/TextFileInput.d.ts +8 -0
- package/dist/ui/mt/input-field/TextFileInput.js +36 -0
- package/dist/ui/mt/input-field/select/InputSelect.d.ts +8 -0
- package/dist/ui/mt/input-field/select/InputSelect.js +16 -0
- package/dist/ui/mt/inputs/SearchInput.d.ts +2 -0
- package/dist/ui/mt/inputs/SearchInput.js +10 -0
- package/dist/ui/mt/inputs/TaskStatusInput.d.ts +2 -0
- package/dist/ui/mt/inputs/TaskStatusInput.js +22 -0
- package/dist/ui/mt/inputs/UrlsInput.d.ts +2 -0
- package/dist/ui/mt/inputs/UrlsInput.js +15 -0
- package/dist/ui/mt/inputs/input.d.ts +1 -0
- package/dist/ui/mt/inputs/input.js +2 -0
- package/dist/ui/mt/modal/MtModal.d.ts +29 -0
- package/dist/ui/mt/modal/MtModal.js +52 -0
- package/dist/ui/mt/mt-tree-view/MtTreeViewExample.d.ts +1 -0
- package/dist/ui/mt/mt-tree-view/MtTreeViewExample.js +2 -0
- package/dist/ui/mt/mt-tree-view/mt-tree-view-api.d.ts +39 -0
- package/dist/ui/mt/mt-tree-view/mt-tree-view-api.js +132 -0
- package/dist/ui/mt/mt-tree-view/mt-treeview.d.ts +24 -0
- package/dist/ui/mt/mt-tree-view/mt-treeview.js +25 -0
- package/dist/ui/mt/mtlink.d.ts +14 -0
- package/dist/ui/mt/mtlink.js +15 -0
- package/dist/ui/mt/pagination.d.ts +7 -0
- package/dist/ui/mt/pagination.js +30 -0
- package/dist/ui/mt/skeleton/NewLoading.d.ts +1 -0
- package/dist/ui/mt/skeleton/NewLoading.js +6 -0
- package/dist/ui/mt/skeleton/SkeletonInput.d.ts +1 -0
- package/dist/ui/mt/skeleton/SkeletonInput.js +5 -0
- package/dist/ui/mt/skeleton/SkeletonLayout.d.ts +1 -0
- package/dist/ui/mt/skeleton/SkeletonLayout.js +6 -0
- package/dist/ui/mt/skeleton/SkeletonLoading.d.ts +3 -0
- package/dist/ui/mt/skeleton/SkeletonLoading.js +10 -0
- package/dist/ui/mt/skeleton/skeleton-card.d.ts +3 -0
- package/dist/ui/mt/skeleton/skeleton-card.js +5 -0
- package/dist/ui/mt/skeleton/skeleton2.d.ts +1 -0
- package/dist/ui/mt/skeleton/skeleton2.js +4 -0
- package/dist/ui/mt/skeleton/skeletons.d.ts +6 -0
- package/dist/ui/mt/skeleton/skeletons.js +6 -0
- package/dist/ui/mt/skeleton.d.ts +5 -0
- package/dist/ui/mt/skeleton.js +5 -0
- package/dist/ui/mt/types.d.ts +4 -0
- package/dist/ui/mt/types.js +1 -0
- package/dist/ui/navigation-menu.d.ts +12 -0
- package/dist/ui/navigation-menu.js +25 -0
- package/dist/ui/pagination.d.ts +28 -0
- package/dist/ui/pagination.js +23 -0
- package/dist/ui/popover.d.ts +6 -0
- package/dist/ui/popover.js +10 -0
- package/dist/ui/progress.d.ts +4 -0
- package/dist/ui/progress.js +8 -0
- package/dist/ui/radio-group.d.ts +5 -0
- package/dist/ui/radio-group.js +15 -0
- package/dist/ui/resizable.d.ts +23 -0
- package/dist/ui/resizable.js +9 -0
- package/dist/ui/scroll-area.d.ts +5 -0
- package/dist/ui/scroll-area.js +12 -0
- package/dist/ui/select.d.ts +11 -0
- package/dist/ui/select.js +22 -0
- package/dist/ui/separator.d.ts +4 -0
- package/dist/ui/separator.js +8 -0
- package/dist/ui/sheet.d.ts +25 -0
- package/dist/ui/sheet.js +37 -0
- package/dist/ui/skeleton.d.ts +2 -0
- package/dist/ui/skeleton.js +6 -0
- package/dist/ui/slider.d.ts +4 -0
- package/dist/ui/slider.js +8 -0
- package/dist/ui/sonner.d.ts +4 -0
- package/dist/ui/sonner.js +16 -0
- package/dist/ui/switch.d.ts +4 -0
- package/dist/ui/switch.js +8 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.js +20 -0
- package/dist/ui/tabs.d.ts +7 -0
- package/dist/ui/tabs.js +13 -0
- package/dist/ui/textarea.d.ts +5 -0
- package/dist/ui/textarea.js +8 -0
- package/dist/ui/toast.d.ts +15 -0
- package/dist/ui/toast.js +33 -0
- package/dist/ui/toaster.d.ts +1 -0
- package/dist/ui/toaster.js +10 -0
- package/dist/ui/toggle.d.ts +12 -0
- package/dist/ui/toggle.js +26 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/tooltip.js +11 -0
- package/dist/ui/use-toast.d.ts +44 -0
- package/dist/ui/use-toast.js +124 -0
- package/dist/video-player/mt-video-player.d.ts +6 -0
- package/dist/video-player/mt-video-player.js +28 -0
- package/dist/video-player/video-player2/modal-video-player.d.ts +12 -0
- package/dist/video-player/video-player2/modal-video-player.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
export const DebugFormState = (props) => {
|
|
4
|
+
const { form } = props;
|
|
5
|
+
useMemo(() => {
|
|
6
|
+
if (form?.formState?.errors && Object.keys(form?.formState?.errors).length > 0) {
|
|
7
|
+
console.warn("DebugFormState", form?.formState?.errors);
|
|
8
|
+
}
|
|
9
|
+
}, [form?.formState?.errors]);
|
|
10
|
+
return null;
|
|
11
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
import { type StateCreator } from "zustand";
|
|
3
|
+
type MtxFormProps = {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type ConfirmCallbackFnType = () => void;
|
|
7
|
+
export interface DeleteConformState extends MtxFormProps {
|
|
8
|
+
setOpen: (open: boolean) => void;
|
|
9
|
+
confirmCallback?: ConfirmCallbackFnType;
|
|
10
|
+
setConfirmCallback: (confirmCallback: ConfirmCallbackFnType) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const createFormSlice: StateCreator<DeleteConformState, [
|
|
13
|
+
], [
|
|
14
|
+
], DeleteConformState>;
|
|
15
|
+
export declare const DeleteConfirmProvider: (props: PropsWithChildren<MtxFormProps>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const useDeleteConfirm: () => {
|
|
17
|
+
show: (props: {
|
|
18
|
+
callback: () => void;
|
|
19
|
+
}) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const DeleteConfirmDlg: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useCallback, useContext, useMemo, } from "react";
|
|
4
|
+
import { createStore, useStore } from "zustand";
|
|
5
|
+
import { immer } from "zustand/middleware/immer";
|
|
6
|
+
import { MtButton } from "../ui/mt/Button";
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogTitle, } from "../ui/dialog";
|
|
8
|
+
export const createFormSlice = (set, get) => ({
|
|
9
|
+
setOpen: (open) => set({ open }),
|
|
10
|
+
setConfirmCallback: (confirmCallback) => set({ confirmCallback }),
|
|
11
|
+
});
|
|
12
|
+
const createDeleteConformStore = (initProps) => {
|
|
13
|
+
return createStore()(immer((...a) => ({
|
|
14
|
+
...createFormSlice(...a),
|
|
15
|
+
...initProps,
|
|
16
|
+
})));
|
|
17
|
+
};
|
|
18
|
+
const formContext = createContext(null);
|
|
19
|
+
export const DeleteConfirmProvider = (props) => {
|
|
20
|
+
const { children, ...etc } = props;
|
|
21
|
+
const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
|
|
22
|
+
return (_jsxs(formContext.Provider, { value: mystore, children: [children, _jsx(DeleteConfirmDlg, {})] }));
|
|
23
|
+
};
|
|
24
|
+
function useDeleteConfirmStore(selector) {
|
|
25
|
+
const store = useContext(formContext);
|
|
26
|
+
if (!store)
|
|
27
|
+
throw new Error("useDeleteConfirm Missing MtxFormProvider");
|
|
28
|
+
return useStore(store, selector);
|
|
29
|
+
}
|
|
30
|
+
export const useDeleteConfirm = () => {
|
|
31
|
+
const setOpen = useDeleteConfirmStore((x) => x.setOpen);
|
|
32
|
+
const setConfirmCallback = useDeleteConfirmStore((x) => x.setConfirmCallback);
|
|
33
|
+
const show = useCallback((props) => {
|
|
34
|
+
setConfirmCallback(props.callback);
|
|
35
|
+
setOpen(true);
|
|
36
|
+
}, [setConfirmCallback, setOpen]);
|
|
37
|
+
return {
|
|
38
|
+
show,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export const DeleteConfirmDlg = () => {
|
|
42
|
+
const open = useDeleteConfirmStore((x) => x.open);
|
|
43
|
+
const setOpen = useDeleteConfirmStore((x) => x.setOpen);
|
|
44
|
+
const confirmCallback = useDeleteConfirmStore((x) => x.confirmCallback);
|
|
45
|
+
return (_jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { children: [_jsx(DialogTitle, { children: "delete confirm" }), _jsx(DialogDescription, { children: "will delete item, continue?" }), _jsx(MtButton, { variant: "destructive", onClick: async () => {
|
|
46
|
+
setOpen(false);
|
|
47
|
+
confirmCallback && confirmCallback();
|
|
48
|
+
}, children: "Continue" }), _jsx(MtButton, { variant: "outline", onClick: () => {
|
|
49
|
+
setOpen(false);
|
|
50
|
+
confirmCallback && confirmCallback();
|
|
51
|
+
}, children: "Cancel" })] }) }));
|
|
52
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export const FullCenter = (props) => {
|
|
4
|
+
const { children } = props;
|
|
5
|
+
return (_jsx("div", { className: "flex h-full w-full items-center justify-center", children: _jsx("div", { className: "flex-1", children: children }) }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
import { type StateCreator } from "zustand";
|
|
3
|
+
type GlobalSearchProps = {};
|
|
4
|
+
export interface GlobalSearchState extends GlobalSearchProps {
|
|
5
|
+
q?: string;
|
|
6
|
+
setQ?: (q: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const createFormSlice: StateCreator<GlobalSearchState, [], [], GlobalSearchState>;
|
|
9
|
+
export declare const GlobalSearchProvider: (props: PropsWithChildren<GlobalSearchProps>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function useGlobalSearch<T>(selector: (state: GlobalSearchState) => T): T;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useMemo } from "react";
|
|
4
|
+
import { createStore, useStore } from "zustand";
|
|
5
|
+
export const createFormSlice = (set, get) => ({
|
|
6
|
+
setQ: (q) => set({ q }),
|
|
7
|
+
});
|
|
8
|
+
const createDeleteConformStore = (initProps) => {
|
|
9
|
+
return createStore()((...a) => ({
|
|
10
|
+
...createFormSlice(...a),
|
|
11
|
+
...initProps,
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
const formContext = createContext(null);
|
|
15
|
+
export const GlobalSearchProvider = (props) => {
|
|
16
|
+
const { children, ...etc } = props;
|
|
17
|
+
const mystore = useMemo(() => createDeleteConformStore(etc), [etc]);
|
|
18
|
+
return (_jsx(formContext.Provider, { value: mystore, children: children }));
|
|
19
|
+
};
|
|
20
|
+
export function useGlobalSearch(selector) {
|
|
21
|
+
const store = useContext(formContext);
|
|
22
|
+
if (!store)
|
|
23
|
+
throw new Error("useGlobalSearch Missing GlobalSearchProvider");
|
|
24
|
+
return useStore(store, selector);
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HtmlChangesObserver({ children }: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { HtmlDiffer } from "html-differ";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
const styles = {
|
|
6
|
+
none: "background: transparent; color:black",
|
|
7
|
+
gray: "background: transparent; color: gray",
|
|
8
|
+
bgGreen: "background: green; color:black",
|
|
9
|
+
bgRed: "background: red; color:black",
|
|
10
|
+
};
|
|
11
|
+
export function HtmlChangesObserver({ children }) {
|
|
12
|
+
const targetNode = useRef(null);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const differ = new HtmlDiffer();
|
|
15
|
+
let lastHtml = targetNode.current.innerHTML;
|
|
16
|
+
function observeChanges() {
|
|
17
|
+
const newHtml = targetNode.current.innerHTML;
|
|
18
|
+
if (newHtml !== lastHtml) {
|
|
19
|
+
const diff = differ.diffHtml(lastHtml, newHtml);
|
|
20
|
+
lastHtml = newHtml;
|
|
21
|
+
logDiff(diff);
|
|
22
|
+
}
|
|
23
|
+
if (running) {
|
|
24
|
+
requestAnimationFrame(observeChanges);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let running = true;
|
|
28
|
+
requestAnimationFrame(observeChanges);
|
|
29
|
+
return () => {
|
|
30
|
+
running = false;
|
|
31
|
+
};
|
|
32
|
+
}, []);
|
|
33
|
+
return _jsx("div", { ref: targetNode, children: children });
|
|
34
|
+
}
|
|
35
|
+
function logDiff(diff) {
|
|
36
|
+
let output = "", styleArr = [];
|
|
37
|
+
if (diff.length === 1 && !diff[0].added && !diff[0].removed)
|
|
38
|
+
return output;
|
|
39
|
+
for (const part of diff) {
|
|
40
|
+
var index = diff.indexOf(part), partValue = part.value;
|
|
41
|
+
if (part.added || part.removed) {
|
|
42
|
+
output += index === 0 ? "\n" : "";
|
|
43
|
+
output += "%c" + partValue;
|
|
44
|
+
styleArr.push(part.added ? styles.bgGreen : styles.bgRed);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
output += index !== 0 ? "" : "\n";
|
|
48
|
+
output += "%c" + partValue;
|
|
49
|
+
styleArr.push(styles.gray);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
console.log(performance.now() + "ms DOM changes: " + output, ...styleArr);
|
|
53
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isCloudflarePage } from 'mtxlib/utils';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
const normalizeSrc = (src) => {
|
|
5
|
+
return src.startsWith('/') ? src.slice(1) : src;
|
|
6
|
+
};
|
|
7
|
+
const cloudflareLoader = ({ src, width, quality }) => {
|
|
8
|
+
const params = [`width=${width}`];
|
|
9
|
+
if (quality) {
|
|
10
|
+
params.push(`quality=${quality}`);
|
|
11
|
+
}
|
|
12
|
+
const paramsString = params.join(',');
|
|
13
|
+
return `https://cfgomtm.yuepa8.com/cdn-cgi/image/${paramsString}/${normalizeSrc(src)}`;
|
|
14
|
+
};
|
|
15
|
+
const exampleImageLoader = ({ src, width, quality }) => {
|
|
16
|
+
return `https://example.com/${src}?w=${width}&q=${quality || 75}`;
|
|
17
|
+
};
|
|
18
|
+
function getImageLoader() {
|
|
19
|
+
if (isCloudflarePage()) {
|
|
20
|
+
return cloudflareLoader;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
exampleImageLoader;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export const MtImage = (props) => {
|
|
27
|
+
return _jsx(Image, { ...props, loader: getImageLoader() });
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MtProgressBar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { AppProgressBar } from "next-nprogress-bar";
|
|
4
|
+
export const MtProgressBar = () => {
|
|
5
|
+
return _jsx(AppProgressBar, { height: "4px", color: "#4934eb", options: { showSpinner: false }, shallowRouting: true });
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NotFoundGoBack: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRouter } from "next/navigation";
|
|
4
|
+
import { Button } from "../ui/button";
|
|
5
|
+
export const NotFoundGoBack = () => {
|
|
6
|
+
const router = useRouter();
|
|
7
|
+
return (_jsxs("div", { className: "container flex flex-col", children: [_jsx("div", { className: "mx-auto p-8", children: "not found" }), _jsx(Button, { className: "mx-auto p-8", onClick: () => {
|
|
8
|
+
router.back();
|
|
9
|
+
}, children: "Go back" })] }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const slntTreeNodeBaseSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
pid: z.ZodOptional<z.ZodString>;
|
|
5
|
+
label: z.ZodOptional<z.ZodString>;
|
|
6
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
7
|
+
routeName: z.ZodOptional<z.ZodString>;
|
|
8
|
+
routeType: z.ZodOptional<z.ZodEnum<["default", "list", "detail"]>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
icon?: string | undefined;
|
|
13
|
+
pid?: string | undefined;
|
|
14
|
+
routeName?: string | undefined;
|
|
15
|
+
routeType?: "default" | "list" | "detail" | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
id: string;
|
|
18
|
+
label?: string | undefined;
|
|
19
|
+
icon?: string | undefined;
|
|
20
|
+
pid?: string | undefined;
|
|
21
|
+
routeName?: string | undefined;
|
|
22
|
+
routeType?: "default" | "list" | "detail" | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type DashMenuTreeItem = z.infer<typeof slntTreeNodeBaseSchema> & {
|
|
25
|
+
children?: DashMenuTreeItem[];
|
|
26
|
+
};
|
|
27
|
+
export declare const treeNodeSchema: z.ZodType<DashMenuTreeItem>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const DashMenuTreeItemRouteType = ["default", "list", "detail"];
|
|
3
|
+
const slntTreeNodeBaseSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
pid: z.string().optional(),
|
|
6
|
+
label: z.string().optional(),
|
|
7
|
+
icon: z.string().optional(),
|
|
8
|
+
routeName: z.string().optional(),
|
|
9
|
+
routeType: z.enum(DashMenuTreeItemRouteType).optional(),
|
|
10
|
+
});
|
|
11
|
+
export const treeNodeSchema = slntTreeNodeBaseSchema.extend({
|
|
12
|
+
children: z.lazy(() => treeNodeSchema.array()).optional(),
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SlntChildrenTabs: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { urlJoinPaths } from "mtxlib/http/url";
|
|
4
|
+
import { usePathname, useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
import { MtLink } from "../mtlink";
|
|
7
|
+
import { useMenuTreeStore } from "./SlntTreeNode";
|
|
8
|
+
export const SlntChildrenTabs = () => {
|
|
9
|
+
const parentData = useMenuTreeStore((x) => x.menuNode);
|
|
10
|
+
const pathName = usePathname();
|
|
11
|
+
const segments = useSelectedLayoutSegments();
|
|
12
|
+
const segment = useSelectedLayoutSegment();
|
|
13
|
+
const basePath = pathName.slice(0, -segments.join("/").length);
|
|
14
|
+
const basePath3 = "/" + segments.join("/");
|
|
15
|
+
return (_jsx("div", { className: "flex gap-1 ", children: parentData?.children?.map((item, i) => {
|
|
16
|
+
let href = `${urlJoinPaths(basePath, item.routeName || "")}`;
|
|
17
|
+
if (!segments?.length) {
|
|
18
|
+
href = urlJoinPaths(pathName, item.routeName || "");
|
|
19
|
+
}
|
|
20
|
+
return (_jsx(TabItem, { activate: segment == item.routeName, children: _jsx(MtLink, { variant: "ghost", href: href, children: item.label }, i) }, i));
|
|
21
|
+
}) }));
|
|
22
|
+
};
|
|
23
|
+
const TabItem = (props) => {
|
|
24
|
+
const { activate, ...etc } = props;
|
|
25
|
+
return (_jsx("div", { "data-state": activate && "active", className: cn("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow"), ...etc }));
|
|
26
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { DashMenuTreeItem } from "./Slnt.z";
|
|
3
|
+
export type SLNTProps = {
|
|
4
|
+
menuNode?: DashMenuTreeItem;
|
|
5
|
+
};
|
|
6
|
+
export interface SlntState extends SLNTProps {
|
|
7
|
+
}
|
|
8
|
+
export declare const slntContext: import("react").Context<(Omit<import("zustand").StoreApi<SlntState>, "setState"> & {
|
|
9
|
+
setState(nextStateOrUpdater: SlntState | Partial<SlntState> | ((state: import("immer").WritableDraft<SlntState>) => void), shouldReplace?: boolean | undefined): void;
|
|
10
|
+
}) | null>;
|
|
11
|
+
type ModalProviderProps = React.PropsWithChildren<SLNTProps>;
|
|
12
|
+
export declare const MenuTreeProvider: (props: ModalProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const DEFAULT_USE_SHALLOW = true;
|
|
14
|
+
export declare function useMenuTreeStore(): SlntState;
|
|
15
|
+
export declare function useMenuTreeStore<T>(selector: (state: SlntState) => T): T;
|
|
16
|
+
export declare const SlntTreeNode: (props: {
|
|
17
|
+
treeData?: DashMenuTreeItem;
|
|
18
|
+
} & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useSelectedLayoutSegment, useSelectedLayoutSegments, } from "next/navigation";
|
|
4
|
+
import { createContext, useContext, useMemo } from "react";
|
|
5
|
+
import { useStore } from "zustand";
|
|
6
|
+
import { immer } from "zustand/middleware/immer";
|
|
7
|
+
import { useShallow } from "zustand/react/shallow";
|
|
8
|
+
import { createStore } from "zustand/vanilla";
|
|
9
|
+
const createModalStore = (initProps) => {
|
|
10
|
+
return createStore()(immer((set, get) => ({
|
|
11
|
+
...initProps,
|
|
12
|
+
})));
|
|
13
|
+
};
|
|
14
|
+
export const slntContext = createContext(null);
|
|
15
|
+
export const MenuTreeProvider = (props) => {
|
|
16
|
+
const { children, ...etc } = props;
|
|
17
|
+
const mystore = useMemo(() => createModalStore(etc), [etc]);
|
|
18
|
+
return (_jsx(slntContext.Provider, { value: mystore, children: children }));
|
|
19
|
+
};
|
|
20
|
+
export const DEFAULT_USE_SHALLOW = true;
|
|
21
|
+
export function useMenuTreeStore(selector) {
|
|
22
|
+
const store = useContext(slntContext);
|
|
23
|
+
if (!store)
|
|
24
|
+
return null;
|
|
25
|
+
if (selector) {
|
|
26
|
+
return useStore(store, DEFAULT_USE_SHALLOW ? useShallow(selector) : selector);
|
|
27
|
+
}
|
|
28
|
+
return useStore(store);
|
|
29
|
+
}
|
|
30
|
+
export const SlntTreeNode = (props) => {
|
|
31
|
+
const { children, treeData } = props;
|
|
32
|
+
const parentData = useMenuTreeStore((x) => x?.menuNode);
|
|
33
|
+
const segment = useSelectedLayoutSegment();
|
|
34
|
+
const segments = useSelectedLayoutSegments();
|
|
35
|
+
const parent = parentData || treeData;
|
|
36
|
+
if (!parent) {
|
|
37
|
+
throw new Error("must within parentNodes or rootNodes ");
|
|
38
|
+
}
|
|
39
|
+
const currNode = useMemo(() => {
|
|
40
|
+
const fined = parent.children?.find((x) => x.routeName == segment);
|
|
41
|
+
console.log({ message: `(SlntTreeNode)${segment}`, fined, parent });
|
|
42
|
+
return fined;
|
|
43
|
+
}, [parent, segment]);
|
|
44
|
+
return (_jsx(MenuTreeProvider, { menuNode: currNode, children: children }));
|
|
45
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Dialog, DialogContent, DialogTrigger } from "../../ui/dialog";
|
|
4
|
+
import { MtButton } from "../../ui/mt/Button";
|
|
5
|
+
export const DebugValue = (props) => {
|
|
6
|
+
const { title, data, className } = props;
|
|
7
|
+
return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(MtButton, { variant: "outline", className: className, children: title || "debug" }) }), _jsx(DialogContent, { className: "max-h-lvh w-full overflow-scroll bg-red-100", children: _jsx("pre", { className: " text-xs", children: JSON.stringify(data, null, 2) }) })] }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import dynamic from "next/dynamic";
|
|
4
|
+
import { useHotkeys } from "react-hotkeys-hook";
|
|
5
|
+
import { useMtapp } from "../../mtapp/MtAppProvider";
|
|
6
|
+
import { TailwindIndicator } from "../tailwind-indicator";
|
|
7
|
+
const ReactQueryDevtoolsProduction = dynamic(() => import("@tanstack/react-query-devtools/build/modern/production.js").then((d) => ({
|
|
8
|
+
default: d.ReactQueryDevtools,
|
|
9
|
+
})), {
|
|
10
|
+
ssr: false,
|
|
11
|
+
});
|
|
12
|
+
export const HOTKEY_Debug = "alt+.";
|
|
13
|
+
export const DevTools = () => {
|
|
14
|
+
const debug = useMtapp((x) => x.debug);
|
|
15
|
+
const setDebug = useMtapp((x) => x.setDebug);
|
|
16
|
+
useHotkeys(HOTKEY_Debug, () => {
|
|
17
|
+
console.log("debug2:%o", !debug);
|
|
18
|
+
setDebug(!debug);
|
|
19
|
+
}, [debug, setDebug]);
|
|
20
|
+
if (!debug) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsx(ReactQueryDevtoolsProduction, { buttonPosition: "bottom-right" }), _jsx(TailwindIndicator, {})] }));
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
import React, { ComponentProps } from "react";
|
|
4
|
+
import { buttonVariants } from "../ui/button";
|
|
5
|
+
export interface TMtLinkProps extends ComponentProps<typeof Link>, VariantProps<typeof buttonVariants> {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const MtLink: React.ForwardRefExoticComponent<Omit<TMtLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
9
|
+
type ExternalLinkProps = ComponentProps<"a">;
|
|
10
|
+
interface TExternalLink extends ExternalLinkProps {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function MtExternalLink({ children, className, ...props }: TExternalLink): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
import { buttonVariants } from "../ui/button";
|
|
8
|
+
export const MtLink = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
9
|
+
const Comp = asChild ? Slot : Link;
|
|
10
|
+
return (_jsx(Comp, { className: cn(((variant) && buttonVariants({ variant: variant, className }))), ref: ref, ...props }));
|
|
11
|
+
});
|
|
12
|
+
MtLink.displayName = "MtLink";
|
|
13
|
+
export function MtExternalLink({ children, className, ...props }) {
|
|
14
|
+
return (_jsx("a", { className: cn(className, "hover:text-brandtext-500 hover:underline hover:brightness-150"), rel: "noopener noreferrer", ...props, children: children }));
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function PipExamplePage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import ReactDocumentPictureInPicture from "mtxuilib/common/pip/ReactDocumentPictureInPicture";
|
|
4
|
+
import { MtButton } from "mtxuilib/ui/mt/Button";
|
|
5
|
+
import { useRef, useState } from "react";
|
|
6
|
+
export default function PipExamplePage() {
|
|
7
|
+
const pipWindowRef = useRef(null);
|
|
8
|
+
return (_jsx(_Fragment, { children: _jsx(ReactDocumentPictureInPicture, { ref: pipWindowRef, width: "50%", height: "100%", buttonRenderer: ({ open, close, toggle, isOpen }) => (_jsxs("div", { className: "flex gap-2", children: [_jsxs("b", { children: ["Is ", isOpen ? "Open" : "Closed", " "] }), _jsx(MtButton, { onClick: open, children: "Open" }), _jsx(MtButton, { onClick: close, children: "Close" }), _jsx(MtButton, { onClick: toggle, children: "Toggle" })] })), children: _jsx(Comp, { pipWindowRef: pipWindowRef }) }) }));
|
|
9
|
+
}
|
|
10
|
+
const Comp = (props) => {
|
|
11
|
+
const { pipWindowRef } = props;
|
|
12
|
+
const [text, setText] = useState("tet1");
|
|
13
|
+
return (_jsxs("div", { className: "prose", children: [_jsx("h1", { children: "\u753B\u4E2D\u753B\u663E\u793A\uFF08\u8303\u4F8B\uFF09" }), _jsxs("div", { children: [_jsx("button", { onClick: () => {
|
|
14
|
+
console.log("关闭");
|
|
15
|
+
setText("ssssssssssssssss");
|
|
16
|
+
}, children: "sssss" }), _jsxs(MtButton, { onClick: () => {
|
|
17
|
+
console.log("关闭");
|
|
18
|
+
setText("ssssssssssssssss");
|
|
19
|
+
}, children: ["\u5173\u95ED333 ", text] })] }), _jsx("i", { children: "This text should be displayed in a Document Picture in Picture filling the maximum allow height and 50% of the width of the original window" })] }));
|
|
20
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export type ReactDocumentPictureInPictureForwardRefType = {
|
|
3
|
+
window: () => Window | undefined;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
close: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare enum FeatureUnavailableReasonEnum {
|
|
8
|
+
USING_UNSECURE_PROTOCOL = "USING_UNSECURE_PROTOCOL",
|
|
9
|
+
API_NOT_SUPPORTED = "API_NOT_SUPPORTED"
|
|
10
|
+
}
|
|
11
|
+
export type ReactDocumentPictureInPicturePropsType = {
|
|
12
|
+
width?: string | number;
|
|
13
|
+
height?: string | number;
|
|
14
|
+
shareStyles?: boolean;
|
|
15
|
+
onOpen?: () => void;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
onResize?: (width: number, height: number) => void;
|
|
18
|
+
featureUnavailableRenderer?: ReactNode | ((reason: FeatureUnavailableReasonEnum) => ReactNode);
|
|
19
|
+
buttonRenderer?: ReactNode | ((props: {
|
|
20
|
+
open: () => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
toggle: () => void;
|
|
23
|
+
isOpen: boolean;
|
|
24
|
+
}) => ReactNode);
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
};
|
|
27
|
+
declare const ReactDocumentPictureInPicture: import("react").ForwardRefExoticComponent<ReactDocumentPictureInPicturePropsType & import("react").RefAttributes<ReactDocumentPictureInPictureForwardRefType>>;
|
|
28
|
+
export default ReactDocumentPictureInPicture;
|