@evelan/jexity-widget 0.21.6 → 0.22.0

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":"MarkdownContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/chat/components/MarkdownContent.tsx"],"names":[],"mappings":"AAmCA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,UAS9C;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,oBAAoB,gCAM7D"}
1
+ {"version":3,"file":"MarkdownContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/chat/components/MarkdownContent.tsx"],"names":[],"mappings":"AAsDA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,UAS9C;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,oBAAoB,gCAM7D"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Card-block support for the ` ```cards ` fenced convention.
3
+ *
4
+ * The model emits a fenced block tagged `cards` whose body is normal markdown,
5
+ * one card per line containing only dashes (`---`). We split on that separator
6
+ * and re-render each card's body with the SAME `marked` instance, so bold,
7
+ * lists and links inside a card work for free. Purely presentational — no tool
8
+ * call, no schema. See docs/superpowers/specs/2026-07-20-generative-ui-rich-responses-design.md.
9
+ *
10
+ * The dashboard has its own ~5-line copy of `parseCards` (apps/web CardGrid.tsx):
11
+ * the widget is Preact and cannot import from apps/web, and the rule is too
12
+ * small to justify a shared package.
13
+ */
14
+ export interface ParsedCard {
15
+ title: string;
16
+ body: string;
17
+ }
18
+ /**
19
+ * Splits a `cards` fence body into cards. Tolerant of blank lines around the
20
+ * `---` separator (models frequently pad it). First line of each card is its
21
+ * title (surrounding `*` bold markers stripped); the rest is the markdown body.
22
+ * Never throws — a malformed block degrades to a single card.
23
+ */
24
+ export declare function parseCards(fenceBody: string): ParsedCard[];
25
+ /**
26
+ * Renders a `cards` fence body to card-grid HTML. Card title uses inline
27
+ * markdown; card body uses full block markdown. The output is injected inside
28
+ * `.jex-md` and passes through the caller's DOMPurify sanitization, so this
29
+ * never introduces an unsanitized-HTML path.
30
+ */
31
+ export declare function renderCardsHtml(fenceBody: string): string;
32
+ //# sourceMappingURL=cards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../../../../src/features/chat/components/cards.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,EAAE,CAc1D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAezD"}