@wzyjs/components 0.2.58 → 0.2.59

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wzyjs/components",
3
- "version": "0.2.58",
3
+ "version": "0.2.59",
4
4
  "description": "description",
5
5
  "author": "wzy",
6
6
  "main": "src/index.ts",
@@ -43,7 +43,7 @@
43
43
  "@types/react-grid-layout": "^1.3.5",
44
44
  "@types/react-syntax-highlighter": "^15.5.5"
45
45
  },
46
- "gitHead": "c293b90cf37a8425c75eb8f3880787b40b951593",
46
+ "gitHead": "0a6dc9df2da5a0b573de1eb5fd24f09b262228a2",
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  }
@@ -33,7 +33,7 @@ export const DragSort = <T extends { id: string }>(props: DragSortProps<T>) => {
33
33
  children,
34
34
  hasContext = true,
35
35
  lastChildren,
36
- onDragEnd,
36
+ onDragEnd = () => undefined,
37
37
  } = props
38
38
 
39
39
  const content = (
@@ -3,7 +3,7 @@ import { CSSProperties, ReactNode } from 'react'
3
3
  import GridLayout, { Layout } from 'react-grid-layout'
4
4
  import 'react-grid-layout/css/styles.css'
5
5
 
6
- export { Layout as GridLayoutItem } from 'react-grid-layout'
6
+ export type { Layout as GridLayoutItem } from 'react-grid-layout'
7
7
 
8
8
  interface GridLayoutProps<I> {
9
9
  layout: I[]
@@ -36,7 +36,7 @@ export const Markdown = (props: MarkdownProps) => {
36
36
 
37
37
  lines.forEach((line) => {
38
38
  const match = line.match(/^(#{2,4})\s+(.+)$/)
39
- if (match) {
39
+ if (match && match[1] && match[2]) {
40
40
  const level = match[1].length
41
41
  const text = match[2].trim()
42
42
  const id = text