@ai-matrx/associations 0.13.7 → 0.13.8
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 +10 -0
- package/dist/react/index.cjs +56 -90
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +56 -90
- package/dist/react/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/associations
|
|
2
2
|
|
|
3
|
+
## 0.13.8
|
|
4
|
+
### (2026-09-27 — the standard section look)
|
|
5
|
+
|
|
6
|
+
- **`AssociationCardGrid` draws the standard section look**: a heading and its cards — the colored role dot, the tagline under each heading ("Incoming sources of truth (Knowledge In).", "How work is organized."), each card's colored top bar and its tinted icon chip are gone; the icon sits on the neutral muted chip. Rows wrap by the card's own minimum width, so a lone card fills its row instead of sitting at half width. Seen on `/crm/<id>` (page-pass).
|
|
7
|
+
- Proof: `src/react/__tests__/outgoing-links.test.tsx` — "the standard section look".
|
|
8
|
+
|
|
9
|
+
### Consumer action
|
|
10
|
+
|
|
11
|
+
None.
|
|
12
|
+
|
|
3
13
|
## 0.13.7
|
|
4
14
|
|
|
5
15
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/react/index.cjs
CHANGED
|
@@ -3394,55 +3394,6 @@ function AttachedItemsBody({
|
|
|
3394
3394
|
// src/react/components/AssociationCard.tsx
|
|
3395
3395
|
var import_react16 = require("react");
|
|
3396
3396
|
var import_design_system7 = require("@ai-matrx/design-system");
|
|
3397
|
-
|
|
3398
|
-
// src/react/contentRoles.ts
|
|
3399
|
-
var CONTENT_ROLES = [
|
|
3400
|
-
{
|
|
3401
|
-
id: "utility",
|
|
3402
|
-
title: "Utilities",
|
|
3403
|
-
tagline: "The agents and tools that act on your knowledge.",
|
|
3404
|
-
accentText: "text-violet-600 dark:text-violet-400",
|
|
3405
|
-
accentBg: "bg-violet-500/10",
|
|
3406
|
-
accentBar: "bg-violet-500"
|
|
3407
|
-
},
|
|
3408
|
-
{
|
|
3409
|
-
id: "source",
|
|
3410
|
-
title: "Sources",
|
|
3411
|
-
tagline: "Incoming sources of truth (Knowledge In).",
|
|
3412
|
-
accentText: "text-sky-600 dark:text-sky-400",
|
|
3413
|
-
accentBg: "bg-sky-500/10",
|
|
3414
|
-
accentBar: "bg-sky-500"
|
|
3415
|
-
},
|
|
3416
|
-
{
|
|
3417
|
-
id: "destination",
|
|
3418
|
-
title: "Outputs",
|
|
3419
|
-
tagline: "Knowledge your team produces.",
|
|
3420
|
-
accentText: "text-emerald-600 dark:text-emerald-400",
|
|
3421
|
-
accentBg: "bg-emerald-500/10",
|
|
3422
|
-
accentBar: "bg-emerald-500"
|
|
3423
|
-
},
|
|
3424
|
-
{
|
|
3425
|
-
id: "hybrid",
|
|
3426
|
-
title: "Sources & Outputs",
|
|
3427
|
-
tagline: "Read from and written to.",
|
|
3428
|
-
accentText: "text-teal-600 dark:text-teal-400",
|
|
3429
|
-
accentBg: "bg-teal-500/10",
|
|
3430
|
-
accentBar: "bg-gradient-to-r from-sky-500 to-emerald-500"
|
|
3431
|
-
},
|
|
3432
|
-
{
|
|
3433
|
-
id: "container",
|
|
3434
|
-
title: "Workspaces",
|
|
3435
|
-
tagline: "How work is organized.",
|
|
3436
|
-
accentText: "text-amber-600 dark:text-amber-400",
|
|
3437
|
-
accentBg: "bg-amber-500/10",
|
|
3438
|
-
accentBar: "bg-amber-500"
|
|
3439
|
-
}
|
|
3440
|
-
];
|
|
3441
|
-
function getContentRoleMeta(role) {
|
|
3442
|
-
return CONTENT_ROLES.find((r) => r.id === role) ?? CONTENT_ROLES[2];
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
// src/react/components/AssociationCard.tsx
|
|
3446
3397
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3447
3398
|
function AssociationCard({
|
|
3448
3399
|
token,
|
|
@@ -3454,7 +3405,6 @@ function AssociationCard({
|
|
|
3454
3405
|
const container = containerProp ?? fromCtx;
|
|
3455
3406
|
const [open, setOpen] = (0, import_react16.useState)(false);
|
|
3456
3407
|
const info = store.registry.getEntityInfo(token);
|
|
3457
|
-
const role = getContentRoleMeta(info.contentRole);
|
|
3458
3408
|
const Icon = info.Icon ?? DefaultEntityIcon;
|
|
3459
3409
|
const [listOpen, setListOpen] = (0, import_react16.useState)(false);
|
|
3460
3410
|
const {
|
|
@@ -3488,15 +3438,6 @@ function AssociationCard({
|
|
|
3488
3438
|
className
|
|
3489
3439
|
),
|
|
3490
3440
|
children: [
|
|
3491
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3492
|
-
"span",
|
|
3493
|
-
{
|
|
3494
|
-
className: (0, import_design_system7.cn)(
|
|
3495
|
-
"absolute inset-x-0 top-0 h-0.5 opacity-60",
|
|
3496
|
-
role.accentBar
|
|
3497
|
-
)
|
|
3498
|
-
}
|
|
3499
|
-
),
|
|
3500
3441
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3501
3442
|
"button",
|
|
3502
3443
|
{
|
|
@@ -3509,17 +3450,7 @@ function AssociationCard({
|
|
|
3509
3450
|
canDrillIn ? "cursor-pointer" : "cursor-default"
|
|
3510
3451
|
),
|
|
3511
3452
|
children: [
|
|
3512
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3513
|
-
"span",
|
|
3514
|
-
{
|
|
3515
|
-
className: (0, import_design_system7.cn)(
|
|
3516
|
-
"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",
|
|
3517
|
-
role.accentBg,
|
|
3518
|
-
role.accentText
|
|
3519
|
-
),
|
|
3520
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: "h-4 w-4" })
|
|
3521
|
-
}
|
|
3522
|
-
),
|
|
3453
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: "h-4 w-4" }) }),
|
|
3523
3454
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
3524
3455
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "block truncate text-sm font-medium text-foreground", children: info.labelPlural }),
|
|
3525
3456
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "block text-[11px] text-muted-foreground tabular-nums", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
|
|
@@ -3559,8 +3490,8 @@ function AssociationCard({
|
|
|
3559
3490
|
setOpen(true);
|
|
3560
3491
|
}
|
|
3561
3492
|
} : {},
|
|
3562
|
-
onDetach: (resourceId,
|
|
3563
|
-
onSetPinned: (resourceId, pinned,
|
|
3493
|
+
onDetach: (resourceId, role) => detach(token, resourceId, role ?? void 0),
|
|
3494
|
+
onSetPinned: (resourceId, pinned, role) => setPinned(token, resourceId, pinned, role ?? void 0)
|
|
3564
3495
|
}
|
|
3565
3496
|
),
|
|
3566
3497
|
canAttach && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
@@ -3582,6 +3513,55 @@ function AssociationCard({
|
|
|
3582
3513
|
|
|
3583
3514
|
// src/react/components/AssociationCardGrid.tsx
|
|
3584
3515
|
var import_design_system8 = require("@ai-matrx/design-system");
|
|
3516
|
+
|
|
3517
|
+
// src/react/contentRoles.ts
|
|
3518
|
+
var CONTENT_ROLES = [
|
|
3519
|
+
{
|
|
3520
|
+
id: "utility",
|
|
3521
|
+
title: "Utilities",
|
|
3522
|
+
tagline: "The agents and tools that act on your knowledge.",
|
|
3523
|
+
accentText: "text-violet-600 dark:text-violet-400",
|
|
3524
|
+
accentBg: "bg-violet-500/10",
|
|
3525
|
+
accentBar: "bg-violet-500"
|
|
3526
|
+
},
|
|
3527
|
+
{
|
|
3528
|
+
id: "source",
|
|
3529
|
+
title: "Sources",
|
|
3530
|
+
tagline: "Incoming sources of truth (Knowledge In).",
|
|
3531
|
+
accentText: "text-sky-600 dark:text-sky-400",
|
|
3532
|
+
accentBg: "bg-sky-500/10",
|
|
3533
|
+
accentBar: "bg-sky-500"
|
|
3534
|
+
},
|
|
3535
|
+
{
|
|
3536
|
+
id: "destination",
|
|
3537
|
+
title: "Outputs",
|
|
3538
|
+
tagline: "Knowledge your team produces.",
|
|
3539
|
+
accentText: "text-emerald-600 dark:text-emerald-400",
|
|
3540
|
+
accentBg: "bg-emerald-500/10",
|
|
3541
|
+
accentBar: "bg-emerald-500"
|
|
3542
|
+
},
|
|
3543
|
+
{
|
|
3544
|
+
id: "hybrid",
|
|
3545
|
+
title: "Sources & Outputs",
|
|
3546
|
+
tagline: "Read from and written to.",
|
|
3547
|
+
accentText: "text-teal-600 dark:text-teal-400",
|
|
3548
|
+
accentBg: "bg-teal-500/10",
|
|
3549
|
+
accentBar: "bg-gradient-to-r from-sky-500 to-emerald-500"
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
id: "container",
|
|
3553
|
+
title: "Workspaces",
|
|
3554
|
+
tagline: "How work is organized.",
|
|
3555
|
+
accentText: "text-amber-600 dark:text-amber-400",
|
|
3556
|
+
accentBg: "bg-amber-500/10",
|
|
3557
|
+
accentBar: "bg-amber-500"
|
|
3558
|
+
}
|
|
3559
|
+
];
|
|
3560
|
+
function getContentRoleMeta(role) {
|
|
3561
|
+
return CONTENT_ROLES.find((r) => r.id === role) ?? CONTENT_ROLES[2];
|
|
3562
|
+
}
|
|
3563
|
+
|
|
3564
|
+
// src/react/components/AssociationCardGrid.tsx
|
|
3585
3565
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
3586
3566
|
function AssociationCardGrid({
|
|
3587
3567
|
tokens,
|
|
@@ -3615,27 +3595,13 @@ function AssociationCardGrid({
|
|
|
3615
3595
|
);
|
|
3616
3596
|
if (inRole.length === 0) return null;
|
|
3617
3597
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { children: [
|
|
3618
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.
|
|
3619
|
-
|
|
3620
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3621
|
-
"span",
|
|
3622
|
-
{
|
|
3623
|
-
className: (0, import_design_system8.cn)("h-2.5 w-2.5 rounded-full", role.accentBar)
|
|
3624
|
-
}
|
|
3625
|
-
),
|
|
3626
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "text-sm font-semibold text-foreground", children: role.title })
|
|
3627
|
-
] }),
|
|
3628
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "hidden text-xs text-muted-foreground sm:block", children: role.tagline })
|
|
3629
|
-
] }),
|
|
3630
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "grid grid-cols-1 gap-2 @md:grid-cols-2 @3xl:grid-cols-3", children: inRole.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
3598
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "mb-2 text-sm font-semibold text-foreground", children: role.title }),
|
|
3599
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-wrap gap-2 [&>*]:min-w-[16rem] [&>*]:flex-1", children: inRole.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
3631
3600
|
] }, role.id);
|
|
3632
3601
|
}),
|
|
3633
3602
|
roleless.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { children: [
|
|
3634
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.
|
|
3635
|
-
|
|
3636
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "hidden text-xs text-muted-foreground sm:block", children: "Libraries, topics and other places this is kept." })
|
|
3637
|
-
] }),
|
|
3638
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "grid grid-cols-1 gap-2 @md:grid-cols-2 @3xl:grid-cols-3", children: roleless.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
3603
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "mb-2 text-sm font-semibold text-foreground", children: "Filed under" }),
|
|
3604
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-wrap gap-2 [&>*]:min-w-[16rem] [&>*]:flex-1", children: roleless.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
3639
3605
|
] })
|
|
3640
3606
|
] });
|
|
3641
3607
|
}
|