@ai-matrx/rich-content 0.2.16 → 0.2.17
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/dist/display/markdown-classification/processors/bock-processors/parse-markdown-table.js +2 -2
- package/dist/display/markdown-classification/processors/utils/gfm-table-vector-inputs.js +1 -1
- package/dist/levels/prose/remote-image-policy.js +1 -1
- package/dist/rich-document/actions/provider.js +2 -1
- package/dist/selection-toolbar/selection-actions.js +1 -1
- package/package.json +6 -6
package/dist/display/markdown-classification/processors/bock-processors/parse-markdown-table.js
CHANGED
|
@@ -62,7 +62,7 @@ const parseMarkdownTable = (content, isStreamActive = false) => {
|
|
|
62
62
|
if (tableLines.length < 3) return { markdown: null, data: null };
|
|
63
63
|
const separatorLine = tableLines[1].trim();
|
|
64
64
|
if (!isGfmDelimiterRow(separatorLine) || !tableStartsAt(lines, tableStartIndex)) {
|
|
65
|
-
if (!isStreamActive &&
|
|
65
|
+
if (!isStreamActive && process.env.NODE_ENV === "development") {
|
|
66
66
|
console.warn("Invalid table separator format:", separatorLine);
|
|
67
67
|
}
|
|
68
68
|
return { markdown: null, data: null };
|
|
@@ -81,7 +81,7 @@ const parseMarkdownTable = (content, isStreamActive = false) => {
|
|
|
81
81
|
(row) => row.length > 0 && row.length <= Math.max(headers.length * 2, 10)
|
|
82
82
|
);
|
|
83
83
|
if (!hasValidStructure) {
|
|
84
|
-
if (!isStreamActive &&
|
|
84
|
+
if (!isStreamActive && process.env.NODE_ENV === "development") {
|
|
85
85
|
console.warn("Table structure validation failed - inconsistent row lengths");
|
|
86
86
|
}
|
|
87
87
|
return { markdown: null, data: null };
|
|
@@ -342,7 +342,7 @@ const TABLE_START_INPUTS = [
|
|
|
342
342
|
under("<span>"),
|
|
343
343
|
under("text <b>B3</b> first"),
|
|
344
344
|
under("<!-- shift note -->"),
|
|
345
|
-
under("<script>x
|
|
345
|
+
under("<script>x</script>"),
|
|
346
346
|
under("<details>", ""),
|
|
347
347
|
under("Tonight's bays:", "<span>"),
|
|
348
348
|
under("<div>", "hello"),
|
|
@@ -22,7 +22,7 @@ function useImagePolicy() {
|
|
|
22
22
|
}
|
|
23
23
|
let warnedUndeclared = false;
|
|
24
24
|
function warnUndeclared(host) {
|
|
25
|
-
if (warnedUndeclared ||
|
|
25
|
+
if (warnedUndeclared || process.env.NODE_ENV === "production") return;
|
|
26
26
|
warnedUndeclared = true;
|
|
27
27
|
console.warn(
|
|
28
28
|
`[rich-content] A remote image (${host}) rendered where no surface declared who wrote the text, so it waits for a click. Pass imagePolicy="self" | "other" | "ai" on the RichContent / RichDocument / MarkdownStream that renders it (components/rich-content/prose/remote-image-policy.tsx).`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { holdDeliberateIntent } from "../../host/app-bindings.js";
|
|
2
2
|
import {
|
|
3
|
+
DuplicateActionError,
|
|
3
4
|
computeEligibility,
|
|
4
5
|
createClickTarget
|
|
5
6
|
} from "@ai-matrx/alchemy/actions";
|
|
@@ -33,7 +34,7 @@ function readStore() {
|
|
|
33
34
|
function registerAction(action) {
|
|
34
35
|
const { actions: ACTIONS, listeners } = store();
|
|
35
36
|
if (ACTIONS.has(action.id)) {
|
|
36
|
-
if (
|
|
37
|
+
if (process.env.NODE_ENV === "development") {
|
|
37
38
|
console.warn(
|
|
38
39
|
`[rich-document] action "${action.id}" re-registered (fast refresh) \u2014 replaced.`
|
|
39
40
|
);
|
|
@@ -190,7 +190,7 @@ const declaredListeners = /* @__PURE__ */ new Set();
|
|
|
190
190
|
function declareSelectionProvider(provider) {
|
|
191
191
|
const existing = declared.get(provider.id);
|
|
192
192
|
if (existing === provider) return;
|
|
193
|
-
if (existing &&
|
|
193
|
+
if (existing && process.env.NODE_ENV !== "development") {
|
|
194
194
|
throw new Error(`Selection provider "${provider.id}" was declared twice by different modules.`);
|
|
195
195
|
}
|
|
196
196
|
declared.set(provider.id, provider);
|
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.17",
|
|
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/alchemy": "latest",
|
|
134
133
|
"@ai-matrx/canvas": "latest",
|
|
134
|
+
"@ai-matrx/alchemy": "latest",
|
|
135
135
|
"@ai-matrx/content-ir": "latest",
|
|
136
136
|
"@ai-matrx/content-ir-react": "latest",
|
|
137
|
+
"@ai-matrx/agents": "latest",
|
|
137
138
|
"@ai-matrx/data": "latest",
|
|
138
139
|
"@ai-matrx/design-system": "latest",
|
|
139
140
|
"@ai-matrx/diff": "latest",
|
|
140
141
|
"@ai-matrx/icons": "latest",
|
|
142
|
+
"@ai-matrx/kit": "latest",
|
|
141
143
|
"@ai-matrx/media": "latest",
|
|
144
|
+
"@ai-matrx/print": "latest",
|
|
142
145
|
"@ai-matrx/records": "latest",
|
|
143
146
|
"@ai-matrx/records-ui": "latest",
|
|
144
|
-
"@ai-matrx/tap-target": "latest"
|
|
145
|
-
"@ai-matrx/print": "latest",
|
|
146
|
-
"@ai-matrx/kit": "latest",
|
|
147
|
-
"@ai-matrx/agents": "latest"
|
|
147
|
+
"@ai-matrx/tap-target": "latest"
|
|
148
148
|
},
|
|
149
149
|
"peerDependencies": {
|
|
150
150
|
"react": ">=19.0.0",
|