ds-markdown 1.0.0-beta.1 → 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.
@@ -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 './index.less';
2
+ import './index.css';
3
3
  interface BlockWrapProps {
4
4
  children: React.ReactNode;
5
5
  language: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './index.less';
2
+ import './index.css';
3
3
  declare const CodeComponent: React.FC<{
4
4
  className: string;
5
5
  children: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './index.less';
2
+ import './index.css';
3
3
  interface TableComponentProps {
4
4
  children: React.ReactNode;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ButtonProps } from '../Button';
2
+ import type { ButtonProps } from '../Button/index.js';
3
3
  interface IconButtonProps extends ButtonProps {
4
4
  icon: React.ReactNode;
5
5
  className?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './index.less';
2
+ import './index.css';
3
3
  export interface SegmentedItem {
4
4
  label: string;
5
5
  value: string;
@@ -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: {
@@ -1,5 +1,5 @@
1
1
  import { Pluggable } from 'unified';
2
- import Mermaid from './mermaid.type';
2
+ import Mermaid from './mermaid.type.js';
3
3
  import { KatexOptions } from 'katex';
4
4
  import type { MarkdownBaseRef, MarkdownTyperBaseProps } from 'react-markdown-typer/es/defined';
5
5
  /**
@@ -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.less';
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 };
@@ -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 };
@@ -1,4 +1,4 @@
1
- import { Token } from './Tokenizer';
1
+ import { Token } from './Tokenizer.js';
2
2
  declare function createCompiler(src: string): Token[];
3
3
  export declare const compiler: typeof createCompiler;
4
4
  export {};
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "ds-markdown",
3
3
  "private": false,
4
- "version": "1.0.0-beta.1",
5
- "main": "./dist/cjs/index.js",
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",
@@ -157,6 +156,6 @@
157
156
  "react-markdown"
158
157
  ],
159
158
  "publishConfig": {
160
- "tag": "beta"
159
+ "tag": "latest"
161
160
  }
162
161
  }