@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.
Files changed (57) hide show
  1. package/dist/{CodeBlock-CVlrvVPP.mjs → CodeBlock-CEZH1GuF.mjs} +3 -6
  2. package/dist/{CodeBlock-Cymx1ZAY.cjs → CodeBlock-Cclo15NS.cjs} +3 -6
  3. package/dist/CodeBlock.cjs +1 -1
  4. package/dist/CodeBlock.d.cts +1 -1
  5. package/dist/CodeBlock.d.mts +1 -1
  6. package/dist/CodeBlock.mjs +1 -2
  7. package/dist/Control.cjs +2 -3
  8. package/dist/Control.d.cts +0 -2
  9. package/dist/Control.d.mts +0 -2
  10. package/dist/Control.mjs +2 -3
  11. package/dist/Editor.cjs +2 -3
  12. package/dist/Editor.d.cts +0 -2
  13. package/dist/Editor.d.mts +0 -2
  14. package/dist/Editor.mjs +2 -3
  15. package/dist/{LiveEdit-BVkUqJd5.mjs → LiveEdit-24uSWoSM.mjs} +4 -7
  16. package/dist/{LiveEdit-Chb8D-NA.cjs → LiveEdit-BHA3ciln.cjs} +4 -7
  17. package/dist/LiveEdit.cjs +1 -1
  18. package/dist/LiveEdit.d.cts +1 -3
  19. package/dist/LiveEdit.d.mts +1 -3
  20. package/dist/LiveEdit.mjs +1 -2
  21. package/dist/MarkdownContext.cjs +1 -2
  22. package/dist/MarkdownContext.d.cts +1 -1
  23. package/dist/MarkdownContext.d.mts +1 -1
  24. package/dist/MarkdownContext.mjs +1 -2
  25. package/dist/{Mermaid-B7vDwGQG.mjs → Mermaid-Cdtxi44F.mjs} +3 -5
  26. package/dist/{Mermaid-CkUan4z-.cjs → Mermaid-D3_ZHgY2.cjs} +3 -5
  27. package/dist/Mermaid.cjs +1 -1
  28. package/dist/Mermaid.d.cts +1 -1
  29. package/dist/Mermaid.d.mts +1 -1
  30. package/dist/Mermaid.mjs +1 -2
  31. package/dist/{Preview-B95_mk1s.mjs → Preview-DbR6jbs-.mjs} +3 -5
  32. package/dist/{Preview-BSieDKBE.cjs → Preview-P7K65WOV.cjs} +4 -7
  33. package/dist/Preview.cjs +1 -1
  34. package/dist/Preview.d.cts +1 -1
  35. package/dist/Preview.d.mts +1 -1
  36. package/dist/Preview.mjs +1 -2
  37. package/dist/{Toolbar-zDEkBuqy.mjs → Toolbar-D3GoFKzb.mjs} +5 -10
  38. package/dist/{Toolbar-BlMahuVU.cjs → Toolbar-XSZ61Hxf.cjs} +5 -10
  39. package/dist/Toolbar.cjs +1 -1
  40. package/dist/Toolbar.d.cts +0 -4
  41. package/dist/Toolbar.d.mts +0 -4
  42. package/dist/Toolbar.mjs +1 -2
  43. package/dist/{applyAction-eBwIRQNK.cjs → applyAction-B3AwrWKV.cjs} +1 -2
  44. package/dist/{applyAction-CegmXrxL.mjs → applyAction-CkTQJ5Iy.mjs} +1 -2
  45. package/dist/{index-Bd3yPDn_.d.cts → index-6taYWZ6e.d.cts} +0 -4
  46. package/dist/{index-Bd3yPDn_.d.mts → index-6taYWZ6e.d.mts} +0 -4
  47. package/dist/{index-TT9-Qjsh.d.cts → index-CX5oiCZj.d.mts} +3 -5
  48. package/dist/{index-CBKWWR5Q.d.mts → index-CooJPOhJ.d.cts} +3 -5
  49. package/dist/{index-D1rI6OgO.d.mts → index-DLd7MehH.d.cts} +0 -4
  50. package/dist/{index-D1rI6OgO.d.cts → index-DLd7MehH.d.mts} +0 -4
  51. package/dist/{index-Cre2ivJn.d.cts → index-cG2-GTkG.d.cts} +0 -4
  52. package/dist/{index-Cre2ivJn.d.mts → index-cG2-GTkG.d.mts} +0 -4
  53. package/dist/index.cjs +5 -5
  54. package/dist/index.d.cts +4 -6
  55. package/dist/index.d.mts +4 -6
  56. package/dist/index.mjs +5 -5
  57. 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
