@ai-matrx/associations 0.13.13 → 0.13.15
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 +15 -0
- package/dist/react/index.cjs +23 -29
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +25 -30
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/associations
|
|
2
2
|
|
|
3
|
+
## 0.13.15
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/associations/v0.13.13..npm/associations/v0.13.15 -- apps/shared/associations`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.13.14
|
|
10
|
+
### Unreleased
|
|
11
|
+
### page-pass shared fix (2026-09-27): the tile speaks the section-card language
|
|
12
|
+
|
|
13
|
+
### also: `CategoryTagPicker`'s trigger draws design-system `SelectChevron` (it drew an up-down pair). Needs design-system with `SelectChevron`.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
- **`AssociationCard` is one header line**: a small icon, the UPPERCASE name, its count, and the platform's round ghost "+" (`TapTargetButton`), in one thin-bordered card — the record page's `SectionCard` language. No boxed icon, no square outlined "+", no second line saying "0 attached" (the full phrase is the drill-in button's accessible name). The grid's group names are quiet uppercase eyebrows, not a second heading level. Proof: `react/__tests__/tile-speaks-the-section-card-language.test.tsx`, red on the previous tile.
|
|
17
|
+
|
|
3
18
|
## 0.13.13
|
|
4
19
|
|
|
5
20
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/react/index.cjs
CHANGED
|
@@ -2610,12 +2610,6 @@ function ExternalLinkIcon(props) {
|
|
|
2610
2610
|
function ChevronDownIcon(props) {
|
|
2611
2611
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...base(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m6 9 6 6 6-6" }) });
|
|
2612
2612
|
}
|
|
2613
|
-
function ChevronsUpDownIcon(props) {
|
|
2614
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...base(props), children: [
|
|
2615
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m7 15 5 5 5-5" }),
|
|
2616
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m7 9 5-5 5 5" })
|
|
2617
|
-
] });
|
|
2618
|
-
}
|
|
2619
2613
|
function CornerDownRightIcon(props) {
|
|
2620
2614
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...base(props), children: [
|
|
2621
2615
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "15 10 20 15 15 20" }),
|
|
@@ -3843,6 +3837,7 @@ function AttachedItemsBody({
|
|
|
3843
3837
|
// src/react/components/AssociationCard.tsx
|
|
3844
3838
|
var import_react16 = require("react");
|
|
3845
3839
|
var import_design_system7 = require("@ai-matrx/design-system");
|
|
3840
|
+
var import_tap_target = require("@ai-matrx/design-system/tap-target");
|
|
3846
3841
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3847
3842
|
function AssociationCard({
|
|
3848
3843
|
token,
|
|
@@ -3878,12 +3873,14 @@ function AssociationCard({
|
|
|
3878
3873
|
const filing = container.direction === "outgoing";
|
|
3879
3874
|
const canAttach = info.canListCandidates && (!filing || isAssociationTargetType(token));
|
|
3880
3875
|
const canDrillIn = count > 0;
|
|
3876
|
+
const countWord = filing ? "filed under" : "attached";
|
|
3881
3877
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
3882
3878
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3883
3879
|
"div",
|
|
3884
3880
|
{
|
|
3881
|
+
"data-association-card": token,
|
|
3885
3882
|
className: (0, import_design_system7.cn)(
|
|
3886
|
-
"
|
|
3883
|
+
"flex min-h-8 items-center gap-x-1.5 rounded-md border border-border bg-card px-2.5 py-1 lg:pointer-fine:[--matrx-tap-target-size:1.75rem]",
|
|
3887
3884
|
className
|
|
3888
3885
|
),
|
|
3889
3886
|
children: [
|
|
@@ -3894,31 +3891,26 @@ function AssociationCard({
|
|
|
3894
3891
|
disabled: !canDrillIn,
|
|
3895
3892
|
onClick: () => setListOpen(true),
|
|
3896
3893
|
title: canDrillIn ? `View the ${info.labelPlural.toLowerCase()} attached to ${container.label ?? "this"}` : void 0,
|
|
3894
|
+
"aria-label": loading ? info.labelPlural : `${info.labelPlural}: ${count} ${countWord}`,
|
|
3897
3895
|
className: (0, import_design_system7.cn)(
|
|
3898
|
-
"flex min-w-0 flex-1 items-center gap-
|
|
3899
|
-
canDrillIn ? "cursor-pointer" : "cursor-default"
|
|
3896
|
+
"flex min-h-8 min-w-0 flex-1 items-center gap-x-1.5 text-left",
|
|
3897
|
+
canDrillIn ? "cursor-pointer hover:text-foreground" : "cursor-default"
|
|
3900
3898
|
),
|
|
3901
3899
|
children: [
|
|
3902
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3903
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.
|
|
3904
|
-
|
|
3905
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "block text-xs text-muted-foreground tabular-nums", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
|
|
3906
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SpinnerIcon, { className: "h-3 w-3 animate-spin" }),
|
|
3907
|
-
"Loading\u2026"
|
|
3908
|
-
] }) : `${count} ${container.direction === "outgoing" ? "filed under" : "attached"}` })
|
|
3909
|
-
] })
|
|
3900
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "min-w-0 truncate text-xs font-semibold uppercase tracking-wider text-foreground", children: info.labelPlural }),
|
|
3902
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SpinnerIcon, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
3910
3903
|
]
|
|
3911
3904
|
}
|
|
3912
3905
|
),
|
|
3913
3906
|
canAttach && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3914
|
-
|
|
3907
|
+
import_tap_target.TapTargetButton,
|
|
3915
3908
|
{
|
|
3916
|
-
|
|
3909
|
+
ariaLabel: `Attach ${info.labelPlural.toLowerCase()}`,
|
|
3910
|
+
tooltip: false,
|
|
3917
3911
|
onClick: () => setOpen(true),
|
|
3918
|
-
"
|
|
3919
|
-
|
|
3920
|
-
className: "mr-2 flex h-11 w-11 shrink-0 items-center justify-center rounded-md border border-border text-muted-foreground transition-colors hover:border-primary/60 hover:text-foreground lg:mr-3 lg:h-7 lg:w-7",
|
|
3921
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PlusIcon, { className: "h-4 w-4" })
|
|
3912
|
+
className: "ml-auto shrink-0",
|
|
3913
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PlusIcon, { className: "h-4 w-4" })
|
|
3922
3914
|
}
|
|
3923
3915
|
)
|
|
3924
3916
|
]
|
|
@@ -4012,6 +4004,8 @@ function getContentRoleMeta(role) {
|
|
|
4012
4004
|
|
|
4013
4005
|
// src/react/components/AssociationCardGrid.tsx
|
|
4014
4006
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4007
|
+
var GROUP_LABEL = "mb-1 text-xs font-medium uppercase tracking-wider text-muted-foreground";
|
|
4008
|
+
var TILE_ROW = "flex flex-wrap gap-2 [&>*]:min-w-[16rem] [&>*]:flex-1";
|
|
4015
4009
|
function AssociationCardGrid({
|
|
4016
4010
|
tokens,
|
|
4017
4011
|
excludeTokens,
|
|
@@ -4037,20 +4031,20 @@ function AssociationCardGrid({
|
|
|
4037
4031
|
const role = store.registry.getEntityInfo(token).contentRole;
|
|
4038
4032
|
return !role || !roleIds.has(role);
|
|
4039
4033
|
}) : [];
|
|
4040
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_design_system8.cn)("@container space-y-
|
|
4034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_design_system8.cn)("@container space-y-3", className), children: [
|
|
4041
4035
|
CONTENT_ROLES.map((role) => {
|
|
4042
4036
|
const inRole = list.filter(
|
|
4043
4037
|
(token) => store.registry.getEntityInfo(token).contentRole === role.id
|
|
4044
4038
|
);
|
|
4045
4039
|
if (inRole.length === 0) return null;
|
|
4046
4040
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { children: [
|
|
4047
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className:
|
|
4048
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className:
|
|
4041
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: GROUP_LABEL, children: role.title }),
|
|
4042
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: TILE_ROW, children: inRole.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
4049
4043
|
] }, role.id);
|
|
4050
4044
|
}),
|
|
4051
4045
|
roleless.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { children: [
|
|
4052
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className:
|
|
4053
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className:
|
|
4046
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: GROUP_LABEL, children: "Filed under" }),
|
|
4047
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: TILE_ROW, children: roleless.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
4054
4048
|
] })
|
|
4055
4049
|
] });
|
|
4056
4050
|
}
|
|
@@ -5563,7 +5557,7 @@ function CategoryTagPicker({
|
|
|
5563
5557
|
children: [
|
|
5564
5558
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { className: "h-3.5 w-3.5" }),
|
|
5565
5559
|
selected.length === 0 ? addLabel : "Edit",
|
|
5566
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5560
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_design_system13.SelectChevron, { size: "sm" })
|
|
5567
5561
|
]
|
|
5568
5562
|
}
|
|
5569
5563
|
) }),
|