@ai-matrx/design-system 0.86.349 → 0.86.351

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 (96) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/dist/carousel.cjs.map +1 -1
  3. package/dist/carousel.js +5 -5
  4. package/dist/chunk-4WSXAP24.js +51 -0
  5. package/dist/chunk-4WSXAP24.js.map +1 -0
  6. package/dist/{chunk-XTP6HOB6.js → chunk-6XNYYROM.js} +1 -1
  7. package/dist/chunk-6XNYYROM.js.map +1 -0
  8. package/dist/{chunk-CEA6X445.js → chunk-CFUXEGW2.js} +2 -2
  9. package/dist/{chunk-54UK6P7E.js → chunk-FLWSEDUW.js} +3 -3
  10. package/dist/{chunk-BC7LMEOD.js → chunk-GJ6UGQ4X.js} +7 -3
  11. package/dist/chunk-GJ6UGQ4X.js.map +1 -0
  12. package/dist/{chunk-6CDAHINE.js → chunk-GMNROZQJ.js} +4 -4
  13. package/dist/{chunk-6CDAHINE.js.map → chunk-GMNROZQJ.js.map} +1 -1
  14. package/dist/{chunk-6QKT52FR.js → chunk-MTE6N7XU.js} +2 -2
  15. package/dist/{chunk-S6F34AX5.js → chunk-QA7EHFRX.js} +2 -2
  16. package/dist/{chunk-CJBSBKG5.js → chunk-SOCNWQMX.js} +2 -2
  17. package/dist/{chunk-GLLPO66A.js → chunk-U46XUQI7.js} +2 -2
  18. package/dist/{chunk-KYH42WEX.js → chunk-UGQRAQTE.js} +433 -344
  19. package/dist/chunk-UGQRAQTE.js.map +1 -0
  20. package/dist/{chunk-TWRC7NP4.js → chunk-WUD23YTG.js} +4 -4
  21. package/dist/{chunk-MIJMP4WI.js → chunk-YRF22M5S.js} +6 -1
  22. package/dist/{chunk-MIJMP4WI.js.map → chunk-YRF22M5S.js.map} +1 -1
  23. package/dist/clipboard-fallback-dialog.cjs.map +1 -1
  24. package/dist/clipboard-fallback-dialog.js +1 -1
  25. package/dist/controls.cjs +547 -458
  26. package/dist/controls.cjs.map +1 -1
  27. package/dist/controls.css +52 -18
  28. package/dist/controls.d.cts +51 -3
  29. package/dist/controls.d.ts +51 -3
  30. package/dist/controls.js +13 -5
  31. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  32. package/dist/data-table/data-row-inspector.js +4 -4
  33. package/dist/data-table/data-row-window.cjs.map +1 -1
  34. package/dist/data-table/data-row-window.js +5 -5
  35. package/dist/data-table/index.cjs +53 -43
  36. package/dist/data-table/index.cjs.map +1 -1
  37. package/dist/data-table/index.js +52 -45
  38. package/dist/data-table/index.js.map +1 -1
  39. package/dist/data-table/pagination.cjs.map +1 -1
  40. package/dist/data-table/pagination.js +2 -2
  41. package/dist/data-table/spreadsheet.cjs +6 -2
  42. package/dist/data-table/spreadsheet.cjs.map +1 -1
  43. package/dist/data-table/spreadsheet.d.cts +4 -1
  44. package/dist/data-table/spreadsheet.d.ts +4 -1
  45. package/dist/data-table/spreadsheet.js +3 -1
  46. package/dist/data-table/uuid-cell.cjs.map +1 -1
  47. package/dist/data-table/uuid-cell.js +2 -2
  48. package/dist/desktop.cjs +158 -16
  49. package/dist/desktop.cjs.map +1 -1
  50. package/dist/desktop.css +46 -0
  51. package/dist/desktop.d.cts +6 -5
  52. package/dist/desktop.d.ts +6 -5
  53. package/dist/desktop.js +127 -17
  54. package/dist/desktop.js.map +1 -1
  55. package/dist/index.cjs +19 -9
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.cts +10 -1
  58. package/dist/index.d.ts +10 -1
  59. package/dist/index.js +21 -14
  60. package/dist/index.js.map +1 -1
  61. package/dist/item.cjs.map +1 -1
  62. package/dist/item.js +2 -2
  63. package/dist/lite-table.cjs.map +1 -1
  64. package/dist/lite-table.js +1 -1
  65. package/dist/notice-stack.cjs +70 -0
  66. package/dist/notice-stack.cjs.map +1 -0
  67. package/dist/notice-stack.d.cts +60 -0
  68. package/dist/notice-stack.d.ts +60 -0
  69. package/dist/notice-stack.js +16 -0
  70. package/dist/notice-stack.js.map +1 -0
  71. package/dist/record-list.cjs.map +1 -1
  72. package/dist/record-list.js +2 -2
  73. package/dist/settings.cjs +2 -2
  74. package/dist/settings.cjs.map +1 -1
  75. package/dist/settings.js +3 -3
  76. package/dist/swipe-deck.cjs +95 -25
  77. package/dist/swipe-deck.cjs.map +1 -1
  78. package/dist/swipe-deck.css +14 -0
  79. package/dist/swipe-deck.d.cts +20 -0
  80. package/dist/swipe-deck.d.ts +20 -0
  81. package/dist/swipe-deck.js +87 -25
  82. package/dist/swipe-deck.js.map +1 -1
  83. package/dist/writing-field.cjs +2 -2
  84. package/dist/writing-field.cjs.map +1 -1
  85. package/dist/writing-field.js +2 -2
  86. package/package.json +12 -18
  87. package/dist/chunk-BC7LMEOD.js.map +0 -1
  88. package/dist/chunk-KYH42WEX.js.map +0 -1
  89. package/dist/chunk-XTP6HOB6.js.map +0 -1
  90. /package/dist/{chunk-CEA6X445.js.map → chunk-CFUXEGW2.js.map} +0 -0
  91. /package/dist/{chunk-54UK6P7E.js.map → chunk-FLWSEDUW.js.map} +0 -0
  92. /package/dist/{chunk-6QKT52FR.js.map → chunk-MTE6N7XU.js.map} +0 -0
  93. /package/dist/{chunk-S6F34AX5.js.map → chunk-QA7EHFRX.js.map} +0 -0
  94. /package/dist/{chunk-CJBSBKG5.js.map → chunk-SOCNWQMX.js.map} +0 -0
  95. /package/dist/{chunk-GLLPO66A.js.map → chunk-U46XUQI7.js.map} +0 -0
  96. /package/dist/{chunk-TWRC7NP4.js.map → chunk-WUD23YTG.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  DataRowWindow
4
- } from "../chunk-CEA6X445.js";
4
+ } from "../chunk-CFUXEGW2.js";
5
5
  import "../chunk-YC5GAO35.js";
