@raketa-builder/markdown-input 0.4.0 → 0.6.0
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/.turbo/turbo-build.log +6 -3
- package/.turbo/turbo-format.log +12 -0
- package/.turbo/turbo-lint.log +4 -13
- package/biome.json +3 -0
- package/dist/index.js +5873 -38
- package/package.json +6 -7
- package/src/MarkdownInput.js +1 -1
- package/src/index.js +1 -2
- package/tsconfig.json +1 -1
- package/src/toHTML.js +0 -19
package/package.json
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raketa-builder/markdown-input",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"lint": "TIMING=1 eslint \"**/*.js\"",
|
|
9
8
|
"build": "tsup src/index.js --format cjs --loader \".js=jsx\"",
|
|
10
|
-
"dev": "tsup src/index.js --format cjs --loader \".js=jsx\" --watch"
|
|
9
|
+
"dev": "tsup src/index.js --format cjs --loader \".js=jsx\" --watch",
|
|
10
|
+
"format": "prettier --write .",
|
|
11
|
+
"lint": "biome lint --max-diagnostics=5000 ."
|
|
11
12
|
},
|
|
12
13
|
"peerDependencies": {
|
|
13
14
|
"react": "18.2.0",
|
|
14
15
|
"react-dom": "18.2.0"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"markdown-it": "13.0.1",
|
|
18
|
-
"markdown-it-attrs": "4.1.4",
|
|
19
18
|
"ui": "*"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
21
|
+
"@biomejs/biome": "1.5.2",
|
|
22
22
|
"@types/react": "17.0.37",
|
|
23
23
|
"@types/react-dom": "17.0.11",
|
|
24
|
-
"
|
|
25
|
-
"eslint-config-custom": "*",
|
|
24
|
+
"prettier": "3.2.4",
|
|
26
25
|
"react": "18.2.0",
|
|
27
26
|
"tsconfig": "*",
|
|
28
27
|
"tsup": "6.5.0",
|
package/src/MarkdownInput.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FormGroup, Label, Textarea, Hint, cn } from "@raketa-builder/ui";
|
|
3
|
-
import toHTML from "
|
|
3
|
+
import { toHTML } from "@raketa-builder/support";
|
|
4
4
|
|
|
5
5
|
const IconButton = ({ as = "button", className, ...props }) => {
|
|
6
6
|
const Component = as;
|
package/src/index.js
CHANGED
package/tsconfig.json
CHANGED
package/src/toHTML.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import MarkdownIt from "markdown-it";
|
|
2
|
-
import markdownItAttrs from "markdown-it-attrs";
|
|
3
|
-
|
|
4
|
-
const parser = new MarkdownIt({
|
|
5
|
-
html: true,
|
|
6
|
-
breaks: true,
|
|
7
|
-
}).use(markdownItAttrs, {
|
|
8
|
-
// optional, these are default options
|
|
9
|
-
leftDelimiter: "{",
|
|
10
|
-
rightDelimiter: "}",
|
|
11
|
-
allowedAttributes: [], // empty array = all attributes are allowed
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const toHTML = (string, inline = false) => {
|
|
15
|
-
if (!string) return;
|
|
16
|
-
return inline ? parser.renderInline(string) : parser.render(string);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default toHTML;
|