@ai-matrx/records-ui 0.93.83 → 0.93.84

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.93.84
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records-ui/v0.93.83..npm/records-ui/v0.93.84 -- apps/shared/records-ui`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.93.83
4
10
 
5
11
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/index.cjs CHANGED
@@ -1600,111 +1600,114 @@ function RelationPicker({ field: field2, value, onChange, disabled, id, classNam
1600
1600
  if (q === "") return true;
1601
1601
  return `${titleOf(row.id)} ${apart.get(row.id) ?? ""}`.toLowerCase().includes(q);
1602
1602
  });
1603
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_design_system4.cn)("flex flex-wrap items-center gap-1", className), children: [
1604
- picked.map((recordId) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1605
- RecordChip,
1606
- {
1607
- title: titleOf(recordId),
1608
- ...disabled ? {} : { onRemove: () => toggle(recordId) }
1609
- },
1610
- recordId
1611
- )),
1612
- disabled ? null : (
1613
- // THE ONE "PICK OR ADD" BUILDER (PickOrAdd.tsx) — the choice editor draws the same one.
1614
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1615
- PickOrAdd,
1603
+ return (
1604
+ // Never wider than where it is drawn (a grid cell beside a sticky column: B3-07) — chips truncate, the button wraps.
1605
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_design_system4.cn)("flex min-w-0 max-w-full flex-wrap items-center gap-1", className), children: [
1606
+ picked.map((recordId) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1607
+ RecordChip,
1616
1608
  {
1617
- triggerId: id,
1618
- triggerLabel: `Pick for ${fieldName(field2)}`,
1619
- triggerText: picked.length === 0 ? "Pick" : "Change",
1620
- open,
1621
- onOpenChange: setOpen,
1622
- search,
1623
- onSearch: setSearch,
1624
- items: visible.map((row) => ({
1625
- id: row.id,
1626
- label: titleOf(row.id),
1627
- detail: apart.get(row.id) ?? null,
1628
- picked: picked.includes(row.id),
1629
- title: apart.has(row.id) ? `${titleOf(row.id)} \u2014 ${apart.get(row.id)}` : titleOf(row.id),
1630
- attrs: { "data-relation-candidate": row.id }
1631
- })),
1632
- onPick: toggle,
1633
- notice: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
1634
- refusal2 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RefusalLine, { error: refusal2, className: "p-2" }) : null,
1635
- !rows && !refusal2 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "p-2 text-xs text-muted-foreground", children: "Reading\u2026" }) : null,
1636
- full ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "p-2 text-xs text-muted-foreground", children: [
1637
- fieldName(field2),
1638
- " can point at ",
1639
- field2.relation_max,
1640
- " at most. Remove one to add another."
1641
- ] }) : null
1642
- ] }),
1643
- empty: rows ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "p-2 text-xs text-muted-foreground", children: "Nothing in that table matches." }) : null,
1644
- add: allowCreate && !full && !targetRefusal && target && !creating ? {
1645
- label: search.trim() !== "" ? `Create \u201C${search.trim()}\u201D` : `New ${targetWord}`,
1646
- disabled: busy,
1647
- // TYPED SOMETHING THAT IS NOT THERE? That IS the name. The champions
1648
- // (Airtable, Notion) make the search text the new record's title in one
1649
- // press; an empty box asks for one.
1650
- onAdd: () => {
1651
- if (search.trim() !== "") void create(search);
1652
- else {
1653
- setNewTitle("");
1654
- setCreating(true);
1609
+ title: titleOf(recordId),
1610
+ ...disabled ? {} : { onRemove: () => toggle(recordId) }
1611
+ },
1612
+ recordId
1613
+ )),
1614
+ disabled ? null : (
1615
+ // THE ONE "PICK OR ADD" BUILDER (PickOrAdd.tsx) — the choice editor draws the same one.
1616
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1617
+ PickOrAdd,
1618
+ {
1619
+ triggerId: id,
1620
+ triggerLabel: `Pick for ${fieldName(field2)}`,
1621
+ triggerText: picked.length === 0 ? "Pick" : "Change",
1622
+ open,
1623
+ onOpenChange: setOpen,
1624
+ search,
1625
+ onSearch: setSearch,
1626
+ items: visible.map((row) => ({
1627
+ id: row.id,
1628
+ label: titleOf(row.id),
1629
+ detail: apart.get(row.id) ?? null,
1630
+ picked: picked.includes(row.id),
1631
+ title: apart.has(row.id) ? `${titleOf(row.id)} \u2014 ${apart.get(row.id)}` : titleOf(row.id),
1632
+ attrs: { "data-relation-candidate": row.id }
1633
+ })),
1634
+ onPick: toggle,
1635
+ notice: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
1636
+ refusal2 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RefusalLine, { error: refusal2, className: "p-2" }) : null,
1637
+ !rows && !refusal2 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "p-2 text-xs text-muted-foreground", children: "Reading\u2026" }) : null,
1638
+ full ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "p-2 text-xs text-muted-foreground", children: [
1639
+ fieldName(field2),
1640
+ " can point at ",
1641
+ field2.relation_max,
1642
+ " at most. Remove one to add another."
1643
+ ] }) : null
1644
+ ] }),
1645
+ empty: rows ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "p-2 text-xs text-muted-foreground", children: "Nothing in that table matches." }) : null,
1646
+ add: allowCreate && !full && !targetRefusal && target && !creating ? {
1647
+ label: search.trim() !== "" ? `Create \u201C${search.trim()}\u201D` : `New ${targetWord}`,
1648
+ disabled: busy,
1649
+ // TYPED SOMETHING THAT IS NOT THERE? That IS the name. The champions
1650
+ // (Airtable, Notion) make the search text the new record's title in one
1651
+ // press; an empty box asks for one.
1652
+ onAdd: () => {
1653
+ if (search.trim() !== "") void create(search);
1654
+ else {
1655
+ setNewTitle("");
1656
+ setCreating(true);
1657
+ }
1655
1658
  }
1656
- }
1657
- } : null,
1658
- foot: !allowCreate || full ? void 0 : targetRefusal ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RefusalLine, { error: targetRefusal, className: "p-2" }) : !target ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "p-2 text-xs text-muted-foreground", children: "Reading that table\u2026" }) : creating ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1 p-1", children: [
1659
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1660
- import_design_system4.BasicInput,
1661
- {
1662
- autoFocus: true,
1663
- value: newTitle,
1664
- onChange: (e) => setNewTitle(e.target.value),
1665
- onKeyDown: (e) => {
1666
- if (e.key === "Enter") {
1667
- e.preventDefault();
1668
- void create(newTitle);
1659
+ } : null,
1660
+ foot: !allowCreate || full ? void 0 : targetRefusal ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RefusalLine, { error: targetRefusal, className: "p-2" }) : !target ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "p-2 text-xs text-muted-foreground", children: "Reading that table\u2026" }) : creating ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1 p-1", children: [
1661
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1662
+ import_design_system4.BasicInput,
1663
+ {
1664
+ autoFocus: true,
1665
+ value: newTitle,
1666
+ onChange: (e) => setNewTitle(e.target.value),
1667
+ onKeyDown: (e) => {
1668
+ if (e.key === "Enter") {
1669
+ e.preventDefault();
1670
+ void create(newTitle);
1671
+ }
1672
+ },
1673
+ placeholder: `New ${targetWord}`,
1674
+ className: "h-7 flex-1 text-xs",
1675
+ "aria-label": `Name the new ${targetWord}`
1676
+ }
1677
+ ),
1678
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1679
+ import_design_system4.Button,
1680
+ {
1681
+ type: "button",
1682
+ size: "sm",
1683
+ variant: "default",
1684
+ disabled: busy || newTitle.trim() === "",
1685
+ onClick: () => void create(newTitle),
1686
+ children: busy ? "Creating\u2026" : "Create"
1687
+ }
1688
+ )
1689
+ ] }) : void 0,
1690
+ footNote: allowCreate && !full && createRefusal ? (
1691
+ // The typed title is still in the search box: the notice owns the
1692
+ // two doors out (lane REFUSAL-SWEEP).
1693
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1694
+ RefusalNotice,
1695
+ {
1696
+ error: createRefusal,
1697
+ className: "mt-1 max-w-72",
1698
+ onKeepEditing: () => setCreateRefusal(null),
1699
+ onDiscard: () => {
1700
+ setCreateRefusal(null);
1701
+ setSearch("");
1669
1702
  }
1670
- },
1671
- placeholder: `New ${targetWord}`,
1672
- className: "h-7 flex-1 text-xs",
1673
- "aria-label": `Name the new ${targetWord}`
1674
- }
1675
- ),
1676
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1677
- import_design_system4.Button,
1678
- {
1679
- type: "button",
1680
- size: "sm",
1681
- variant: "default",
1682
- disabled: busy || newTitle.trim() === "",
1683
- onClick: () => void create(newTitle),
1684
- children: busy ? "Creating\u2026" : "Create"
1685
- }
1686
- )
1687
- ] }) : void 0,
1688
- footNote: allowCreate && !full && createRefusal ? (
1689
- // The typed title is still in the search box: the notice owns the
1690
- // two doors out (lane REFUSAL-SWEEP).
1691
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1692
- RefusalNotice,
1693
- {
1694
- error: createRefusal,
1695
- className: "mt-1 max-w-72",
1696
- onKeepEditing: () => setCreateRefusal(null),
1697
- onDiscard: () => {
1698
- setCreateRefusal(null);
1699
- setSearch("");
1700
1703
  }
1701
- }
1702
- )
1703
- ) : null
1704
- }
1704
+ )
1705
+ ) : null
1706
+ }
1707
+ )
1705
1708
  )
1706
- )
1707
- ] });
1709
+ ] })
1710
+ );
1708
1711
  }
1709
1712
 
1710
1713
  // src/gridAttachments.tsx
@@ -5591,9 +5594,10 @@ function OpenCell({
5591
5594
  {
5592
5595
  ref: host,
5593
5596
  "data-matrx-cell-control": "",
5597
+ "data-matrx-cell-fill": "",
5594
5598
  "data-matrx-cell-editor": "",
5595
5599
  tabIndex: -1,
5596
- className: "relative z-[25] flex w-full min-w-[10rem] flex-col gap-1 outline-none",
5600
+ className: "relative z-[25] flex w-full min-w-0 max-w-full flex-col gap-1 outline-none",
5597
5601
  onDoubleClick: (event) => event.stopPropagation(),
5598
5602
  onKeyDown: (event) => {
5599
5603
  if (event.target?.closest?.("[data-refusal-notice], [data-records-choice-ask]")) return;