@asgard-js/react 0.2.56 → 0.2.57

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.
@@ -1 +1 @@
1
- {"version":3,"file":"streamdown-client.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/streamdown-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAyBvD,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,SAAS,CA4B/E"}
1
+ {"version":3,"file":"streamdown-client.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/streamdown-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAyBvD,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAOD,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,SAAS,CA6C/E"}
package/dist/index.js CHANGED
@@ -1761,16 +1761,27 @@ function hz() {
1761
1761
  }
1762
1762
  function bp({ children: e }) {
1763
1763
  const [t, n] = be(null), [r, i] = be(!1);
1764
- return Fe(() => {
1765
- hz(), (async () => {
1764
+ if (Fe(() => {
1765
+ hz();
1766
+ let a = !1;
1767
+ return (async () => {
1766
1768
  try {
1767
- const { Streamdown: s } = await import("streamdown");
1768
- n(() => s);
1769
+ const { Streamdown: u, defaultRemarkPlugins: c } = await import("streamdown");
1770
+ if (a) return;
1771
+ n({
1772
+ Component: u,
1773
+ remarkPlugins: [...Object.values(c), UP]
1774
+ });
1769
1775
  } catch {
1770
- i(!0);
1776
+ a || i(!0);
1771
1777
  }
1772
- })();
1773
- }, []), r || !t ? e : /* @__PURE__ */ C(t, { components: dz, remarkPlugins: [UP], children: e });
1778
+ })(), () => {
1779
+ a = !0;
1780
+ };
1781
+ }, []), r || !t)
1782
+ return e;
1783
+ const { Component: o, remarkPlugins: s } = t;
1784
+ return /* @__PURE__ */ C(o, { components: dz, remarkPlugins: s, children: e });
1774
1785
  }
1775
1786
  function mk(e) {
1776
1787
  const { message: t } = e, { avatar: n } = Rt(), r = yt(), { botMessage: i } = r, o = t?.message?.text || "", s = t.type === "bot", a = r?.template?.TextMessageTemplate?.style, l = ve(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgard-js/react",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -47,7 +47,7 @@
47
47
  "vite-plugin-svgr": "^4.3.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@asgard-js/core": "^0.2.56",
50
+ "@asgard-js/core": "^0.2.57",
51
51
  "react": "^18.0.0 || ^19.0.0",
52
52
  "react-dom": "^18.0.0 || ^19.0.0"
53
53
  }