markdown-flow-ui 0.2.30 → 0.2.32

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 (119) hide show
  1. package/README.md +27 -4
  2. package/dist/_virtual/index.es3.js +5 -4
  3. package/dist/_virtual/index.es3.js.map +1 -1
  4. package/dist/_virtual/index.es4.js +4 -5
  5. package/dist/_virtual/index.es4.js.map +1 -1
  6. package/dist/_virtual/index.es5.js +5 -3
  7. package/dist/_virtual/index.es5.js.map +1 -1
  8. package/dist/_virtual/index.es6.js +3 -5
  9. package/dist/_virtual/index.es6.js.map +1 -1
  10. package/dist/_virtual/index.es7.js +4 -4
  11. package/dist/_virtual/index.es8.js +2 -2
  12. package/dist/_virtual/index.es9.js +2 -2
  13. package/dist/_virtual/index3.cjs +1 -1
  14. package/dist/_virtual/index4.cjs +1 -1
  15. package/dist/_virtual/index5.cjs +1 -1
  16. package/dist/_virtual/index6.cjs +1 -1
  17. package/dist/_virtual/index7.cjs +1 -1
  18. package/dist/_virtual/index8.cjs +1 -1
  19. package/dist/_virtual/index9.cjs +1 -1
  20. package/dist/components/ContentRender/ContentRender.cjs +2 -2
  21. package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
  22. package/dist/components/ContentRender/ContentRender.d.ts +1 -1
  23. package/dist/components/ContentRender/ContentRender.es.js +623 -401
  24. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  25. package/dist/components/ContentRender/index.cjs +1 -1
  26. package/dist/components/ContentRender/index.es.js +1 -0
  27. package/dist/components/ContentRender/index.es.js.map +1 -1
  28. package/dist/components/ContentRender/utils/escape-typed-metadata.cjs +2 -0
  29. package/dist/components/ContentRender/utils/escape-typed-metadata.cjs.map +1 -0
  30. package/dist/components/ContentRender/utils/escape-typed-metadata.d.ts +9 -0
  31. package/dist/components/ContentRender/utils/escape-typed-metadata.es.js +47 -0
  32. package/dist/components/ContentRender/utils/escape-typed-metadata.es.js.map +1 -0
  33. package/dist/components/ContentRender/utils/escape-typed-metadata.test.d.ts +1 -0
  34. package/dist/components/ContentRender/utils/html-block-end.cjs +1 -1
  35. package/dist/components/ContentRender/utils/html-block-end.cjs.map +1 -1
  36. package/dist/components/ContentRender/utils/html-block-end.d.ts +20 -6
  37. package/dist/components/ContentRender/utils/html-block-end.es.js +63 -56
  38. package/dist/components/ContentRender/utils/html-block-end.es.js.map +1 -1
  39. package/dist/components/ContentRender/utils/inline-code-ranges.cache.test.d.ts +1 -0
  40. package/dist/components/ContentRender/utils/inline-code-ranges.cjs +10 -0
  41. package/dist/components/ContentRender/utils/inline-code-ranges.cjs.map +1 -0
  42. package/dist/components/ContentRender/utils/inline-code-ranges.d.ts +39 -0
  43. package/dist/components/ContentRender/utils/inline-code-ranges.es.js +336 -0
  44. package/dist/components/ContentRender/utils/inline-code-ranges.es.js.map +1 -0
  45. package/dist/components/ContentRender/utils/inline-code-ranges.test.d.ts +1 -0
  46. package/dist/components/ContentRender/utils/markdown-plugins.cjs +2 -0
  47. package/dist/components/ContentRender/utils/markdown-plugins.cjs.map +1 -0
  48. package/dist/components/ContentRender/utils/markdown-plugins.d.ts +2 -0
  49. package/dist/components/ContentRender/utils/markdown-plugins.es.js +14 -0
  50. package/dist/components/ContentRender/utils/markdown-plugins.es.js.map +1 -0
  51. package/dist/components/ContentRender/utils/mermaid-parse.cjs +4 -3
  52. package/dist/components/ContentRender/utils/mermaid-parse.cjs.map +1 -1
  53. package/dist/components/ContentRender/utils/mermaid-parse.es.js +86 -67
  54. package/dist/components/ContentRender/utils/mermaid-parse.es.js.map +1 -1
  55. package/dist/components/ContentRender/utils/mermaid-parse.test.d.ts +1 -0
  56. package/dist/components/ContentRender/utils/normalize-inline-html.cjs +4 -2
  57. package/dist/components/ContentRender/utils/normalize-inline-html.cjs.map +1 -1
  58. package/dist/components/ContentRender/utils/normalize-inline-html.d.ts +4 -1
  59. package/dist/components/ContentRender/utils/normalize-inline-html.es.js +15 -7
  60. package/dist/components/ContentRender/utils/normalize-inline-html.es.js.map +1 -1
  61. package/dist/components/ContentRender/utils/normalize-inline-html.test.d.ts +1 -0
  62. package/dist/components/ContentRender/utils/resumed-prose-fence.cjs +5 -0
  63. package/dist/components/ContentRender/utils/resumed-prose-fence.cjs.map +1 -0
  64. package/dist/components/ContentRender/utils/resumed-prose-fence.d.ts +5 -0
  65. package/dist/components/ContentRender/utils/resumed-prose-fence.es.js +60 -0
  66. package/dist/components/ContentRender/utils/resumed-prose-fence.es.js.map +1 -0
  67. package/dist/components/ContentRender/utils/split-content.cjs +6 -3
  68. package/dist/components/ContentRender/utils/split-content.cjs.map +1 -1
  69. package/dist/components/ContentRender/utils/split-content.d.ts +7 -1
  70. package/dist/components/ContentRender/utils/split-content.es.js +460 -216
  71. package/dist/components/ContentRender/utils/split-content.es.js.map +1 -1
  72. package/dist/components/ContentRender/utils/split-content.image-alt.test.d.ts +1 -0
  73. package/dist/components/ContentRender/utils/split-content.resumed-fences.test.d.ts +1 -0
  74. package/dist/components/ContentRender/utils/video-markdown-run.cjs +14 -0
  75. package/dist/components/ContentRender/utils/video-markdown-run.cjs.map +1 -0
  76. package/dist/components/ContentRender/utils/video-markdown-run.d.ts +47 -0
  77. package/dist/components/ContentRender/utils/video-markdown-run.es.js +468 -0
  78. package/dist/components/ContentRender/utils/video-markdown-run.es.js.map +1 -0
  79. package/dist/components/ContentRender/utils/video-markdown-run.test.d.ts +1 -0
  80. package/dist/components/ContentRender/utils/wrapped-content.test.d.ts +1 -0
  81. package/dist/components/MarkdownFlow/MarkdownFlow.cjs +1 -1
  82. package/dist/components/MarkdownFlow/MarkdownFlow.cjs.map +1 -1
  83. package/dist/components/MarkdownFlow/MarkdownFlow.es.js +9 -8
  84. package/dist/components/MarkdownFlow/MarkdownFlow.es.js.map +1 -1
  85. package/dist/components/Slide/Slide.cjs +1 -1
  86. package/dist/components/Slide/Slide.cjs.map +1 -1
  87. package/dist/components/Slide/Slide.es.js +3 -2
  88. package/dist/components/Slide/Slide.es.js.map +1 -1
  89. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  90. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  91. package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
  92. package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
  93. package/dist/node_modules/classnames/index.cjs +1 -1
  94. package/dist/node_modules/classnames/index.es.js +1 -1
  95. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.cjs +1 -1
  96. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.cjs +1 -1
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAMF2YG6.es.js +1 -1
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.cjs +1 -1
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OMD6QJNC.es.js +1 -1
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.cjs +1 -1
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U37J5Y7L.es.js +1 -1
  103. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.cjs +1 -1
  104. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-WV7ZQ7D5.es.js +1 -1
  105. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.cjs +1 -1
  106. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-4MX5Z3NR.es.js +1 -1
  107. package/dist/node_modules/rc-input/es/BaseInput.cjs +1 -1
  108. package/dist/node_modules/rc-input/es/BaseInput.es.js +1 -1
  109. package/dist/node_modules/rc-textarea/es/ResizableTextArea.cjs +1 -1
  110. package/dist/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  111. package/dist/node_modules/rc-textarea/es/TextArea.cjs +1 -1
  112. package/dist/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  113. package/dist/node_modules/rc-textarea/es/index.cjs +1 -1
  114. package/dist/node_modules/rc-textarea/es/index.es.js +1 -1
  115. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.cjs +1 -1
  116. package/dist/node_modules/remark-flow/dist/interaction-plugin-core.es.js +1 -1
  117. package/dist/node_modules/unified/lib/index.cjs +1 -1
  118. package/dist/node_modules/unified/lib/index.es.js +1 -1
  119. package/package.json +6 -1
