@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.4 — 2026-09-12
4
+
5
+ Alchemy custom exports now preserve the exact captured filename through
6
+ preparation and delivery, with safe basename validation; omitting a filename
7
+ keeps the existing default behavior. Tables gain the shared responsive
8
+ `TableTitleRow`, canonical toolbar tooltips, a mobile-safe append footer, and
9
+ collision-free Select labels and chevrons.
10
+
11
+ ### Consumer action
12
+
13
+ Update to 0.18.4. No host configuration changes are required.
14
+
3
15
  ## 0.18.3 — 2026-09-12
4
16
 
5
17
  Reopening an Alchemy preparation now checks the current source while retaining
package/README.md CHANGED
@@ -4,6 +4,28 @@ The small, semantic UI foundation shared by AI Matrx React applications — prim
4
4
 
5
5
  **Controls:** Button, Badge, Label, Separator, the Input family, the Textarea family, Checkbox, Switch, RadioGroup, Slider, Toggle + ToggleGroup, Avatar, Progress.
6
6
  **Content transfer:** `@ai-matrx/design-system/content-transfer` supplies Matrx Alchemy's inlined glyph, accessible menu, projected capture workspace, optional AI capability seam, and locally scoped `SurfaceHandle` provider. Its source is captured on user action; preparation keeps an immutable original, preserves manual and alternate-source sessions, fences stale async results, and routes every copy/download through `Transport`. Import `@ai-matrx/design-system/content-transfer.css` with the package structural sheets.
7
+
8
+ ```tsx
9
+ <MatrxCopyMenu
10
+ label="Log"
11
+ export={{
12
+ items: [
13
+ {
14
+ id: "raw",
15
+ label: "Download raw log",
16
+ build: () => ({
17
+ content: rawText,
18
+ filename: "worker.log",
19
+ extension: "txt",
20
+ mime: "text/plain",
21
+ }),
22
+ },
23
+ ],
24
+ }}
25
+ />
26
+ ```
27
+
28
+ An explicit filename is an exact safe basename captured with its bytes. Omit it to use the label-derived default; unsafe values fail the export visibly.
7
29
  **Surfaces:** Card, Table, Tabs, Accordion, Collapsible, ScrollArea, Popover, Tooltip, HoverCard, Sheet, Dialog, AlertDialog, Drawer, BottomSheet + TabbedBottomSheet, Alert, Resizable, Skeleton.
8
30
  **Menus:** DropdownMenu, ContextMenu, Command / CommandDialog, Select, CreatablePicker.
9
31
  **Composed:** EditableLabel, SegmentedControl, ArchiveFilter, ScoreRing, OverflowToolbar, ConfirmDialog + ConfirmDialogHost.
@@ -649,6 +649,7 @@ var actionDone = (message) => ({
649
649
  mimeTypes: [],
650
650
  message
651
651
  });
652
+ var isSafeFilename = (filename) => filename === filename.trim() && filename.length > 0 && !/^\.+$/.test(filename) && !/[\\/\x00-\x1F\x7F]/.test(filename);
652
653
  var sourceFor = (id, label, build) => ({
653
654
  id,
654
655
  label,
@@ -797,7 +798,8 @@ function MatrxCopyMenuSession(props) {
797
798
  value: {
798
799
  bytes: Array.from(bytes),
799
800
  mime: file.mime,
800
- extension: file.extension
801
+ extension: file.extension,
802
+ ...file.filename !== void 0 ? { filename: file.filename } : {}
801
803
  }
802
804
  };
803
805
  },
@@ -814,12 +816,16 @@ function MatrxCopyMenuSession(props) {
814
816
  (byte) => typeof byte !== "number" || !Number.isInteger(byte) || byte < 0 || byte > 255
815
817
  ))
816
818
  throw new Error(`${item.label} did not capture a valid file.`);
819
+ if (value.filename !== void 0 && (typeof value.filename !== "string" || !isSafeFilename(value.filename)))
820
+ throw new Error(
821
+ `${item.label} has an unsafe filename. Use a nonempty basename without leading or trailing whitespace, dots only, path separators, or control characters.`
822
+ );
817
823
  if (draft.omissions.some((omission) => omission.reason !== "duplicate"))
818
824
  throw new Error(
819
825
  "This custom file exceeds the configured export limits or contains excluded content. Use a standard format or revise the source options."
820
826
  );
821
827
  const bytes = new Uint8Array(value.bytes);
822
- const filename = `${props.label.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "export"}.${value.extension.replace(/[^a-zA-Z0-9.-]/g, "") || "bin"}`;
828
+ 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"}`;
823
829
  return transport.download(
824
830
  (0, import_content_transfer.sealTransferArtifact)({
825
831
  snapshotId: snapshot.id,