@ai-matrx/associations 0.13.13 → 0.13.16
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 +21 -0
- package/dist/{CommentThread-BoL8r7ZL.d.cts → CommentThread-CODjsBow.d.cts} +1 -1
- package/dist/{CommentThread-BoL8r7ZL.d.ts → CommentThread-CODjsBow.d.ts} +1 -1
- package/dist/core/index.cjs +2 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +24 -29
- 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 +26 -30
- 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 +2 -2
package/dist/react/index.cjs
CHANGED
|
@@ -248,6 +248,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
248
248
|
"billing_plan_limit",
|
|
249
249
|
"billing_price",
|
|
250
250
|
"billing_product",
|
|
251
|
+
"billing_spend_approval",
|
|
251
252
|
"billing_spend_guardrail",
|
|
252
253
|
"billing_stripe_event",
|
|
253
254
|
"billing_subscription",
|
|
@@ -2610,12 +2611,6 @@ function ExternalLinkIcon(props) {
|
|
|
2610
2611
|
function ChevronDownIcon(props) {
|
|
2611
2612
|
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
2613
|
}
|
|
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
2614
|
function CornerDownRightIcon(props) {
|
|
2620
2615
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...base(props), children: [
|
|
2621
2616
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "15 10 20 15 15 20" }),
|
|
@@ -3843,6 +3838,7 @@ function AttachedItemsBody({
|
|
|
3843
3838
|
// src/react/components/AssociationCard.tsx
|
|
3844
3839
|
var import_react16 = require("react");
|
|
3845
3840
|
var import_design_system7 = require("@ai-matrx/design-system");
|
|
3841
|
+
var import_tap_target = require("@ai-matrx/design-system/tap-target");
|
|
3846
3842
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3847
3843
|
function AssociationCard({
|
|
3848
3844
|
token,
|
|
@@ -3878,12 +3874,14 @@ function AssociationCard({
|
|
|
3878
3874
|
const filing = container.direction === "outgoing";
|
|
3879
3875
|
const canAttach = info.canListCandidates && (!filing || isAssociationTargetType(token));
|
|
3880
3876
|
const canDrillIn = count > 0;
|
|
3877
|
+
const countWord = filing ? "filed under" : "attached";
|
|
3881
3878
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
3882
3879
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3883
3880
|
"div",
|
|
3884
3881
|
{
|
|
3882
|
+
"data-association-card": token,
|
|
3885
3883
|
className: (0, import_design_system7.cn)(
|
|
3886
|
-
"
|
|
3884
|
+
"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
3885
|
className
|
|
3888
3886
|
),
|
|
3889
3887
|
children: [
|
|
@@ -3894,31 +3892,26 @@ function AssociationCard({
|
|
|
3894
3892
|
disabled: !canDrillIn,
|
|
3895
3893
|
onClick: () => setListOpen(true),
|
|
3896
3894
|
title: canDrillIn ? `View the ${info.labelPlural.toLowerCase()} attached to ${container.label ?? "this"}` : void 0,
|
|
3895
|
+
"aria-label": loading ? info.labelPlural : `${info.labelPlural}: ${count} ${countWord}`,
|
|
3897
3896
|
className: (0, import_design_system7.cn)(
|
|
3898
|
-
"flex min-w-0 flex-1 items-center gap-
|
|
3899
|
-
canDrillIn ? "cursor-pointer" : "cursor-default"
|
|
3897
|
+
"flex min-h-8 min-w-0 flex-1 items-center gap-x-1.5 text-left",
|
|
3898
|
+
canDrillIn ? "cursor-pointer hover:text-foreground" : "cursor-default"
|
|
3900
3899
|
),
|
|
3901
3900
|
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
|
-
] })
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
3902
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "min-w-0 truncate text-xs font-semibold uppercase tracking-wider text-foreground", children: info.labelPlural }),
|
|
3903
|
+
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
3904
|
]
|
|
3911
3905
|
}
|
|
3912
3906
|
),
|
|
3913
3907
|
canAttach && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3914
|
-
|
|
3908
|
+
import_tap_target.TapTargetButton,
|
|
3915
3909
|
{
|
|
3916
|
-
|
|
3910
|
+
ariaLabel: `Attach ${info.labelPlural.toLowerCase()}`,
|
|
3911
|
+
tooltip: false,
|
|
3917
3912
|
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" })
|
|
3913
|
+
className: "ml-auto shrink-0",
|
|
3914
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PlusIcon, { className: "h-4 w-4" })
|
|
3922
3915
|
}
|
|
3923
3916
|
)
|
|
3924
3917
|
]
|
|
@@ -4012,6 +4005,8 @@ function getContentRoleMeta(role) {
|
|
|
4012
4005
|
|
|
4013
4006
|
// src/react/components/AssociationCardGrid.tsx
|
|
4014
4007
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4008
|
+
var GROUP_LABEL = "mb-1 text-xs font-medium uppercase tracking-wider text-muted-foreground";
|
|
4009
|
+
var TILE_ROW = "flex flex-wrap gap-2 [&>*]:min-w-[16rem] [&>*]:flex-1";
|
|
4015
4010
|
function AssociationCardGrid({
|
|
4016
4011
|
tokens,
|
|
4017
4012
|
excludeTokens,
|
|
@@ -4037,20 +4032,20 @@ function AssociationCardGrid({
|
|
|
4037
4032
|
const role = store.registry.getEntityInfo(token).contentRole;
|
|
4038
4033
|
return !role || !roleIds.has(role);
|
|
4039
4034
|
}) : [];
|
|
4040
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_design_system8.cn)("@container space-y-
|
|
4035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_design_system8.cn)("@container space-y-3", className), children: [
|
|
4041
4036
|
CONTENT_ROLES.map((role) => {
|
|
4042
4037
|
const inRole = list.filter(
|
|
4043
4038
|
(token) => store.registry.getEntityInfo(token).contentRole === role.id
|
|
4044
4039
|
);
|
|
4045
4040
|
if (inRole.length === 0) return null;
|
|
4046
4041
|
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:
|
|
4042
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: GROUP_LABEL, children: role.title }),
|
|
4043
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: TILE_ROW, children: inRole.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
4049
4044
|
] }, role.id);
|
|
4050
4045
|
}),
|
|
4051
4046
|
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:
|
|
4047
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: GROUP_LABEL, children: "Filed under" }),
|
|
4048
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: TILE_ROW, children: roleless.map((token) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssociationCard, { token }, token)) })
|
|
4054
4049
|
] })
|
|
4055
4050
|
] });
|
|
4056
4051
|
}
|
|
@@ -5563,7 +5558,7 @@ function CategoryTagPicker({
|
|
|
5563
5558
|
children: [
|
|
5564
5559
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { className: "h-3.5 w-3.5" }),
|
|
5565
5560
|
selected.length === 0 ? addLabel : "Edit",
|
|
5566
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5561
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_design_system13.SelectChevron, { size: "sm" })
|
|
5567
5562
|
]
|
|
5568
5563
|
}
|
|
5569
5564
|
) }),
|