6
6
  import "../chunk-VLLUUOYJ.js";
7
7
  import "../chunk-TH6DDCWF.js";
@@ -10,7 +10,7 @@ import "../chunk-IMQ3RX35.js";
10
10
  import "../chunk-U24MOJWK.js";
11
11
  import "../chunk-NDTDBBMM.js";
12
12
  import "../chunk-LEPD6TV7.js";
13
- import "../chunk-TWRC7NP4.js";
13
+ import "../chunk-WUD23YTG.js";
14
14
  import "../chunk-UEQK6PFD.js";
15
15
  import "../chunk-PTYKILZE.js";
16
16
  import "../chunk-FRJ4PPA2.js";
@@ -18,14 +18,14 @@ import "../chunk-KPZX2M2C.js";
18
18
  import "../chunk-GLZJ7WZK.js";
19
19
  import "../chunk-B3LDW3IQ.js";
20
20
  import "../chunk-FXT7PZAF.js";
21
- import "../chunk-6QKT52FR.js";
21
+ import "../chunk-MTE6N7XU.js";
22
22
  import "../chunk-WFBPCMPF.js";
23
23
  import "../chunk-KGW373MK.js";
24
24
  import "../chunk-7ZCD4AZS.js";
25
25
  import "../chunk-OPF265PU.js";