- //#region ../hooks/src/useCopyToClipboard.ts
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
- //#endregion
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
- //#endregion
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
- //#region ../hooks/src/useCopyToClipboard.ts
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
- //#endregion
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
- //#endregion
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() {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_CodeBlock = require("./CodeBlock-Cymx1ZAY.cjs");
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;
@@ -1,2 +1,2 @@
1
- import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-D1rI6OgO.cjs";
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 };
@@ -1,2 +1,2 @@
1
- import { a as CodeBlockProps, i as CodeBlock, n as syntaxDark, r as syntaxLight, t as ThemeSyntax } from "./index-D1rI6OgO.mjs";
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 };
@@ -1,2 +1 @@
1
- import { n as syntaxLight, r as CodeBlock, t as syntaxDark } from "./CodeBlock-CVlrvVPP.mjs";
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-eBwIRQNK.cjs");
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
- //#region src/Control/Control.tsx
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;
@@ -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 };
@@ -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-CegmXrxL.mjs";
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
- //#region src/Control/Control.tsx
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-eBwIRQNK.cjs");
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
- //#region src/Editor/Editor.tsx
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-CegmXrxL.mjs";
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
- //#region src/Editor/Editor.tsx
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-B95_mk1s.mjs";
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
- //#region src/utils/blockToMarkdown.ts
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
- //#endregion
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
- //#endregion
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-BSieDKBE.cjs");
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
- //#region src/utils/blockToMarkdown.ts
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
- //#endregion
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
- //#endregion
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
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_LiveEdit = require("./LiveEdit-Chb8D-NA.cjs");
2
+ const require_LiveEdit = require("./LiveEdit-BHA3ciln.cjs");
3
3
  exports.LiveEdit = require_LiveEdit.LiveEdit;
@@ -1,5 +1,4 @@
1
- import { r as PreviewSlotProps } from "./index-TT9-Qjsh.cjs";
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 };
@@ -1,5 +1,4 @@
1
- import { r as PreviewSlotProps } from "./index-CBKWWR5Q.mjs";
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
- import { t as LiveEdit } from "./LiveEdit-BVkUqJd5.mjs";
2
- export { LiveEdit };
1
+ export { t as LiveEdit } from "./LiveEdit-24uSWoSM.mjs";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let react = require("react");
3
- //#region src/MarkdownContext/MarkdownContext.ts
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-Cre2ivJn.cjs";
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-Cre2ivJn.mjs";
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 };
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- //#region src/MarkdownContext/MarkdownContext.ts
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-CVlrvVPP.mjs";
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
- //#region src/Mermaid/DiagramViewer.tsx
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
- //#endregion
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-Cymx1ZAY.cjs");
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
- //#region src/Mermaid/DiagramViewer.tsx
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
- //#endregion
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
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_Mermaid = require("./Mermaid-CkUan4z-.cjs");
2
+ const require_Mermaid = require("./Mermaid-D3_ZHgY2.cjs");
3
3
  exports.Mermaid = require_Mermaid.Mermaid;
@@ -1,2 +1,2 @@
1
- import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-Bd3yPDn_.cjs";
1
+ import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-6taYWZ6e.cjs";
2
2
  export { DiagramProps, Mermaid, MermaidProps };
