@assistant-ui/react-markdown 0.0.2 → 0.0.3

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/index.d.mts CHANGED
@@ -4,4 +4,4 @@ import { Options } from 'react-markdown';
4
4
  type MarkdownTextPrimitiveProps = Omit<Options, "children">;
5
5
  declare const MarkdownTextPrimitive: FC<MarkdownTextPrimitiveProps>;
6
6
 
7
- export { MarkdownTextPrimitive };
7
+ export { MarkdownTextPrimitive, type MarkdownTextPrimitiveProps };
package/dist/index.d.ts CHANGED
@@ -4,4 +4,4 @@ import { Options } from 'react-markdown';
4
4
  type MarkdownTextPrimitiveProps = Omit<Options, "children">;
5
5
  declare const MarkdownTextPrimitive: FC<MarkdownTextPrimitiveProps>;
6
6
 
7
- export { MarkdownTextPrimitive };
7
+ export { MarkdownTextPrimitive, type MarkdownTextPrimitiveProps };
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ var MarkdownTextPrimitive = (options) => {
47
47
  );
48
48
  return c.part.text;
49
49
  });
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_markdown.default, { ...options, children: text || "\xA0" });
50
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_markdown.default, { ...options, children: text });
51
51
  };
52
52
  // Annotate the CommonJS export names for ESM import in node:
53
53
  0 && (module.exports = {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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"]}
1
+ {"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"]}
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ var MarkdownTextPrimitive = (options) => {
11
11
  );
12
12
  return c.part.text;
13
13
  });
14
- return /* @__PURE__ */ jsx(ReactMarkdown, { ...options, children: text || "\xA0" });
14
+ return /* @__PURE__ */ jsx(ReactMarkdown, { ...options, children: text });
15
15
  };
16
16
  export {
17
17
  MarkdownTextPrimitive
@@ -1 +1 @@
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":[]}
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\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":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assistant-ui/react-markdown",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {