@ai-matrx/design-system 0.39.4 → 0.40.0

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 (41) hide show
  1. package/CHANGELOG.md +24 -5
  2. package/dist/content-transfer.cjs +2 -1
  3. package/dist/content-transfer.cjs.map +1 -1
  4. package/dist/content-transfer.js +2 -1
  5. package/dist/content-transfer.js.map +1 -1
  6. package/dist/data-table/copy-helpers.d.cts +1 -1
  7. package/dist/data-table/copy-helpers.d.ts +1 -1
  8. package/dist/data-table/data-row-inspector.cjs +2 -1
  9. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  10. package/dist/data-table/data-row-inspector.js +2 -1
  11. package/dist/data-table/data-row-inspector.js.map +1 -1
  12. package/dist/data-table/data-row-window.cjs +2 -1
  13. package/dist/data-table/data-row-window.cjs.map +1 -1
  14. package/dist/data-table/data-row-window.js +2 -1
  15. package/dist/data-table/data-row-window.js.map +1 -1
  16. package/dist/data-table/filter-engine.d.cts +1 -1
  17. package/dist/data-table/filter-engine.d.ts +1 -1
  18. package/dist/data-table/host.d.cts +1 -1
  19. package/dist/data-table/host.d.ts +1 -1
  20. package/dist/data-table/index.cjs +41 -8
  21. package/dist/data-table/index.cjs.map +1 -1
  22. package/dist/data-table/index.d.cts +8 -3
  23. package/dist/data-table/index.d.ts +8 -3
  24. package/dist/data-table/index.js +41 -8
  25. package/dist/data-table/index.js.map +1 -1
  26. package/dist/data-table/infer-filter.d.cts +1 -1
  27. package/dist/data-table/infer-filter.d.ts +1 -1
  28. package/dist/data-table/layered-filters.d.cts +1 -1
  29. package/dist/data-table/layered-filters.d.ts +1 -1
  30. package/dist/data-table/query-control.d.cts +1 -1
  31. package/dist/data-table/query-control.d.ts +1 -1
  32. package/dist/data-table/types.cjs.map +1 -1
  33. package/dist/data-table/types.d.cts +1 -1
  34. package/dist/data-table/types.d.ts +1 -1
  35. package/dist/data-table/url-state.d.cts +1 -1
  36. package/dist/data-table/url-state.d.ts +1 -1
  37. package/dist/data-table/xlsx.d.cts +1 -1
  38. package/dist/data-table/xlsx.d.ts +1 -1
  39. package/dist/{types-p13OrDj-.d.ts → types-Z32pxexx.d.ts} +9 -0
  40. package/dist/{types-D7O3uOIs.d.cts → types-oVyZbfwn.d.cts} +9 -0
  41. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-D7O3uOIs.cjs';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-oVyZbfwn.cjs';
2
2
  import '../content-transfer.cjs';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-p13OrDj-.js';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-Z32pxexx.js';
2
2
  import '../content-transfer.js';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.cjs';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-D7O3uOIs.cjs';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-oVyZbfwn.cjs';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.cjs';
7
7
  import '../content-transfer.cjs';
8
8
  import '@ai-matrx/kit/content-transfer';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.js';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-p13OrDj-.js';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-Z32pxexx.js';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.js';
7
7
  import '../content-transfer.js';
8
8
  import '@ai-matrx/kit/content-transfer';
@@ -152,6 +152,7 @@ module.exports = __toCommonJS(data_table_exports);
152
152
 
153
153
  // src/data-table/MatrxDataTable.tsx
154
154
  var import_react21 = require("react");
155
+ var import_react_dom2 = require("react-dom");
155
156
  var import_core3 = require("@dnd-kit/core");
156
157
 
157
158
  // src/data-table/icons.tsx
@@ -1069,6 +1070,7 @@ function TableTitleRow({
1069
1070
  tabs,
1070
1071
  actions,
1071
1072
  children,
1073
+ singleRow = false,
1072
1074
  className
1073
1075
  }) {
1074
1076
  const Heading = headingLevel === 1 ? "h1" : "h2";
@@ -1077,7 +1079,8 @@ function TableTitleRow({
1077
1079
  {
1078
1080
  "data-matrx-table-toolbar": true,
1079
1081
  className: cn(
1080
- "relative flex min-w-0 shrink-0 flex-wrap items-center gap-2",
1082
+ "relative flex min-w-0 shrink-0 items-center gap-2",
1083
+ singleRow ? "flex-nowrap overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : "flex-wrap",
1081
1084
  className
1082
1085
  ),
1083
1086
  children: [
@@ -1096,7 +1099,7 @@ function TableTitleRow({
1096
1099
  "div",
1097
1100
  {
1098
1101
  "data-matrx-table-title-search": true,
1099
- className: "order-last w-full min-w-0 sm:order-none sm:w-64 sm:shrink-0 sm:max-w-md",
1102
+ className: singleRow ? "w-44 min-w-[9rem] shrink-0 sm:w-64 sm:max-w-md" : "order-last w-full min-w-0 sm:order-none sm:w-64 sm:shrink-0 sm:max-w-md",
1100
1103
  children: search
1101
1104
  }
1102
1105
  ) : null,
@@ -1106,7 +1109,7 @@ function TableTitleRow({
1106
1109
  "div",
1107
1110
  {
1108
1111
  "data-matrx-table-actions": true,
1109
- className: "ml-auto flex min-w-0 flex-wrap items-center gap-0",
1112
+ className: cn("ml-auto flex min-w-0 items-center gap-0", singleRow ? "shrink-0 flex-nowrap" : "flex-wrap"),
1110
1113
  children: actions
1111
1114
  }
1112
1115
  ) : null
@@ -4372,7 +4375,8 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, scopeLabels,
4372
4375
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("summary", { children: [
4373
4376
  "Use prepared content \xB7 ",
4374
4377
  eligibleActions.length,
4375
- " destinations"
4378
+ " ",
4379
+ eligibleActions.length === 1 ? "destination" : "destinations"
4376
4380
  ] }),
4377
4381
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "matrx-alchemy-destination-grid", children: eligibleActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { type: "button", className: "matrx-alchemy-palette-row", disabled: busy !== null || Boolean(bufferError || formatError) || !preparedArtifact, onClick: () => void deliverAction(action), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DestinationPresentation, { action }) }, action.id)) })
4378
4382
  ] }) : null,
