@ai-matrx/design-system 0.18.3 → 0.18.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 +12 -0
- package/README.md +22 -0
- package/dist/content-transfer.cjs +8 -2
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.d.cts +2 -0
- package/dist/content-transfer.d.ts +2 -0
- package/dist/content-transfer.js +8 -2
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/data-row-inspector.cjs +8 -2
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +8 -2
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +8 -2
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +8 -2
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/index.cjs +1041 -930
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +23 -3
- package/dist/data-table/index.d.ts +23 -3
- package/dist/data-table/index.js +1041 -930
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/pagination.cjs +2 -2
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +2 -2
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{types-CD4xGL5Z.d.cts → types-Bx9SfdJM.d.cts} +2 -0
- package/dist/{types-BhSkeZQ_.d.ts → types-DyByb6tW.d.ts} +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.cjs';
|
|
2
|
-
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-
|
|
2
|
+
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-Bx9SfdJM.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
/** Human markdown table of the current view (visible columns × rows). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.js';
|
|
2
|
-
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-
|
|
2
|
+
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-DyByb6tW.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
/** Human markdown table of the current view (visible columns × rows). */
|
|
@@ -1523,6 +1523,7 @@ var actionDone = (message) => ({
|
|
|
1523
1523
|
mimeTypes: [],
|
|
1524
1524
|
message
|
|
1525
1525
|
});
|
|
1526
|
+
var isSafeFilename = (filename) => filename === filename.trim() && filename.length > 0 && !/^\.+$/.test(filename) && !/[\\/\x00-\x1F\x7F]/.test(filename);
|
|
1526
1527
|
var sourceFor = (id, label, build) => ({
|
|
1527
1528
|
id,
|
|
1528
1529
|
label,
|
|
@@ -1671,7 +1672,8 @@ function MatrxCopyMenuSession(props) {
|
|
|
1671
1672
|
value: {
|
|
1672
1673
|
bytes: Array.from(bytes),
|
|
1673
1674
|
mime: file.mime,
|
|
1674
|
-
extension: file.extension
|
|
1675
|
+
extension: file.extension,
|
|
1676
|
+
...file.filename !== void 0 ? { filename: file.filename } : {}
|
|
1675
1677
|
}
|
|
1676
1678
|
};
|
|
1677
1679
|
},
|
|
@@ -1688,12 +1690,16 @@ function MatrxCopyMenuSession(props) {
|
|
|
1688
1690
|
(byte) => typeof byte !== "number" || !Number.isInteger(byte) || byte < 0 || byte > 255
|
|
1689
1691
|
))
|
|
1690
1692
|
throw new Error(`${item.label} did not capture a valid file.`);
|
|
1693
|
+
if (value.filename !== void 0 && (typeof value.filename !== "string" || !isSafeFilename(value.filename)))
|
|
1694
|
+
throw new Error(
|
|
1695
|
+
`${item.label} has an unsafe filename. Use a nonempty basename without leading or trailing whitespace, dots only, path separators, or control characters.`
|
|
1696
|
+
);
|
|
1691
1697
|
if (draft.omissions.some((omission) => omission.reason !== "duplicate"))
|
|
1692
1698
|
throw new Error(
|
|
1693
1699
|
"This custom file exceeds the configured export limits or contains excluded content. Use a standard format or revise the source options."
|
|
1694
1700
|
);
|
|
1695
1701
|
const bytes = new Uint8Array(value.bytes);
|
|
1696
|
-
const filename = `${props.label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "export"}.${value.extension.replace(/[^a-zA-Z0-9.-]/g, "") || "bin"}`;
|
|
1702
|
+
const filename = typeof value.filename === "string" ? value.filename : `${props.label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "export"}.${value.extension.replace(/[^a-zA-Z0-9.-]/g, "") || "bin"}`;
|
|
1697
1703
|
return transport.download(
|
|
1698
1704
|
(0, import_content_transfer2.sealTransferArtifact)({
|
|
1699
1705
|
snapshotId: snapshot.id,
|