@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
|
@@ -1514,6 +1514,7 @@ var actionDone = (message) => ({
|
|
|
1514
1514
|
mimeTypes: [],
|
|
1515
1515
|
message
|
|
1516
1516
|
});
|
|
1517
|
+
var isSafeFilename = (filename) => filename === filename.trim() && filename.length > 0 && !/^\.+$/.test(filename) && !/[\\/\x00-\x1F\x7F]/.test(filename);
|
|
1517
1518
|
var sourceFor = (id, label, build) => ({
|
|
1518
1519
|
id,
|
|
1519
1520
|
label,
|
|
@@ -1662,7 +1663,8 @@ function MatrxCopyMenuSession(props) {
|
|
|
1662
1663
|
value: {
|
|
1663
1664
|
bytes: Array.from(bytes),
|
|
1664
1665
|
mime: file.mime,
|
|
1665
|
-
extension: file.extension
|
|
1666
|
+
extension: file.extension,
|
|
1667
|
+
...file.filename !== void 0 ? { filename: file.filename } : {}
|
|
1666
1668
|
}
|
|
1667
1669
|
};
|
|
1668
1670
|
},
|
|
@@ -1679,12 +1681,16 @@ function MatrxCopyMenuSession(props) {
|
|
|
1679
1681
|
(byte) => typeof byte !== "number" || !Number.isInteger(byte) || byte < 0 || byte > 255
|
|
1680
1682
|
))
|
|
1681
1683
|
throw new Error(`${item.label} did not capture a valid file.`);
|
|
1684
|
+
if (value.filename !== void 0 && (typeof value.filename !== "string" || !isSafeFilename(value.filename)))
|
|
1685
|
+
throw new Error(
|
|
1686
|
+
`${item.label} has an unsafe filename. Use a nonempty basename without leading or trailing whitespace, dots only, path separators, or control characters.`
|
|
1687
|
+
);
|
|
1682
1688
|
if (draft.omissions.some((omission) => omission.reason !== "duplicate"))
|
|
1683
1689
|
throw new Error(
|
|
1684
1690
|
"This custom file exceeds the configured export limits or contains excluded content. Use a standard format or revise the source options."
|
|
1685
1691
|
);
|
|
1686
1692
|
const bytes = new Uint8Array(value.bytes);
|
|
1687
|
-
const filename = `${props.label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "export"}.${value.extension.replace(/[^a-zA-Z0-9.-]/g, "") || "bin"}`;
|
|
1693
|
+
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"}`;
|
|
1688
1694
|
return transport.download(
|
|
1689
1695
|
sealTransferArtifact2({
|
|
1690
1696
|
snapshotId: snapshot.id,
|