@ai-matrx/design-system 0.18.3 → 0.18.5
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 +18 -0
- package/README.md +22 -0
- package/dist/content-transfer.cjs +20 -7
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.d.cts +6 -0
- package/dist/content-transfer.d.ts +6 -0
- package/dist/content-transfer.js +20 -7
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.cjs +53 -0
- package/dist/data-table/copy-helpers.cjs.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +13 -2
- package/dist/data-table/copy-helpers.d.ts +13 -2
- package/dist/data-table/copy-helpers.js +55 -0
- package/dist/data-table/copy-helpers.js.map +1 -1
- package/dist/data-table/copy-types.cjs.map +1 -1
- package/dist/data-table/copy-types.d.cts +4 -0
- package/dist/data-table/copy-types.d.ts +4 -0
- package/dist/data-table/data-row-inspector.cjs +78 -52
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +78 -52
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +78 -52
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +78 -52
- 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 +1587 -1277
- 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 +1574 -1262
- 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 +149 -91
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +144 -86
- 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/uuid-cell.cjs +58 -45
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js +58 -45
- package/dist/data-table/uuid-cell.js.map +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-0CNCWvdK.d.cts} +4 -2
- package/dist/{types-BhSkeZQ_.d.ts → types-cH8oLqUx.d.ts} +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.5
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.18.4..npm/design-system/v0.18.5 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.18.4 — 2026-09-12
|
|
10
|
+
|
|
11
|
+
Alchemy custom exports now preserve the exact captured filename through
|
|
12
|
+
preparation and delivery, with safe basename validation; omitting a filename
|
|
13
|
+
keeps the existing default behavior. Tables gain the shared responsive
|
|
14
|
+
`TableTitleRow`, canonical toolbar tooltips, a mobile-safe append footer, and
|
|
15
|
+
collision-free Select labels and chevrons.
|
|
16
|
+
|
|
17
|
+
### Consumer action
|
|
18
|
+
|
|
19
|
+
Update to 0.18.4. No host configuration changes are required.
|
|
20
|
+
|
|
3
21
|
## 0.18.3 — 2026-09-12
|
|
4
22
|
|
|
5
23
|
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,
|
|
@@ -705,14 +706,21 @@ function MatrxCopyMenuSession(props) {
|
|
|
705
706
|
))
|
|
706
707
|
throw new Error("Sheet rows must be JSON objects.");
|
|
707
708
|
const rows = value;
|
|
708
|
-
const
|
|
709
|
+
const suppliedColumns = props.export.sheetColumns?.();
|
|
710
|
+
const columns = suppliedColumns ?? [...new Set(rows.flatMap((row) => Object.keys(row)))].map((id) => ({ id, label: id }));
|
|
711
|
+
const ids = /* @__PURE__ */ new Set();
|
|
712
|
+
for (const column of columns) {
|
|
713
|
+
if (!column.id || !column.label || ids.has(column.id)) throw new Error("Sheet columns require unique nonempty ids and labels.");
|
|
714
|
+
ids.add(column.id);
|
|
715
|
+
}
|
|
716
|
+
for (const row of rows) for (const key of Object.keys(row)) if (!ids.has(key)) throw new Error(`Sheet row key "${key}" is not declared in sheetColumns.`);
|
|
709
717
|
return {
|
|
710
718
|
kind: "rows",
|
|
711
719
|
rows,
|
|
712
|
-
columns:
|
|
713
|
-
id:
|
|
714
|
-
label:
|
|
715
|
-
path: `/${
|
|
720
|
+
columns: columns.map((column) => ({
|
|
721
|
+
id: column.id,
|
|
722
|
+
label: column.label,
|
|
723
|
+
path: `/${column.id.replace(/~/g, "~0").replace(/\//g, "~1")}`,
|
|
716
724
|
visible: true
|
|
717
725
|
}))
|
|
718
726
|
};
|
|
@@ -797,7 +805,8 @@ function MatrxCopyMenuSession(props) {
|
|
|
797
805
|
value: {
|
|
798
806
|
bytes: Array.from(bytes),
|
|
799
807
|
mime: file.mime,
|
|
800
|
-
extension: file.extension
|
|
808
|
+
extension: file.extension,
|
|
809
|
+
...file.filename !== void 0 ? { filename: file.filename } : {}
|
|
801
810
|
}
|
|
802
811
|
};
|
|
803
812
|
},
|
|
@@ -814,12 +823,16 @@ function MatrxCopyMenuSession(props) {
|
|
|
814
823
|
(byte) => typeof byte !== "number" || !Number.isInteger(byte) || byte < 0 || byte > 255
|
|
815
824
|
))
|
|
816
825
|
throw new Error(`${item.label} did not capture a valid file.`);
|
|
826
|
+
if (value.filename !== void 0 && (typeof value.filename !== "string" || !isSafeFilename(value.filename)))
|
|
827
|
+
throw new Error(
|
|
828
|
+
`${item.label} has an unsafe filename. Use a nonempty basename without leading or trailing whitespace, dots only, path separators, or control characters.`
|
|
829
|
+
);
|
|
817
830
|
if (draft.omissions.some((omission) => omission.reason !== "duplicate"))
|
|
818
831
|
throw new Error(
|
|
819
832
|
"This custom file exceeds the configured export limits or contains excluded content. Use a standard format or revise the source options."
|
|
820
833
|
);
|
|
821
834
|
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"}`;
|
|
835
|
+
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
836
|
return transport.download(
|
|
824
837
|
(0, import_content_transfer.sealTransferArtifact)({
|
|
825
838
|
snapshotId: snapshot.id,
|