ds-markdown 0.1.9-beta.2 → 0.1.9-beta.4

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.
@@ -4,6 +4,13 @@ declare const enUS: {
4
4
  readonly copied: "Copied";
5
5
  readonly download: "Download";
6
6
  };
7
+ readonly mermaid: {
8
+ readonly diagram: "Diagram";
9
+ readonly code: "Code";
10
+ readonly zoomOut: "Zoom Out";
11
+ readonly zoomIn: "Zoom In";
12
+ readonly download: "Download";
13
+ };
7
14
  };
8
15
  type EnUS = typeof enUS;
9
16
 
@@ -8,6 +8,13 @@ const enUS = {
8
8
  copied: 'Copied',
9
9
  download: 'Download',
10
10
  },
11
+ mermaid: {
12
+ diagram: 'Diagram',
13
+ code: 'Code',
14
+ zoomOut: 'Zoom Out',
15
+ zoomIn: 'Zoom In',
16
+ download: 'Download',
17
+ },
11
18
  };
12
19
 
13
20
  exports.default = enUS;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/i18n/en/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAa,MAAA,IAAI,GAAG;AAClB,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,QAAQ,EAAE,UAAU;AACrB,KAAA;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/i18n/en/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAa,MAAA,IAAI,GAAG;AAClB,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,QAAQ,EAAE,UAAU;AACrB,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,OAAO,EAAE,UAAU;AACnB,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,QAAQ,EAAE,UAAU;AACrB,KAAA;;;;;;"}
@@ -4,6 +4,13 @@ declare const zhCN: {
4
4
  readonly copied: "已复制";
5
5
  readonly download: "下载";
6
6
  };
7
+ readonly mermaid: {
8
+ readonly diagram: "图表";
9
+ readonly code: "代码";
10
+ readonly zoomOut: "缩小";
11
+ readonly zoomIn: "放大";
12
+ readonly download: "下载";
13
+ };
7
14
  };
8
15
  type ZhCN = typeof zhCN;
9
16
 
@@ -8,6 +8,13 @@ const zhCN = {
8
8
  copied: '已复制',
9
9
  download: '下载',
10
10
  },
11
+ mermaid: {
12
+ diagram: '图表',
13
+ code: '代码',
14
+ zoomOut: '缩小',
15
+ zoomIn: '放大',
16
+ download: '下载',
17
+ },
11
18
  };
12
19
 
13
20
  exports.default = zhCN;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/i18n/zh/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAa,MAAA,IAAI,GAAG;AAClB,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/i18n/zh/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAa,MAAA,IAAI,GAAG;AAClB,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA;;;;;;"}
@@ -34,6 +34,10 @@ interface IMarkdownThemeProps {
34
34
  /** 回答类型 */
35
35
  answerType?: 'thinking' | 'answer';
36
36
  }
37
+ interface IMarkdownThemeStateProps extends IMarkdownThemeProps {
38
+ theme: Theme;
39
+ answerType: AnswerType;
40
+ }
37
41
  interface MarkdownBaseProps {
38
42
  /** 计时类型: 支持setTimeout和requestAnimationFrame */
39
43
  timerType?: 'setTimeout' | 'requestAnimationFrame';
@@ -110,6 +114,68 @@ declare const MarkdownCMD: React$1.ForwardRefExoticComponent<MarkdownCMDProps &
110
114
 
111
115
  declare const _default: React__default.NamedExoticComponent<MarkdownProps & React__default.RefAttributes<MarkdownBaseRef>>;
112
116
 
117
+ interface ButtonProps {
118
+ className?: string;
119
+ children?: React__default.ReactNode;
120
+ icon?: React__default.ReactNode;
121
+ onClick?: () => void;
122
+ style?: React__default.CSSProperties;
123
+ }
124
+ declare const Button: React__default.FC<ButtonProps>;
125
+
126
+ interface IconButtonProps {
127
+ icon: React__default.ReactNode;
128
+ style?: React__default.CSSProperties;
129
+ className?: string;
130
+ onClick?: () => void;
131
+ }
132
+ declare const IconButton: React__default.FC<IconButtonProps>;
133
+
134
+ type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
135
+ interface ToolTipProps {
136
+ title: React__default.ReactNode;
137
+ children: React__default.ReactElement;
138
+ position?: TooltipPosition;
139
+ className?: string;
140
+ style?: React__default.CSSProperties;
141
+ showArrow?: boolean;
142
+ delay?: number;
143
+ }
144
+ declare const ToolTip: React__default.ForwardRefExoticComponent<ToolTipProps & React__default.RefAttributes<HTMLElement>>;
145
+
146
+ interface CopyButtonProps {
147
+ codeContent?: string;
148
+ style?: React__default.CSSProperties;
149
+ className?: string;
150
+ }
151
+ declare const CopyButton: React__default.FC<CopyButtonProps>;
152
+
153
+ interface DownloadButtonProps {
154
+ codeContent?: string;
155
+ language: string;
156
+ style?: React__default.CSSProperties;
157
+ className?: string;
158
+ }
159
+ declare const DownloadButton: React__default.FC<DownloadButtonProps>;
160
+
161
+ interface CodeBlockActionsProps {
162
+ codeContent?: string;
163
+ language: string;
164
+ }
165
+ declare const CodeBlockActions: React__default.FC<CodeBlockActionsProps>;
166
+
167
+ interface CodeBlockWrapProps {
168
+ children: React__default.ReactNode;
169
+ title: React__default.ReactNode;
170
+ }
171
+ declare const CodeBlockWrap: React__default.FC<CodeBlockWrapProps>;
172
+
173
+ interface HighlightCodeProps {
174
+ code: string;
175
+ language: string;
176
+ }
177
+ declare const HighlightCode: React__default.FC<HighlightCodeProps>;
178
+
113
179
  declare namespace Mermaid {
114
180
  /**
115
181
  * The font size to use
@@ -1631,6 +1697,13 @@ interface Locale {
1631
1697
  download: string;
1632
1698
  [key: string]: string;
1633
1699
  };
1700
+ mermaid: {
1701
+ diagram: string;
1702
+ code: string;
1703
+ zoomOut: string;
1704
+ zoomIn: string;
1705
+ download: string;
1706
+ };
1634
1707
  [key: string]: unknown;
1635
1708
  }
1636
1709
  interface ConfigProviderProps {
@@ -1646,5 +1719,7 @@ declare const ConfigProvider: React__default.FC<ConfigProviderProps>;
1646
1719
  declare const useConfig: () => ConfigContextType;
1647
1720
  declare const useLocale: () => Locale;
1648
1721
 
1649
- export { ConfigProvider, _default as Markdown, MarkdownCMD, _default as default, useConfig, useLocale };
1722
+ declare const useThemeState: () => IMarkdownThemeStateProps;
1723
+
1724
+ export { Button, CodeBlockActions, CodeBlockWrap, ConfigProvider, CopyButton, DownloadButton, HighlightCode, IconButton, _default as Markdown, MarkdownCMD, ToolTip, _default as default, useConfig, useLocale, useThemeState };
1650
1725
  export type { ConfigContextType, ConfigProviderProps, IMarkdownMath, ITypedChar, Locale, MarkdownCMDProps, MarkdownCMDRef, MarkdownProps, MarkdownRef };