@@ -1,2 +1,2 @@
1
- import { n as Mermaid, r as MermaidProps, t as DiagramProps } from "./index-Bd3yPDn_.mjs";
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
- import { t as Mermaid } from "./Mermaid-B7vDwGQG.mjs";
2
- export { Mermaid };
1
+ export { t as Mermaid } from "./Mermaid-Cdtxi44F.mjs";
@@ -1,5 +1,5 @@
1
- import { r as CodeBlock } from "./CodeBlock-CVlrvVPP.mjs";
2
- import { t as Mermaid } from "./Mermaid-B7vDwGQG.mjs";
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
- //#endregion
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
- //#region \0rolldown/runtime.js
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
- //#endregion
23
- const require_CodeBlock = require("./CodeBlock-Cymx1ZAY.cjs");
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
- //#endregion
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
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_Preview = require("./Preview-BSieDKBE.cjs");
2
+ const require_Preview = require("./Preview-P7K65WOV.cjs");
3
3
  exports.Preview = require_Preview.Preview;
@@ -1,2 +1,2 @@
1
- import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-TT9-Qjsh.cjs";
1
+ import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-CooJPOhJ.cjs";
2
2
  export { Preview, PreviewProps, PreviewSlotProps };
@@ -1,2 +1,2 @@
1
- import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-CBKWWR5Q.mjs";
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
- import { t as Preview } from "./Preview-B95_mk1s.mjs";
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
- //#region src/utils/buildTableSnippet.ts
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#region src/utils/buildTableSnippet.ts
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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-BlMahuVU.cjs");
2
+ const require_Toolbar = require("./Toolbar-XSZ61Hxf.cjs");
3
3
  exports.TablePicker = require_Toolbar.TablePicker;
4
4
  exports.Toolbar = require_Toolbar.Toolbar;
@@ -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 };
@@ -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
- import { n as TablePicker, t as Toolbar } from "./Toolbar-zDEkBuqy.mjs";
2
- export { TablePicker, Toolbar };
1
+ export { n as TablePicker, t as Toolbar } from "./Toolbar-D3GoFKzb.mjs";
@@ -1,4 +1,4 @@
1
- //#region src/utils/applyAction.ts
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
- //#region src/utils/applyAction.ts
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-D1rI6OgO.cjs";
2
- import { r as MermaidProps } from "./index-Bd3yPDn_.cjs";
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-D1rI6OgO.mjs";
2
- import { r as MermaidProps } from "./index-Bd3yPDn_.mjs";
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
- //#region src/Preview/Preview.d.ts
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-BSieDKBE.cjs");
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-BlMahuVU.cjs");
5
+ const require_Toolbar = require("./Toolbar-XSZ61Hxf.cjs");
6
6
  const require_Editor = require("./Editor.cjs");
7
- const require_CodeBlock = require("./CodeBlock-Cymx1ZAY.cjs");
8
- const require_Mermaid = require("./Mermaid-CkUan4z-.cjs");
9
- const require_LiveEdit = require("./LiveEdit-Chb8D-NA.cjs");
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-D1rI6OgO.cjs";
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-Bd3yPDn_.cjs";
5
- import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-TT9-Qjsh.cjs";
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-Cre2ivJn.cjs";
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-D1rI6OgO.mjs";
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-Bd3yPDn_.mjs";
5
- import { n as PreviewProps, r as PreviewSlotProps, t as Preview } from "./index-CBKWWR5Q.mjs";
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-Cre2ivJn.mjs";
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-zDEkBuqy.mjs";
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-CVlrvVPP.mjs";
6
- import { t as Mermaid } from "./Mermaid-B7vDwGQG.mjs";
7
- import { t as Preview } from "./Preview-B95_mk1s.mjs";
8
- import { t as LiveEdit } from "./LiveEdit-BVkUqJd5.mjs";
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.4",
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": "^11.16.1",
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-alpha.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.5.8",
74
+ "@storybook/react-vite": "^10.6.3",
75
75
  "@testing-library/jest-dom": "^7.0.1",
76
- "@testing-library/react": "^16.3.2",
77
- "@types/node": "^26.1.2",
78
- "@types/react": "^19.2.18",
79
- "@types/react-dom": "^19.2.4",
80
- "@vitest/coverage-v8": "^4.1.10",
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.78.0",
83
- "react": "^19.2.8",
84
- "react-dom": "^19.2.8",
85
- "storybook": "^10.5.8",
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": "^4.1.10",
89
- "@soroush.tech/design-system": "2.0.0-rc.4",
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
  },