@soroush.tech/markdown 1.2.3-rc.4 → 1.2.3-rc.5
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/{CodeBlock-CVlrvVPP.mjs → CodeBlock-CEZH1GuF.mjs} +3 -6
- package/dist/{CodeBlock-Cymx1ZAY.cjs → CodeBlock-Cclo15NS.cjs} +3 -6
- package/dist/CodeBlock.cjs +1 -1
- package/dist/CodeBlock.d.cts +1 -1
- package/dist/CodeBlock.d.mts +1 -1
- package/dist/CodeBlock.mjs +1 -2
- package/dist/Control.cjs +2 -3
- package/dist/Control.d.cts +0 -2
- package/dist/Control.d.mts +0 -2
- package/dist/Control.mjs +2 -3
- package/dist/Editor.cjs +2 -3
- package/dist/Editor.d.cts +0 -2
- package/dist/Editor.d.mts +0 -2
- package/dist/Editor.mjs +2 -3
- package/dist/{LiveEdit-BVkUqJd5.mjs → LiveEdit-24uSWoSM.mjs} +4 -7
- package/dist/{LiveEdit-Chb8D-NA.cjs → LiveEdit-BHA3ciln.cjs} +4 -7
- package/dist/LiveEdit.cjs +1 -1
- package/dist/LiveEdit.d.cts +1 -3
- package/dist/LiveEdit.d.mts +1 -3
- package/dist/LiveEdit.mjs +1 -2
- package/dist/MarkdownContext.cjs +1 -2
- package/dist/MarkdownContext.d.cts +1 -1
- package/dist/MarkdownContext.d.mts +1 -1
- package/dist/MarkdownContext.mjs +1 -2
- package/dist/{Mermaid-B7vDwGQG.mjs → Mermaid-Cdtxi44F.mjs} +3 -5
- package/dist/{Mermaid-CkUan4z-.cjs → Mermaid-D3_ZHgY2.cjs} +3 -5
- package/dist/Mermaid.cjs +1 -1
- package/dist/Mermaid.d.cts +1 -1
- package/dist/Mermaid.d.mts +1 -1
- package/dist/Mermaid.mjs +1 -2
- package/dist/{Preview-B95_mk1s.mjs → Preview-DbR6jbs-.mjs} +3 -5
- package/dist/{Preview-BSieDKBE.cjs → Preview-P7K65WOV.cjs} +4 -7
- package/dist/Preview.cjs +1 -1
- package/dist/Preview.d.cts +1 -1
- package/dist/Preview.d.mts +1 -1
- package/dist/Preview.mjs +1 -2
- package/dist/{Toolbar-zDEkBuqy.mjs → Toolbar-D3GoFKzb.mjs} +5 -10
- package/dist/{Toolbar-BlMahuVU.cjs → Toolbar-XSZ61Hxf.cjs} +5 -10
- package/dist/Toolbar.cjs +1 -1
- package/dist/Toolbar.d.cts +0 -4
- package/dist/Toolbar.d.mts +0 -4
- package/dist/Toolbar.mjs +1 -2
- package/dist/{applyAction-eBwIRQNK.cjs → applyAction-B3AwrWKV.cjs} +1 -2
- package/dist/{applyAction-CegmXrxL.mjs → applyAction-CkTQJ5Iy.mjs} +1 -2
- package/dist/{index-Bd3yPDn_.d.cts → index-6taYWZ6e.d.cts} +0 -4
- package/dist/{index-Bd3yPDn_.d.mts → index-6taYWZ6e.d.mts} +0 -4
- package/dist/{index-TT9-Qjsh.d.cts → index-CX5oiCZj.d.mts} +3 -5
- package/dist/{index-CBKWWR5Q.d.mts → index-CooJPOhJ.d.cts} +3 -5
- package/dist/{index-D1rI6OgO.d.mts → index-DLd7MehH.d.cts} +0 -4
- package/dist/{index-D1rI6OgO.d.cts → index-DLd7MehH.d.mts} +0 -4
- package/dist/{index-Cre2ivJn.d.cts → index-cG2-GTkG.d.cts} +0 -4
- package/dist/{index-Cre2ivJn.d.mts → index-cG2-GTkG.d.mts} +0 -4
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +4 -6
- package/dist/index.d.mts +4 -6
- package/dist/index.mjs +5 -5
- package/package.json +16 -16
|
@@ -4,7 +4,7 @@ import { Button } from "@soroush.tech/design-system/Button";
|
|
|
4
4
|
import { Icon } from "@soroush.tech/design-system/Icon";
|
|
5
5
|
import { styled } from "@soroush.tech/design-system";
|
|
6
6
|
import { View } from "@soroush.tech/design-system/View";
|
|
7
|
-
|
|
7
|
+
// ../hooks/src/useCopyToClipboard.ts
|
|
8
8
|
/** How long the "copied" confirmation stays true before reverting, in ms. */
|
|
9
9
|
const COPIED_RESET_MS = 2e3;
|
|
10
10
|
/**
|
|
@@ -34,8 +34,7 @@ function useCopyToClipboard(resetMs = COPIED_RESET_MS) {
|
|
|
34
34
|
}, [resetMs])
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
//#region src/CodeBlock/CodeBlock.tsx
|
|
37
|
+
// src/CodeBlock/CodeBlock.tsx
|
|
39
38
|
const syntaxStyles = ({ theme }) => ({
|
|
40
39
|
color: theme.syntax.base,
|
|
41
40
|
fontFamily: theme.syntax.font,
|
|
@@ -126,8 +125,7 @@ function CodeBlock({ children, ...rest }) {
|
|
|
126
125
|
})]
|
|
127
126
|
});
|
|
128
127
|
}
|
|
129
|
-
|
|
130
|
-
//#region src/CodeBlock/CodeBlock.data.ts
|
|
128
|
+
// src/CodeBlock/CodeBlock.data.ts
|
|
131
129
|
const font = "'JetBrains Mono Variable', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace";
|
|
132
130
|
/** Matched to the JetBrains "Islands Dark" editor scheme. */
|
|
133
131
|
const syntaxDark = {
|
|
@@ -155,5 +153,4 @@ const syntaxLight = {
|
|
|
155
153
|
tag: "#008077",
|
|
156
154
|
font
|
|
157
155
|
};
|
|
158
|
-
//#endregion
|
|
159
156
|
export { syntaxLight as n, CodeBlock as r, syntaxDark as t };
|
|
@@ -4,7 +4,7 @@ let _soroush_tech_design_system_Button = require("@soroush.tech/design-system/Bu
|
|
|
4
4
|
let _soroush_tech_design_system_Icon = require("@soroush.tech/design-system/Icon");
|
|
5
5
|
let _soroush_tech_design_system = require("@soroush.tech/design-system");
|
|
6
6
|
let _soroush_tech_design_system_View = require("@soroush.tech/design-system/View");
|
|
7
|
-
|
|
7
|
+
// ../hooks/src/useCopyToClipboard.ts
|
|
8
8
|
/** How long the "copied" confirmation stays true before reverting, in ms. */
|
|
9
9
|
const COPIED_RESET_MS = 2e3;
|
|
10
10
|
/**
|
|
@@ -34,8 +34,7 @@ function useCopyToClipboard(resetMs = COPIED_RESET_MS) {
|
|
|
34
34
|
}, [resetMs])
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
//#region src/CodeBlock/CodeBlock.tsx
|
|
37
|
+
// src/CodeBlock/CodeBlock.tsx
|
|
39
38
|
const syntaxStyles = ({ theme }) => ({
|
|
40
39
|
color: theme.syntax.base,
|
|
41
40
|
fontFamily: theme.syntax.font,
|
|
@@ -126,8 +125,7 @@ function CodeBlock({ children, ...rest }) {
|
|
|
126
125
|
})]
|
|
127
126
|
});
|
|
128
127
|
}
|
|
129
|
-
|
|
130
|
-
//#region src/CodeBlock/CodeBlock.data.ts
|
|
128
|
+
// src/CodeBlock/CodeBlock.data.ts
|
|
131
129
|
const font = "'JetBrains Mono Variable', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace";
|
|
132
130
|
/** Matched to the JetBrains "Islands Dark" editor scheme. */
|
|
133
131
|
const syntaxDark = {
|
|
@@ -155,7 +153,6 @@ const syntaxLight = {
|
|
|
155
153
|
tag: "#008077",
|
|
156
154
|
font
|
|
157
155
|
};
|
|
158
|
-
//#endregion
|
|
159
156
|
Object.defineProperty(exports, "CodeBlock", {
|
|
160
157
|
enumerable: true,
|
|
161
158
|
get: function() {
|
package/dist/CodeBlock.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_CodeBlock = require("./CodeBlock-
|
|
2
|
+
const require_CodeBlock = require("./CodeBlock-Cclo15NS.cjs");
|
|
3
3
|
exports.CodeBlock = require_CodeBlock.CodeBlock;
|
|
4
4
|
exports.syntaxDark = require_CodeBlock.syntaxDark;
|
|
5
5
|
exports.syntaxLight = require_CodeBlock.syntaxLight;
|
package/dist/CodeBlock.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-
|
|
1
|
+
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-DLd7MehH.cjs";
|
|
2
2
|
export { CodeBlock, CodeBlockProps, ThemeSyntax, syntaxDark, syntaxLight };
|
package/dist/CodeBlock.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-
|
|
1
|
+
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-DLd7MehH.mjs";
|
|
2
2
|
export { CodeBlock, CodeBlockProps, ThemeSyntax, syntaxDark, syntaxLight };
|
package/dist/CodeBlock.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { CodeBlock, syntaxDark, syntaxLight };
|
|
1
|
+
export { r as CodeBlock, t as syntaxDark, n as syntaxLight } from "./CodeBlock-CEZH1GuF.mjs";
|
package/dist/Control.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_applyAction = require("./applyAction-
|
|
2
|
+
const require_applyAction = require("./applyAction-B3AwrWKV.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");
|
|
6
|
-
|
|
6
|
+
// src/Control/Control.tsx
|
|
7
7
|
/**
|
|
8
8
|
* The headless root of the Markdown compound: owns the shared value/selection state and exposes
|
|
9
9
|
* it (plus a `dispatch` for toolbar actions) via context. It renders no UI of its own - the
|
|
@@ -57,5 +57,4 @@ function Control({ value, onChange, children }) {
|
|
|
57
57
|
children
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
//#endregion
|
|
61
60
|
exports.Control = Control;
|
package/dist/Control.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/Control/Control.d.ts
|
|
3
2
|
interface ControlProps {
|
|
4
3
|
/** Current markdown source (controlled). */
|
|
5
4
|
value: string;
|
|
@@ -14,5 +13,4 @@ interface ControlProps {
|
|
|
14
13
|
* consumer arranges the parts and decides which panes to show.
|
|
15
14
|
*/
|
|
16
15
|
declare function Control({ value, onChange, children }: Readonly<ControlProps>): import("react").JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
16
|
export { Control, ControlProps };
|
package/dist/Control.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/Control/Control.d.ts
|
|
3
2
|
interface ControlProps {
|
|
4
3
|
/** Current markdown source (controlled). */
|
|
5
4
|
value: string;
|
|
@@ -14,5 +13,4 @@ interface ControlProps {
|
|
|
14
13
|
* consumer arranges the parts and decides which panes to show.
|
|
15
14
|
*/
|
|
16
15
|
declare function Control({ value, onChange, children }: Readonly<ControlProps>): import("react").JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
16
|
export { Control, ControlProps };
|
package/dist/Control.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as applyAction } from "./applyAction-
|
|
1
|
+
import { t as applyAction } from "./applyAction-CkTQJ5Iy.mjs";
|
|
2
2
|
import { MarkdownContext } from "./MarkdownContext.mjs";
|
|
3
3
|
import { useMemo, useRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/Control/Control.tsx
|
|
6
6
|
/**
|
|
7
7
|
* The headless root of the Markdown compound: owns the shared value/selection state and exposes
|
|
8
8
|
* it (plus a `dispatch` for toolbar actions) via context. It renders no UI of its own - the
|
|
@@ -56,5 +56,4 @@ function Control({ value, onChange, children }) {
|
|
|
56
56
|
children
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
//#endregion
|
|
60
59
|
export { Control };
|
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-B3AwrWKV.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");
|
|
@@ -8,7 +8,7 @@ let _soroush_tech_design_system_Typography = require("@soroush.tech/design-syste
|
|
|
8
8
|
let _soroush_tech_design_system = require("@soroush.tech/design-system");
|
|
9
9
|
let _soroush_tech_design_system_theme = require("@soroush.tech/design-system/theme");
|
|
10
10
|
let _soroush_tech_design_system_TextInput = require("@soroush.tech/design-system/TextInput");
|
|
11
|
-
|
|
11
|
+
// src/Editor/Editor.tsx
|
|
12
12
|
const EditorRoot = (0, _soroush_tech_design_system.styled)(_soroush_tech_design_system_Flex.Flex, {
|
|
13
13
|
name: "MarkdownEditor",
|
|
14
14
|
label: "MarkdownEditor"
|
|
@@ -126,5 +126,4 @@ function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write
|
|
|
126
126
|
})]
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
//#endregion
|
|
130
129
|
exports.Editor = Editor;
|
package/dist/Editor.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TextInputColor, TextInputSize, TextInputTextColor, TextInputVariant } from "@soroush.tech/design-system/TextInput";
|
|
2
|
-
//#region src/Editor/Editor.d.ts
|
|
3
2
|
interface EditorProps {
|
|
4
3
|
/** Standalone source value - used when rendered outside a `Control`. Ignored inside one. */
|
|
5
4
|
value?: string;
|
|
@@ -41,5 +40,4 @@ interface EditorProps {
|
|
|
41
40
|
* via `value`/`onChange`.
|
|
42
41
|
*/
|
|
43
42
|
declare function Editor({ value: valueProp, onChange: onChangeProp, placeholder, minRows, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint }: Readonly<EditorProps>): import("react").JSX.Element;
|
|
44
|
-
//#endregion
|
|
45
43
|
export { Editor, EditorProps };
|
package/dist/Editor.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TextInputColor, TextInputSize, TextInputTextColor, TextInputVariant } from "@soroush.tech/design-system/TextInput";
|
|
2
|
-
//#region src/Editor/Editor.d.ts
|
|
3
2
|
interface EditorProps {
|
|
4
3
|
/** Standalone source value - used when rendered outside a `Control`. Ignored inside one. */
|
|
5
4
|
value?: string;
|
|
@@ -41,5 +40,4 @@ interface EditorProps {
|
|
|
41
40
|
* via `value`/`onChange`.
|
|
42
41
|
*/
|
|
43
42
|
declare function Editor({ value: valueProp, onChange: onChangeProp, placeholder, minRows, maxRows, variant, color, textColor: textColorProp, size, name, id, error, required, disabled, showShortcutHint }: Readonly<EditorProps>): import("react").JSX.Element;
|
|
44
|
-
//#endregion
|
|
45
43
|
export { Editor, EditorProps };
|
package/dist/Editor.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as applyAction } from "./applyAction-
|
|
1
|
+
import { t as applyAction } from "./applyAction-CkTQJ5Iy.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";
|
|
@@ -7,7 +7,7 @@ import { Typography } from "@soroush.tech/design-system/Typography";
|
|
|
7
7
|
import { styled } from "@soroush.tech/design-system";
|
|
8
8
|
import { themeDefault, useTheme } from "@soroush.tech/design-system/theme";
|
|
9
9
|
import { TextInput } from "@soroush.tech/design-system/TextInput";
|
|
10
|
-
|
|
10
|
+
// src/Editor/Editor.tsx
|
|
11
11
|
const EditorRoot = styled(Flex, {
|
|
12
12
|
name: "MarkdownEditor",
|
|
13
13
|
label: "MarkdownEditor"
|
|
@@ -125,5 +125,4 @@ function Editor({ value: valueProp, onChange: onChangeProp, placeholder = "Write
|
|
|
125
125
|
})]
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
//#endregion
|
|
129
128
|
export { Editor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownContext } from "./MarkdownContext.mjs";
|
|
2
|
-
import { t as Preview } from "./Preview-
|
|
2
|
+
import { t as Preview } from "./Preview-DbR6jbs-.mjs";
|
|
3
3
|
import { useContext, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { styled } from "@soroush.tech/design-system";
|
|
@@ -9,7 +9,7 @@ import rehypeParse from "rehype-parse";
|
|
|
9
9
|
import rehypeRemark from "rehype-remark";
|
|
10
10
|
import remarkStringify from "remark-stringify";
|
|
11
11
|
import { unified } from "unified";
|
|
12
|
-
|
|
12
|
+
// src/utils/blockToMarkdown.ts
|
|
13
13
|
const processor = unified().use(rehypeParse, { fragment: true }).use(rehypeRemark).use(remarkGfm).use(remarkStringify, {
|
|
14
14
|
bullet: "-",
|
|
15
15
|
fence: "`",
|
|
@@ -25,8 +25,7 @@ function blockToMarkdown(element) {
|
|
|
25
25
|
for (const junk of clone.querySelectorAll(".code-copy, button, svg")) junk.remove();
|
|
26
26
|
return String(processor.processSync(clone.innerHTML)).trimEnd();
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
//#region src/utils/splitBlocks.ts
|
|
28
|
+
// src/utils/splitBlocks.ts
|
|
30
29
|
const FENCE = /^[ \t]{0,3}(`{3,}|~{3,})/;
|
|
31
30
|
/**
|
|
32
31
|
* The fence state after `line`: unchanged when the line carries no marker, the
|
|
@@ -80,8 +79,7 @@ function splitBlocks(value) {
|
|
|
80
79
|
});
|
|
81
80
|
return blocks;
|
|
82
81
|
}
|
|
83
|
-
|
|
84
|
-
//#region src/LiveEdit/LiveEdit.tsx
|
|
82
|
+
// src/LiveEdit/LiveEdit.tsx
|
|
85
83
|
const LiveEditRoot = styled(View, {
|
|
86
84
|
name: "MarkdownLiveEdit",
|
|
87
85
|
label: "MarkdownLiveEdit"
|
|
@@ -207,5 +205,4 @@ function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Cli
|
|
|
207
205
|
onDone: handleDone
|
|
208
206
|
}, `${generation}:${index}`)) });
|
|
209
207
|
}
|
|
210
|
-
//#endregion
|
|
211
208
|
export { LiveEdit as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_Preview = require("./Preview-
|
|
1
|
+
const require_Preview = require("./Preview-P7K65WOV.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");
|
|
@@ -12,7 +12,7 @@ let rehype_remark = require("rehype-remark");
|
|
|
12
12
|
rehype_remark = require_Preview.__toESM(rehype_remark, 1);
|
|
13
13
|
let remark_stringify = require("remark-stringify");
|
|
14
14
|
remark_stringify = require_Preview.__toESM(remark_stringify, 1);
|
|
15
|
-
|
|
15
|
+
// src/utils/blockToMarkdown.ts
|
|
16
16
|
const processor = (0, require("unified").unified)().use(rehype_parse.default, { fragment: true }).use(rehype_remark.default).use(remark_gfm.default).use(remark_stringify.default, {
|
|
17
17
|
bullet: "-",
|
|
18
18
|
fence: "`",
|
|
@@ -28,8 +28,7 @@ function blockToMarkdown(element) {
|
|
|
28
28
|
for (const junk of clone.querySelectorAll(".code-copy, button, svg")) junk.remove();
|
|
29
29
|
return String(processor.processSync(clone.innerHTML)).trimEnd();
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
//#region src/utils/splitBlocks.ts
|
|
31
|
+
// src/utils/splitBlocks.ts
|
|
33
32
|
const FENCE = /^[ \t]{0,3}(`{3,}|~{3,})/;
|
|
34
33
|
/**
|
|
35
34
|
* The fence state after `line`: unchanged when the line carries no marker, the
|
|
@@ -83,8 +82,7 @@ function splitBlocks(value) {
|
|
|
83
82
|
});
|
|
84
83
|
return blocks;
|
|
85
84
|
}
|
|
86
|
-
|
|
87
|
-
//#region src/LiveEdit/LiveEdit.tsx
|
|
85
|
+
// src/LiveEdit/LiveEdit.tsx
|
|
88
86
|
const LiveEditRoot = (0, _soroush_tech_design_system.styled)(_soroush_tech_design_system_View.View, {
|
|
89
87
|
name: "MarkdownLiveEdit",
|
|
90
88
|
label: "MarkdownLiveEdit"
|
|
@@ -210,7 +208,6 @@ function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder = "Cli
|
|
|
210
208
|
onDone: handleDone
|
|
211
209
|
}, `${generation}:${index}`)) });
|
|
212
210
|
}
|
|
213
|
-
//#endregion
|
|
214
211
|
Object.defineProperty(exports, "LiveEdit", {
|
|
215
212
|
enumerable: true,
|
|
216
213
|
get: function() {
|
package/dist/LiveEdit.cjs
CHANGED
package/dist/LiveEdit.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { r as PreviewSlotProps } from "./index-
|
|
2
|
-
//#region src/LiveEdit/LiveEdit.d.ts
|
|
1
|
+
import { r as PreviewSlotProps } from "./index-CooJPOhJ.cjs";
|
|
3
2
|
interface LiveEditProps {
|
|
4
3
|
/** Standalone source value - used when rendered outside a `Control`. Ignored inside one. */
|
|
5
4
|
value?: string;
|
|
@@ -21,5 +20,4 @@ interface LiveEditProps {
|
|
|
21
20
|
* context; standalone it is a plain controlled component.
|
|
22
21
|
*/
|
|
23
22
|
declare function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder, slotProps }: Readonly<LiveEditProps>): import("react").JSX.Element;
|
|
24
|
-
//#endregion
|
|
25
23
|
export { LiveEdit, LiveEditProps };
|
package/dist/LiveEdit.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { r as PreviewSlotProps } from "./index-
|
|
2
|
-
//#region src/LiveEdit/LiveEdit.d.ts
|
|
1
|
+
import { r as PreviewSlotProps } from "./index-CX5oiCZj.mjs";
|
|
3
2
|
interface LiveEditProps {
|
|
4
3
|
/** Standalone source value - used when rendered outside a `Control`. Ignored inside one. */
|
|
5
4
|
value?: string;
|
|
@@ -21,5 +20,4 @@ interface LiveEditProps {
|
|
|
21
20
|
* context; standalone it is a plain controlled component.
|
|
22
21
|
*/
|
|
23
22
|
declare function LiveEdit({ value: valueProp, onChange: onChangeProp, placeholder, slotProps }: Readonly<LiveEditProps>): import("react").JSX.Element;
|
|
24
|
-
//#endregion
|
|
25
23
|
export { LiveEdit, LiveEditProps };
|
package/dist/LiveEdit.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { LiveEdit };
|
|
1
|
+
export { t as LiveEdit } from "./LiveEdit-24uSWoSM.mjs";
|
package/dist/MarkdownContext.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let react = require("react");
|
|
3
|
-
|
|
3
|
+
// src/MarkdownContext/MarkdownContext.ts
|
|
4
4
|
const MarkdownContext = (0, react.createContext)(null);
|
|
5
5
|
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
6
6
|
function useMarkdownContext() {
|
|
@@ -8,6 +8,5 @@ function useMarkdownContext() {
|
|
|
8
8
|
if (!context) throw new Error("Markdown parts must be rendered inside <Markdown.Control>");
|
|
9
9
|
return context;
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
exports.MarkdownContext = MarkdownContext;
|
|
13
12
|
exports.useMarkdownContext = useMarkdownContext;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-
|
|
1
|
+
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-cG2-GTkG.cjs";
|
|
2
2
|
export { MarkdownContext, MarkdownContextValue, MarkdownSelection, useMarkdownContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-
|
|
1
|
+
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-cG2-GTkG.mjs";
|
|
2
2
|
export { MarkdownContext, MarkdownContextValue, MarkdownSelection, useMarkdownContext };
|
package/dist/MarkdownContext.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
-
|
|
2
|
+
// src/MarkdownContext/MarkdownContext.ts
|
|
3
3
|
const MarkdownContext = createContext(null);
|
|
4
4
|
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
5
5
|
function useMarkdownContext() {
|
|
@@ -7,5 +7,4 @@ function useMarkdownContext() {
|
|
|
7
7
|
if (!context) throw new Error("Markdown parts must be rendered inside <Markdown.Control>");
|
|
8
8
|
return context;
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { MarkdownContext, useMarkdownContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CodeBlock } from "./CodeBlock-
|
|
1
|
+
import { r as CodeBlock } from "./CodeBlock-CEZH1GuF.mjs";
|
|
2
2
|
import { useEffect, useId, useRef, useState } from "react";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Button } from "@soroush.tech/design-system/Button";
|
|
@@ -8,7 +8,7 @@ import { useTheme } from "@soroush.tech/design-system/theme";
|
|
|
8
8
|
import { View } from "@soroush.tech/design-system/View";
|
|
9
9
|
import { Grid } from "@soroush.tech/design-system/Grid";
|
|
10
10
|
import { Modal } from "@soroush.tech/design-system/Modal";
|
|
11
|
-
|
|
11
|
+
// src/Mermaid/DiagramViewer.tsx
|
|
12
12
|
const MIN_SCALE = .2;
|
|
13
13
|
const MAX_SCALE = 5;
|
|
14
14
|
const ZOOM_STEP = .2;
|
|
@@ -177,8 +177,7 @@ function DiagramViewer({ svg, expandable = true, fill = false }) {
|
|
|
177
177
|
})
|
|
178
178
|
})] });
|
|
179
179
|
}
|
|
180
|
-
|
|
181
|
-
//#region src/Mermaid/Mermaid.tsx
|
|
180
|
+
// src/Mermaid/Mermaid.tsx
|
|
182
181
|
async function toSvg(id, chart, theme) {
|
|
183
182
|
const { default: mermaid } = await import("mermaid");
|
|
184
183
|
mermaid.initialize({
|
|
@@ -227,5 +226,4 @@ function Mermaid({ chart, diagram }) {
|
|
|
227
226
|
});
|
|
228
227
|
return /* @__PURE__ */ jsx(CodeBlock, { children: chart });
|
|
229
228
|
}
|
|
230
|
-
//#endregion
|
|
231
229
|
export { Mermaid as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_CodeBlock = require("./CodeBlock-
|
|
1
|
+
const require_CodeBlock = require("./CodeBlock-Cclo15NS.cjs");
|
|
2
2
|
let react = require("react");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
let _soroush_tech_design_system_Button = require("@soroush.tech/design-system/Button");
|
|
@@ -8,7 +8,7 @@ let _soroush_tech_design_system_theme = require("@soroush.tech/design-system/the
|
|
|
8
8
|
let _soroush_tech_design_system_View = require("@soroush.tech/design-system/View");
|
|
9
9
|
let _soroush_tech_design_system_Grid = require("@soroush.tech/design-system/Grid");
|
|
10
10
|
let _soroush_tech_design_system_Modal = require("@soroush.tech/design-system/Modal");
|
|
11
|
-
|
|
11
|
+
// src/Mermaid/DiagramViewer.tsx
|
|
12
12
|
const MIN_SCALE = .2;
|
|
13
13
|
const MAX_SCALE = 5;
|
|
14
14
|
const ZOOM_STEP = .2;
|
|
@@ -177,8 +177,7 @@ function DiagramViewer({ svg, expandable = true, fill = false }) {
|
|
|
177
177
|
})
|
|
178
178
|
})] });
|
|
179
179
|
}
|
|
180
|
-
|
|
181
|
-
//#region src/Mermaid/Mermaid.tsx
|
|
180
|
+
// src/Mermaid/Mermaid.tsx
|
|
182
181
|
async function toSvg(id, chart, theme) {
|
|
183
182
|
const { default: mermaid } = await import("mermaid");
|
|
184
183
|
mermaid.initialize({
|
|
@@ -227,7 +226,6 @@ function Mermaid({ chart, diagram }) {
|
|
|
227
226
|
});
|
|
228
227
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CodeBlock.CodeBlock, { children: chart });
|
|
229
228
|
}
|
|
230
|
-
//#endregion
|
|
231
229
|
Object.defineProperty(exports, "Mermaid", {
|
|
232
230
|
enumerable: true,
|
|
233
231
|
get: function() {
|
package/dist/Mermaid.cjs
CHANGED
package/dist/Mermaid.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
1
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-6taYWZ6e.cjs";
|
|
2
2
|
export { DiagramProps, Mermaid, MermaidProps };
|
package/dist/Mermaid.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
1
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-6taYWZ6e.mjs";
|
|
2
2
|
export { DiagramProps, Mermaid, MermaidProps };
|
package/dist/Mermaid.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Mermaid };
|
|
1
|
+
export { t as Mermaid } from "./Mermaid-Cdtxi44F.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as CodeBlock } from "./CodeBlock-
|
|
2
|
-
import { t as Mermaid } from "./Mermaid-
|
|
1
|
+
import { r as CodeBlock } from "./CodeBlock-CEZH1GuF.mjs";
|
|
2
|
+
import { t as Mermaid } from "./Mermaid-Cdtxi44F.mjs";
|
|
3
3
|
import { createContext, isValidElement, useContext } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Typography } from "@soroush.tech/design-system/Typography";
|
|
@@ -22,8 +22,7 @@ function isMermaidBlock(children) {
|
|
|
22
22
|
const { className } = children.props;
|
|
23
23
|
return typeof className === "string" && className.includes("language-mermaid");
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
//#region src/Preview/Preview.tsx
|
|
25
|
+
// src/Preview/Preview.tsx
|
|
27
26
|
const remarkPlugins = [remarkGfm];
|
|
28
27
|
const rehypePlugins = [rehypeSlug, [rehypeHighlight, { ignoreMissing: true }]];
|
|
29
28
|
const PreviewRoot = styled(View, {
|
|
@@ -250,5 +249,4 @@ function Preview({ children, slotProps }) {
|
|
|
250
249
|
})
|
|
251
250
|
}) });
|
|
252
251
|
}
|
|
253
|
-
//#endregion
|
|
254
252
|
export { Preview as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -19,9 +19,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const require_Mermaid = require("./Mermaid-CkUan4z-.cjs");
|
|
22
|
+
const require_CodeBlock = require("./CodeBlock-Cclo15NS.cjs");
|
|
23
|
+
const require_Mermaid = require("./Mermaid-D3_ZHgY2.cjs");
|
|
25
24
|
let react = require("react");
|
|
26
25
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
27
26
|
let _soroush_tech_design_system_Typography = require("@soroush.tech/design-system/Typography");
|
|
@@ -48,8 +47,7 @@ function isMermaidBlock(children) {
|
|
|
48
47
|
const { className } = children.props;
|
|
49
48
|
return typeof className === "string" && className.includes("language-mermaid");
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
//#region src/Preview/Preview.tsx
|
|
50
|
+
// src/Preview/Preview.tsx
|
|
53
51
|
const remarkPlugins = [remark_gfm.default];
|
|
54
52
|
const rehypePlugins = [rehype_slug.default, [rehype_highlight.default, { ignoreMissing: true }]];
|
|
55
53
|
const PreviewRoot = (0, _soroush_tech_design_system.styled)(_soroush_tech_design_system_View.View, {
|
|
@@ -276,7 +274,6 @@ function Preview({ children, slotProps }) {
|
|
|
276
274
|
})
|
|
277
275
|
}) });
|
|
278
276
|
}
|
|
279
|
-
//#endregion
|
|
280
277
|
Object.defineProperty(exports, "Preview", {
|
|
281
278
|
enumerable: true,
|
|
282
279
|
get: function() {
|
package/dist/Preview.cjs
CHANGED
package/dist/Preview.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-
|
|
1
|
+
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-CooJPOhJ.cjs";
|
|
2
2
|
export { Preview, PreviewProps, PreviewSlotProps };
|
package/dist/Preview.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-
|
|
1
|
+
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-CX5oiCZj.mjs";
|
|
2
2
|
export { Preview, PreviewProps, PreviewSlotProps };
|
package/dist/Preview.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Preview };
|
|
1
|
+
export { t as Preview } from "./Preview-DbR6jbs-.mjs";
|
|
@@ -11,7 +11,7 @@ import { Typography } from "@soroush.tech/design-system/Typography";
|
|
|
11
11
|
import { styled } from "@soroush.tech/design-system";
|
|
12
12
|
import { themeDefault } from "@soroush.tech/design-system/theme";
|
|
13
13
|
import { Popover } from "@soroush.tech/design-system/Popover";
|
|
14
|
-
|
|
14
|
+
// src/utils/buildTableSnippet.ts
|
|
15
15
|
/**
|
|
16
16
|
* Builds a GFM table snippet with `rows` total rows (a header row plus `rows - 1` body rows)
|
|
17
17
|
* and `cols` columns, wrapped in blank lines so it sits on its own block.
|
|
@@ -24,8 +24,7 @@ function buildTableSnippet(rows, cols) {
|
|
|
24
24
|
...Array.from({ length: rows - 1 }, () => row(() => "Cell"))
|
|
25
25
|
].join("\n")}\n`;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/utils/groupToolbarActions.ts
|
|
27
|
+
// src/utils/groupToolbarActions.ts
|
|
29
28
|
/**
|
|
30
29
|
* Splits actions into render segments: consecutive actions sharing a `group` id collapse into
|
|
31
30
|
* one segment (rendered as a joined `ButtonGroup`); ungrouped actions each get their own.
|
|
@@ -39,8 +38,7 @@ function groupToolbarActions(actions) {
|
|
|
39
38
|
});
|
|
40
39
|
return segments;
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
//#region src/const.ts
|
|
41
|
+
// src/const.ts
|
|
44
42
|
const LIST_MARKER = /^(?:- \[[ xX]\] |- |\d+\. )/;
|
|
45
43
|
/**
|
|
46
44
|
* Every formatting action the toolbar exposes - one per markdown feature the `Markdown`
|
|
@@ -352,8 +350,7 @@ const mermaidDiagramAction = (snippet) => ({
|
|
|
352
350
|
kind: "insert",
|
|
353
351
|
snippet: `\n\`\`\`mermaid\n${snippet}\n\`\`\`\n`
|
|
354
352
|
});
|
|
355
|
-
|
|
356
|
-
//#region src/Toolbar/TablePicker.tsx
|
|
353
|
+
// src/Toolbar/TablePicker.tsx
|
|
357
354
|
/** Smallest grid shown, and the hard cap it grows to as the hover nears the edge. */
|
|
358
355
|
const MIN_EXTENT = 8;
|
|
359
356
|
const MAX_EXTENT = 20;
|
|
@@ -471,8 +468,7 @@ function TablePicker({ onSelect }) {
|
|
|
471
468
|
})
|
|
472
469
|
})] });
|
|
473
470
|
}
|
|
474
|
-
|
|
475
|
-
//#region src/Toolbar/Toolbar.tsx
|
|
471
|
+
// src/Toolbar/Toolbar.tsx
|
|
476
472
|
const HEADING_OPTIONS = HEADING_ACTIONS.map((action) => ({
|
|
477
473
|
label: action.label,
|
|
478
474
|
value: action.id
|
|
@@ -593,5 +589,4 @@ function Toolbar() {
|
|
|
593
589
|
]
|
|
594
590
|
});
|
|
595
591
|
}
|
|
596
|
-
//#endregion
|
|
597
592
|
export { TablePicker as n, Toolbar as t };
|
|
@@ -11,7 +11,7 @@ let _soroush_tech_design_system_Typography = require("@soroush.tech/design-syste
|
|
|
11
11
|
let _soroush_tech_design_system = require("@soroush.tech/design-system");
|
|
12
12
|
let _soroush_tech_design_system_theme = require("@soroush.tech/design-system/theme");
|
|
13
13
|
let _soroush_tech_design_system_Popover = require("@soroush.tech/design-system/Popover");
|
|
14
|
-
|
|
14
|
+
// src/utils/buildTableSnippet.ts
|
|
15
15
|
/**
|
|
16
16
|
* Builds a GFM table snippet with `rows` total rows (a header row plus `rows - 1` body rows)
|
|
17
17
|
* and `cols` columns, wrapped in blank lines so it sits on its own block.
|
|
@@ -24,8 +24,7 @@ function buildTableSnippet(rows, cols) {
|
|
|
24
24
|
...Array.from({ length: rows - 1 }, () => row(() => "Cell"))
|
|
25
25
|
].join("\n")}\n`;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/utils/groupToolbarActions.ts
|
|
27
|
+
// src/utils/groupToolbarActions.ts
|
|
29
28
|
/**
|
|
30
29
|
* Splits actions into render segments: consecutive actions sharing a `group` id collapse into
|
|
31
30
|
* one segment (rendered as a joined `ButtonGroup`); ungrouped actions each get their own.
|
|
@@ -39,8 +38,7 @@ function groupToolbarActions(actions) {
|
|
|
39
38
|
});
|
|
40
39
|
return segments;
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
//#region src/const.ts
|
|
41
|
+
// src/const.ts
|
|
44
42
|
const LIST_MARKER = /^(?:- \[[ xX]\] |- |\d+\. )/;
|
|
45
43
|
/**
|
|
46
44
|
* Every formatting action the toolbar exposes - one per markdown feature the `Markdown`
|
|
@@ -352,8 +350,7 @@ const mermaidDiagramAction = (snippet) => ({
|
|
|
352
350
|
kind: "insert",
|
|
353
351
|
snippet: `\n\`\`\`mermaid\n${snippet}\n\`\`\`\n`
|
|
354
352
|
});
|
|
355
|
-
|
|
356
|
-
//#region src/Toolbar/TablePicker.tsx
|
|
353
|
+
// src/Toolbar/TablePicker.tsx
|
|
357
354
|
/** Smallest grid shown, and the hard cap it grows to as the hover nears the edge. */
|
|
358
355
|
const MIN_EXTENT = 8;
|
|
359
356
|
const MAX_EXTENT = 20;
|
|
@@ -471,8 +468,7 @@ function TablePicker({ onSelect }) {
|
|
|
471
468
|
})
|
|
472
469
|
})] });
|
|
473
470
|
}
|
|
474
|
-
|
|
475
|
-
//#region src/Toolbar/Toolbar.tsx
|
|
471
|
+
// src/Toolbar/Toolbar.tsx
|
|
476
472
|
const HEADING_OPTIONS = HEADING_ACTIONS.map((action) => ({
|
|
477
473
|
label: action.label,
|
|
478
474
|
value: action.id
|
|
@@ -593,7 +589,6 @@ function Toolbar() {
|
|
|
593
589
|
]
|
|
594
590
|
});
|
|
595
591
|
}
|
|
596
|
-
//#endregion
|
|
597
592
|
Object.defineProperty(exports, "TablePicker", {
|
|
598
593
|
enumerable: true,
|
|
599
594
|
get: function() {
|
package/dist/Toolbar.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_Toolbar = require("./Toolbar-
|
|
2
|
+
const require_Toolbar = require("./Toolbar-XSZ61Hxf.cjs");
|
|
3
3
|
exports.TablePicker = require_Toolbar.TablePicker;
|
|
4
4
|
exports.Toolbar = require_Toolbar.Toolbar;
|
package/dist/Toolbar.d.cts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
//#region src/Toolbar/Toolbar.d.ts
|
|
2
1
|
/** Formatting buttons, heading + code-language selects, and the table-size picker. */
|
|
3
2
|
declare function Toolbar(): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/Toolbar/TablePicker.d.ts
|
|
6
3
|
interface TablePickerProps {
|
|
7
4
|
/** Fired with the chosen (rows, cols) when a grid cell is picked. */
|
|
8
5
|
onSelect: (rows: number, cols: number) => void;
|
|
9
6
|
}
|
|
10
7
|
/** A "Table" trigger that opens a hover grid for choosing table dimensions. */
|
|
11
8
|
declare function TablePicker({ onSelect }: Readonly<TablePickerProps>): import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
9
|
export { TablePicker, TablePickerProps, Toolbar };
|
package/dist/Toolbar.d.mts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
//#region src/Toolbar/Toolbar.d.ts
|
|
2
1
|
/** Formatting buttons, heading + code-language selects, and the table-size picker. */
|
|
3
2
|
declare function Toolbar(): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/Toolbar/TablePicker.d.ts
|
|
6
3
|
interface TablePickerProps {
|
|
7
4
|
/** Fired with the chosen (rows, cols) when a grid cell is picked. */
|
|
8
5
|
onSelect: (rows: number, cols: number) => void;
|
|
9
6
|
}
|
|
10
7
|
/** A "Table" trigger that opens a hover grid for choosing table dimensions. */
|
|
11
8
|
declare function TablePicker({ onSelect }: Readonly<TablePickerProps>): import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
9
|
export { TablePicker, TablePickerProps, Toolbar };
|
package/dist/Toolbar.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { TablePicker, Toolbar };
|
|
1
|
+
export { n as TablePicker, t as Toolbar } from "./Toolbar-D3GoFKzb.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/applyAction.ts
|
|
2
2
|
const fusesWithMarker = (char) => !/[\s*_~`]/.test(char);
|
|
3
3
|
function stripWrap(action, { value, selectionStart, selectionEnd }) {
|
|
4
4
|
const { prefix, suffix } = action;
|
|
@@ -113,7 +113,6 @@ function applyAction(action, selection) {
|
|
|
113
113
|
case "insert": return applyInsert(action, selection);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
//#endregion
|
|
117
116
|
Object.defineProperty(exports, "applyAction", {
|
|
118
117
|
enumerable: true,
|
|
119
118
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/applyAction.ts
|
|
2
2
|
const fusesWithMarker = (char) => !/[\s*_~`]/.test(char);
|
|
3
3
|
function stripWrap(action, { value, selectionStart, selectionEnd }) {
|
|
4
4
|
const { prefix, suffix } = action;
|
|
@@ -113,5 +113,4 @@ function applyAction(action, selection) {
|
|
|
113
113
|
case "insert": return applyInsert(action, selection);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
//#endregion
|
|
117
116
|
export { applyAction as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/Mermaid/DiagramViewer.d.ts
|
|
2
1
|
interface DiagramViewerProps {
|
|
3
2
|
/** The rendered mermaid SVG markup. */
|
|
4
3
|
svg: string;
|
|
@@ -7,8 +6,6 @@ interface DiagramViewerProps {
|
|
|
7
6
|
/** Fill the parent's height - used by the viewer inside the fullscreen dialog. */
|
|
8
7
|
fill?: boolean;
|
|
9
8
|
}
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/Mermaid/Mermaid.d.ts
|
|
12
9
|
/** DiagramViewer props a consumer may set - `svg` and `fill` are managed internally. */
|
|
13
10
|
type DiagramProps = Omit<DiagramViewerProps, 'svg' | 'fill'>;
|
|
14
11
|
interface MermaidProps {
|
|
@@ -23,5 +20,4 @@ interface MermaidProps {
|
|
|
23
20
|
* no-JS readers still show something useful and hydration stays stable.
|
|
24
21
|
*/
|
|
25
22
|
declare function Mermaid({ chart, diagram }: Readonly<MermaidProps>): import("react").JSX.Element;
|
|
26
|
-
//#endregion
|
|
27
23
|
export { Mermaid as n, MermaidProps as r, DiagramProps as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/Mermaid/DiagramViewer.d.ts
|
|
2
1
|
interface DiagramViewerProps {
|
|
3
2
|
/** The rendered mermaid SVG markup. */
|
|
4
3
|
svg: string;
|
|
@@ -7,8 +6,6 @@ interface DiagramViewerProps {
|
|
|
7
6
|
/** Fill the parent's height - used by the viewer inside the fullscreen dialog. */
|
|
8
7
|
fill?: boolean;
|
|
9
8
|
}
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/Mermaid/Mermaid.d.ts
|
|
12
9
|
/** DiagramViewer props a consumer may set - `svg` and `fill` are managed internally. */
|
|
13
10
|
type DiagramProps = Omit<DiagramViewerProps, 'svg' | 'fill'>;
|
|
14
11
|
interface MermaidProps {
|
|
@@ -23,5 +20,4 @@ interface MermaidProps {
|
|
|
23
20
|
* no-JS readers still show something useful and hydration stays stable.
|
|
24
21
|
*/
|
|
25
22
|
declare function Mermaid({ chart, diagram }: Readonly<MermaidProps>): import("react").JSX.Element;
|
|
26
|
-
//#endregion
|
|
27
23
|
export { Mermaid as n, MermaidProps as r, DiagramProps as t };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { a as CodeBlockProps } from "./index-
|
|
2
|
-
import { r as MermaidProps } from "./index-
|
|
1
|
+
import { a as CodeBlockProps } from "./index-DLd7MehH.mjs";
|
|
2
|
+
import { r as MermaidProps } from "./index-6taYWZ6e.mjs";
|
|
3
|
+
import { TypographyProps } from "@soroush.tech/design-system/Typography";
|
|
3
4
|
import { ViewProps } from "@soroush.tech/design-system/View";
|
|
4
5
|
import { QuoteProps } from "@soroush.tech/design-system/Quote";
|
|
5
6
|
import { CheckboxProps } from "@soroush.tech/design-system/Checkbox";
|
|
6
7
|
import { ImageProps } from "@soroush.tech/design-system/Image";
|
|
7
8
|
import { LinkProps } from "@soroush.tech/design-system/Link";
|
|
8
9
|
import { TableBodyProps, TableCellProps, TableHeadProps, TableProps, TableRowProps } from "@soroush.tech/design-system/Table";
|
|
9
|
-
import { TypographyProps } from "@soroush.tech/design-system/Typography";
|
|
10
|
-
//#region src/Preview/Preview.d.ts
|
|
11
10
|
/**
|
|
12
11
|
* Per-element prop overrides, merged over the design-system defaults (the caller's props win).
|
|
13
12
|
* Keyed by markdown element - e.g. `slotProps={{ p: { color: 'primary' }, h1: { variant: 'h2' } }}`.
|
|
@@ -49,5 +48,4 @@ interface PreviewProps {
|
|
|
49
48
|
}
|
|
50
49
|
/** Renders a markdown string with every element mapped to a design-system primitive. */
|
|
51
50
|
declare function Preview({ children, slotProps }: Readonly<PreviewProps>): import("react").JSX.Element;
|
|
52
|
-
//#endregion
|
|
53
51
|
export { PreviewProps as n, PreviewSlotProps as r, Preview as t };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { a as CodeBlockProps } from "./index-
|
|
2
|
-
import { r as MermaidProps } from "./index-
|
|
3
|
-
import { TypographyProps } from "@soroush.tech/design-system/Typography";
|
|
1
|
+
import { a as CodeBlockProps } from "./index-DLd7MehH.cjs";
|
|
2
|
+
import { r as MermaidProps } from "./index-6taYWZ6e.cjs";
|
|
4
3
|
import { ViewProps } from "@soroush.tech/design-system/View";
|
|
5
4
|
import { QuoteProps } from "@soroush.tech/design-system/Quote";
|
|
6
5
|
import { CheckboxProps } from "@soroush.tech/design-system/Checkbox";
|
|
7
6
|
import { ImageProps } from "@soroush.tech/design-system/Image";
|
|
8
7
|
import { LinkProps } from "@soroush.tech/design-system/Link";
|
|
9
8
|
import { TableBodyProps, TableCellProps, TableHeadProps, TableProps, TableRowProps } from "@soroush.tech/design-system/Table";
|
|
10
|
-
|
|
9
|
+
import { TypographyProps } from "@soroush.tech/design-system/Typography";
|
|
11
10
|
/**
|
|
12
11
|
* Per-element prop overrides, merged over the design-system defaults (the caller's props win).
|
|
13
12
|
* Keyed by markdown element - e.g. `slotProps={{ p: { color: 'primary' }, h1: { variant: 'h2' } }}`.
|
|
@@ -49,5 +48,4 @@ interface PreviewProps {
|
|
|
49
48
|
}
|
|
50
49
|
/** Renders a markdown string with every element mapped to a design-system primitive. */
|
|
51
50
|
declare function Preview({ children, slotProps }: Readonly<PreviewProps>): import("react").JSX.Element;
|
|
52
|
-
//#endregion
|
|
53
51
|
export { PreviewProps as n, PreviewSlotProps as r, Preview as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { ViewProps } from "@soroush.tech/design-system/View";
|
|
3
|
-
//#region src/CodeBlock/CodeBlock.d.ts
|
|
4
3
|
interface CodeBlockProps extends ViewProps {
|
|
5
4
|
children: ReactNode;
|
|
6
5
|
}
|
|
@@ -9,8 +8,6 @@ interface CodeBlockProps extends ViewProps {
|
|
|
9
8
|
* copy-to-clipboard button that sticks to the top-right while the block is in view.
|
|
10
9
|
*/
|
|
11
10
|
declare function CodeBlock({ children, ...rest }: Readonly<CodeBlockProps>): import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/CodeBlock/CodeBlock.data.d.ts
|
|
14
11
|
/**
|
|
15
12
|
* Syntax-highlighting tokens for `CodeBlock` - mapped onto highlight.js token classes.
|
|
16
13
|
* Not part of design-system's own scales; `../index.ts` augments
|
|
@@ -44,5 +41,4 @@ interface ThemeSyntax {
|
|
|
44
41
|
declare const syntaxDark: ThemeSyntax;
|
|
45
42
|
/** Matched to the JetBrains "Islands Light" editor scheme. */
|
|
46
43
|
declare const syntaxLight: ThemeSyntax;
|
|
47
|
-
//#endregion
|
|
48
44
|
export { CodeBlockProps as a, CodeBlock as i, syntaxDark as n, syntaxLight as r, ThemeSyntax as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { ViewProps } from "@soroush.tech/design-system/View";
|
|
3
|
-
//#region src/CodeBlock/CodeBlock.d.ts
|
|
4
3
|
interface CodeBlockProps extends ViewProps {
|
|
5
4
|
children: ReactNode;
|
|
6
5
|
}
|
|
@@ -9,8 +8,6 @@ interface CodeBlockProps extends ViewProps {
|
|
|
9
8
|
* copy-to-clipboard button that sticks to the top-right while the block is in view.
|
|
10
9
|
*/
|
|
11
10
|
declare function CodeBlock({ children, ...rest }: Readonly<CodeBlockProps>): import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/CodeBlock/CodeBlock.data.d.ts
|
|
14
11
|
/**
|
|
15
12
|
* Syntax-highlighting tokens for `CodeBlock` - mapped onto highlight.js token classes.
|
|
16
13
|
* Not part of design-system's own scales; `../index.ts` augments
|
|
@@ -44,5 +41,4 @@ interface ThemeSyntax {
|
|
|
44
41
|
declare const syntaxDark: ThemeSyntax;
|
|
45
42
|
/** Matched to the JetBrains "Islands Light" editor scheme. */
|
|
46
43
|
declare const syntaxLight: ThemeSyntax;
|
|
47
|
-
//#endregion
|
|
48
44
|
export { CodeBlockProps as a, CodeBlock as i, syntaxDark as n, syntaxLight as r, ThemeSyntax as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IconName } from "@soroush.tech/design-system/Icon";
|
|
2
|
-
//#region src/const.d.ts
|
|
3
2
|
/** How a text label is rendered - mirrors the mark it inserts. */
|
|
4
3
|
type ToolbarLabelEmphasis = 'bold' | 'italic' | 'strike';
|
|
5
4
|
/** Shared presentation for a toolbar control. */
|
|
@@ -48,8 +47,6 @@ interface InsertAction extends BaseAction {
|
|
|
48
47
|
snippet: string;
|
|
49
48
|
}
|
|
50
49
|
type ToolbarAction = WrapAction | LinePrefixAction | InsertAction;
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/MarkdownContext/MarkdownContext.d.ts
|
|
53
50
|
/** A textarea selection range shared between the Editor and the Toolbar. */
|
|
54
51
|
interface MarkdownSelection {
|
|
55
52
|
start: number;
|
|
@@ -72,5 +69,4 @@ interface MarkdownContextValue {
|
|
|
72
69
|
declare const MarkdownContext: import("react").Context<MarkdownContextValue | null>;
|
|
73
70
|
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
74
71
|
declare function useMarkdownContext(): MarkdownContextValue;
|
|
75
|
-
//#endregion
|
|
76
72
|
export { useMarkdownContext as i, MarkdownContextValue as n, MarkdownSelection as r, MarkdownContext as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IconName } from "@soroush.tech/design-system/Icon";
|
|
2
|
-
//#region src/const.d.ts
|
|
3
2
|
/** How a text label is rendered - mirrors the mark it inserts. */
|
|
4
3
|
type ToolbarLabelEmphasis = 'bold' | 'italic' | 'strike';
|
|
5
4
|
/** Shared presentation for a toolbar control. */
|
|
@@ -48,8 +47,6 @@ interface InsertAction extends BaseAction {
|
|
|
48
47
|
snippet: string;
|
|
49
48
|
}
|
|
50
49
|
type ToolbarAction = WrapAction | LinePrefixAction | InsertAction;
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/MarkdownContext/MarkdownContext.d.ts
|
|
53
50
|
/** A textarea selection range shared between the Editor and the Toolbar. */
|
|
54
51
|
interface MarkdownSelection {
|
|
55
52
|
start: number;
|
|
@@ -72,5 +69,4 @@ interface MarkdownContextValue {
|
|
|
72
69
|
declare const MarkdownContext: import("react").Context<MarkdownContextValue | null>;
|
|
73
70
|
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
74
71
|
declare function useMarkdownContext(): MarkdownContextValue;
|
|
75
|
-
//#endregion
|
|
76
72
|
export { useMarkdownContext as i, MarkdownContextValue as n, MarkdownSelection as r, MarkdownContext as t };
|
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-P7K65WOV.cjs");
|
|
3
3
|
const require_MarkdownContext = require("./MarkdownContext.cjs");
|
|
4
4
|
const require_Control = require("./Control.cjs");
|
|
5
|
-
const require_Toolbar = require("./Toolbar-
|
|
5
|
+
const require_Toolbar = require("./Toolbar-XSZ61Hxf.cjs");
|
|
6
6
|
const require_Editor = require("./Editor.cjs");
|
|
7
|
-
const require_CodeBlock = require("./CodeBlock-
|
|
8
|
-
const require_Mermaid = require("./Mermaid-
|
|
9
|
-
const require_LiveEdit = require("./LiveEdit-
|
|
7
|
+
const require_CodeBlock = require("./CodeBlock-Cclo15NS.cjs");
|
|
8
|
+
const require_Mermaid = require("./Mermaid-D3_ZHgY2.cjs");
|
|
9
|
+
const require_LiveEdit = require("./LiveEdit-BHA3ciln.cjs");
|
|
10
10
|
exports.CodeBlock = require_CodeBlock.CodeBlock;
|
|
11
11
|
exports.Control = require_Control.Control;
|
|
12
12
|
exports.Editor = require_Editor.Editor;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-
|
|
1
|
+
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-DLd7MehH.cjs";
|
|
2
2
|
import { Control, ControlProps } from "./Control.cjs";
|
|
3
3
|
import { Editor, EditorProps } from "./Editor.cjs";
|
|
4
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
5
|
-
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-
|
|
4
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-6taYWZ6e.cjs";
|
|
5
|
+
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-CooJPOhJ.cjs";
|
|
6
6
|
import { LiveEdit, LiveEditProps } from "./LiveEdit.cjs";
|
|
7
|
-
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-
|
|
7
|
+
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-cG2-GTkG.cjs";
|
|
8
8
|
import { TablePicker, TablePickerProps, Toolbar } from "./Toolbar.cjs";
|
|
9
|
-
//#region src/index.d.ts
|
|
10
9
|
/**
|
|
11
10
|
* Per-theme overrides for the `Mermaid` renderer, merged over (and winning against) its default
|
|
12
11
|
* mermaid `themeVariables`. Common variables are listed for autocomplete; any other mermaid theme
|
|
@@ -48,5 +47,4 @@ declare module '@soroush.tech/design-system/theme' {
|
|
|
48
47
|
syntax?: ThemeSyntax;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
//#endregion
|
|
52
50
|
export { CodeBlock, CodeBlockProps, Control, ControlProps, DiagramProps, Editor, EditorProps, LiveEdit, LiveEditProps, MarkdownContext, MarkdownContextValue, MarkdownSelection, Mermaid, MermaidProps, MermaidThemeVariables, Preview, PreviewProps, PreviewSlotProps, TablePicker, TablePickerProps, ThemeSyntax, Toolbar, syntaxDark, syntaxLight, useMarkdownContext };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-
|
|
1
|
+
import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-DLd7MehH.mjs";
|
|
2
2
|
import { Control, ControlProps } from "./Control.mjs";
|
|
3
3
|
import { Editor, EditorProps } from "./Editor.mjs";
|
|
4
|
-
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-
|
|
5
|
-
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-
|
|
4
|
+
import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-6taYWZ6e.mjs";
|
|
5
|
+
import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-CX5oiCZj.mjs";
|
|
6
6
|
import { LiveEdit, LiveEditProps } from "./LiveEdit.mjs";
|
|
7
|
-
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-
|
|
7
|
+
import { i as useMarkdownContext, n as MarkdownContextValue, r as MarkdownSelection, t as MarkdownContext } from "./index-cG2-GTkG.mjs";
|
|
8
8
|
import { TablePicker, TablePickerProps, Toolbar } from "./Toolbar.mjs";
|
|
9
|
-
//#region src/index.d.ts
|
|
10
9
|
/**
|
|
11
10
|
* Per-theme overrides for the `Mermaid` renderer, merged over (and winning against) its default
|
|
12
11
|
* mermaid `themeVariables`. Common variables are listed for autocomplete; any other mermaid theme
|
|
@@ -48,5 +47,4 @@ declare module '@soroush.tech/design-system/theme' {
|
|
|
48
47
|
syntax?: ThemeSyntax;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
//#endregion
|
|
52
50
|
export { CodeBlock, CodeBlockProps, Control, ControlProps, DiagramProps, Editor, EditorProps, LiveEdit, LiveEditProps, MarkdownContext, MarkdownContextValue, MarkdownSelection, Mermaid, MermaidProps, MermaidThemeVariables, Preview, PreviewProps, PreviewSlotProps, TablePicker, TablePickerProps, ThemeSyntax, Toolbar, syntaxDark, syntaxLight, useMarkdownContext };
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MarkdownContext, useMarkdownContext } from "./MarkdownContext.mjs";
|
|
2
2
|
import { Control } from "./Control.mjs";
|
|
3
|
-
import { n as TablePicker, t as Toolbar } from "./Toolbar-
|
|
3
|
+
import { n as TablePicker, t as Toolbar } from "./Toolbar-D3GoFKzb.mjs";
|
|
4
4
|
import { Editor } from "./Editor.mjs";
|
|
5
|
-
import { n as syntaxLight, r as CodeBlock, t as syntaxDark } from "./CodeBlock-
|
|
6
|
-
import { t as Mermaid } from "./Mermaid-
|
|
7
|
-
import { t as Preview } from "./Preview-
|
|
8
|
-
import { t as LiveEdit } from "./LiveEdit-
|
|
5
|
+
import { n as syntaxLight, r as CodeBlock, t as syntaxDark } from "./CodeBlock-CEZH1GuF.mjs";
|
|
6
|
+
import { t as Mermaid } from "./Mermaid-Cdtxi44F.mjs";
|
|
7
|
+
import { t as Preview } from "./Preview-DbR6jbs-.mjs";
|
|
8
|
+
import { t as LiveEdit } from "./LiveEdit-24uSWoSM.mjs";
|
|
9
9
|
export { CodeBlock, Control, Editor, LiveEdit, MarkdownContext, Mermaid, Preview, TablePicker, Toolbar, syntaxDark, syntaxLight, useMarkdownContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soroush.tech/markdown",
|
|
3
|
-
"version": "1.2.3-rc.
|
|
3
|
+
"version": "1.2.3-rc.5",
|
|
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",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"author": "Masoud Soroush <masoud@soroush.tech>",
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"homepage": "https://soroush.tech/markdown",
|
|
17
|
+
"homepage": "https://docs.soroush.tech/markdown/",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/soroush-tech/design-system.git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"mermaid": "^
|
|
58
|
+
"mermaid": "^12.2.0",
|
|
59
59
|
"react-markdown": "^10.1.0",
|
|
60
60
|
"rehype-highlight": "^7.0.2",
|
|
61
61
|
"rehype-parse": "^9.0.1",
|
|
@@ -66,27 +66,27 @@
|
|
|
66
66
|
"unified": "^11.0.5"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@soroush.tech/design-system": "^1.3.3 || ^2.0.0
|
|
69
|
+
"@soroush.tech/design-system": "^1.3.3 || ^2.0.0",
|
|
70
70
|
"react": "^19.0.0",
|
|
71
71
|
"react-dom": "^19.0.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@storybook/react-vite": "^10.
|
|
74
|
+
"@storybook/react-vite": "^10.6.3",
|
|
75
75
|
"@testing-library/jest-dom": "^7.0.1",
|
|
76
|
-
"@testing-library/react": "^16.3.
|
|
77
|
-
"@types/node": "^26.
|
|
78
|
-
"@types/react": "^19.
|
|
79
|
-
"@types/react-dom": "^19.
|
|
80
|
-
"@vitest/coverage-v8": "^
|
|
76
|
+
"@testing-library/react": "^16.3.3",
|
|
77
|
+
"@types/node": "^26.6.5",
|
|
78
|
+
"@types/react": "^19.3.0",
|
|
79
|
+
"@types/react-dom": "^19.3.0",
|
|
80
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
81
81
|
"jsdom": "^29.1.1",
|
|
82
|
-
"oxlint": "^1.
|
|
83
|
-
"react": "^19.
|
|
84
|
-
"react-dom": "^19.
|
|
85
|
-
"storybook": "^10.
|
|
82
|
+
"oxlint": "^1.89.0",
|
|
83
|
+
"react": "^19.3.1",
|
|
84
|
+
"react-dom": "^19.3.1",
|
|
85
|
+
"storybook": "^10.6.3",
|
|
86
86
|
"tsdown": "^0.22.14",
|
|
87
87
|
"typescript": "~7.0.2",
|
|
88
|
-
"vitest": "^
|
|
89
|
-
"@soroush.tech/design-system": "2.0.0-rc.
|
|
88
|
+
"vitest": "^5.0.5",
|
|
89
|
+
"@soroush.tech/design-system": "2.0.0-rc.5",
|
|
90
90
|
"@soroush.tech/eslint-config": "0.0.0",
|
|
91
91
|
"@soroush.tech/hooks": "0.1.0"
|
|
92
92
|
},
|