Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@assistant-ui/react-markdown

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assistant-ui/react-markdown - npm Package Compare versions

Comparing version
0.0.2
to
0.0.3
+1
-1
dist/index.d.mts

@@ -7,2 +7,2 @@ import { FC } from 'react';

export { MarkdownTextPrimitive };
export { MarkdownTextPrimitive, type MarkdownTextPrimitiveProps };

@@ -7,2 +7,2 @@ import { FC } from 'react';

export { MarkdownTextPrimitive };
export { MarkdownTextPrimitive, type MarkdownTextPrimitiveProps };

@@ -50,3 +50,3 @@ "use strict";

});
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_markdown.default, { ...options, children: text || "\xA0" });
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_markdown.default, { ...options, children: text });
};

@@ -53,0 +53,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -1,1 +0,1 @@

{"version":3,"sources":["../src/index.ts","../src/MarkdownText.tsx"],"sourcesContent":["export { MarkdownTextPrimitive } from \"./MarkdownText\";\n","import { useContentPartContext } from \"@assistant-ui/react\";\nimport type { FC } from \"react\";\nimport ReactMarkdown, { type Options } from \"react-markdown\";\n\ntype MarkdownTextPrimitiveProps = Omit<Options, \"children\">;\n\nexport const MarkdownTextPrimitive: FC<MarkdownTextPrimitiveProps> = (\n options,\n) => {\n const { useContentPart } = useContentPartContext();\n const text = useContentPart((c) => {\n if (c.part.type !== \"text\")\n throw new Error(\n \"This component can only be used inside text content parts.\",\n );\n\n return c.part.text;\n });\n return <ReactMarkdown {...options}>{text || \"\\u00A0\"}</ReactMarkdown>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAsC;AAEtC,4BAA4C;AAgBnC;AAZF,IAAM,wBAAwD,CACnE,YACG;AACH,QAAM,EAAE,eAAe,QAAI,oCAAsB;AACjD,QAAM,OAAO,eAAe,CAAC,MAAM;AACjC,QAAI,EAAE,KAAK,SAAS;AAClB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAEF,WAAO,EAAE,KAAK;AAAA,EAChB,CAAC;AACD,SAAO,4CAAC,sBAAAA,SAAA,EAAe,GAAG,SAAU,kBAAQ,QAAS;AACvD;","names":["ReactMarkdown"]}
{"version":3,"sources":["../src/index.ts","../src/MarkdownText.tsx"],"sourcesContent":["export {\n MarkdownTextPrimitive,\n type MarkdownTextPrimitiveProps,\n} from \"./MarkdownText\";\n","import { useContentPartContext } from \"@assistant-ui/react\";\nimport type { FC } from \"react\";\nimport ReactMarkdown, { type Options } from \"react-markdown\";\n\nexport type MarkdownTextPrimitiveProps = Omit<Options, \"children\">;\n\nexport const MarkdownTextPrimitive: FC<MarkdownTextPrimitiveProps> = (\n options,\n) => {\n const { useContentPart } = useContentPartContext();\n const text = useContentPart((c) => {\n if (c.part.type !== \"text\")\n throw new Error(\n \"This component can only be used inside text content parts.\",\n );\n\n return c.part.text;\n });\n return <ReactMarkdown {...options}>{text}</ReactMarkdown>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAsC;AAEtC,4BAA4C;AAgBnC;AAZF,IAAM,wBAAwD,CACnE,YACG;AACH,QAAM,EAAE,eAAe,QAAI,oCAAsB;AACjD,QAAM,OAAO,eAAe,CAAC,MAAM;AACjC,QAAI,EAAE,KAAK,SAAS;AAClB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAEF,WAAO,EAAE,KAAK;AAAA,EAChB,CAAC;AACD,SAAO,4CAAC,sBAAAA,SAAA,EAAe,GAAG,SAAU,gBAAK;AAC3C;","names":["ReactMarkdown"]}

@@ -14,3 +14,3 @@ // src/MarkdownText.tsx

});
return /* @__PURE__ */ jsx(ReactMarkdown, { ...options, children: text || "\xA0" });
return /* @__PURE__ */ jsx(ReactMarkdown, { ...options, children: text });
};

@@ -17,0 +17,0 @@ export {

@@ -1,1 +0,1 @@

{"version":3,"sources":["../src/MarkdownText.tsx"],"sourcesContent":["import { useContentPartContext } from \"@assistant-ui/react\";\nimport type { FC } from \"react\";\nimport ReactMarkdown, { type Options } from \"react-markdown\";\n\ntype MarkdownTextPrimitiveProps = Omit<Options, \"children\">;\n\nexport const MarkdownTextPrimitive: FC<MarkdownTextPrimitiveProps> = (\n options,\n) => {\n const { useContentPart } = useContentPartContext();\n const text = useContentPart((c) => {\n if (c.part.type !== \"text\")\n throw new Error(\n \"This component can only be used inside text content parts.\",\n );\n\n return c.part.text;\n });\n return <ReactMarkdown {...options}>{text || \"\\u00A0\"}</ReactMarkdown>;\n};\n"],"mappings":";AAAA,SAAS,6BAA6B;AAEtC,OAAO,mBAAqC;AAgBnC;AAZF,IAAM,wBAAwD,CACnE,YACG;AACH,QAAM,EAAE,eAAe,IAAI,sBAAsB;AACjD,QAAM,OAAO,eAAe,CAAC,MAAM;AACjC,QAAI,EAAE,KAAK,SAAS;AAClB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAEF,WAAO,EAAE,KAAK;AAAA,EAChB,CAAC;AACD,SAAO,oBAAC,iBAAe,GAAG,SAAU,kBAAQ,QAAS;AACvD;","names":[]}
{"version":3,"sources":["../src/MarkdownText.tsx"],"sourcesContent":["import { useContentPartContext } from \"@assistant-ui/react\";\nimport type { FC } from \"react\";\nimport ReactMarkdown, { type Options } from \"react-markdown\";\n\nexport type MarkdownTextPrimitiveProps = Omit<Options, \"children\">;\n\nexport const MarkdownTextPrimitive: FC<MarkdownTextPrimitiveProps> = (\n options,\n) => {\n const { useContentPart } = useContentPartContext();\n const text = useContentPart((c) => {\n if (c.part.type !== \"text\")\n throw new Error(\n \"This component can only be used inside text content parts.\",\n );\n\n return c.part.text;\n });\n return <ReactMarkdown {...options}>{text}</ReactMarkdown>;\n};\n"],"mappings":";AAAA,SAAS,6BAA6B;AAEtC,OAAO,mBAAqC;AAgBnC;AAZF,IAAM,wBAAwD,CACnE,YACG;AACH,QAAM,EAAE,eAAe,IAAI,sBAAsB;AACjD,QAAM,OAAO,eAAe,CAAC,MAAM;AACjC,QAAI,EAAE,KAAK,SAAS;AAClB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAEF,WAAO,EAAE,KAAK;AAAA,EAChB,CAAC;AACD,SAAO,oBAAC,iBAAe,GAAG,SAAU,gBAAK;AAC3C;","names":[]}
{
"name": "@assistant-ui/react-markdown",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "exports": {