@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.
Files changed (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +22 -0
  3. package/dist/content-transfer.cjs +8 -2
  4. package/dist/content-transfer.cjs.map +1 -1
  5. package/dist/content-transfer.d.cts +2 -0
  6. package/dist/content-transfer.d.ts +2 -0
  7. package/dist/content-transfer.js +8 -2
  8. package/dist/content-transfer.js.map +1 -1
  9. package/dist/data-table/copy-helpers.d.cts +1 -1
  10. package/dist/data-table/copy-helpers.d.ts +1 -1
  11. package/dist/data-table/data-row-inspector.cjs +8 -2
  12. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  13. package/dist/data-table/data-row-inspector.js +8 -2
  14. package/dist/data-table/data-row-inspector.js.map +1 -1
  15. package/dist/data-table/data-row-window.cjs +8 -2
  16. package/dist/data-table/data-row-window.cjs.map +1 -1
  17. package/dist/data-table/data-row-window.js +8 -2
  18. package/dist/data-table/data-row-window.js.map +1 -1
  19. package/dist/data-table/filter-engine.d.cts +1 -1
  20. package/dist/data-table/filter-engine.d.ts +1 -1
  21. package/dist/data-table/index.cjs +1041 -930
  22. package/dist/data-table/index.cjs.map +1 -1
  23. package/dist/data-table/index.d.cts +23 -3
  24. package/dist/data-table/index.d.ts +23 -3
  25. package/dist/data-table/index.js +1041 -930
  26. package/dist/data-table/index.js.map +1 -1
  27. package/dist/data-table/infer-filter.d.cts +1 -1
  28. package/dist/data-table/infer-filter.d.ts +1 -1
  29. package/dist/data-table/layered-filters.d.cts +1 -1
  30. package/dist/data-table/layered-filters.d.ts +1 -1
  31. package/dist/data-table/pagination.cjs +2 -2
  32. package/dist/data-table/pagination.cjs.map +1 -1
  33. package/dist/data-table/pagination.js +2 -2
  34. package/dist/data-table/pagination.js.map +1 -1
  35. package/dist/data-table/query-control.d.cts +1 -1
  36. package/dist/data-table/query-control.d.ts +1 -1
  37. package/dist/data-table/types.cjs.map +1 -1
  38. package/dist/data-table/types.d.cts +1 -1
  39. package/dist/data-table/types.d.ts +1 -1
  40. package/dist/data-table/url-state.d.cts +1 -1
  41. package/dist/data-table/url-state.d.ts +1 -1
  42. package/dist/data-table/xlsx.d.cts +1 -1
  43. package/dist/data-table/xlsx.d.ts +1 -1
  44. package/dist/index.cjs +2 -2
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.js +2 -2
  47. package/dist/index.js.map +1 -1
  48. package/dist/{types-CD4xGL5Z.d.cts → types-Bx9SfdJM.d.cts} +2 -0
  49. package/dist/{types-BhSkeZQ_.d.ts → types-DyByb6tW.d.ts} +2 -0
  50. 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-CD4xGL5Z.cjs';
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-BhSkeZQ_.js';
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,