26
26
  import "../chunk-QFP4BUKZ.js";
27
- import "../chunk-GLLPO66A.js";
28
- import "../chunk-XTP6HOB6.js";
27
+ import "../chunk-U46XUQI7.js";
28
+ import "../chunk-6XNYYROM.js";
29
29
  import "../chunk-BD77DHUO.js";
30
30
  import "../chunk-BKCJUFD3.js";
31
31
  import "../chunk-PIQJULQB.js";
@@ -16410,6 +16410,9 @@ function canRedo(stack) {
16410
16410
  }
16411
16411
 
16412
16412
  // src/data-table/useSpreadsheetGrid.ts
16413
+ function cellCount(n) {
16414
+ return `${n} ${n === 1 ? "cell" : "cells"}`;
16415
+ }
16413
16416
  function targetsAnEditor(target) {
16414
16417
  const element = target instanceof Element ? target : null;
16415
16418
  if (!element) return false;
@@ -16604,7 +16607,7 @@ function useSpreadsheetGrid(options) {
16604
16607
  await applyPatches(screened.accepted, "clear", "Cleared");
16605
16608
  announceSkips(
16606
16609
  [...skipped, ...screened.refusals],
16607
- `Cleared ${screened.accepted.length} cells.`
16610
+ `Cleared ${cellCount(screened.accepted.length)}.`
16608
16611
  );
16609
16612
  }, [bounds, applyPatches, announceSkips, screenPatches, refuseWrite]);
16610
16613
  const doUndo = (0, import_react31.useCallback)(async () => {
@@ -16971,7 +16974,7 @@ function useSpreadsheetGrid(options) {
16971
16974
  void applyPatches(screened.accepted, "paste", "Pasted");
16972
16975
  const outside = pastRightEdge + overflow.reduce((n, row) => n + Object.keys(row).length, 0);
16973
16976
  const tail = outside > 0 ? ` ${outside} landed past the edge of the table and were ignored.` : "";
16974
- announceSkips(refusals, `Pasted ${screened.accepted.length} cells.${tail}`);
16977
+ announceSkips(refusals, `Pasted ${cellCount(screened.accepted.length)}.${tail}`);
16975
16978
  },
16976
16979
  [range, bounds, rowIds, columnIds, applyPatches, announceSkips, screenPatches, refuseWrite]
16977
16980
  );
@@ -18491,12 +18494,12 @@ var import_react_slot4 = require("@radix-ui/react-slot");
18491
18494
  var React28 = __toESM(require("react"), 1);
18492
18495
  var import_jsx_runtime60 = require("react/jsx-runtime");
18493
18496
  var Tile = React28.forwardRef(
18494
- ({ layout = "row", variant = "outline", icon, title, wrapTitle, line, end, selected, selectedStyle, tooltip, level, fit, endInset, oneLine, dashed, hoverStyle, danger, dimmed, glyphTone, hero, tone, dense, asChild = false, className, children, onClick, type, ...props }, ref) => {
18497
+ ({ layout = "row", variant = "outline", icon, title, wrapTitle, line, end, selected, selectedStyle, tooltip, level, fit, endInset, oneLine, dashed, hoverStyle, danger, dimmed, glyphTone, hero, tone, iconTone, dense, asChild = false, className, children, onClick, type, ...props }, ref) => {
18495
18498
  const Component = asChild ? import_react_slot4.Slot : "button";
18496
18499
  const ariaDisabled = props["aria-disabled"];
18497
18500
  const inert = ariaDisabled === true || ariaDisabled === "true";
18498
18501
  const body = /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
18499
- icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "matrx-tile-icon", children: icon }) : null,
18502
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "matrx-tile-icon", "data-tone": iconTone && iconTone !== "neutral" ? iconTone : void 0, children: icon }) : null,
18500
18503
  /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "matrx-tile-text", children: [
18501
18504
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "matrx-tile-title", children: title }),
18502
18505
  line ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "matrx-tile-line", children: line }) : null
