@soroush.tech/markdown 1.1.0 → 1.2.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.
- package/dist/Control.cjs +1 -1
- package/dist/Control.mjs +1 -1
- package/dist/Editor.cjs +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/{LiveEdit-DyBGqI3s.cjs → LiveEdit-DmM35H99.cjs} +1 -1
- package/dist/LiveEdit.cjs +1 -1
- package/dist/{Preview-CQ0z3gzx.cjs → Preview-YtIipm0z.cjs} +1 -1
- package/dist/Preview.cjs +1 -1
- package/dist/{applyAction-BGWMbUYT.mjs → applyAction-CegmXrxL.mjs} +6 -4
- package/dist/{applyAction-BDkgYhOd.cjs → applyAction-eBwIRQNK.cjs} +6 -4
- package/dist/index.cjs +2 -2
- package/package.json +19 -24
package/dist/Control.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_applyAction = require("./applyAction-
|
|
2
|
+
const require_applyAction = require("./applyAction-eBwIRQNK.cjs");
|
|
3
3
|
const require_MarkdownContext = require("./MarkdownContext.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/Control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as applyAction } from "./applyAction-
|
|
1
|
+
import { t as applyAction } from "./applyAction-CegmXrxL.mjs";
|
|
2
2
|
import { MarkdownContext } from "./MarkdownContext.mjs";
|
|
3
3
|
import { useMemo, useRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
package/dist/Editor.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_applyAction = require("./applyAction-
|
|
2
|
+
const require_applyAction = require("./applyAction-eBwIRQNK.cjs");
|
|
3
3
|
const require_MarkdownContext = require("./MarkdownContext.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/Editor.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as applyAction } from "./applyAction-
|
|
1
|
+
import { t as applyAction } from "./applyAction-CegmXrxL.mjs";
|
|
2
2
|
import { MarkdownContext } from "./MarkdownContext.mjs";
|
|
3
3
|
import { useContext, useId, useLayoutEffect, useRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_Preview = require("./Preview-
|
|
1
|
+
const require_Preview = require("./Preview-YtIipm0z.cjs");
|
|
2
2
|
const require_MarkdownContext = require("./MarkdownContext.cjs");
|
|
3
3
|
let react = require("react");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/LiveEdit.cjs
CHANGED
|
@@ -15,7 +15,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
package/dist/Preview.cjs
CHANGED
|
@@ -79,10 +79,12 @@ function fenceEndAfter(value, pos) {
|
|
|
79
79
|
let openStart = -1;
|
|
80
80
|
for (const line of value.split("\n")) {
|
|
81
81
|
const lineEnd = offset + line.length;
|
|
82
|
-
if (line.startsWith("```"))
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
if (line.startsWith("```")) {
|
|
83
|
+
if (openStart === -1) openStart = offset;
|
|
84
|
+
else {
|
|
85
|
+
if (pos >= openStart && pos <= lineEnd) return lineEnd;
|
|
86
|
+
openStart = -1;
|
|
87
|
+
}
|
|
86
88
|
}
|
|
87
89
|
offset = lineEnd + 1;
|
|
88
90
|
}
|
|
@@ -79,10 +79,12 @@ function fenceEndAfter(value, pos) {
|
|
|
79
79
|
let openStart = -1;
|
|
80
80
|
for (const line of value.split("\n")) {
|
|
81
81
|
const lineEnd = offset + line.length;
|
|
82
|
-
if (line.startsWith("```"))
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
if (line.startsWith("```")) {
|
|
83
|
+
if (openStart === -1) openStart = offset;
|
|
84
|
+
else {
|
|
85
|
+
if (pos >= openStart && pos <= lineEnd) return lineEnd;
|
|
86
|
+
openStart = -1;
|
|
87
|
+
}
|
|
86
88
|
}
|
|
87
89
|
offset = lineEnd + 1;
|
|
88
90
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_Preview = require("./Preview-
|
|
2
|
+
const require_Preview = require("./Preview-YtIipm0z.cjs");
|
|
3
3
|
const require_MarkdownContext = require("./MarkdownContext.cjs");
|
|
4
4
|
const require_Control = require("./Control.cjs");
|
|
5
5
|
const require_Toolbar = require("./Toolbar-Ba3l-oBU.cjs");
|
|
6
6
|
const require_Editor = require("./Editor.cjs");
|
|
7
7
|
const require_CodeBlock = require("./CodeBlock-Cymx1ZAY.cjs");
|
|
8
8
|
const require_Mermaid = require("./Mermaid-DqP2Q0bt.cjs");
|
|
9
|
-
const require_LiveEdit = require("./LiveEdit-
|
|
9
|
+
const require_LiveEdit = require("./LiveEdit-DmM35H99.cjs");
|
|
10
10
|
exports.CodeBlock = require_CodeBlock.CodeBlock;
|
|
11
11
|
exports.Control = require_Control.Control;
|
|
12
12
|
exports.Editor = require_Editor.Editor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soroush.tech/markdown",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Headless, composable markdown editor + renderer for @soroush.tech/design-system — Control, Toolbar, Editor, and Preview built on react-markdown, remark-gfm, and rehype-highlight.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"mermaid": "^11.
|
|
58
|
+
"mermaid": "^11.16.1",
|
|
59
59
|
"react-markdown": "^10.1.0",
|
|
60
60
|
"rehype-highlight": "^7.0.2",
|
|
61
61
|
"rehype-parse": "^9.0.1",
|
|
@@ -65,38 +65,33 @@
|
|
|
65
65
|
"unified": "^11.0.5"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"react": "^19.
|
|
69
|
-
"react-dom": "^19.
|
|
70
|
-
"@soroush.tech/design-system": "^1.
|
|
68
|
+
"react": "^19.2.8",
|
|
69
|
+
"react-dom": "^19.2.8",
|
|
70
|
+
"@soroush.tech/design-system": "^1.3.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@storybook/react-vite": "^10.5.
|
|
74
|
-
"@testing-library/jest-dom": "^
|
|
73
|
+
"@storybook/react-vite": "^10.5.8",
|
|
74
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
75
75
|
"@testing-library/react": "^16.3.2",
|
|
76
|
-
"@types/node": "^26.1.
|
|
77
|
-
"@types/react": "^19.2.
|
|
78
|
-
"@types/react-dom": "^19.2.
|
|
76
|
+
"@types/node": "^26.1.2",
|
|
77
|
+
"@types/react": "^19.2.18",
|
|
78
|
+
"@types/react-dom": "^19.2.4",
|
|
79
79
|
"@vitest/coverage-v8": "^4.1.10",
|
|
80
|
-
"eslint": "^10.7.0",
|
|
81
|
-
"eslint-plugin-react": "^7.37.5",
|
|
82
|
-
"eslint-plugin-react-hooks": "^7.1.1",
|
|
83
|
-
"eslint-plugin-react-refresh": "^0.5.3",
|
|
84
|
-
"eslint-plugin-storybook": "^10.5.0",
|
|
85
|
-
"globals": "^17.7.0",
|
|
86
80
|
"jsdom": "^29.1.1",
|
|
87
|
-
"
|
|
88
|
-
"react
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
81
|
+
"oxlint": "^1.78.0",
|
|
82
|
+
"react": "^19.2.8",
|
|
83
|
+
"react-dom": "^19.2.8",
|
|
84
|
+
"storybook": "^10.5.8",
|
|
85
|
+
"tsdown": "^0.22.14",
|
|
86
|
+
"typescript": "~7.0.2",
|
|
92
87
|
"vitest": "^4.1.10",
|
|
93
|
-
"@soroush.tech/design-system": "1.1.0",
|
|
94
88
|
"@soroush.tech/eslint-config": "0.0.0",
|
|
95
|
-
"@soroush.tech/hooks": "0.1.0"
|
|
89
|
+
"@soroush.tech/hooks": "0.1.0",
|
|
90
|
+
"@soroush.tech/design-system": "1.3.2"
|
|
96
91
|
},
|
|
97
92
|
"scripts": {
|
|
98
93
|
"build": "tsdown",
|
|
99
|
-
"lint": "
|
|
94
|
+
"lint": "oxlint --deny-warnings",
|
|
100
95
|
"typecheck": "tsc --noEmit",
|
|
101
96
|
"test": "vitest run",
|
|
102
97
|
"test:coverage": "vitest run --coverage",
|