@ai-matrx/rich-content 0.2.47 → 0.2.48
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,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.48
|
|
4
|
+
|
|
5
|
+
- The copy commands and the document menu strip thinking with THE rule
|
|
6
|
+
(`stripThinking`, `@ai-matrx/content-ir/source`) instead of a static import of
|
|
7
|
+
`@ai-matrx/print/markdown`, which put KaTeX and an HTML parser on every first screen. The
|
|
8
|
+
formatted-HTML copy still loads print at click time.
|
|
9
|
+
|
|
3
10
|
## 0.2.47
|
|
4
11
|
|
|
5
12
|
- The JSON value types and guards (`isJsonObject`, `isJsonArray`, `isJsonPrimitive`, `Json*`)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { removeThinkingContent } from "@ai-matrx/
|
|
1
|
+
export { stripThinking as removeThinkingContent } from "@ai-matrx/content-ir/source";
|
|
2
2
|
/** The formatted HTML for a copy (loaded at click time), or `undefined` when this host writes plain text only. */
|
|
3
3
|
export declare function formattedCopyHtml(markdown: string): Promise<string> | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { stripThinking } from "@ai-matrx/content-ir/source";
|
|
2
2
|
function formattedCopyHtml(markdown) {
|
|
3
3
|
return import("@ai-matrx/print/markdown").then(({ markdownToHtml }) => markdownToHtml(markdown));
|
|
4
4
|
}
|
|
5
5
|
export {
|
|
6
6
|
formattedCopyHtml,
|
|
7
|
-
removeThinkingContent
|
|
7
|
+
stripThinking as removeThinkingContent
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ConfirmDialog as DesignSystemConfirmDialog } from "@ai-matrx/design-system";
|
|
3
|
-
import { createElement } from "react";
|
|
3
|
+
import { createElement, lazy, Suspense } from "react";
|
|
4
4
|
import { GenericStructuredView } from "@ai-matrx/content-ir-react";
|
|
5
5
|
import { announceBareHost, BARE_HOST_ATTR, hostCapability } from "./registry.js";
|
|
6
6
|
function binding(key) {
|
|
@@ -47,7 +47,17 @@ const getArtifactDef = fn("getArtifactDef", nothing, "no artifact types are know
|
|
|
47
47
|
const resolveArtifactDef = fn("resolveArtifactDef", nothing, "no artifact types are known");
|
|
48
48
|
const hasArtifactRenderer = fn("hasArtifactRenderer", () => false, "no artifact renderers are known");
|
|
49
49
|
const ArtifactRender = component("ArtifactRender", ValueFloor, "artifacts render through the generic structured view");
|
|
50
|
-
const
|
|
50
|
+
const LazyCodeBlock = lazy(() => import("../code-block/CodeBlock.js"));
|
|
51
|
+
function PlainCodeBlock(props) {
|
|
52
|
+
const { conversationId: _c, messageId: _m, existingArtifactId: _a, extraMenuItems: _e, ...rest } = props;
|
|
53
|
+
const code = typeof rest.code === "string" ? rest.code : "";
|
|
54
|
+
return createElement(
|
|
55
|
+
Suspense,
|
|
56
|
+
{ fallback: createElement("pre", { ...BARE_HOST_ATTR, "data-code-block-loading": "" }, createElement("code", null, code)) },
|
|
57
|
+
createElement(LazyCodeBlock, rest)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
const CodeBlockWithContextAttach = component("CodeBlockWithContextAttach", PlainCodeBlock, "code blocks render without the attach-to-context action");
|
|
51
61
|
const useOpenConvertToShapeWindow = fn("useOpenConvertToShapeWindow", nothing, "no convert-to-shape window");
|
|
52
62
|
const useOpenSmartCodeEditorWindow = fn("useOpenSmartCodeEditorWindow", nothing, "no code editor window");
|
|
53
63
|
const useOpenTableViewerWindow = fn("useOpenTableViewerWindow", nothing, "no table viewer window");
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
import { ContentTransferMenu } from "@ai-matrx/alchemy/react/workspace";
|
|
6
6
|
import { unwrapKindEnvelopes } from "@ai-matrx/content-ir/source";
|
|
7
7
|
import { directSource } from "@ai-matrx/alchemy/operate";
|
|
8
|
-
import { removeThinkingContent } from "@ai-matrx/
|
|
8
|
+
import { stripThinking as removeThinkingContent } from "@ai-matrx/content-ir/source";
|
|
9
9
|
function AlchemyDocumentMenu({
|
|
10
10
|
getCtx,
|
|
11
11
|
sourceId,
|
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.48",
|
|
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",
|
|
@@ -130,21 +130,21 @@
|
|
|
130
130
|
"unist-util-visit": "^5.1.0",
|
|
131
131
|
"unist-util-visit-parents": "^6.0.2",
|
|
132
132
|
"yaml": "^2.9.1",
|
|
133
|
-
"@ai-matrx/canvas": "latest",
|
|
134
133
|
"@ai-matrx/content-ir": "latest",
|
|
134
|
+
"@ai-matrx/alchemy": "latest",
|
|
135
135
|
"@ai-matrx/content-ir-react": "latest",
|
|
136
|
+
"@ai-matrx/agents": "latest",
|
|
136
137
|
"@ai-matrx/data": "latest",
|
|
137
|
-
"@ai-matrx/
|
|
138
|
-
"@ai-matrx/design-system": "latest",
|
|
138
|
+
"@ai-matrx/canvas": "latest",
|
|
139
139
|
"@ai-matrx/diff": "latest",
|
|
140
140
|
"@ai-matrx/icons": "latest",
|
|
141
141
|
"@ai-matrx/kit": "latest",
|
|
142
|
-
"@ai-matrx/media": "latest",
|
|
143
|
-
"@ai-matrx/print": "latest",
|
|
144
142
|
"@ai-matrx/records": "latest",
|
|
143
|
+
"@ai-matrx/print": "latest",
|
|
145
144
|
"@ai-matrx/records-ui": "latest",
|
|
145
|
+
"@ai-matrx/media": "latest",
|
|
146
146
|
"@ai-matrx/tap-target": "latest",
|
|
147
|
-
"@ai-matrx/
|
|
147
|
+
"@ai-matrx/design-system": "latest"
|
|
148
148
|
},
|
|
149
149
|
"peerDependencies": {
|
|
150
150
|
"react": ">=19.0.0",
|