@@ -23392,10 +23395,10 @@ function MatrxDataTableCore(coreProps) {
23392
23395
  }
23393
23396
  case "selection": {
23394
23397
  const addresses = sheetRef.current.selectionAddresses();
23395
- const cellCount = addresses.rowIds.length * addresses.columnIds.length;
23396
- if (cellCount <= 1) return menuPayloadFor({ ...target, level: "cell" });
23398
+ const cellCount2 = addresses.rowIds.length * addresses.columnIds.length;
23399
+ if (cellCount2 <= 1) return menuPayloadFor({ ...target, level: "cell" });
23397
23400
  return {
23398
- payload: { level: "selection", ...addresses, tsv: sheetRef.current.selectionTsv(), cellCount }
23401
+ payload: { level: "selection", ...addresses, tsv: sheetRef.current.selectionTsv(), cellCount: cellCount2 }
23399
23402
  };
23400
23403
  }
23401
23404
  case "table":
@@ -26030,14 +26033,14 @@ function MatrxDataTableCore(coreProps) {
26030
26033
  "div",
26031
26034
  {
26032
26035
  "data-matrx-table-bulk-bar": true,
26033
- className: "mt-2 flex shrink-0 flex-wrap items-center gap-2 rounded-md border border-primary/30 bg-primary/5 px-2 py-1.5",
26036
+ className: "mt-2 flex shrink-0 flex-nowrap items-center gap-2 rounded-md border border-primary/30 bg-primary/5 px-2 py-1.5",
26034
26037
  children: [
26035
26038
  /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
26036
26039
  "span",
26037
26040
  {
26038
26041
  "data-matrx-table-selection-count": true,
26039
26042
  "data-matrx-table-selection-all-matching": allMatching ? "" : void 0,
26040
- className: "text-xs font-medium text-foreground",
26043
+ className: "shrink-0 whitespace-nowrap text-xs font-medium text-foreground",
26041
26044
  children: [
26042
26045
  allMatching ? "All " : "",
26043
26046
  (0, import_format14.formatCount)(selectionCount),
@@ -26072,40 +26075,47 @@ function MatrxDataTableCore(coreProps) {
26072
26075
  children: "Clear"
26073
26076
  }
26074
26077
  ),
26075
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-1 flex-wrap items-center justify-end gap-0", children: [
26076
- effectiveCopy ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
26077
- CopyButtons,
26078
- {
26079
- size: "icon",
26080
- "data-matrx-table-icon-action": true,
26081
- sourceId: `${tableCopySourceNamespace}:selection`,
26082
- disabled: selectedCopyRows.length === 0,
26083
- ...effectiveCopy.references ? { references: effectiveCopy.references(selectedCopyRows, selectedCopyRows) } : {},
26084
- ...effectiveCopy.triggerVariant ? { triggerVariant: effectiveCopy.triggerVariant } : {},
26085
- label: selectedCopyRows.length === selectedIdSet.size ? `${selectedCopyRows.length} selected ${selectionNoun}${selectedCopyRows.length === 1 ? "" : "s"}` : `${selectedCopyRows.length} of ${selectedIdSet.size} selected ${selectionNoun}${selectedIdSet.size === 1 ? "" : "s"} available to copy`,
26086
- ...copy === void 0 ? {} : {
26087
- human: () => buildViewHuman(effectiveCopy, selectedCopyRows, effectiveCopyColumns),
26088
- json: () => selectedCopyRows.map((row) => effectiveCopy.agentRow ? effectiveCopy.agentRow(row) : row)
26089
- },
26090
- agent: () => copy === void 0 ? buildDefaultTableViewAgentInput(effectiveCopy, selectedCopyRows, selectedCopyRows, declaredVisibleCopyColumns, { scope: "selected" }) : buildViewAgentInput(effectiveCopy, selectedCopyRows, selectedCopyRows, { scope: "selected" }),
26091
- aiVariants: copySubsetVariantFor(
26092
- () => selectedCopyRows,
26093
- "selected"
26094
- ),
26095
- export: {
26096
- items: [],
26097
- sheetRows: () => selectedCopyRows.map(
26098
- (row) => projectDefaultTableCopyRow(row, declaredVisibleCopyColumns)
26099
- ),
26100
- sheetColumns: () => declaredVisibleCopyColumns.map((column) => ({
26101
- id: columnId(column),
26102
- label: column.label ?? (typeof column.header === "string" ? column.header : columnId(column))
26103
- }))
26104
- }
26105
- }
26106
- ) : null,
26107
- selection.actions?.(selectedRows, [...selectedIdSet], selectionScope)
26108
- ] })
26078
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
26079
+ "div",
26080
+ {
26081
+ "data-matrx-table-bulk-actions": true,
26082
+ className: "flex min-w-0 flex-1 flex-nowrap items-center justify-start gap-0 overflow-x-auto sm:justify-end [&>*]:shrink-0",
26083
+ children: [
26084
+ effectiveCopy ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
26085
+ CopyButtons,
26086
+ {
26087
+ size: "icon",
26088
+ "data-matrx-table-icon-action": true,
26089
+ sourceId: `${tableCopySourceNamespace}:selection`,
26090
+ disabled: selectedCopyRows.length === 0,
26091
+ ...effectiveCopy.references ? { references: effectiveCopy.references(selectedCopyRows, selectedCopyRows) } : {},
26092
+ ...effectiveCopy.triggerVariant ? { triggerVariant: effectiveCopy.triggerVariant } : {},
26093
+ label: selectedCopyRows.length === selectedIdSet.size ? `${selectedCopyRows.length} selected ${selectionNoun}${selectedCopyRows.length === 1 ? "" : "s"}` : `${selectedCopyRows.length} of ${selectedIdSet.size} selected ${selectionNoun}${selectedIdSet.size === 1 ? "" : "s"} available to copy`,
26094
+ ...copy === void 0 ? {} : {
26095
+ human: () => buildViewHuman(effectiveCopy, selectedCopyRows, effectiveCopyColumns),
26096
+ json: () => selectedCopyRows.map((row) => effectiveCopy.agentRow ? effectiveCopy.agentRow(row) : row)
26097
+ },
26098
+ agent: () => copy === void 0 ? buildDefaultTableViewAgentInput(effectiveCopy, selectedCopyRows, selectedCopyRows, declaredVisibleCopyColumns, { scope: "selected" }) : buildViewAgentInput(effectiveCopy, selectedCopyRows, selectedCopyRows, { scope: "selected" }),
26099
+ aiVariants: copySubsetVariantFor(
26100
+ () => selectedCopyRows,
26101
+ "selected"
26102
+ ),
26103
+ export: {
26104
+ items: [],
26105
+ sheetRows: () => selectedCopyRows.map(
26106
+ (row) => projectDefaultTableCopyRow(row, declaredVisibleCopyColumns)
26107
+ ),
26108
+ sheetColumns: () => declaredVisibleCopyColumns.map((column) => ({
26109
+ id: columnId(column),
26110
+ label: column.label ?? (typeof column.header === "string" ? column.header : columnId(column))
26111
+ }))
26112
+ }
26113
+ }
26114
+ ) : null,
26115
+ selection.actions?.(selectedRows, [...selectedIdSet], selectionScope)
26116
+ ]
26117
+ }
26118
+ )
26109
26119
  ]
26110
26120
  }
26111
26121
  ) : null