@danxbot/ui 6.0.1 → 6.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.
@@ -1,4 +1,4 @@
1
1
  export { parseMarkdown } from "./parse";
2
2
  export { markdown } from "./grammar";
3
- export { MarkdownNodes, sanitizeHref } from "./render";
3
+ export { MarkdownNodes, MarkdownImage, sanitizeHref } from "./render";
4
4
  export type { MdNode, MdInline, MdListItem, MdCell, MdAlign, MdCodeRenderer } from "./types";
@@ -6,6 +6,33 @@ export interface MarkdownNodesProps {
6
6
  renderCode: MdCodeRenderer;
7
7
  }
8
8
  export declare function MarkdownNodes({ nodes, renderCode }: MarkdownNodesProps): ReactNode;
9
+ /**
10
+ * An inline image, capped to a compact thumbnail and click-to-enlarge.
11
+ *
12
+ * A screenshot dropped into a markdown field (a card comment, a problem
13
+ * statement, a plan record) is the most common image this renders, and an
14
+ * uncapped one would blow past the width of any of those surfaces and,
15
+ * worse, a TALL one (a full-page screenshot) would still run on forever even
16
+ * with a width cap alone — hence a HEIGHT cap here, not a width cap, with
17
+ * `w-auto` left free to shrink for a narrow source image.
18
+ *
19
+ * Clicking opens the full-resolution image in a `Dialog` rather than
20
+ * navigating or replacing the thumbnail in place, so the surrounding prose
21
+ * never loses its layout while the image is being inspected.
22
+ */
23
+ /**
24
+ * Exported so `components/chat/Markdown.tsx` — the streaming chat renderer,
25
+ * which does NOT go through this file's node tree/parser — can reuse the
26
+ * exact same capped, click-to-enlarge treatment instead of forking it. Two
27
+ * markdown renderers exist in this package on purpose (streaming vs.
28
+ * document); a shared leaf component is how they stay visually identical
29
+ * without duplicating the cap/dialog logic.
30
+ */
31
+ export declare function MarkdownImage({ src, alt, title }: {
32
+ src: string;
33
+ alt: string;
34
+ title?: string;
35
+ }): ReactNode;
9
36
  /**
10
37
  * RULE TWO, the implementation: a link's scheme is checked before it is
11
38
  * rendered.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "6.0.1",
3
+ "version": "6.0.3",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",