@@ -13494,6 +13498,11 @@ function MatrxDataTableCore({
13494
13498
  const rowCopyInMenu = rowCopyPlacement === "menu" && Boolean(rowActions);
13495
13499
  const showInlineRowCopy = showRowCopy && !rowCopyInMenu;
13496
13500
  const showToolbarCopy = effectiveCopy !== void 0 && effectiveCopy.showToolbar !== false;
13501
+ const placeToolbar = (node) => {
13502
+ if (!toolbar || !("portalInto" in toolbar)) return node;
13503
+ const target = toolbar.portalInto;
13504
+ return target ? (0, import_react_dom2.createPortal)(node, target) : null;
13505
+ };
13497
13506
  const renderRowActions = (row, controls) => {
13498
13507
  const actions = rowActions?.(row, controls);
13499
13508
  const scopedActions = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MatrxTableRowControlsScope, { value: controls, children: actions });
@@ -14321,9 +14330,10 @@ function MatrxDataTableCore({
14321
14330
  notice,
14322
14331
  savedViewError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: savedViewError }) : null,
14323
14332
  toolbarActionError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "alert", className: "shrink-0 text-xs text-destructive", children: toolbarActionError }) : null,
14324
- !hideToolbar && (viewTabs || toolbar?.title || toolbar?.titleCount || showSearch || toolbar?.customSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14333
+ placeToolbar(!hideToolbar && (viewTabs || toolbar?.title || toolbar?.titleCount || showSearch || toolbar?.customSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14325
14334
  TableTitleRow,
14326
14335
  {
14336
+ ...toolbar?.singleRow ? { singleRow: true } : {},
14327
14337
  tabs: viewTabs ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableViewWorkspace, { snapshot: currentViewSnapshot, onApply: applySavedView, related: relatedTableActions }, tableId ?? "table") : void 0,
14328
14338
  ...toolbar?.title === void 0 ? {} : { title: toolbar.title },
14329
14339
  ...toolbar?.titleCount === void 0 ? {} : { count: toolbar.titleCount },
@@ -14458,8 +14468,31 @@ function MatrxDataTableCore({
14458
14468
  "div",
14459
14469
  {
14460
14470
  "data-matrx-table-actions": true,
14461
- className: "ml-auto flex min-w-0 flex-wrap items-center gap-0",
14471
+ className: cn(
14472
+ "ml-auto flex min-w-0 items-center gap-0",
14473
+ toolbar?.singleRow ? "shrink-0 flex-nowrap" : "flex-wrap"
14474
+ ),
14462
14475
  children: [
14476
+ toolbar?.singleRow && coverageResult && coverageResult.notice ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
14477
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14478
+ "span",
14479
+ {
14480
+ "data-matrx-table-coverage": true,
14481
+ "data-matrx-table-coverage-scope": coverageResult.scope,
14482
+ role: "status",
14483
+ tabIndex: 0,
14484
+ className: "mr-1 inline-flex shrink-0 items-center whitespace-nowrap rounded-md border border-amber-300/70 bg-amber-50 px-2 py-0.5 text-[11px] font-semibold text-amber-900 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-200",
14485
+ children: [
14486
+ coverageResult.badge,
14487
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "sr-only", children: [
14488
+ ": ",
14489
+ coverageResult.notice
14490
+ ] })
14491
+ ]
14492
+ }
14493
+ ) }),
14494
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContent, { className: "max-w-xs", children: coverageResult.notice })
14495
+ ] }) : null,
14463
14496
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
14464
14497
  TableToolbarAction,
14465
14498
  {
@@ -14602,9 +14635,9 @@ function MatrxDataTableCore({
14602
14635
  )
14603
14636
  ]
14604
14637
  }
14605
- ),
14638
+ )),
14606
14639
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { "data-matrx-table-body-region": true, className: "flex min-h-0 flex-1 flex-col gap-2", children: [
14607
- coverageResult && coverageResult.notice ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14640
+ coverageResult && coverageResult.notice && !toolbar?.singleRow ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
14608
14641
  "div",
14609
14642
  {
14610
14643
  "data-matrx-table-coverage": true,