@ai-matrx/rich-content 0.2.3 → 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,9 @@
|
|
|
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
|
+
|
|
3
7
|
## 0.2.3
|
|
4
8
|
|
|
5
9
|
The packaged artifact now includes the MIT attribution notice for the vendored math plugins.
|
|
@@ -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
|
};
|
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",
|
|
89
88
|
"@ai-matrx/design-system": "latest",
|
|
90
89
|
"@ai-matrx/kit": "latest",
|
|
91
90
|
"@ai-matrx/media": "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",
|