@ai-matrx/associations 0.11.0 → 0.11.2
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 +19 -0
- package/dist/{CommentThread-ZWiJVDpI.d.cts → CommentThread-4DN5Fe4g.d.cts} +4 -2
- package/dist/{CommentThread-ZWiJVDpI.d.ts → CommentThread-4DN5Fe4g.d.ts} +4 -2
- package/dist/core/index.cjs +12 -4
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +12 -4
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +17 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -9
- package/dist/index.d.ts +73 -9
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +52 -21
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +52 -21
- package/dist/react/index.js.map +1 -1
- package/dist/react/lazy/index.d.cts +1 -1
- package/dist/react/lazy/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -755,6 +755,8 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
755
755
|
"oauth_handoff_claim",
|
|
756
756
|
"opinion_clusters",
|
|
757
757
|
"opinions",
|
|
758
|
+
"ops_check_item",
|
|
759
|
+
"ops_check_run",
|
|
758
760
|
"ops_issue_class",
|
|
759
761
|
"ops_issue_event",
|
|
760
762
|
"ops_proof_check",
|
|
@@ -1012,6 +1014,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
1012
1014
|
"task",
|
|
1013
1015
|
"task_user_state",
|
|
1014
1016
|
"taxonomy_node",
|
|
1017
|
+
"team",
|
|
1015
1018
|
"template_context_items",
|
|
1016
1019
|
"template_scope_types",
|
|
1017
1020
|
"templates",
|
|
@@ -1046,6 +1049,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
1046
1049
|
"ui_surface_agent_role",
|
|
1047
1050
|
"ui_surface_client_tool",
|
|
1048
1051
|
"ui_surface_config",
|
|
1052
|
+
"ui_surface_item_type",
|
|
1049
1053
|
"ui_surface_value",
|
|
1050
1054
|
"ui_surface_write_target",
|
|
1051
1055
|
"univer_payload",
|
|
@@ -1314,8 +1318,12 @@ var ASSOCIATION_TARGET_TYPES = [
|
|
|
1314
1318
|
// a CRM outreach list (a worked send/dial queue) — parties and resources attach into it
|
|
1315
1319
|
"crm_deal",
|
|
1316
1320
|
// a CRM deal (crm.deal) — people on it (role 'deal_contact'), tasks/files attach onto it
|
|
1317
|
-
"rulebook"
|
|
1321
|
+
"rulebook",
|
|
1318
1322
|
// a Masterwork Rulebook — its Scout interviews attach here (conversation→rulebook, role 'interview')
|
|
1323
|
+
"research_topic",
|
|
1324
|
+
// a research topic — Sources are filed under it (processed_document→research_topic, the landing door's edge)
|
|
1325
|
+
"media_source_library"
|
|
1326
|
+
// a media-catalog Library — Sources are catalogued into it (processed_document→media_source_library)
|
|
1319
1327
|
];
|
|
1320
1328
|
function isAssociationTargetType(value) {
|
|
1321
1329
|
return typeof value === "string" && ASSOCIATION_TARGET_TYPES.includes(value);
|
|
@@ -1504,6 +1512,7 @@ function useContainerLinks(args) {
|
|
|
1504
1512
|
error,
|
|
1505
1513
|
reload,
|
|
1506
1514
|
totalCount: incoming.length,
|
|
1515
|
+
presentTokens: [...new Set(incoming.map((link) => link.token))],
|
|
1507
1516
|
countFor,
|
|
1508
1517
|
attachedIdsFor,
|
|
1509
1518
|
linksFor,
|
|
@@ -3383,30 +3392,52 @@ function AssociationCardGrid({
|
|
|
3383
3392
|
const primary = usePrimaryEntity();
|
|
3384
3393
|
const excluded = new Set(excludeTokens ?? []);
|
|
3385
3394
|
const filing = primary?.direction === "outgoing";
|
|
3386
|
-
const
|
|
3395
|
+
const links = useContainerLinks(containerLinksArgs(primary));
|
|
3396
|
+
const base2 = tokens ?? store.registry.curatedTokens();
|
|
3397
|
+
const withPresent = filing ? [
|
|
3398
|
+
...base2,
|
|
3399
|
+
...links.presentTokens.filter(
|
|
3400
|
+
(t) => isEntityTypeToken(t) && !base2.includes(t)
|
|
3401
|
+
)
|
|
3402
|
+
] : base2;
|
|
3403
|
+
const list = withPresent.filter(
|
|
3387
3404
|
(token) => !excluded.has(token) && (!filing || isAssociationTargetType(token))
|
|
3388
3405
|
);
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
);
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
),
|
|
3403
|
-
|
|
3406
|
+
const roleIds = new Set(CONTENT_ROLES.map((r) => r.id));
|
|
3407
|
+
const roleless = filing ? list.filter((token) => {
|
|
3408
|
+
const role = store.registry.getEntityInfo(token).contentRole;
|
|
3409
|
+
return !role || !roleIds.has(role);
|
|
3410
|
+
}) : [];
|
|
3411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_design_system7.cn)("space-y-5", className), children: [
|
|
3412
|
+
CONTENT_ROLES.map((role) => {
|
|
3413
|
+
const inRole = list.filter(
|
|
3414
|
+
(token) => store.registry.getEntityInfo(token).contentRole === role.id
|
|
3415
|
+
);
|
|
3416
|
+
if (inRole.length === 0) return null;
|
|
3417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("section", { children: [
|
|
3418
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mb-2.5 flex items-baseline gap-3 pl-1.5", children: [
|
|
3419
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3420
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3421
|
+
"span",
|
|
3422
|
+
{
|
|
3423
|
+
className: (0, import_design_system7.cn)("h-2.5 w-2.5 rounded-full", role.accentBar)
|
|
3424
|
+
}
|
|
3425
|
+
),
|
|
3426
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "text-sm font-semibold text-foreground", children: role.title })
|
|
3427
|
+
] }),
|
|
3428
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "hidden text-xs text-muted-foreground sm:block", children: role.tagline })
|
|
3404
3429
|
] }),
|
|
3405
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("
|
|
3430
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3", children: inRole.map((token) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AssociationCard, { token }, token)) })
|
|
3431
|
+
] }, role.id);
|
|
3432
|
+
}),
|
|
3433
|
+
roleless.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("section", { children: [
|
|
3434
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mb-2.5 flex items-baseline gap-3 pl-1.5", children: [
|
|
3435
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "text-sm font-semibold text-foreground", children: "Filed under" }),
|
|
3436
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "hidden text-xs text-muted-foreground sm:block", children: "Libraries, topics and other places this is kept." })
|
|
3406
3437
|
] }),
|
|
3407
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3", children:
|
|
3408
|
-
] }
|
|
3409
|
-
|
|
3438
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3", children: roleless.map((token) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AssociationCard, { token }, token)) })
|
|
3439
|
+
] })
|
|
3440
|
+
] });
|
|
3410
3441
|
}
|
|
3411
3442
|
|
|
3412
3443
|
// src/react/components/AssociationList.tsx
|