@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/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.74.2",
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
- "heroku-postbuild": "make emojis && webpack --mode production --config ./webpack.dev.js",
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
- "start": "webpack serve --config ./webpack.dev.js --open --mode development",
25
- "test": "jest --coverage --runInBand --testPathIgnorePatterns '__tests__/browser'",
26
- "test.watch": "jest --watch --coverage=false --testPathIgnorePatterns '__tests__/browser'",
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.1.2",
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
- "rehype-stringify": "^6.0.0",
47
- "remark-breaks": "^1.0.0",
48
- "remark-disable-tokenizers": "^1.0.24",
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": "^9.2.2",
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.3",
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.19.3",
69
- "@babel/eslint-parser": "^7.19.1",
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-object-rest-spread": "^7.19.4",
72
- "@babel/plugin-proposal-optional-chaining": "^7.18.9",
73
- "@babel/plugin-transform-runtime": "^7.19.1",
74
- "@babel/preset-env": "^7.19.4",
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
- "@commitlint/cli": "^17.1.2",
77
- "@commitlint/config-angular": "^17.1.0",
78
- "@commitlint/config-conventional": "^17.1.0",
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
- "@readme/stylelint-config": "^3.2.0",
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.2.1",
87
- "babel-loader": "^8.2.5",
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": "^3.25.5",
90
- "css-loader": "^6.7.1",
91
- "eslint": "^8.25.0",
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": "^28.1.3",
95
- "jest-environment-jsdom": "^29.2.1",
96
- "jest-environment-puppeteer": "^6.1.1",
97
- "jest-image-snapshot": "^5.2.0",
98
- "jest-puppeteer": "^6.1.1",
99
- "mini-css-extract-plugin": "^2.6.1",
100
- "node-sass": "^7.0.3",
101
- "postcss": "^8.4.23",
102
- "prettier": "^2.7.1",
103
- "puppeteer": "^19.0.0",
104
- "react-hot-loader": "^4.13.0",
105
- "regenerator-runtime": "^0.13.10",
106
- "sass-loader": "^13.1.0",
107
- "semantic-release": "^19.0.5",
108
- "string.prototype.trimend": "^1.0.5",
109
- "stylelint": "^14.16.1",
110
- "terser-webpack-plugin": "^5.3.6",
111
- "webpack": "^5.74.0",
112
- "webpack-cli": "^4.10.0",
113
- "webpack-dev-server": "^4.11.1",
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;