@@ -1,5 +1,5 @@
1
1
  import { __exports as l } from "../../../_virtual/interaction-plugin-core.es.js";
2
- import C from "../../../_virtual/index.es3.js";
2
+ import C from "../../../_virtual/index.es4.js";
3
3
  import { __require as v } from "./interaction-parser.es.js";
4
4
  import { __require as q } from "./escaping.es.js";
5
5
  import { __require as O } from "./interaction-syntax.es.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../../bail/index.cjs"),w=require("../../../_virtual/index7.cjs"),z=require("../../is-plain-obj/index.cjs"),C=require("./callable-instance.cjs"),S=require("../../trough/lib/index.cjs"),A=require("../../vfile/lib/index.cjs"),F={}.hasOwnProperty;class m extends C.CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=S.trough()}copy(){const e=new m;let n=-1;for(;++n<this.attachers.length;){const t=this.attachers[n];e.use(...t)}return e.data(w.default(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(x("data",this.frozen),this.namespace[e]=n,this):F.call(this.namespace,e)&&this.namespace[e]||void 0:e?(x("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...t]=this.attachers[this.freezeIndex];if(t[0]===!1)continue;t[0]===!0&&(t[0]=void 0);const i=n.call(e,...t);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=y(e),t=this.parser||this.Parser;return g("parse",t),t(String(n),n)}process(e,n){const t=this;return this.freeze(),g("process",this.parser||this.Parser),b("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,h){const u=y(e),l=t.parse(u);t.run(l,u,function(o,c,f){if(o||!c||!f)return s(o);const p=c,d=t.stringify(p,f);D(d)?f.value=d:f.result=d,s(o,f)});function s(o,c){o||!c?h(o):a?a(c):n(void 0,c)}}}processSync(e){let n=!1,t;return this.freeze(),g("processSync",this.parser||this.Parser),b("processSync",this.compiler||this.Compiler),this.process(e,i),T("processSync","process",n),t;function i(a,h){n=!0,P.bail(a),t=h}}run(e,n,t){I(e),this.freeze();const i=this.transformers;return!t&&typeof n=="function"&&(t=n,n=void 0),t?a(void 0,t):new Promise(a);function a(h,u){const l=y(n);i.run(e,l,s);function s(o,c,f){const p=c||e;o?u(o):h?h(p):t(void 0,p,f)}}}runSync(e,n){let t=!1,i;return this.run(e,n,a),T("runSync","run",t),i;function a(h,u){P.bail(h),i=u,t=!0}}stringify(e,n){this.freeze();const t=y(n),i=this.compiler||this.Compiler;return b("stringify",i),I(e),i(e,t)}use(e,...n){const t=this.attachers,i=this.namespace;if(x("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?u(e):h(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(s){if(typeof s=="function")l(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[o,...c]=s;l(o,c)}else h(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function h(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(s.plugins),s.settings&&(i.settings=w.default(!0,i.settings,s.settings))}function u(s){let o=-1;if(s!=null)if(Array.isArray(s))for(;++o<s.length;){const c=s[o];a(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function l(s,o){let c=-1,f=-1;for(;++c<t.length;)if(t[c][0]===s){f=c;break}if(f===-1)t.push([s,...o]);else if(o.length>0){let[p,...d]=o;const E=t[f][1];z.default(E)&&z.default(p)&&(p=w.default(!0,E,p)),t[f]=[s,p,...d]}}}}const q=new m().freeze();function g(r,e){if(typeof e!="function")throw new TypeError("Cannot `"+r+"` without `parser`")}function b(r,e){if(typeof e!="function")throw new TypeError("Cannot `"+r+"` without `compiler`")}function x(r,e){if(e)throw new Error("Cannot call `"+r+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function I(r){if(!z.default(r)||typeof r.type!="string")throw new TypeError("Expected node, got `"+r+"`")}function T(r,e,n){if(!n)throw new Error("`"+r+"` finished async. Use `"+e+"` instead")}function y(r){return j(r)?r:new A.VFile(r)}function j(r){return!!(r&&typeof r=="object"&&"message"in r&&"messages"in r)}function D(r){return typeof r=="string"||L(r)}function L(r){return!!(r&&typeof r=="object"&&"byteLength"in r&&"byteOffset"in r)}exports.Processor=m;exports.unified=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../../bail/index.cjs"),w=require("../../../_virtual/index5.cjs"),z=require("../../is-plain-obj/index.cjs"),C=require("./callable-instance.cjs"),S=require("../../trough/lib/index.cjs"),A=require("../../vfile/lib/index.cjs"),F={}.hasOwnProperty;class m extends C.CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=S.trough()}copy(){const e=new m;let n=-1;for(;++n<this.attachers.length;){const t=this.attachers[n];e.use(...t)}return e.data(w.default(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(x("data",this.frozen),this.namespace[e]=n,this):F.call(this.namespace,e)&&this.namespace[e]||void 0:e?(x("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...t]=this.attachers[this.freezeIndex];if(t[0]===!1)continue;t[0]===!0&&(t[0]=void 0);const i=n.call(e,...t);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=y(e),t=this.parser||this.Parser;return g("parse",t),t(String(n),n)}process(e,n){const t=this;return this.freeze(),g("process",this.parser||this.Parser),b("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,h){const u=y(e),l=t.parse(u);t.run(l,u,function(o,c,f){if(o||!c||!f)return s(o);const p=c,d=t.stringify(p,f);D(d)?f.value=d:f.result=d,s(o,f)});function s(o,c){o||!c?h(o):a?a(c):n(void 0,c)}}}processSync(e){let n=!1,t;return this.freeze(),g("processSync",this.parser||this.Parser),b("processSync",this.compiler||this.Compiler),this.process(e,i),T("processSync","process",n),t;function i(a,h){n=!0,P.bail(a),t=h}}run(e,n,t){I(e),this.freeze();const i=this.transformers;return!t&&typeof n=="function"&&(t=n,n=void 0),t?a(void 0,t):new Promise(a);function a(h,u){const l=y(n);i.run(e,l,s);function s(o,c,f){const p=c||e;o?u(o):h?h(p):t(void 0,p,f)}}}runSync(e,n){let t=!1,i;return this.run(e,n,a),T("runSync","run",t),i;function a(h,u){P.bail(h),i=u,t=!0}}stringify(e,n){this.freeze();const t=y(n),i=this.compiler||this.Compiler;return b("stringify",i),I(e),i(e,t)}use(e,...n){const t=this.attachers,i=this.namespace;if(x("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?u(e):h(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(s){if(typeof s=="function")l(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[o,...c]=s;l(o,c)}else h(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function h(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(s.plugins),s.settings&&(i.settings=w.default(!0,i.settings,s.settings))}function u(s){let o=-1;if(s!=null)if(Array.isArray(s))for(;++o<s.length;){const c=s[o];a(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function l(s,o){let c=-1,f=-1;for(;++c<t.length;)if(t[c][0]===s){f=c;break}if(f===-1)t.push([s,...o]);else if(o.length>0){let[p,...d]=o;const E=t[f][1];z.default(E)&&z.default(p)&&(p=w.default(!0,E,p)),t[f]=[s,p,...d]}}}}const q=new m().freeze();function g(r,e){if(typeof e!="function")throw new TypeError("Cannot `"+r+"` without `parser`")}function b(r,e){if(typeof e!="function")throw new TypeError("Cannot `"+r+"` without `compiler`")}function x(r,e){if(e)throw new Error("Cannot call `"+r+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function I(r){if(!z.default(r)||typeof r.type!="string")throw new TypeError("Expected node, got `"+r+"`")}function T(r,e,n){if(!n)throw new Error("`"+r+"` finished async. Use `"+e+"` instead")}function y(r){return j(r)?r:new A.VFile(r)}function j(r){return!!(r&&typeof r=="object"&&"message"in r&&"messages"in r)}function D(r){return typeof r=="string"||L(r)}function L(r){return!!(r&&typeof r=="object"&&"byteLength"in r&&"byteOffset"in r)}exports.Processor=m;exports.unified=q;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { bail as P } from "../../bail/index.es.js";
2
- import y from "../../../_virtual/index.es7.js";
2
+ import y from "../../../_virtual/index.es5.js";
3
3
  import z from "../../is-plain-obj/index.es.js";
4
4
  import { CallableInstance as C } from "./callable-instance.es.js";
5
5
  import { trough as A } from "../../trough/lib/index.es.js";
package/package.json CHANGED
@@ -21,6 +21,8 @@
21
21
  "@radix-ui/react-popover": "1.1.15",
22
22
  "@radix-ui/react-slot": "1.2.3",
23
23
  "@radix-ui/react-tooltip": "^1.2.8",
24
+ "@types/hast": "^3.0.4",
25
+ "@types/mdast": "^4.0.4",
24
26
  "@types/unist": "^3.0.3",
25
27
  "@uiw/react-codemirror": "^4.24.1",
26
28
  "class-variance-authority": "^0.7.1",
@@ -31,6 +33,7 @@
31
33
  "katex": "^0.16.22",
32
34
  "lucide-react": "^0.525.0",
33
35
  "mermaid": "^11.10.1",
36
+ "micromark-util-decode-string": "^2.0.1",
34
37
  "rc-textarea": "^1.10.2",
35
38
  "react-i18next": "^15.5.1",
36
39
  "react-markdown": "^10.1.0",
@@ -41,6 +44,8 @@
41
44
  "remark-flow": "^1.3.4",
42
45
  "remark-gfm": "^4.0.1",
43
46
  "remark-math": "^6.0.0",
47
+ "remark-parse": "^11.0.0",
48
+ "remark-rehype": "^11.1.2",
44
49
  "tailwind-merge": "^3.3.1",
45
50
  "unicode-segmenter": "0.17.3",
46
51
  "unified": "^11.0.5",
@@ -182,7 +187,7 @@
182
187
  ]
183
188
  }
184
189
  },
185
- "version": "0.2.30",
190
+ "version": "0.2.32",
186
191
  "type": "module",
187
192
  "exports": {
188
193
  ".": {