ds-markdown 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +335 -512
- package/README.zh.md +938 -0
- package/es/Markdown/index.d.ts +1 -1
- package/es/MarkdownCMD/index.d.ts +1 -1
- package/es/components/CodeComponent/BlockWrap/index.d.ts +1 -1
- package/es/components/CodeComponent/index.d.ts +1 -1
- package/es/components/TableComponent/index.d.ts +1 -1
- package/es/components/ui/IconButton/index.d.ts +1 -1
- package/es/components/ui/Segmented/index.d.ts +1 -1
- package/es/components/ui/SuccessButton/index.d.ts +1 -1
- package/es/context/ConfigProvider/index.d.ts +2 -2
- package/es/context/MarkdownProvider.d.ts +1 -1
- package/es/context/MarkdownThemeProvider.d.ts +1 -1
- package/es/defined/index.d.ts +1 -1
- package/es/i18n/index.d.ts +6 -6
- package/es/index.d.ts +18 -18
- package/es/plugins/index.d.ts +2 -2
- package/es/utils/compiler.d.ts +1 -1
- package/package.json +2 -3
- package/README.en.md +0 -753
package/es/Markdown/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MarkdownProps } from '../defined';
|
|
2
|
+
import { MarkdownProps } from '../defined/index.js';
|
|
3
3
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<MarkdownProps & React.RefAttributes<import("react-markdown-typer/es/defined").MarkdownBaseRef>>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnswerType, IMarkdownCode, IMarkdownMath, IMarkdownPlugin, MarkdownCMDRef, Theme } from '../defined';
|
|
1
|
+
import { AnswerType, IMarkdownCode, IMarkdownMath, IMarkdownPlugin, MarkdownCMDRef, Theme } from '../defined/index.js';
|
|
2
2
|
import { MarkdownTyperCMDProps } from 'react-markdown-typer';
|
|
3
3
|
interface IMarkdownCustom {
|
|
4
4
|
answerType?: AnswerType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Button from '../../ui/Button';
|
|
2
|
+
import Button from '../../ui/Button/index.js';
|
|
3
3
|
type ButtonProps = React.ComponentProps<typeof Button>;
|
|
4
4
|
interface SuccessButtonProps extends Omit<ButtonProps, 'onClick'> {
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ZhCN } from '../../i18n/zh';
|
|
3
|
-
import { IMarkdownKatexConfig, IMarkdownMermaidConfig } from '../../defined';
|
|
2
|
+
import { ZhCN } from '../../i18n/zh/index.js';
|
|
3
|
+
import { IMarkdownKatexConfig, IMarkdownMermaidConfig } from '../../defined/index.js';
|
|
4
4
|
export type Locale = ZhCN;
|
|
5
5
|
export interface ConfigProviderProps {
|
|
6
6
|
locale?: Locale;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { MarkdownBaseProps } from '../defined';
|
|
2
|
+
import type { MarkdownBaseProps } from '../defined/index.js';
|
|
3
3
|
export type MarkdownContextType = Partial<MarkdownBaseProps>;
|
|
4
4
|
export declare const MarkdownProvider: React.FC<{
|
|
5
5
|
value: MarkdownContextType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { IMarkdownThemeProps, IMarkdownThemeStateProps } from '../defined';
|
|
2
|
+
import type { IMarkdownThemeProps, IMarkdownThemeStateProps } from '../defined/index.js';
|
|
3
3
|
export type MarkdownThemeContextType = {
|
|
4
4
|
state: IMarkdownThemeStateProps;
|
|
5
5
|
methods: {
|
package/es/defined/index.d.ts
CHANGED
package/es/i18n/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as zhCN } from './zh';
|
|
2
|
-
export type { ZhCN } from './zh';
|
|
3
|
-
export { default as enUS } from './en';
|
|
4
|
-
export type { EnUS } from './en';
|
|
5
|
-
export { ConfigProvider, useConfig, useLocale } from '../context/ConfigProvider';
|
|
6
|
-
export type { Locale, ConfigProviderProps, ConfigContextType } from '../context/ConfigProvider';
|
|
1
|
+
export { default as zhCN } from './zh/index.js';
|
|
2
|
+
export type { ZhCN } from './zh/index.js';
|
|
3
|
+
export { default as enUS } from './en/index.js';
|
|
4
|
+
export type { EnUS } from './en/index.js';
|
|
5
|
+
export { ConfigProvider, useConfig, useLocale } from '../context/ConfigProvider/index.js';
|
|
6
|
+
export type { Locale, ConfigProviderProps, ConfigContextType } from '../context/ConfigProvider/index.js';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/es/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import MarkdownCMD from './MarkdownCMD';
|
|
2
|
-
import Markdown from './Markdown';
|
|
3
|
-
import type { MarkdownCMDRef, MarkdownRef, IMarkdownMath, MarkdownProps, MarkdownCMDProps, IMarkdownPlugin, IMarkdownMermaidConfig } from './defined';
|
|
1
|
+
import MarkdownCMD from './MarkdownCMD/index.js';
|
|
2
|
+
import Markdown from './Markdown/index.js';
|
|
3
|
+
import type { MarkdownCMDRef, MarkdownRef, IMarkdownMath, MarkdownProps, MarkdownCMDProps, IMarkdownPlugin, IMarkdownMermaidConfig } from './defined/index.js';
|
|
4
4
|
import type { ITypedChar } from 'react-markdown-typer';
|
|
5
|
-
import Button from './components/ui/Button';
|
|
6
|
-
import IconButton from './components/ui/IconButton';
|
|
7
|
-
import Segmented from './components/ui/Segmented';
|
|
8
|
-
import SuccessButton from './components/ui/SuccessButton';
|
|
9
|
-
import CopyButton from './components/CopyButton';
|
|
10
|
-
import DownloadButton from './components/DownloadButton';
|
|
11
|
-
import CodeBlockActions from './components/CodeComponent/CodeBlockActions';
|
|
12
|
-
import CodeBlockWrap from './components/CodeComponent/CodeBlockWrap';
|
|
13
|
-
import HighlightCode from './components/CodeComponent/HighlightCode';
|
|
14
|
-
import './index.
|
|
15
|
-
export { CopyIcon, DownloadIcon, CheckMarkIcon } from './components/Icon';
|
|
16
|
-
export { ConfigProvider, useConfig, useLocale } from './context/ConfigProvider';
|
|
17
|
-
export { useThemeState } from './context/MarkdownThemeProvider';
|
|
18
|
-
export * from './defined/mermaid.type';
|
|
19
|
-
export type { Locale, ConfigProviderProps, ConfigContextType } from './context/ConfigProvider';
|
|
5
|
+
import Button from './components/ui/Button/index.js';
|
|
6
|
+
import IconButton from './components/ui/IconButton/index.js';
|
|
7
|
+
import Segmented from './components/ui/Segmented/index.js';
|
|
8
|
+
import SuccessButton from './components/ui/SuccessButton/index.js';
|
|
9
|
+
import CopyButton from './components/CopyButton/index.js';
|
|
10
|
+
import DownloadButton from './components/DownloadButton/index.js';
|
|
11
|
+
import CodeBlockActions from './components/CodeComponent/CodeBlockActions/index.js';
|
|
12
|
+
import CodeBlockWrap from './components/CodeComponent/CodeBlockWrap/index.js';
|
|
13
|
+
import HighlightCode from './components/CodeComponent/HighlightCode/index.js';
|
|
14
|
+
import './index.css';
|
|
15
|
+
export { CopyIcon, DownloadIcon, CheckMarkIcon } from './components/Icon/index.js';
|
|
16
|
+
export { ConfigProvider, useConfig, useLocale } from './context/ConfigProvider/index.js';
|
|
17
|
+
export { useThemeState } from './context/MarkdownThemeProvider.js';
|
|
18
|
+
export * from './defined/mermaid.type.js';
|
|
19
|
+
export type { Locale, ConfigProviderProps, ConfigContextType } from './context/ConfigProvider/index.js';
|
|
20
20
|
export default Markdown;
|
|
21
21
|
export type { MarkdownCMDRef, MarkdownRef, IMarkdownMath, ITypedChar, MarkdownProps, MarkdownCMDProps, IMarkdownPlugin, IMarkdownMermaidConfig };
|
|
22
22
|
export { Markdown, MarkdownCMD, Button, IconButton, CopyButton, DownloadButton, SuccessButton, CodeBlockActions, CodeBlockWrap, HighlightCode, Segmented };
|
package/es/plugins/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IMarkdownPlugin } from '../defined';
|
|
2
|
-
import { katexId, mermaidId } from '../constant';
|
|
1
|
+
import type { IMarkdownPlugin } from '../defined/index.js';
|
|
2
|
+
import { katexId, mermaidId } from '../constant.js';
|
|
3
3
|
declare function createBuildInPlugin(partialPlugin: Partial<IMarkdownPlugin>): IMarkdownPlugin;
|
|
4
4
|
declare const katexPlugin: IMarkdownPlugin;
|
|
5
5
|
export { createBuildInPlugin, katexPlugin, mermaidId, katexId, IMarkdownPlugin };
|
package/es/utils/compiler.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ds-markdown",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"main": "./dist/
|
|
6
|
-
"types": "./dist/cjs/index.d.ts",
|
|
4
|
+
"version": "1.0.1",
|
|
5
|
+
"main": "./dist/esm/index.js",
|
|
7
6
|
"module": "./dist/esm/index.js",
|
|
8
7
|
"style": "./dist/style.css",
|
|
9
8
|
"type": "module",
|