@exponential_app/eui-react 0.15.1 → 0.15.2

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.js CHANGED
@@ -4975,10 +4975,11 @@ function useOpenState(node, scope, external, emit) {
4975
4975
  }, [setOpen, emit]);
4976
4976
  return [open, change];
4977
4977
  }
4978
- var Trigger = forwardRef2(function Trigger({ children, ...rest }, ref) {
4978
+ var Trigger = forwardRef2(function Trigger({ children, onClick, ...rest }, ref) {
4979
4979
  return /* @__PURE__ */ jsx19("span", {
4980
4980
  ref,
4981
4981
  className: "xui-trigger",
4982
+ onClickCapture: onClick,
4982
4983
  ...rest,
4983
4984
  children
4984
4985
  });
@@ -6551,7 +6552,7 @@ import { textLinkSegments } from "@exponential_app/eui/web";
6551
6552
 
6552
6553
  // packages/exponential-ui-react/src/markdown.tsx
6553
6554
  import { Fragment as Fragment8, createElement, useMemo as useMemo16 } from "react";
6554
- import { linkHref as linkHref3, mediaRequestOf, parseMarkdown } from "@exponential_app/eui/web";
6555
+ import { linkedMarkdown, linkHref as linkHref3, mediaRequestOf, parseMarkdown } from "@exponential_app/eui/web";
6555
6556
  import { MAX_LINK_NESTING, MAX_LINK_DEST, MAX_BLOCK_NESTING, linkAt, wholeImage, parseList } from "@exponential_app/eui/web";
6556
6557
  import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
6557
6558
  function MarkdownImage({ host, src, alt }) {
@@ -6608,7 +6609,7 @@ function inline(nodes, host) {
6608
6609
  }, k);
6609
6610
  case `del`:
6610
6611
  return /* @__PURE__ */ jsx23("del", {
6611
- children: n.text
6612
+ children: n.children ? inline(n.children, host) : n.text
6612
6613
  }, k);
6613
6614
  case `link`: {
6614
6615
  const href = linkHref3(host, n.dest);
@@ -6711,13 +6712,14 @@ function blocks(tree, host) {
6711
6712
  }, k));
6712
6713
  }
6713
6714
  function renderMarkdown(text, host = {}) {
6714
- return blocks(parseMarkdown(text), host);
6715
+ return blocks(linkedMarkdown(host, parseMarkdown(text)), host);
6715
6716
  }
6716
- function BuiltinMarkdown({ text, className, host }) {
6717
- const tree = useMemo16(() => renderMarkdown(text, host), [text, host]);
6717
+ var NO_HOST = {};
6718
+ function BuiltinMarkdown({ text, className, host = NO_HOST }) {
6719
+ const tree = useMemo16(() => parseMarkdown(text), [text]);
6718
6720
  return /* @__PURE__ */ jsx23("div", {
6719
6721
  className: className ? `xui-md ${className}` : `xui-md`,
6720
- children: tree
6722
+ children: blocks(linkedMarkdown(host, tree), host)
6721
6723
  });
6722
6724
  }
6723
6725
 
@@ -8122,5 +8124,5 @@ export {
8122
8124
  walkNodes
8123
8125
  };
8124
8126
 
8125
- //# debugId=7933C1446ED0A0FC64756E2164756E21
8127
+ //# debugId=EFD55A5D896C9D8164756E2164756E21
8126
8128
  //# sourceMappingURL=index.js.map