mtxuilib 0.1.159 → 0.1.161
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.jsx +11 -0
- package/dist/common/DeleteComfirm.d.ts +20 -0
- package/dist/common/DeleteComfirm.jsx +65 -0
- package/dist/common/FullCenter.d.ts +2 -0
- package/dist/common/FullCenter.jsx +7 -0
- package/dist/common/GlobalSearch.d.ts +11 -0
- package/dist/common/GlobalSearch.jsx +27 -0
- package/dist/common/HtmlChangesObserver.d.ts +1 -0
- package/dist/common/HtmlChangesObserver.jsx +52 -0
- package/dist/common/MtImage.d.ts +5 -0
- package/dist/common/MtImage.jsx +27 -0
- package/dist/common/MtProgressBar.d.ts +1 -0
- package/dist/common/MtProgressBar.jsx +5 -0
- package/dist/common/NotFoundGoBack.d.ts +1 -0
- package/dist/common/NotFoundGoBack.jsx +15 -0
- package/dist/common/SlntTree/Slnt.z.d.ts +28 -0
- package/dist/common/SlntTree/Slnt.z.jsx +13 -0
- package/dist/common/SlntTree/SlntChildrenTabs.d.ts +1 -0
- package/dist/common/SlntTree/SlntChildrenTabs.jsx +33 -0
- package/dist/common/SlntTree/SlntTreeNode.d.ts +19 -0
- package/dist/common/SlntTree/SlntTreeNode.jsx +47 -0
- package/dist/common/TrpcQuery.d.ts +0 -0
- package/dist/common/TrpcQuery.jsx +1 -0
- package/dist/common/devtools/DebugValue.d.ts +5 -0
- package/dist/common/devtools/DebugValue.jsx +16 -0
- package/dist/common/devtools/DevTools.d.ts +2 -0
- package/dist/common/devtools/DevTools.jsx +26 -0
- package/dist/common/markdown.d.ts +3 -0
- package/dist/common/markdown.jsx +4 -0
- package/dist/common/mtlink.d.ts +14 -0
- package/dist/common/mtlink.jsx +16 -0
- package/dist/common/pip/PipExamplePage.d.ts +1 -0
- package/dist/common/pip/PipExamplePage.jsx +42 -0
- package/dist/common/pip/ReactDocumentPictureInPicture.d.ts +28 -0
- package/dist/common/pip/ReactDocumentPictureInPicture.jsx +122 -0
- package/dist/common/react-markdown/Code.d.ts +6 -0
- package/dist/common/react-markdown/Code.jsx +12 -0
- package/dist/common/react-markdown/MarkdownToolbar.d.ts +4 -0
- package/dist/common/react-markdown/MarkdownToolbar.jsx +15 -0
- package/dist/common/react-markdown/ReactMarkdownExample.d.ts +1 -0
- package/dist/common/react-markdown/ReactMarkdownExample.jsx +27 -0
- package/dist/common/schema-form/SchemaFormFieldsRender.d.ts +4 -0
- package/dist/common/schema-form/SchemaFormFieldsRender.jsx +22 -0
- package/dist/common/schema-form/SchemaFormView.d.ts +12 -0
- package/dist/common/schema-form/SchemaFormView.jsx +31 -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.jsx +26 -0
- package/dist/common/table/cells/ExpenderCell.d.ts +2 -0
- package/dist/common/table/cells/ExpenderCell.jsx +10 -0
- package/dist/common/table/cells/SelectCell.d.ts +13 -0
- package/dist/common/table/cells/SelectCell.jsx +32 -0
- package/dist/common/table/cells/Text.d.ts +9 -0
- package/dist/common/table/cells/Text.jsx +15 -0
- package/dist/common/table/cells/ViewLink.d.ts +13 -0
- package/dist/common/table/cells/ViewLink.jsx +32 -0
- package/dist/common/table/cells/container/cellWrapper.d.ts +6 -0
- package/dist/common/table/cells/container/cellWrapper.jsx +6 -0
- package/dist/common/table/cells/number.d.ts +3 -0
- package/dist/common/table/cells/number.jsx +11 -0
- package/dist/common/table/cells/string.d.ts +3 -0
- package/dist/common/table/cells/string.jsx +17 -0
- package/dist/common/table/data-table-pagination.d.ts +6 -0
- package/dist/common/table/data-table-pagination.jsx +49 -0
- package/dist/common/table/data-table-view-options.d.ts +6 -0
- package/dist/common/table/data-table-view-options.jsx +26 -0
- package/dist/common/table/datatable-view-options.d.ts +12 -0
- package/dist/common/table/datatable-view-options.jsx +2 -0
- package/dist/common/table/example/ExampleTable.d.ts +1 -0
- package/dist/common/table/example/ExampleTable.jsx +102 -0
- package/dist/common/table/header/SimpleHeader.d.ts +4 -0
- package/dist/common/table/header/SimpleHeader.jsx +39 -0
- package/dist/common/table/header/header.d.ts +5 -0
- package/dist/common/table/header/header.jsx +15 -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.jsx +13 -0
- package/dist/common/theme/mode-toggle.d.ts +1 -0
- package/dist/common/theme/mode-toggle.jsx +28 -0
- package/dist/common/theme/theme-toggle.d.ts +1 -0
- package/dist/common/theme/theme-toggle.jsx +12 -0
- package/dist/common/tiptap/MenuBar.d.ts +1 -0
- package/dist/common/tiptap/MenuBar.jsx +100 -0
- package/dist/common/tiptap/TiptapEditor.d.ts +5 -0
- package/dist/common/tiptap/TiptapEditor.jsx +56 -0
- package/dist/common/tiptap/examples/Demo-Default.d.ts +1 -0
- package/dist/common/tiptap/examples/Demo-Default.jsx +152 -0
- package/dist/common/tiptap/examples/Demo-Tiptap.d.ts +1 -0
- package/dist/common/tiptap/examples/Demo-Tiptap.jsx +12 -0
- package/dist/components/ChatMessageBubble.d.ts +6 -0
- package/dist/components/ChatMessageBubble.jsx +26 -0
- package/dist/components/IntermediateStep.d.ts +4 -0
- package/dist/components/IntermediateStep.jsx +32 -0
- package/dist/components/UploadDocumentsForm.d.ts +1 -0
- package/dist/components/UploadDocumentsForm.jsx +40 -0
- package/dist/components/auth/LoginDlg.d.ts +0 -0
- package/dist/components/auth/LoginDlg.jsx +1 -0
- package/dist/components/button-scroll-to-bottom.d.ts +8 -0
- package/dist/components/button-scroll-to-bottom.jsx +11 -0
- package/dist/components/chat-share-dialog.d.ts +10 -0
- package/dist/components/chat-share-dialog.jsx +55 -0
- package/dist/components/dev-bot/DevBot.d.ts +8 -0
- package/dist/components/dev-bot/DevBot.jsx +48 -0
- package/dist/components/dev-bot/DevBotActions.d.ts +13 -0
- package/dist/components/dev-bot/DevBotActions.jsx +164 -0
- package/dist/components/dev-bot/actions.d.ts +2 -0
- package/dist/components/dev-bot/actions.jsx +9 -0
- package/dist/components/dev-bot/chat-list.d.ts +8 -0
- package/dist/components/dev-bot/chat-list.jsx +36 -0
- package/dist/components/dev-bot/chat-panel.d.ts +10 -0
- package/dist/components/dev-bot/chat-panel.jsx +71 -0
- package/dist/components/dev-bot/prompt-form.d.ts +5 -0
- package/dist/components/dev-bot/prompt-form.jsx +69 -0
- package/dist/components/empty-screen.d.ts +1 -0
- package/dist/components/empty-screen.jsx +19 -0
- package/dist/components/external-link.d.ts +4 -0
- package/dist/components/external-link.jsx +8 -0
- package/dist/components/message.d.ts +16 -0
- package/dist/components/message.jsx +74 -0
- package/dist/components/spinner.d.ts +1 -0
- package/dist/components/spinner.jsx +4 -0
- package/dist/components/tool-ui/BlogHomePage.d.ts +5 -0
- package/dist/components/tool-ui/BlogHomePage.jsx +12 -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.jsx +9 -0
- package/dist/components/tool-ui/DpCfWorker.d.ts +1 -0
- package/dist/components/tool-ui/DpCfWorker.jsx +15 -0
- package/dist/components/tool-ui/DpMtxEdge.d.ts +1 -0
- package/dist/components/tool-ui/DpMtxEdge.jsx +15 -0
- package/dist/components/tool-ui/ExtractArticle.d.ts +1 -0
- package/dist/components/tool-ui/ExtractArticle.jsx +41 -0
- package/dist/components/tool-ui/OpenBrowser.d.ts +1 -0
- package/dist/components/tool-ui/OpenBrowser.jsx +41 -0
- package/dist/components/tool-ui/vcDeploy.d.ts +1 -0
- package/dist/components/tool-ui/vcDeploy.jsx +15 -0
- package/dist/demos/bigcode/BigCode.d.ts +4 -0
- package/dist/demos/bigcode/BigCode.jsx +16 -0
- package/dist/demos/condition-type/serialize.d.ts +3 -0
- package/dist/demos/condition-type/serialize.jsx +32 -0
- package/dist/demos/lib.d.ts +3 -0
- package/dist/demos/lib.jsx +20 -0
- package/dist/demos/scrollarea/LongListDemo.d.ts +1 -0
- package/dist/demos/scrollarea/LongListDemo.jsx +8 -0
- package/dist/demos/scrollarea/ScrollAreaDemo.d.ts +1 -0
- package/dist/demos/scrollarea/ScrollAreaDemo.jsx +43 -0
- package/dist/demos/suspense-ssr/ExampleOg.d.ts +4 -0
- package/dist/demos/suspense-ssr/ExampleOg.jsx +19 -0
- package/dist/demos/suspense-ssr/ExamplePage.d.ts +3 -0
- package/dist/demos/suspense-ssr/ExamplePage.jsx +55 -0
- package/dist/demos/suspense-ssr/ExampleProviderProviders.d.ts +3 -0
- package/dist/demos/suspense-ssr/ExampleProviderProviders.jsx +10 -0
- package/dist/demos/suspense-ssr/ReadMe.d.ts +1 -0
- package/dist/demos/suspense-ssr/ReadMe.jsx +44 -0
- package/dist/demos/suspense-ssr/examplesPostDetail.d.ts +3 -0
- package/dist/demos/suspense-ssr/examplesPostDetail.jsx +28 -0
- package/dist/demos/suspense-ssr/examplesPosts.d.ts +1 -0
- package/dist/demos/suspense-ssr/examplesPosts.jsx +24 -0
- package/dist/form/EditFormToolbar.d.ts +13 -0
- package/dist/form/EditFormToolbar.jsx +72 -0
- package/dist/form/PopupFormV2.d.ts +46 -0
- package/dist/form/PopupFormV2.jsx +88 -0
- package/dist/form/SchemaFormFieldRender.d.ts +6 -0
- package/dist/form/SchemaFormFieldRender.jsx +42 -0
- package/dist/form/ZodForm.d.ts +13 -0
- package/dist/form/ZodForm.jsx +35 -0
- package/dist/form/deleteConform.d.ts +8 -0
- package/dist/form/deleteConform.jsx +65 -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.jsx +20 -0
- package/dist/hooks/use-enter-submit.d.ts +5 -0
- package/dist/hooks/use-enter-submit.jsx +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.jsx +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.jsx +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.jsx +1 -0
- package/dist/icons/DotsHorizontalIcon.d.ts +1 -0
- package/dist/icons/DotsHorizontalIcon.jsx +1 -0
- package/dist/icons/MixerHorizontal.d.ts +1 -0
- package/dist/icons/MixerHorizontal.jsx +1 -0
- package/dist/icons/crazy-spinner.d.ts +2 -0
- package/dist/icons/crazy-spinner.jsx +8 -0
- package/dist/icons/font-default.d.ts +3 -0
- package/dist/icons/font-default.jsx +6 -0
- package/dist/icons/font-mono.d.ts +3 -0
- package/dist/icons/font-mono.jsx +6 -0
- package/dist/icons/font-serif.d.ts +3 -0
- package/dist/icons/font-serif.jsx +6 -0
- package/dist/icons/github.d.ts +3 -0
- package/dist/icons/github.jsx +5 -0
- package/dist/icons/icons-ai.d.ts +31 -0
- package/dist/icons/icons-ai.jsx +160 -0
- package/dist/icons/icons.d.ts +132 -0
- package/dist/icons/icons.jsx +188 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.jsx +4 -0
- package/dist/icons/loading-circle.d.ts +3 -0
- package/dist/icons/loading-circle.jsx +6 -0
- package/dist/icons/magic.d.ts +3 -0
- package/dist/icons/magic.jsx +7 -0
- package/dist/lib/auth/auth.config.d.ts +1 -0
- package/dist/lib/auth/auth.config.js +35 -0
- package/dist/lib/auth/auth.d.ts +5 -0
- package/dist/lib/auth/auth.js +7 -0
- package/dist/lib/auth/authActions.d.ts +9 -0
- package/dist/lib/auth/authActions.jsx +50 -0
- package/dist/lib/chat/chatActions.d.ts +27 -0
- package/dist/lib/chat/chatActions.jsx +120 -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.jsx +58 -0
- package/dist/lib/htmlparse/htmlParse.d.ts +2 -0
- package/dist/lib/htmlparse/htmlParse.jsx +50 -0
- package/dist/lib/react-query/ReactQueryProvider.d.ts +4 -0
- package/dist/lib/react-query/ReactQueryProvider.jsx +44 -0
- package/dist/lib/render.d.ts +3 -0
- package/dist/lib/render.jsx +20 -0
- package/dist/lib/service-worker/ServiceWorkerMain.d.ts +1 -0
- package/dist/lib/service-worker/ServiceWorkerMain.jsx +31 -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.jsx +13 -0
- package/dist/misc/ExampleErrorDemo.d.ts +3 -0
- package/dist/misc/ExampleErrorDemo.jsx +17 -0
- package/dist/misc/MtErrorBoundary.d.ts +16 -0
- package/dist/misc/MtErrorBoundary.jsx +32 -0
- package/dist/misc/MtErrorBoundary.stories.d.ts +15 -0
- package/dist/misc/MtErrorBoundary.stories.jsx +26 -0
- package/dist/misc/MtErrorBoundaryV2.d.ts +2 -0
- package/dist/misc/MtErrorBoundaryV2.jsx +13 -0
- package/dist/misc/MtErrorBoundaryV2.stories.d.ts +14 -0
- package/dist/misc/MtErrorBoundaryV2.stories.jsx +24 -0
- package/dist/mtapp/History.d.ts +23 -0
- package/dist/mtapp/History.jsx +59 -0
- package/dist/mtapp/MtAppProvider.d.ts +53 -0
- package/dist/mtapp/MtAppProvider.jsx +61 -0
- package/dist/mtedtior/LzMtEditor.d.ts +6 -0
- package/dist/mtedtior/LzMtEditor.jsx +7 -0
- package/dist/mtedtior/MtEditor.d.ts +29 -0
- package/dist/mtedtior/MtEditor.jsx +149 -0
- package/dist/mtedtior/components/editor-bubble-item.d.ts +9 -0
- package/dist/mtedtior/components/editor-bubble-item.jsx +15 -0
- package/dist/mtedtior/components/editor-bubble.d.ts +7 -0
- package/dist/mtedtior/components/editor-bubble.jsx +47 -0
- package/dist/mtedtior/components/editor-command-item.d.ts +19 -0
- package/dist/mtedtior/components/editor-command-item.jsx +17 -0
- package/dist/mtedtior/components/editor-command.d.ts +29 -0
- package/dist/mtedtior/components/editor-command.jsx +54 -0
- package/dist/mtedtior/components/editor.d.ts +21 -0
- package/dist/mtedtior/components/editor.jsx +17 -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.jsx +165 -0
- package/dist/mtedtior/extensions/image-resizer.d.ts +2 -0
- package/dist/mtedtior/extensions/image-resizer.jsx +30 -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.jsx +223 -0
- package/dist/mtedtior/extensions/twitter.d.ts +22 -0
- package/dist/mtedtior/extensions/twitter.jsx +87 -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.jsx +48 -0
- package/dist/mtedtior/generative/ai-selector-commands.d.ts +5 -0
- package/dist/mtedtior/generative/ai-selector-commands.jsx +55 -0
- package/dist/mtedtior/generative/ai-selector.d.ts +6 -0
- package/dist/mtedtior/generative/ai-selector.jsx +74 -0
- package/dist/mtedtior/generative/generative-menu-switch.d.ts +8 -0
- package/dist/mtedtior/generative/generative-menu-switch.jsx +34 -0
- package/dist/mtedtior/mtextesions/DemoComponent.d.ts +2 -0
- package/dist/mtedtior/mtextesions/DemoComponent.jsx +34 -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.jsx +193 -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.jsx +98 -0
- package/dist/mtedtior/selectors/color-selector.d.ts +8 -0
- package/dist/mtedtior/selectors/color-selector.jsx +142 -0
- package/dist/mtedtior/selectors/link-selector.d.ts +8 -0
- package/dist/mtedtior/selectors/link-selector.jsx +68 -0
- package/dist/mtedtior/selectors/math-selector.d.ts +2 -0
- package/dist/mtedtior/selectors/math-selector.jsx +24 -0
- package/dist/mtedtior/selectors/node-selector.d.ts +14 -0
- package/dist/mtedtior/selectors/node-selector.jsx +94 -0
- package/dist/mtedtior/selectors/text-buttons.d.ts +1 -0
- package/dist/mtedtior/selectors/text-buttons.jsx +49 -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.jsx +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.jsx +38 -0
- package/dist/tools/devTools/bash.d.ts +14 -0
- package/dist/tools/devTools/bash.jsx +38 -0
- package/dist/tools/devTools/clean.d.ts +8 -0
- package/dist/tools/devTools/clean.jsx +33 -0
- package/dist/tools/devTools/cloudflareTunnel.d.ts +17 -0
- package/dist/tools/devTools/cloudflareTunnel.jsx +50 -0
- package/dist/tools/devTools/docker-compose.d.ts +8 -0
- package/dist/tools/devTools/docker-compose.jsx +21 -0
- package/dist/tools/devTools/dockerBuildMtm.d.ts +8 -0
- package/dist/tools/devTools/dockerBuildMtm.jsx +40 -0
- package/dist/tools/devTools/dpMtCfWorkerTool.d.ts +8 -0
- package/dist/tools/devTools/dpMtCfWorkerTool.jsx +17 -0
- package/dist/tools/devTools/dpMtxedge.d.ts +8 -0
- package/dist/tools/devTools/dpMtxedge.jsx +94 -0
- package/dist/tools/devTools/getIp.d.ts +14 -0
- package/dist/tools/devTools/getIp.jsx +34 -0
- package/dist/tools/devTools/installOsPackages.d.ts +8 -0
- package/dist/tools/devTools/installOsPackages.jsx +34 -0
- package/dist/tools/devTools/ollamaService.d.ts +14 -0
- package/dist/tools/devTools/ollamaService.jsx +33 -0
- package/dist/tools/devTools/packageRelease.d.ts +8 -0
- package/dist/tools/devTools/packageRelease.jsx +50 -0
- package/dist/tools/devTools/vcDeploytool.d.ts +8 -0
- package/dist/tools/devTools/vcDeploytool.jsx +80 -0
- package/dist/tools/devTools/vncServer.d.ts +1 -0
- package/dist/tools/devTools/vncServer.jsx +1 -0
- package/dist/tools/genSiteHeaderBarsTool.d.ts +14 -0
- package/dist/tools/genSiteHeaderBarsTool.jsx +17 -0
- package/dist/tools/hello1Tool.d.ts +14 -0
- package/dist/tools/hello1Tool.jsx +18 -0
- package/dist/tools/rag/RagHello.d.ts +8 -0
- package/dist/tools/rag/RagHello.jsx +15 -0
- package/dist/tools/rag/addResoure.d.ts +18 -0
- package/dist/tools/rag/addResoure.jsx +27 -0
- package/dist/tools/rag/getInformation.d.ts +18 -0
- package/dist/tools/rag/getInformation.jsx +15 -0
- package/dist/tools/rag/ui/RagInput.d.ts +2 -0
- package/dist/tools/rag/ui/RagInput.jsx +51 -0
- package/dist/tools/search/exampleSearchTool.d.ts +8 -0
- package/dist/tools/search/exampleSearchTool.jsx +15 -0
- package/dist/tools/webbot/callAdminBot.d.ts +8 -0
- package/dist/tools/webbot/callAdminBot.jsx +15 -0
- package/dist/tools/welcomeAdminTool.d.ts +8 -0
- package/dist/tools/welcomeAdminTool.jsx +14 -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.jsx +20 -0
- package/dist/ui/alert-dialog.d.ts +20 -0
- package/dist/ui/alert-dialog.jsx +29 -0
- package/dist/ui/alert.d.ts +8 -0
- package/dist/ui/alert.jsx +21 -0
- package/dist/ui/aspect-ratio.d.ts +3 -0
- package/dist/ui/aspect-ratio.jsx +4 -0
- package/dist/ui/avatar.d.ts +6 -0
- package/dist/ui/avatar.jsx +11 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/badge.jsx +20 -0
- package/dist/ui/breadcrumb.d.ts +19 -0
- package/dist/ui/breadcrumb.jsx +27 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/button.jsx +32 -0
- package/dist/ui/calendar.d.ts +8 -0
- package/dist/ui/calendar.jsx +40 -0
- package/dist/ui/card.d.ts +8 -0
- package/dist/ui/card.jsx +15 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/checkbox.jsx +12 -0
- package/dist/ui/codeblock.d.ts +12 -0
- package/dist/ui/codeblock.jsx +101 -0
- package/dist/ui/collapsible.d.ts +5 -0
- package/dist/ui/collapsible.jsx +6 -0
- package/dist/ui/command.d.ts +50 -0
- package/dist/ui/command.jsx +37 -0
- package/dist/ui/context-menu.d.ts +27 -0
- package/dist/ui/context-menu.jsx +52 -0
- package/dist/ui/dialog.d.ts +19 -0
- package/dist/ui/dialog.jsx +31 -0
- package/dist/ui/drawer.d.ts +24 -0
- package/dist/ui/drawer.jsx +28 -0
- package/dist/ui/dropdown-menu.d.ts +27 -0
- package/dist/ui/dropdown-menu.jsx +54 -0
- package/dist/ui/form.d.ts +23 -0
- package/dist/ui/form.jsx +67 -0
- package/dist/ui/hover-card.d.ts +6 -0
- package/dist/ui/hover-card.jsx +9 -0
- package/dist/ui/input.d.ts +5 -0
- package/dist/ui/input.jsx +7 -0
- package/dist/ui/label.d.ts +5 -0
- package/dist/ui/label.jsx +9 -0
- package/dist/ui/menubar.d.ts +33 -0
- package/dist/ui/menubar.jsx +54 -0
- package/dist/ui/navigation-menu.d.ts +12 -0
- package/dist/ui/navigation-menu.jsx +34 -0
- package/dist/ui/pagination.d.ts +28 -0
- package/dist/ui/pagination.jsx +31 -0
- package/dist/ui/popover.d.ts +6 -0
- package/dist/ui/popover.jsx +11 -0
- package/dist/ui/progress.d.ts +4 -0
- package/dist/ui/progress.jsx +9 -0
- package/dist/ui/radio-group.d.ts +5 -0
- package/dist/ui/radio-group.jsx +18 -0
- package/dist/ui/resizable.d.ts +23 -0
- package/dist/ui/resizable.jsx +12 -0
- package/dist/ui/scroll-area.d.ts +5 -0
- package/dist/ui/scroll-area.jsx +19 -0
- package/dist/ui/select.d.ts +11 -0
- package/dist/ui/select.jsx +39 -0
- package/dist/ui/separator.d.ts +4 -0
- package/dist/ui/separator.jsx +7 -0
- package/dist/ui/sheet.d.ts +25 -0
- package/dist/ui/sheet.jsx +45 -0
- package/dist/ui/skeleton.d.ts +2 -0
- package/dist/ui/skeleton.jsx +5 -0
- package/dist/ui/slider.d.ts +4 -0
- package/dist/ui/slider.jsx +12 -0
- package/dist/ui/sonner.d.ts +4 -0
- package/dist/ui/sonner.jsx +15 -0
- package/dist/ui/switch.d.ts +4 -0
- package/dist/ui/switch.jsx +9 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.jsx +21 -0
- package/dist/ui/tabs.d.ts +7 -0
- package/dist/ui/tabs.jsx +12 -0
- package/dist/ui/textarea.d.ts +5 -0
- package/dist/ui/textarea.jsx +7 -0
- package/dist/ui/toast.d.ts +15 -0
- package/dist/ui/toast.jsx +34 -0
- package/dist/ui/toaster.d.ts +1 -0
- package/dist/ui/toaster.jsx +19 -0
- package/dist/ui/toggle.d.ts +12 -0
- package/dist/ui/toggle.jsx +25 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/tooltip.jsx +10 -0
- package/dist/ui/use-toast.d.ts +44 -0
- package/dist/ui/use-toast.js +124 -0
- package/dist/ui-mt/Boundary.d.ts +9 -0
- package/dist/ui-mt/Boundary.jsx +16 -0
- package/dist/ui-mt/Button.d.ts +1 -0
- package/dist/ui-mt/Button.jsx +2 -0
- package/dist/ui-mt/DropdownMenuItemLink.d.ts +7 -0
- package/dist/ui-mt/DropdownMenuItemLink.jsx +9 -0
- package/dist/ui-mt/ErrorMessage.d.ts +2 -0
- package/dist/ui-mt/ErrorMessage.jsx +7 -0
- package/dist/ui-mt/ExampleTree.d.ts +2 -0
- package/dist/ui-mt/ExampleTree.jsx +83 -0
- package/dist/ui-mt/MtDialog.d.ts +19 -0
- package/dist/ui-mt/MtDialog.jsx +39 -0
- package/dist/ui-mt/MtForm.d.ts +1 -0
- package/dist/ui-mt/MtForm.jsx +3 -0
- package/dist/ui-mt/NavTag.d.ts +10 -0
- package/dist/ui-mt/NavTag.jsx +35 -0
- package/dist/ui-mt/ScreenPanel.d.ts +4 -0
- package/dist/ui-mt/ScreenPanel.jsx +10 -0
- package/dist/ui-mt/Separator.d.ts +1 -0
- package/dist/ui-mt/Separator.jsx +3 -0
- package/dist/ui-mt/SimpleModel.d.ts +3 -0
- package/dist/ui-mt/SimpleModel.jsx +30 -0
- package/dist/ui-mt/SimpleTag.d.ts +5 -0
- package/dist/ui-mt/SimpleTag.jsx +7 -0
- package/dist/ui-mt/Slot.d.ts +1 -0
- package/dist/ui-mt/Slot.jsx +1 -0
- package/dist/ui-mt/Tree.d.ts +14 -0
- package/dist/ui-mt/Tree.jsx +98 -0
- package/dist/ui-mt/WithLinkIf.d.ts +4 -0
- package/dist/ui-mt/WithLinkIf.jsx +9 -0
- package/dist/ui-mt/headline.d.ts +7 -0
- package/dist/ui-mt/headline.jsx +8 -0
- package/dist/ui-mt/input-field/InputField.d.ts +4 -0
- package/dist/ui-mt/input-field/InputField.jsx +40 -0
- package/dist/ui-mt/input-field/SingleUploadForm.d.ts +2 -0
- package/dist/ui-mt/input-field/SingleUploadForm.jsx +83 -0
- package/dist/ui-mt/input-field/TextArea.d.ts +4 -0
- package/dist/ui-mt/input-field/TextArea.jsx +20 -0
- package/dist/ui-mt/input-field/TextFileInput.d.ts +8 -0
- package/dist/ui-mt/input-field/TextFileInput.jsx +38 -0
- package/dist/ui-mt/input-field/select/InputSelect.d.ts +8 -0
- package/dist/ui-mt/input-field/select/InputSelect.jsx +44 -0
- package/dist/ui-mt/inputs/SearchInput.d.ts +2 -0
- package/dist/ui-mt/inputs/SearchInput.jsx +12 -0
- package/dist/ui-mt/inputs/TaskStatusInput.d.ts +2 -0
- package/dist/ui-mt/inputs/TaskStatusInput.jsx +37 -0
- package/dist/ui-mt/inputs/UrlsInput.d.ts +2 -0
- package/dist/ui-mt/inputs/UrlsInput.jsx +16 -0
- package/dist/ui-mt/inputs/input.d.ts +1 -0
- package/dist/ui-mt/inputs/input.jsx +2 -0
- package/dist/ui-mt/modal/MtModal.d.ts +29 -0
- package/dist/ui-mt/modal/MtModal.jsx +58 -0
- package/dist/ui-mt/mt-tree-view/MtTreeViewExample.d.ts +1 -0
- package/dist/ui-mt/mt-tree-view/MtTreeViewExample.jsx +2 -0
- package/dist/ui-mt/mt-tree-view/mt-tree-view-api.d.ts +38 -0
- package/dist/ui-mt/mt-tree-view/mt-tree-view-api.jsx +158 -0
- package/dist/ui-mt/mt-tree-view/mt-treeview.d.ts +24 -0
- package/dist/ui-mt/mt-tree-view/mt-treeview.jsx +40 -0
- package/dist/ui-mt/pagination.d.ts +7 -0
- package/dist/ui-mt/pagination.jsx +49 -0
- package/dist/ui-mt/skeleton/NewLoading.d.ts +1 -0
- package/dist/ui-mt/skeleton/NewLoading.jsx +31 -0
- package/dist/ui-mt/skeleton/SkeletonDashboardShell.d.ts +0 -0
- package/dist/ui-mt/skeleton/SkeletonDashboardShell.jsx +2 -0
- package/dist/ui-mt/skeleton/SkeletonInput.d.ts +1 -0
- package/dist/ui-mt/skeleton/SkeletonInput.jsx +6 -0
- package/dist/ui-mt/skeleton/SkeletonLayout.d.ts +1 -0
- package/dist/ui-mt/skeleton/SkeletonLayout.jsx +8 -0
- package/dist/ui-mt/skeleton/SkeletonLoading.d.ts +3 -0
- package/dist/ui-mt/skeleton/SkeletonLoading.jsx +14 -0
- package/dist/ui-mt/skeleton/skeleton-card.d.ts +3 -0
- package/dist/ui-mt/skeleton/skeleton-card.jsx +10 -0
- package/dist/ui-mt/skeleton/skeleton2.d.ts +1 -0
- package/dist/ui-mt/skeleton/skeleton2.jsx +8 -0
- package/dist/ui-mt/skeleton/skeletons.d.ts +6 -0
- package/dist/ui-mt/skeleton/skeletons.jsx +12 -0
- package/dist/ui-mt/skeleton.d.ts +5 -0
- package/dist/ui-mt/skeleton.jsx +4 -0
- package/dist/ui-mt/types.d.ts +4 -0
- package/dist/ui-mt/types.jsx +1 -0
- package/dist/ui-vamp/alert.d.ts +17 -0
- package/dist/ui-vamp/alert.jsx +45 -0
- package/dist/ui-vamp/button.d.ts +13 -0
- package/dist/ui-vamp/button.jsx +34 -0
- package/dist/ui-vamp/card.d.ts +23 -0
- package/dist/ui-vamp/card.jsx +32 -0
- package/dist/ui-vamp/chip.d.ts +11 -0
- package/dist/ui-vamp/chip.jsx +23 -0
- package/dist/ui-vamp/external-link.d.ts +7 -0
- package/dist/ui-vamp/external-link.jsx +6 -0
- package/dist/ui-vamp/input.d.ts +13 -0
- package/dist/ui-vamp/input.jsx +31 -0
- package/dist/ui-vamp/keyvalue.d.ts +7 -0
- package/dist/ui-vamp/keyvalue.jsx +6 -0
- package/dist/ui-vamp/mobile-nav-button.d.ts +2 -0
- package/dist/ui-vamp/mobile-nav-button.jsx +13 -0
- package/dist/ui-vamp/modal.d.ts +11 -0
- package/dist/ui-vamp/modal.jsx +22 -0
- package/dist/ui-vamp/textarea.d.ts +12 -0
- package/dist/ui-vamp/textarea.jsx +21 -0
- package/dist/ui-vamp/toggle-group.d.ts +8 -0
- package/dist/ui-vamp/toggle-group.jsx +10 -0
- package/dist/video-player/mt-video-player.d.ts +7 -0
- package/dist/video-player/mt-video-player.jsx +37 -0
- package/dist/video-player/video-player2/modal-video-player.d.ts +12 -0
- package/dist/video-player/video-player2/modal-video-player.jsx +43 -0
- package/package.json +3 -2
|
@@ -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,20 @@
|
|
|
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, [], [], DeleteConformState>;
|
|
13
|
+
export declare const DeleteConfirmProvider: (props: PropsWithChildren<MtxFormProps>) => import("react").JSX.Element;
|
|
14
|
+
export declare const useDeleteConfirm: () => {
|
|
15
|
+
show: (props: {
|
|
16
|
+
callback: () => void;
|
|
17
|
+
}) => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const DeleteConfirmDlg: () => import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -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,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.Element;
|
|
10
|
+
export declare function useGlobalSearch<T>(selector: (state: GlobalSearchState) => T): T;
|
|
11
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export declare function HtmlChangesObserver({ children }: React.PropsWithChildren): import("react").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { HtmlDiffer } from "html-differ";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
const styles = {
|
|
5
|
+
none: "background: transparent; color:black",
|
|
6
|
+
gray: "background: transparent; color: gray",
|
|
7
|
+
bgGreen: "background: green; color:black",
|
|
8
|
+
bgRed: "background: red; color:black",
|
|
9
|
+
};
|
|
10
|
+
export function HtmlChangesObserver({ children }) {
|
|
11
|
+
const targetNode = useRef(null);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const differ = new HtmlDiffer();
|
|
14
|
+
let lastHtml = targetNode.current.innerHTML;
|
|
15
|
+
function observeChanges() {
|
|
16
|
+
const newHtml = targetNode.current.innerHTML;
|
|
17
|
+
if (newHtml != lastHtml) {
|
|
18
|
+
const diff = differ.diffHtml(lastHtml, newHtml);
|
|
19
|
+
lastHtml = newHtml;
|
|
20
|
+
logDiff(diff);
|
|
21
|
+
}
|
|
22
|
+
if (running) {
|
|
23
|
+
requestAnimationFrame(observeChanges);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
let running = true;
|
|
27
|
+
requestAnimationFrame(observeChanges);
|
|
28
|
+
return () => {
|
|
29
|
+
running = false;
|
|
30
|
+
};
|
|
31
|
+
}, []);
|
|
32
|
+
return <div ref={targetNode}>{children}</div>;
|
|
33
|
+
}
|
|
34
|
+
function logDiff(diff) {
|
|
35
|
+
let output = "", styleArr = [];
|
|
36
|
+
if (diff.length === 1 && !diff[0].added && !diff[0].removed)
|
|
37
|
+
return output;
|
|
38
|
+
for (const part of diff) {
|
|
39
|
+
var index = diff.indexOf(part), partValue = part.value;
|
|
40
|
+
if (part.added || part.removed) {
|
|
41
|
+
output += index === 0 ? "\n" : "";
|
|
42
|
+
output += "%c" + partValue;
|
|
43
|
+
styleArr.push(part.added ? styles.bgGreen : styles.bgRed);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
output += index !== 0 ? "" : "\n";
|
|
47
|
+
output += "%c" + partValue;
|
|
48
|
+
styleArr.push(styles.gray);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
console.log(performance.now() + "ms DOM changes: " + output, ...styleArr);
|
|
52
|
+
}
|
|
@@ -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 @@
|
|
|
1
|
+
export declare const MtProgressBar: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NotFoundGoBack: () => import("react").JSX.Element;
|
|
@@ -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,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.Element;
|
|
@@ -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,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.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.Element;
|
|
19
|
+
export {};
|
|
@@ -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
|
+
};
|
|
File without changes
|
|
@@ -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,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): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export default function PipExamplePage(): import("react").JSX.Element;
|
|
@@ -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,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;
|