@ai-matrx/rich-content 0.2.2 → 0.2.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.4
|
|
4
|
+
|
|
5
|
+
`display/blocks/csv/CsvBlock`: Copy goes through `@ai-matrx/kit/clipboard` `useClipboard` with toast notices (carries matrx-frontend ALC-19 `b980571731`, which landed on the app copy as the app switched to this package).
|
|
6
|
+
|
|
7
|
+
## 0.2.3
|
|
8
|
+
|
|
9
|
+
The packaged artifact now includes the MIT attribution notice for the vendored math plugins.
|
|
10
|
+
|
|
11
|
+
### Consumer action
|
|
12
|
+
|
|
13
|
+
None. Math rendering and public imports are unchanged.
|
|
14
|
+
|
|
3
15
|
## 0.2.2
|
|
4
16
|
|
|
5
17
|
`remark-math`, `rehype-katex` and the syntax half of `micromark-extension-math` are vendored
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useClipboard } from "@ai-matrx/kit/clipboard";
|
|
3
4
|
import { useState, useEffect } from "react";
|
|
4
5
|
import { cn } from "@ai-matrx/design-system";
|
|
5
6
|
import {
|
|
@@ -66,6 +67,9 @@ const CsvBlock = ({
|
|
|
66
67
|
className,
|
|
67
68
|
onInnerContentChange
|
|
68
69
|
}) => {
|
|
70
|
+
const { copyText } = useClipboard({
|
|
71
|
+
notify: (message, kind) => kind === "error" ? toast.error(message) : toast.success(message)
|
|
72
|
+
});
|
|
69
73
|
const [copied, setCopied] = useState(false);
|
|
70
74
|
const [sortCol, setSortCol] = useState(null);
|
|
71
75
|
const [sortDir, setSortDir] = useState(null);
|
|
@@ -82,7 +86,7 @@ const CsvBlock = ({
|
|
|
82
86
|
const headers = data[0] || [];
|
|
83
87
|
const bodyRows = data.slice(1);
|
|
84
88
|
const handleCopy = async () => {
|
|
85
|
-
await
|
|
89
|
+
await copyText(content);
|
|
86
90
|
setCopied(true);
|
|
87
91
|
setTimeout(() => setCopied(false), 2e3);
|
|
88
92
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Vendored math plugins
|
|
2
|
+
|
|
3
|
+
`remark-math`, `rehype-katex` and the syntax half of `micromark-extension-math` are copied here
|
|
4
|
+
verbatim (one import path changed each) under their MIT license:
|
|
5
|
+
|
|
6
|
+
> (The MIT License) Copyright (c) Titus Wormer <tituswormer@gmail.com>. Permission is hereby
|
|
7
|
+
> granted, free of charge, to any person obtaining a copy of this software and associated
|
|
8
|
+
> documentation files (the 'Software'), to deal in the Software without restriction, including
|
|
9
|
+
> without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
> and/or sell copies of the Software, and to permit persons to whom the Software is furnished to
|
|
11
|
+
> do so, subject to the following conditions: The above copyright notice and this permission
|
|
12
|
+
> notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS
|
|
13
|
+
> PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND.
|
|
14
|
+
|
|
15
|
+
Why: the upstream packages pin `katex ^0.16.0`, which carries GHSA-238p-pmpm-9mq7 (fixed in
|
|
16
|
+
0.18.2), so any npm consumer of this package installed a vulnerable KaTeX. Vendored, the only
|
|
17
|
+
KaTeX in the graph is this package's own `katex` dependency (^0.18.9). Drop the vendor copy the
|
|
18
|
+
day upstream depends on katex >= 0.18.2.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/rich-content",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "The AI Matrx formatted-text engine: the one markdown renderer, streaming markdown, the block splitter and renderer, the generic blocks, <RichContent> levels, the rich-document action registry and menus, copy, and the selection toolbar — as portable React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"unist-util-visit": "^5.1.0",
|
|
84
84
|
"unist-util-visit-parents": "^6.0.2",
|
|
85
85
|
"yaml": "^2.9.1",
|
|
86
|
-
"@ai-matrx/agents": "latest",
|
|
87
86
|
"@ai-matrx/content-ir": "latest",
|
|
88
87
|
"@ai-matrx/content-ir-react": "latest",
|
|
88
|
+
"@ai-matrx/design-system": "latest",
|
|
89
89
|
"@ai-matrx/kit": "latest",
|
|
90
90
|
"@ai-matrx/media": "latest",
|
|
91
|
-
"@ai-matrx/design-system": "latest",
|
|
92
91
|
"@ai-matrx/print": "latest",
|
|
93
|
-
"@ai-matrx/records": "latest"
|
|
92
|
+
"@ai-matrx/records": "latest",
|
|
93
|
+
"@ai-matrx/agents": "latest"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"react": ">=19.0.0",
|