@ai-matrx/chat 0.2.8 → 0.2.9
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 +7 -0
- package/dist/agent-copy/export.d.ts +0 -10
- package/dist/agent-copy/export.js +0 -23
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @ai-matrx/chat
|
|
2
2
|
|
|
3
|
+
## 0.2.9 — 2026-10-07
|
|
4
|
+
|
|
5
|
+
ALC-19: the download door moved to the base package.
|
|
6
|
+
|
|
7
|
+
- `agent-copy/export` no longer exports `downloadFile` / `downloadUrl`; they live in `@ai-matrx/kit/download` (kit 0.26.0).
|
|
8
|
+
- Consumer action: import `downloadFile` / `downloadUrl` from `@ai-matrx/kit/download`.
|
|
9
|
+
|
|
3
10
|
## 0.2.8 — 2026-10-07
|
|
4
11
|
|
|
5
12
|
ALC-19: the one file-download door.
|
|
@@ -21,16 +21,6 @@ export interface ExportItem {
|
|
|
21
21
|
*/
|
|
22
22
|
onSelect?: () => void | Promise<void>;
|
|
23
23
|
}
|
|
24
|
-
export declare function downloadFile(filename: string, content: BlobPart, mime: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Save a file that already has a URL (a data: or blob: URL, or a remote URL the browser may
|
|
27
|
-
* download). Same-origin and data/blob URLs are saved under `filename`; a cross-origin remote
|
|
28
|
-
* URL is handed to the browser, which may ignore the name. `newTab` opens it in a new tab
|
|
29
|
-
* (noopener) as the cross-origin fallback.
|
|
30
|
-
*/
|
|
31
|
-
export declare function downloadUrl(url: string, filename: string, options?: {
|
|
32
|
-
newTab?: boolean;
|
|
33
|
-
}): void;
|
|
34
24
|
/** Sanitized `base-2026-07-27.ext` filename. */
|
|
35
25
|
export declare function exportFilename(base: string, extension: string): string;
|
|
36
26
|
export declare function jsonExportItem(data: unknown | (() => unknown), label?: string): ExportItem;
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
function downloadFile(filename, content, mime) {
|
|
2
|
-
const blob = new Blob([content], { type: mime });
|
|
3
|
-
const url = URL.createObjectURL(blob);
|
|
4
|
-
clickDownloadAnchor(url, filename);
|
|
5
|
-
setTimeout(() => URL.revokeObjectURL(url), 1e3);
|
|
6
|
-
}
|
|
7
|
-
function downloadUrl(url, filename, options = {}) {
|
|
8
|
-
clickDownloadAnchor(url, filename, options.newTab);
|
|
9
|
-
}
|
|
10
|
-
function clickDownloadAnchor(href, filename, newTab = false) {
|
|
11
|
-
const anchor = document.createElement("a");
|
|
12
|
-
anchor.href = href;
|
|
13
|
-
anchor.download = filename;
|
|
14
|
-
if (newTab) {
|
|
15
|
-
anchor.target = "_blank";
|
|
16
|
-
anchor.rel = "noopener noreferrer";
|
|
17
|
-
}
|
|
18
|
-
document.body.appendChild(anchor);
|
|
19
|
-
anchor.click();
|
|
20
|
-
document.body.removeChild(anchor);
|
|
21
|
-
}
|
|
22
1
|
function exportFilename(base, extension) {
|
|
23
2
|
const slug = base.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60);
|
|
24
3
|
const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
@@ -90,8 +69,6 @@ function csvExportItem(rows, label = "CSV", columns) {
|
|
|
90
69
|
}
|
|
91
70
|
export {
|
|
92
71
|
csvExportItem,
|
|
93
|
-
downloadFile,
|
|
94
|
-
downloadUrl,
|
|
95
72
|
exportFilename,
|
|
96
73
|
jsonExportItem,
|
|
97
74
|
rowsToCsv,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/chat",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "THE one AI Matrx person-to-agent chat system: the full chat (running agents, conversations, tool calls, streaming, context, surfaces, voice) as per-module subpaths @ai-matrx/chat/<domain>/<module> over a host contract (/host, /host/react) whose only required value is a db; plus the kernel compatibility entries (., /external-store, /matrx, /react, /tools, styles.css, tokens.css) until P28.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -202,23 +202,23 @@
|
|
|
202
202
|
"uuid": "^14.0.2",
|
|
203
203
|
"zod": "^4.6.5",
|
|
204
204
|
"@ai-matrx/agents": "latest",
|
|
205
|
+
"@ai-matrx/alchemy": "latest",
|
|
206
|
+
"@ai-matrx/associations": "latest",
|
|
205
207
|
"@ai-matrx/browser-audio": "latest",
|
|
206
208
|
"@ai-matrx/canvas": "latest",
|
|
207
209
|
"@ai-matrx/content-ir": "latest",
|
|
208
|
-
"@ai-matrx/content-ir-react": "latest",
|
|
209
210
|
"@ai-matrx/data": "latest",
|
|
211
|
+
"@ai-matrx/content-ir-react": "latest",
|
|
210
212
|
"@ai-matrx/design-system": "latest",
|
|
211
213
|
"@ai-matrx/diff": "latest",
|
|
212
214
|
"@ai-matrx/icons": "latest",
|
|
215
|
+
"@ai-matrx/media": "latest",
|
|
213
216
|
"@ai-matrx/kit": "latest",
|
|
214
|
-
"@ai-matrx/print": "latest",
|
|
215
217
|
"@ai-matrx/realtime": "latest",
|
|
216
218
|
"@ai-matrx/records": "latest",
|
|
219
|
+
"@ai-matrx/print": "latest",
|
|
217
220
|
"@ai-matrx/records-ui": "latest",
|
|
218
|
-
"@ai-matrx/tap-target": "latest"
|
|
219
|
-
"@ai-matrx/alchemy": "latest",
|
|
220
|
-
"@ai-matrx/associations": "latest",
|
|
221
|
-
"@ai-matrx/media": "latest"
|
|
221
|
+
"@ai-matrx/tap-target": "latest"
|
|
222
222
|
},
|
|
223
223
|
"devDependencies": {
|
|
224
224
|
"@arethetypeswrong/cli": "^0.18.5",
|