@blocklet/pages-kit 0.4.115 → 0.4.117
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/lib/cjs/builtin/async/rehype-mermaid.js +26 -0
- package/lib/cjs/builtin/markdown/action-button.js +41 -0
- package/lib/cjs/builtin/markdown/index.js +13 -0
- package/lib/cjs/builtin/markdown/loading-button.js +19 -0
- package/lib/cjs/builtin/markdown/markdown-context.js +17 -0
- package/lib/cjs/builtin/markdown/markdown-renderer.js +156 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/builtin/async/rehype-mermaid.js +1 -0
- package/lib/esm/builtin/markdown/action-button.js +35 -0
- package/lib/esm/builtin/markdown/index.js +4 -0
- package/lib/esm/builtin/markdown/loading-button.js +17 -0
- package/lib/esm/builtin/markdown/markdown-context.js +12 -0
- package/lib/esm/builtin/markdown/markdown-renderer.js +128 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/builtin/async/rehype-mermaid.d.ts +2 -0
- package/lib/types/builtin/markdown/action-button.d.ts +13 -0
- package/lib/types/builtin/markdown/index.d.ts +5 -0
- package/lib/types/builtin/markdown/loading-button.d.ts +3 -0
- package/lib/types/builtin/markdown/markdown-context.d.ts +16 -0
- package/lib/types/builtin/markdown/markdown-renderer.d.ts +12 -0
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LoadingButtonProps } from '@mui/lab';
|
|
2
|
+
import { TooltipProps } from '@mui/material';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
export default function ActionButton({ tip, tipSucceed, title, titleSucceed, icon, iconSucceed, autoReset, placement, ...props }: {
|
|
5
|
+
tip?: ReactNode;
|
|
6
|
+
tipSucceed?: ReactNode;
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
titleSucceed?: ReactNode;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
iconSucceed?: ReactNode;
|
|
11
|
+
autoReset?: boolean;
|
|
12
|
+
placement?: TooltipProps['placement'];
|
|
13
|
+
} & Omit<Partial<LoadingButtonProps>, 'title'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MarkdownContext, MarkdownOptions, MarkdownProvider, useMarkdownOptions } from './markdown-context';
|
|
2
|
+
import MarkdownRenderer, { MarkdownRendererProps } from './markdown-renderer';
|
|
3
|
+
export { MarkdownRenderer, MarkdownProvider, MarkdownContext, useMarkdownOptions };
|
|
4
|
+
export type { MarkdownRendererProps, MarkdownOptions };
|
|
5
|
+
export default MarkdownRenderer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownOptions {
|
|
3
|
+
codeOptions?: {
|
|
4
|
+
showActionButton?: boolean;
|
|
5
|
+
theme?: {
|
|
6
|
+
[key: string]: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const MarkdownContext: import("react").Context<MarkdownOptions>;
|
|
11
|
+
export declare const useMarkdownOptions: () => MarkdownOptions;
|
|
12
|
+
export interface MarkdownProviderProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
options?: MarkdownOptions;
|
|
15
|
+
}
|
|
16
|
+
export declare function MarkdownProvider({ children, options }: MarkdownProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
import { MarkdownHooks } from 'react-markdown';
|
|
3
|
+
export interface MarkdownRendererProps extends ComponentProps<typeof MarkdownHooks> {
|
|
4
|
+
codeOptions?: {
|
|
5
|
+
showActionButton?: boolean;
|
|
6
|
+
theme?: {
|
|
7
|
+
[key: string]: React.CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare function MarkdownRenderer(props: MarkdownRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default MarkdownRenderer;
|