@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
|
@@ -1574,6 +1574,7 @@ var actionDone = (message) => ({
|
|
|
1574
1574
|
mimeTypes: [],
|
|
1575
1575
|
message
|
|
1576
1576
|
});
|
|
1577
|
+
var isSafeFilename = (filename) => filename === filename.trim() && filename.length > 0 && !/^\.+$/.test(filename) && !/[\\/\x00-\x1F\x7F]/.test(filename);
|
|
1577
1578
|
var sourceFor = (id, label, build) => ({
|
|
1578
1579
|
id,
|
|
1579
1580
|
label,
|
|
@@ -1722,7 +1723,8 @@ function MatrxCopyMenuSession(props) {
|
|
|
1722
1723
|
value: {
|
|
1723
1724
|
bytes: Array.from(bytes),
|
|
1724
1725
|
mime: file.mime,
|
|
1725
|
-
extension: file.extension
|
|
1726
|
+
extension: file.extension,
|
|
1727
|
+
...file.filename !== void 0 ? { filename: file.filename } : {}
|
|
1726
1728
|
}
|
|
1727
1729
|
};
|
|
1728
1730
|
},
|
|
@@ -1739,12 +1741,16 @@ function MatrxCopyMenuSession(props) {
|
|
|
1739
1741
|
(byte) => typeof byte !== "number" || !Number.isInteger(byte) || byte < 0 || byte > 255
|
|
1740
1742
|
))
|
|
1741
1743
|
throw new Error(`${item.label} did not capture a valid file.`);
|
|
1744
|
+
if (value.filename !== void 0 && (typeof value.filename !== "string" || !isSafeFilename(value.filename)))
|
|
1745
|
+
throw new Error(
|
|
1746
|
+
`${item.label} has an unsafe filename. Use a nonempty basename without leading or trailing whitespace, dots only, path separators, or control characters.`
|
|
1747
|
+
);
|
|
1742
1748
|
if (draft.omissions.some((omission) => omission.reason !== "duplicate"))
|
|
1743
1749
|
throw new Error(
|
|
1744
1750
|
"This custom file exceeds the configured export limits or contains excluded content. Use a standard format or revise the source options."
|
|
1745
1751
|
);
|
|
1746
1752
|
const bytes = new Uint8Array(value.bytes);
|
|
1747
|
-
const filename = `${props.label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "export"}.${value.extension.replace(/[^a-zA-Z0-9.-]/g, "") || "bin"}`;
|
|
1753
|
+
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"}`;
|
|
1748
1754
|
return transport.download(
|
|
1749
1755
|
(0, import_content_transfer2.sealTransferArtifact)({
|
|
1750
1756
|
snapshotId: snapshot.id,
|