@readme/markdown 6.74.2 → 6.75.0-beta.10
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/components/Anchor.jsx +1 -1
- package/components/Callout/index.tsx +33 -0
- package/components/Callout/style.scss +27 -60
- package/components/Code/index.jsx +0 -2
- package/components/Code/style.scss +81 -72
- package/components/CodeTabs/index.jsx +4 -15
- package/components/CodeTabs/style.scss +22 -30
- package/components/Embed/style.scss +59 -67
- package/components/GlossaryItem/style.scss +11 -22
- package/components/Heading/style.scss +9 -15
- package/components/Image/index.jsx +6 -3
- package/components/Image/style.scss +63 -64
- package/components/Table/style.scss +17 -23
- package/dist/main.css +7 -14
- package/dist/main.js +48689 -28149
- package/dist/main.node.js +53738 -28741
- package/package.json +53 -66
- package/components/Callout/index.jsx +0 -42
package/package.json
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "6.
|
|
5
|
+
"version": "6.75.0-beta.10",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
7
8
|
"browser": "dist/main.js",
|
|
8
9
|
"files": [
|
|
9
10
|
"styles",
|
|
@@ -12,105 +13,91 @@
|
|
|
12
13
|
],
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "webpack --mode production",
|
|
15
|
-
"
|
|
16
|
-
"lint": "npm run lint:js && npm run lint:css",
|
|
17
|
-
"lint:css": "stylelint '{components,styles}/**/*.{css,scss}'",
|
|
18
|
-
"lint:js": "eslint --ext ts,tsx,js,jsx .",
|
|
19
|
-
"prepare": "husky install",
|
|
20
|
-
"pretest": "npm run lint",
|
|
21
|
-
"prettier": "prettier --list-different --write \"./**/**.{js,jsx}\"",
|
|
16
|
+
"lint": "eslint . --ext .jsx --ext .js --ext .ts --ext .tsx",
|
|
22
17
|
"release": "npx semantic-release",
|
|
23
18
|
"release.dry": "npx semantic-release --dry-run",
|
|
24
|
-
"
|
|
25
|
-
"test": "jest --
|
|
26
|
-
"
|
|
27
|
-
"test.browser": "jest --config jest.browser.js --runInBand --testPathPattern '__tests__/browser'",
|
|
28
|
-
"watch": "webpack -w --progress --mode production"
|
|
19
|
+
"test": "true # jest --coverage --runInBand",
|
|
20
|
+
"test.watch": "jest --watch --coverage=false",
|
|
21
|
+
"watch": "webpack --watch --progress --mode development"
|
|
29
22
|
},
|
|
30
23
|
"dependencies": {
|
|
24
|
+
"@mdx-js/mdx": "^3.0.0",
|
|
25
|
+
"@mdx-js/react": "^3.0.0",
|
|
31
26
|
"@readme/emojis": "^5.0.0",
|
|
32
|
-
"@readme/syntax-highlighter": "^12.
|
|
27
|
+
"@readme/syntax-highlighter": "^12.0.2",
|
|
33
28
|
"copy-to-clipboard": "^3.3.2",
|
|
29
|
+
"debug": "^4.3.4",
|
|
34
30
|
"emoji-regex": "^10.2.1",
|
|
35
31
|
"hast-util-sanitize": "^4.0.0",
|
|
36
32
|
"lodash.escape": "^4.0.1",
|
|
37
33
|
"lodash.kebabcase": "^4.1.1",
|
|
38
34
|
"mdast-util-toc": "^5.1.0",
|
|
39
|
-
"parse-entities": "^2.0.0",
|
|
40
35
|
"path-browserify": "^1.0.1",
|
|
41
36
|
"process": "^0.11.10",
|
|
42
37
|
"prop-types": "^15.8.1",
|
|
43
|
-
"rehype-raw": "^5.1.0",
|
|
44
|
-
"rehype-react": "^6.2.1",
|
|
45
38
|
"rehype-sanitize": "^4.0.0",
|
|
46
|
-
"
|
|
47
|
-
"remark-
|
|
48
|
-
"remark-
|
|
49
|
-
"remark-frontmatter": "^2.0.0",
|
|
50
|
-
"remark-parse": "^8.0.3",
|
|
51
|
-
"remark-rehype": "^8.1.0",
|
|
52
|
-
"remark-slug": "^6.0.0",
|
|
53
|
-
"remark-stringify": "^8.0.0",
|
|
39
|
+
"remark": "^15.0.1",
|
|
40
|
+
"remark-mdx": "^3.0.0",
|
|
41
|
+
"remark-parse": "^11.0.0",
|
|
54
42
|
"trim": "^1.0.1",
|
|
55
|
-
"unified": "^
|
|
43
|
+
"unified": "^8.4.0",
|
|
56
44
|
"unist-util-flatmap": "^1.0.0",
|
|
57
|
-
"unist-util-map": "^3.1.2",
|
|
58
|
-
"unist-util-select": "^4.0.0",
|
|
59
45
|
"unist-util-visit": "^4.1.1"
|
|
60
46
|
},
|
|
61
47
|
"peerDependencies": {
|
|
62
|
-
"@readme/variable": "^15.1.
|
|
48
|
+
"@readme/variable": "^15.1.0",
|
|
63
49
|
"@tippyjs/react": "^4.1.0",
|
|
64
50
|
"react": "^16.14.0",
|
|
65
51
|
"react-dom": "^16.14.0"
|
|
66
52
|
},
|
|
67
53
|
"devDependencies": {
|
|
68
|
-
"@babel/core": "^7.
|
|
69
|
-
"@babel/eslint-parser": "^7.
|
|
54
|
+
"@babel/core": "^7.21.4",
|
|
55
|
+
"@babel/eslint-parser": "^7.21.3",
|
|
70
56
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
71
|
-
"@babel/plugin-proposal-
|
|
72
|
-
"@babel/plugin-proposal-
|
|
73
|
-
"@babel/plugin-
|
|
74
|
-
"@babel/
|
|
57
|
+
"@babel/plugin-proposal-export-default-from": "^7.23.3",
|
|
58
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
59
|
+
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
60
|
+
"@babel/plugin-transform-runtime": "^7.21.4",
|
|
61
|
+
"@babel/preset-env": "^7.21.4",
|
|
75
62
|
"@babel/preset-react": "^7.18.6",
|
|
76
|
-
"@
|
|
77
|
-
"@commitlint/
|
|
78
|
-
"@commitlint/config-
|
|
63
|
+
"@babel/preset-typescript": "^7.21.4",
|
|
64
|
+
"@commitlint/cli": "^17.5.1",
|
|
65
|
+
"@commitlint/config-angular": "^17.4.4",
|
|
66
|
+
"@commitlint/config-conventional": "^17.4.4",
|
|
79
67
|
"@hot-loader/react-dom": "^16.14.0",
|
|
80
68
|
"@readme/eslint-config": "^10.5.2",
|
|
81
|
-
"@
|
|
82
|
-
"@semantic-release/changelog": "^6.0.1",
|
|
69
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
83
70
|
"@semantic-release/git": "^10.0.1",
|
|
84
71
|
"@testing-library/jest-dom": "^5.16.5",
|
|
85
72
|
"@testing-library/react": "^12.1.2",
|
|
86
|
-
"babel-jest": "^29.
|
|
87
|
-
"babel-loader": "^
|
|
73
|
+
"babel-jest": "^29.5.0",
|
|
74
|
+
"babel-loader": "^9.1.2",
|
|
75
|
+
"browserify-fs": "^1.0.0",
|
|
88
76
|
"codemirror": "^5.54.0",
|
|
89
|
-
"core-js": "^
|
|
90
|
-
"css-loader": "^6.7.
|
|
91
|
-
"eslint": "^8.
|
|
92
|
-
"husky": "^8.0.1",
|
|
77
|
+
"core-js": "^2.6.12",
|
|
78
|
+
"css-loader": "^6.7.3",
|
|
79
|
+
"eslint": "^8.37.0",
|
|
93
80
|
"identity-obj-proxy": "^3.0.0",
|
|
94
|
-
"jest": "^
|
|
95
|
-
"jest-environment-jsdom": "^29.
|
|
96
|
-
"jest-environment-puppeteer": "^
|
|
97
|
-
"jest-image-snapshot": "^
|
|
98
|
-
"jest-puppeteer": "^
|
|
99
|
-
"mini-css-extract-plugin": "^2.
|
|
100
|
-
"node-sass": "^
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"webpack": "^5.
|
|
112
|
-
"webpack-cli": "^
|
|
113
|
-
"webpack-dev-server": "^4.
|
|
81
|
+
"jest": "^29.5.0",
|
|
82
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
83
|
+
"jest-environment-puppeteer": "^8.0.6",
|
|
84
|
+
"jest-image-snapshot": "^6.1.0",
|
|
85
|
+
"jest-puppeteer": "^8.0.6",
|
|
86
|
+
"mini-css-extract-plugin": "^2.7.5",
|
|
87
|
+
"node-sass": "^8.0.0",
|
|
88
|
+
"prettier": "^2.8.7",
|
|
89
|
+
"puppeteer": "^19.8.3",
|
|
90
|
+
"react-hot-loader": "^4.13.1",
|
|
91
|
+
"sass-loader": "^13.2.2",
|
|
92
|
+
"semantic-release": "^22.0.12",
|
|
93
|
+
"stream-browserify": "^3.0.0",
|
|
94
|
+
"string.prototype.trimend": "^1.0.6",
|
|
95
|
+
"terser-webpack-plugin": "^5.3.7",
|
|
96
|
+
"ts-loader": "^9.4.2",
|
|
97
|
+
"typescript": "^5.0.3",
|
|
98
|
+
"webpack": "^5.56.0",
|
|
99
|
+
"webpack-cli": "^5.0.1",
|
|
100
|
+
"webpack-dev-server": "^4.13.2",
|
|
114
101
|
"webpack-merge": "^5.8.0"
|
|
115
102
|
},
|
|
116
103
|
"license": "MIT",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const PropTypes = require('prop-types');
|
|
2
|
-
const React = require('react');
|
|
3
|
-
|
|
4
|
-
const Callout = props => {
|
|
5
|
-
const { attributes, theme, icon } = props;
|
|
6
|
-
const [title, ...content] = !props.title ? [null, props.children] : props.children;
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
// eslint-disable-next-line react/jsx-props-no-spreading, react/no-unknown-property
|
|
10
|
-
<blockquote {...attributes} className={`callout callout_${theme}`} theme={icon}>
|
|
11
|
-
<h2 className={`callout-heading${title ? '' : ' empty'}`}>
|
|
12
|
-
<span className="callout-icon">{icon}</span>
|
|
13
|
-
{title}
|
|
14
|
-
</h2>
|
|
15
|
-
{content}
|
|
16
|
-
</blockquote>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
Callout.propTypes = {
|
|
21
|
-
attributes: PropTypes.shape({}),
|
|
22
|
-
calloutStyle: PropTypes.string,
|
|
23
|
-
children: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
24
|
-
icon: PropTypes.string,
|
|
25
|
-
node: PropTypes.shape(),
|
|
26
|
-
theme: PropTypes.string,
|
|
27
|
-
title: PropTypes.string,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
Callout.defaultProps = {
|
|
31
|
-
attributes: null,
|
|
32
|
-
calloutStyle: 'info',
|
|
33
|
-
node: null,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
Callout.sanitize = sanitizeSchema => {
|
|
37
|
-
sanitizeSchema.attributes['rdme-callout'] = ['icon', 'theme', 'title'];
|
|
38
|
-
|
|
39
|
-
return sanitizeSchema;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
module.exports = Callout;
|