@abstractframework/panel-chat 0.1.2 → 0.1.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/README.md +1 -1
- package/dist/markdown.d.ts.map +1 -1
- package/dist/markdown.js +6 -2
- package/package.json +3 -3
- package/src/panel_chat.css +3 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ export function ChatView() {
|
|
|
49
49
|
- JSON ⇒ `JsonViewer`
|
|
50
50
|
- otherwise ⇒ `Markdown` (or your `renderMarkdown` override)
|
|
51
51
|
|
|
52
|
-
Markdown is intentionally minimal and implemented in `panel-chat/src/markdown.tsx` (headings 1–
|
|
52
|
+
Markdown is intentionally minimal and implemented in `panel-chat/src/markdown.tsx` (headings 1–5, code fences, lists, tables, blockquotes, hr, emphasis, and optional highlighting).
|
|
53
53
|
|
|
54
54
|
## Styling & theming
|
|
55
55
|
|
package/dist/markdown.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAqI1B,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,KAAK,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAqI1B,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,KAAK,CAAC,YAAY,CAyLrB"}
|
package/dist/markdown.js
CHANGED
|
@@ -162,7 +162,7 @@ export function Markdown({ text, className, highlight, highlights, highlightClas
|
|
|
162
162
|
blocks.push(_jsx("pre", { className: "pc-md_pre", children: _jsx("code", { className: lang ? `language-${lang}` : undefined, children: code }) }, `pre:${i}`));
|
|
163
163
|
continue;
|
|
164
164
|
}
|
|
165
|
-
const headingM = line.match(/^(#{1,
|
|
165
|
+
const headingM = line.match(/^(#{1,5})\s+(.*)$/);
|
|
166
166
|
if (headingM) {
|
|
167
167
|
const level = headingM[1].length;
|
|
168
168
|
const content = headingM[2] || "";
|
|
@@ -171,8 +171,12 @@ export function Markdown({ text, className, highlight, highlights, highlightClas
|
|
|
171
171
|
blocks.push(_jsx("h1", { children: nodes }, `h1:${i}`));
|
|
172
172
|
else if (level === 2)
|
|
173
173
|
blocks.push(_jsx("h2", { children: nodes }, `h2:${i}`));
|
|
174
|
-
else
|
|
174
|
+
else if (level === 3)
|
|
175
175
|
blocks.push(_jsx("h3", { children: nodes }, `h3:${i}`));
|
|
176
|
+
else if (level === 4)
|
|
177
|
+
blocks.push(_jsx("h4", { children: nodes }, `h4:${i}`));
|
|
178
|
+
else
|
|
179
|
+
blocks.push(_jsx("h5", { children: nodes }, `h5:${i}`));
|
|
176
180
|
i += 1;
|
|
177
181
|
continue;
|
|
178
182
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abstractframework/panel-chat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Shared chat panel components for AbstractFramework (extracted from AbstractCode; reusable by other UIs).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Laurent-Philippe Albou",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"prepublishOnly": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@abstractframework/ui-kit": "^0.1.
|
|
42
|
+
"@abstractframework/ui-kit": "^0.1.3",
|
|
43
43
|
"react": "^18.0.0",
|
|
44
44
|
"react-dom": "^18.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@abstractframework/ui-kit": "^0.1.
|
|
47
|
+
"@abstractframework/ui-kit": "^0.1.3",
|
|
48
48
|
"react": "^18.0.0",
|
|
49
49
|
"react-dom": "^18.0.0",
|
|
50
50
|
"@types/react": "^18.2.48",
|