@ai-matrx/associations 0.14.84 → 0.14.86

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.
@@ -171,6 +171,7 @@ var ENTITY_TYPE_TOKENS = [
171
171
  "ai_usage_hourly_watermark",
172
172
  "analysis_result",
173
173
  "anon_form",
174
+ "anon_form_password",
174
175
  "anon_form_visit",
175
176
  "anon_function_birth_grandfather",
176
177
  "anon_hit",
@@ -238,6 +239,7 @@ var ENTITY_TYPE_TOKENS = [
238
239
  "billing_customer",
239
240
  "billing_external_call_vendor",
240
241
  "billing_free_period_grant",
242
+ "billing_free_use_counter",
241
243
  "billing_hard_cost_reconciliation",
242
244
  "billing_held_run",
243
245
  "billing_org_payment_account",
@@ -388,6 +390,7 @@ var ENTITY_TYPE_TOKENS = [
388
390
  "content_ir_kind_example",
389
391
  "content_ir_kind_instance",
390
392
  "content_ir_kind_surface",
393
+ "content_ir_render_inspection",
391
394
  "content_lane",
392
395
  "context_access_log",
393
396
  "context_item",
@@ -457,6 +460,8 @@ var ENTITY_TYPE_TOKENS = [
457
460
  "definer_grant_baseline",
458
461
  "deprecated_relation",
459
462
  "derive_run",
463
+ "desktop_app_account",
464
+ "desktop_app_instance",
460
465
  "desktop_app_profile",
461
466
  "dev_login_audit",
462
467
  "device_handoff",
@@ -711,6 +716,7 @@ var ENTITY_TYPE_TOKENS = [
711
716
  "iam_org_domain_route",
712
717
  "iam_read_lane_v2_rollout",
713
718
  "iam_record_seat_change",
719
+ "iam_sign_in_event",
714
720
  "idempotency",
715
721
  "industry",
716
722
  "industry_curator",
@@ -849,12 +855,14 @@ var ENTITY_TYPE_TOKENS = [
849
855
  "ops_test_replay_cache",
850
856
  "org_admin_audit",
851
857
  "org_change_policy",
858
+ "org_chart_publication",
852
859
  "org_context_ledger",
853
860
  "org_industries",
854
861
  "org_member_control",
855
862
  "org_module_config",
856
863
  "org_move_txn",
857
864
  "org_plan",
865
+ "org_sweep_list",
858
866
  "organization",
859
867
  "organization_preferences",
860
868
  "organization_visibility_version",
@@ -1223,6 +1231,8 @@ var ENTITY_TYPE_TOKENS = [
1223
1231
  "user",
1224
1232
  "user_achievement",
1225
1233
  "user_acquisition_facts",
1234
+ "user_acquisition_facts_stored",
1235
+ "user_acquisition_facts_stored_watermark",
1226
1236
  "user_active_context",
1227
1237
  "user_analysis_preference",
1228
1238
  "user_email_preference",
@@ -1397,6 +1407,7 @@ var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
1397
1407
  "assessment>tag",
1398
1408
  "board>category",
1399
1409
  "board>tag",
1410
+ "board>web_brand",
1400
1411
  "calendar_event>conversation",
1401
1412
  "calendar_event>party",
1402
1413
  "canvas_item>tag",
@@ -1909,6 +1920,7 @@ var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
1909
1920
  "record>content_ir_kind_example",
1910
1921
  "record>content_ir_kind_instance",
1911
1922
  "record>content_ir_kind_surface",
1923
+ "record>content_ir_render_inspection",
1912
1924
  "record>context_access_log",
1913
1925
  "record>context_item",
1914
1926
  "record>context_item_suggestion",
@@ -1968,6 +1980,8 @@ var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
1968
1980
  "record>definer_class_exemption",
1969
1981
  "record>definer_grant_baseline",
1970
1982
  "record>derive_run",
1983
+ "record>desktop_app_account",
1984
+ "record>desktop_app_instance",
1971
1985
  "record>desktop_app_profile",
1972
1986
  "record>dev_login_audit",
1973
1987
  "record>device_handoff",
@@ -2205,6 +2219,7 @@ var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
2205
2219
  "record>iam_org_domain",
2206
2220
  "record>iam_org_domain_route",
2207
2221
  "record>iam_record_seat_change",
2222
+ "record>iam_sign_in_event",
2208
2223
  "record>industry",
2209
2224
  "record>ingest_runs",
2210
2225
  "record>integration_connection",
@@ -2332,6 +2347,7 @@ var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
2332
2347
  "record>ops_test_replay_cache",
2333
2348
  "record>org_admin_audit",
2334
2349
  "record>org_change_policy",
2350
+ "record>org_chart_publication",
2335
2351
  "record>org_context_ledger",
2336
2352
  "record>org_industries",
2337
2353
  "record>org_member_control",
@@ -2857,6 +2873,7 @@ var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
2857
2873
  "war_room>scope",
2858
2874
  "war_room>scope_type",
2859
2875
  "war_room>tag",
2876
+ "web_brand_choice>category",
2860
2877
  "web_brand_choice>web_brand_choice",
2861
2878
  "web_brand_choice>web_brand_offering",
2862
2879
  "web_brand_choice>web_brand_testimony",
@@ -3881,96 +3898,36 @@ import {
3881
3898
  } from "@ai-matrx/design-system";
3882
3899
 
3883
3900
  // src/react/icons.tsx
3884
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
3885
- function base(props) {
3886
- return {
3887
- xmlns: "http://www.w3.org/2000/svg",
3888
- width: 24,
3889
- height: 24,
3890
- viewBox: "0 0 24 24",
3891
- fill: "none",
3892
- stroke: "currentColor",
3893
- strokeWidth: 2,
3894
- strokeLinecap: "round",
3895
- strokeLinejoin: "round",
3896
- "aria-hidden": true,
3897
- ...props
3898
- };
3899
- }
3900
- function SpinnerIcon(props) {
3901
- return /* @__PURE__ */ jsx4("svg", { ...base(props), children: /* @__PURE__ */ jsx4("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
3902
- }
3903
- function Link2Icon(props) {
3904
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3905
- /* @__PURE__ */ jsx4("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
3906
- /* @__PURE__ */ jsx4("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
3907
- /* @__PURE__ */ jsx4("line", { x1: "8", x2: "16", y1: "12", y2: "12" })
3908
- ] });
3909
- }
3910
- function RefreshIcon(props) {
3911
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3912
- /* @__PURE__ */ jsx4("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
3913
- /* @__PURE__ */ jsx4("path", { d: "M21 3v5h-5" }),
3914
- /* @__PURE__ */ jsx4("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
3915
- /* @__PURE__ */ jsx4("path", { d: "M8 16H3v5" })
3916
- ] });
3917
- }
3918
- function UploadIcon(props) {
3919
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3920
- /* @__PURE__ */ jsx4("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
3921
- /* @__PURE__ */ jsx4("polyline", { points: "17 8 12 3 7 8" }),
3922
- /* @__PURE__ */ jsx4("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
3923
- ] });
3924
- }
3925
- function FolderOpenIcon(props) {
3926
- return /* @__PURE__ */ jsx4("svg", { ...base(props), children: /* @__PURE__ */ jsx4("path", { d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" }) });
3927
- }
3928
- function CornerDownRightIcon(props) {
3929
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3930
- /* @__PURE__ */ jsx4("polyline", { points: "15 10 20 15 15 20" }),
3931
- /* @__PURE__ */ jsx4("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
3932
- ] });
3933
- }
3934
- function TagIcon(props) {
3935
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3936
- /* @__PURE__ */ jsx4("path", { d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }),
3937
- /* @__PURE__ */ jsx4("circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" })
3938
- ] });
3939
- }
3940
- function DefaultEntityIcon(props) {
3941
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3942
- /* @__PURE__ */ jsx4("path", { d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" }),
3943
- /* @__PURE__ */ jsx4("path", { d: "m7 16.5-4.74-2.85" }),
3944
- /* @__PURE__ */ jsx4("path", { d: "m7 16.5 5-3" }),
3945
- /* @__PURE__ */ jsx4("path", { d: "M7 16.5v5.17" }),
3946
- /* @__PURE__ */ jsx4("path", { d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" }),
3947
- /* @__PURE__ */ jsx4("path", { d: "m17 16.5-5-3" }),
3948
- /* @__PURE__ */ jsx4("path", { d: "m17 16.5 4.74-2.85" }),
3949
- /* @__PURE__ */ jsx4("path", { d: "M17 16.5v5.17" }),
3950
- /* @__PURE__ */ jsx4("path", { d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" }),
3951
- /* @__PURE__ */ jsx4("path", { d: "M12 8 7.26 5.15" }),
3952
- /* @__PURE__ */ jsx4("path", { d: "m12 8 4.74-2.85" }),
3953
- /* @__PURE__ */ jsx4("path", { d: "M12 13.5V8" })
3954
- ] });
3955
- }
3956
- function RestoreIcon(props) {
3957
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3958
- /* @__PURE__ */ jsx4("path", { d: "M4 14h6v6" }),
3959
- /* @__PURE__ */ jsx4("path", { d: "M20 10h-6V4" }),
3960
- /* @__PURE__ */ jsx4("path", { d: "M14 10l7-7" }),
3961
- /* @__PURE__ */ jsx4("path", { d: "M3 21l7-7" })
3962
- ] });
3963
- }
3964
- function GripResizeIcon(props) {
3965
- return /* @__PURE__ */ jsxs2("svg", { ...base(props), children: [
3966
- /* @__PURE__ */ jsx4("path", { d: "M21 15 15 21" }),
3967
- /* @__PURE__ */ jsx4("path", { d: "M21 20 20 21" })
3968
- ] });
3969
- }
3901
+ import {
3902
+ BoxesIcon as GBoxesIcon,
3903
+ CornerDownRightIcon as GCornerDownRightIcon,
3904
+ FileTextIcon as GFileTextIcon,
3905
+ FolderOpenIcon as GFolderOpenIcon,
3906
+ GripResizeIcon as GGripResizeIcon,
3907
+ Link2Icon as GLink2Icon,
3908
+ Loader2Icon as GLoader2Icon,
3909
+ RefreshCwIcon as GRefreshCwIcon,
3910
+ RestoreIcon as GRestoreIcon,
3911
+ TagIcon as GTagIcon,
3912
+ UploadIcon as GUploadIcon,
3913
+ withGlyphDefaults
3914
+ } from "@ai-matrx/design-system/icons";
3915
+ var sized = (Glyph) => withGlyphDefaults(Glyph, { width: 24, height: 24 });
3916
+ var SpinnerIcon = sized(GLoader2Icon);
3917
+ var Link2Icon = sized(GLink2Icon);
3918
+ var RefreshIcon = sized(GRefreshCwIcon);
3919
+ var UploadIcon = sized(GUploadIcon);
3920
+ var FolderOpenIcon = sized(GFolderOpenIcon);
3921
+ var FileTextIcon = sized(GFileTextIcon);
3922
+ var CornerDownRightIcon = sized(GCornerDownRightIcon);
3923
+ var TagIcon = sized(GTagIcon);
3924
+ var DefaultEntityIcon = sized(GBoxesIcon);
3925
+ var RestoreIcon = sized(GRestoreIcon);
3926
+ var GripResizeIcon = sized(GGripResizeIcon);
3970
3927
 
3971
3928
  // src/react/components/DefaultWindowShell.tsx
3972
3929
  import { Maximize2Icon, XIcon } from "@ai-matrx/design-system/icons";
3973
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
3930
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
3974
3931
  var DEFAULT_WIDTH = 440;
3975
3932
  var DEFAULT_HEIGHT = 580;
3976
3933
  var MIN_WIDTH = 330;
@@ -4054,7 +4011,7 @@ function DefaultWindowShell({
4054
4011
  height: rect.height
4055
4012
  };
4056
4013
  return createPortal(
4057
- /* @__PURE__ */ jsx5(FloatingLayer, { children: /* @__PURE__ */ jsxs3(
4014
+ /* @__PURE__ */ jsx4(FloatingLayer, { children: /* @__PURE__ */ jsxs2(
4058
4015
  "div",
4059
4016
  {
4060
4017
  ref: setPanelRef,
@@ -4071,7 +4028,7 @@ function DefaultWindowShell({
4071
4028
  className
4072
4029
  ),
4073
4030
  children: [
4074
- /* @__PURE__ */ jsxs3(
4031
+ /* @__PURE__ */ jsxs2(
4075
4032
  "header",
4076
4033
  {
4077
4034
  onPointerDown: drag.onPointerDown,
@@ -4083,51 +4040,51 @@ function DefaultWindowShell({
4083
4040
  isMobile ? "" : "cursor-move touch-none"
4084
4041
  ),
4085
4042
  children: [
4086
- /* @__PURE__ */ jsxs3(
4043
+ /* @__PURE__ */ jsxs2(
4087
4044
  "span",
4088
4045
  {
4089
4046
  id: labelId,
4090
4047
  className: "flex min-w-0 items-center gap-1.5 text-sm font-medium text-foreground",
4091
4048
  children: [
4092
4049
  icon,
4093
- /* @__PURE__ */ jsx5("span", { className: "truncate", children: title })
4050
+ /* @__PURE__ */ jsx4("span", { className: "truncate", children: title })
4094
4051
  ]
4095
4052
  }
4096
4053
  ),
4097
- /* @__PURE__ */ jsxs3("span", { className: "flex shrink-0 items-center gap-0.5", children: [
4098
- isMobile ? null : /* @__PURE__ */ jsx5(
4054
+ /* @__PURE__ */ jsxs2("span", { className: "flex shrink-0 items-center gap-0.5", children: [
4055
+ isMobile ? null : /* @__PURE__ */ jsx4(
4099
4056
  "button",
4100
4057
  {
4101
4058
  type: "button",
4102
4059
  onClick: () => setMaximized((v) => !v),
4103
4060
  "aria-label": maximized ? "Restore window" : "Maximize window",
4104
4061
  className: "flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
4105
- children: maximized ? /* @__PURE__ */ jsx5(RestoreIcon, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx5(Maximize2Icon, { className: "h-3.5 w-3.5" })
4062
+ children: maximized ? /* @__PURE__ */ jsx4(RestoreIcon, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx4(Maximize2Icon, { className: "h-3.5 w-3.5" })
4106
4063
  }
4107
4064
  ),
4108
- /* @__PURE__ */ jsx5(
4065
+ /* @__PURE__ */ jsx4(
4109
4066
  "button",
4110
4067
  {
4111
4068
  type: "button",
4112
4069
  onClick: onClose,
4113
4070
  "aria-label": "Close",
4114
4071
  className: "flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
4115
- children: /* @__PURE__ */ jsx5(XIcon, { className: "h-3.5 w-3.5" })
4072
+ children: /* @__PURE__ */ jsx4(XIcon, { className: "h-3.5 w-3.5" })
4116
4073
  }
4117
4074
  )
4118
4075
  ] })
4119
4076
  ]
4120
4077
  }
4121
4078
  ),
4122
- /* @__PURE__ */ jsx5("div", { className: "min-h-0 flex-1 overflow-hidden", children }),
4123
- isMobile || maximized ? null : /* @__PURE__ */ jsx5(
4079
+ /* @__PURE__ */ jsx4("div", { className: "min-h-0 flex-1 overflow-hidden", children }),
4080
+ isMobile || maximized ? null : /* @__PURE__ */ jsx4(
4124
4081
  "button",
4125
4082
  {
4126
4083
  type: "button",
4127
4084
  "aria-label": "Resize window",
4128
4085
  onPointerDown: drag.resizeHandle("se"),
4129
4086
  className: "absolute bottom-0 right-0 flex h-4 w-4 cursor-nwse-resize touch-none items-center justify-center text-muted-foreground/60 hover:text-foreground",
4130
- children: /* @__PURE__ */ jsx5(GripResizeIcon, { className: "h-3 w-3" })
4087
+ children: /* @__PURE__ */ jsx4(GripResizeIcon, { className: "h-3 w-3" })
4131
4088
  }
4132
4089
  )
4133
4090
  ]
@@ -4138,7 +4095,7 @@ function DefaultWindowShell({
4138
4095
  }
4139
4096
 
4140
4097
  // src/react/components/AssociationWindow.tsx
4141
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
4098
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
4142
4099
  function AssociationWindow({
4143
4100
  open,
4144
4101
  onClose,
@@ -4151,16 +4108,16 @@ function AssociationWindow({
4151
4108
  const instanceId = useId();
4152
4109
  const { windowShell } = useAssociationsUiPorts();
4153
4110
  if (!open) return null;
4154
- const body = /* @__PURE__ */ jsxs4("div", { className: "flex h-full min-h-0 flex-col gap-2 p-3", children: [
4155
- subtitle ? /* @__PURE__ */ jsx6("div", { className: "shrink-0 text-xs text-muted-foreground", children: subtitle }) : null,
4111
+ const body = /* @__PURE__ */ jsxs3("div", { className: "flex h-full min-h-0 flex-col gap-2 p-3", children: [
4112
+ subtitle ? /* @__PURE__ */ jsx5("div", { className: "shrink-0 text-xs text-muted-foreground", children: subtitle }) : null,
4156
4113
  children
4157
4114
  ] });
4158
4115
  const windowId = `association:${scopeId}:${instanceId}`;
4159
4116
  if (windowShell) {
4160
4117
  const HostWindow = windowShell.Window;
4161
- return /* @__PURE__ */ jsx6(HostWindow, { id: windowId, title, onClose, children: body });
4118
+ return /* @__PURE__ */ jsx5(HostWindow, { id: windowId, title, onClose, children: body });
4162
4119
  }
4163
- return /* @__PURE__ */ jsx6(
4120
+ return /* @__PURE__ */ jsx5(
4164
4121
  DefaultWindowShell,
4165
4122
  {
4166
4123
  id: windowId,
@@ -4176,27 +4133,27 @@ function AssociationWindow({
4176
4133
  import { useState as useState6 } from "react";
4177
4134
  import { cn as cn3, Input } from "@ai-matrx/design-system";
4178
4135
  import { CheckIcon, PlusIcon, SearchIcon, XIcon as XIcon2 } from "@ai-matrx/design-system/icons";
4179
- import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
4136
+ import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
4180
4137
  function AssociationPicker(props) {
4181
4138
  const store = useAssociationsStore();
4182
4139
  const { pickerOverrides } = useAssociationsUiPorts();
4183
4140
  const info = store.registry.getEntityInfo(props.token);
4184
4141
  const Icon = info.Icon ?? DefaultEntityIcon;
4185
4142
  const Override = pickerOverrides?.[props.token];
4186
- if (Override) return /* @__PURE__ */ jsx7(Override, { ...props });
4143
+ if (Override) return /* @__PURE__ */ jsx6(Override, { ...props });
4187
4144
  const title = `Add ${info.labelPlural}`;
4188
4145
  const subtitle = props.filing ? `File ${props.containerLabel ?? "this"} under a ${info.label.toLowerCase()}` : props.containerLabel ? `Attach to ${props.containerLabel}` : "Click an item to attach or detach it";
4189
4146
  if (!props.open) return null;
4190
- return /* @__PURE__ */ jsx7(
4147
+ return /* @__PURE__ */ jsx6(
4191
4148
  AssociationWindow,
4192
4149
  {
4193
4150
  open: props.open,
4194
4151
  onClose: () => props.onOpenChange(false),
4195
4152
  scopeId: `picker:${props.token}`,
4196
4153
  title,
4197
- icon: /* @__PURE__ */ jsx7(Icon, { className: "size-3.5 text-primary" }),
4154
+ icon: /* @__PURE__ */ jsx6(Icon, { className: "size-3.5 text-primary" }),
4198
4155
  subtitle,
4199
- children: /* @__PURE__ */ jsx7(
4156
+ children: /* @__PURE__ */ jsx6(
4200
4157
  AssociationCandidateBody,
4201
4158
  {
4202
4159
  token: props.token,
@@ -4221,7 +4178,7 @@ function AssociationCandidateBody({
4221
4178
  onClose
4222
4179
  }) {
4223
4180
  void onClose;
4224
- return /* @__PURE__ */ jsx7(
4181
+ return /* @__PURE__ */ jsx6(
4225
4182
  EntityCandidateList,
4226
4183
  {
4227
4184
  token,
@@ -4281,10 +4238,10 @@ function EntityCandidateList({
4281
4238
  setBusyId(null);
4282
4239
  }
4283
4240
  };
4284
- return /* @__PURE__ */ jsxs5(Fragment, { children: [
4285
- /* @__PURE__ */ jsxs5("div", { className: "relative mb-2", children: [
4286
- /* @__PURE__ */ jsx7(SearchIcon, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
4287
- /* @__PURE__ */ jsx7(
4241
+ return /* @__PURE__ */ jsxs4(Fragment, { children: [
4242
+ /* @__PURE__ */ jsxs4("div", { className: "relative mb-2", children: [
4243
+ /* @__PURE__ */ jsx6(SearchIcon, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
4244
+ /* @__PURE__ */ jsx6(
4288
4245
  Input,
4289
4246
  {
4290
4247
  autoFocus: true,
@@ -4296,8 +4253,8 @@ function EntityCandidateList({
4296
4253
  }
4297
4254
  )
4298
4255
  ] }),
4299
- /* @__PURE__ */ jsxs5("div", { className: "flex-1 min-h-0 overflow-y-auto -mx-1 px-1", children: [
4300
- !search.trim() && !error && /* @__PURE__ */ jsx7(
4256
+ /* @__PURE__ */ jsxs4("div", { className: "flex-1 min-h-0 overflow-y-auto -mx-1 px-1", children: [
4257
+ !search.trim() && !error && /* @__PURE__ */ jsx6(
4301
4258
  SearchFailureNotice,
4302
4259
  {
4303
4260
  error: null,
@@ -4307,13 +4264,13 @@ function EntityCandidateList({
4307
4264
  className: "mb-1"
4308
4265
  }
4309
4266
  ),
4310
- (loading || recentsLoading) && visibleCount === 0 ? /* @__PURE__ */ jsxs5(ListMessage, { children: [
4311
- /* @__PURE__ */ jsx7(SpinnerIcon, { className: "h-4 w-4 animate-spin" }),
4267
+ (loading || recentsLoading) && visibleCount === 0 ? /* @__PURE__ */ jsxs4(ListMessage, { children: [
4268
+ /* @__PURE__ */ jsx6(SpinnerIcon, { className: "h-4 w-4 animate-spin" }),
4312
4269
  "Loading\u2026"
4313
- ] }) : error ? /* @__PURE__ */ jsxs5("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: [
4314
- /* @__PURE__ */ jsx7("p", { className: "font-medium", children: "Couldn\u2019t load items" }),
4315
- /* @__PURE__ */ jsx7("p", { className: "opacity-80", children: error }),
4316
- /* @__PURE__ */ jsx7(
4270
+ ] }) : error ? /* @__PURE__ */ jsxs4("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: [
4271
+ /* @__PURE__ */ jsx6("p", { className: "font-medium", children: "Couldn\u2019t load items" }),
4272
+ /* @__PURE__ */ jsx6("p", { className: "opacity-80", children: error }),
4273
+ /* @__PURE__ */ jsx6(
4317
4274
  "button",
4318
4275
  {
4319
4276
  type: "button",
@@ -4322,32 +4279,32 @@ function EntityCandidateList({
4322
4279
  children: "Retry"
4323
4280
  }
4324
4281
  )
4325
- ] }) : visibleCount === 0 ? /* @__PURE__ */ jsx7(ListMessage, { children: canCreate ? `Nothing to attach yet \u2014 create a new ${info.label.toLowerCase()} below.` : "Nothing to attach." }) : /* @__PURE__ */ jsxs5("div", { className: "space-y-2", children: [
4326
- visibleRecents.length > 0 && /* @__PURE__ */ jsx7(
4282
+ ] }) : visibleCount === 0 ? /* @__PURE__ */ jsx6(ListMessage, { children: canCreate ? `Nothing to attach yet \u2014 create a new ${info.label.toLowerCase()} below.` : "Nothing to attach." }) : /* @__PURE__ */ jsxs4("div", { className: "space-y-2", children: [
4283
+ visibleRecents.length > 0 && /* @__PURE__ */ jsx6(
4327
4284
  CandidateSection,
4328
4285
  {
4329
4286
  label: "Recent",
4330
4287
  candidates: visibleRecents,
4331
4288
  attachedIds,
4332
4289
  busyId,
4333
- icon: /* @__PURE__ */ jsx7(Icon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
4290
+ icon: /* @__PURE__ */ jsx6(Icon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
4334
4291
  onToggle: toggle
4335
4292
  }
4336
4293
  ),
4337
- ordinaryCandidates.length > 0 && /* @__PURE__ */ jsx7(
4294
+ ordinaryCandidates.length > 0 && /* @__PURE__ */ jsx6(
4338
4295
  CandidateSection,
4339
4296
  {
4340
4297
  label: visibleRecents.length > 0 ? `All ${info.labelPlural}` : null,
4341
4298
  candidates: ordinaryCandidates,
4342
4299
  attachedIds,
4343
4300
  busyId,
4344
- icon: /* @__PURE__ */ jsx7(Icon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
4301
+ icon: /* @__PURE__ */ jsx6(Icon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
4345
4302
  onToggle: toggle
4346
4303
  }
4347
4304
  )
4348
4305
  ] })
4349
4306
  ] }),
4350
- canCreate && /* @__PURE__ */ jsx7(
4307
+ canCreate && /* @__PURE__ */ jsx6(
4351
4308
  CreateAndAttachFooter,
4352
4309
  {
4353
4310
  token,
@@ -4367,12 +4324,12 @@ function CandidateSection({
4367
4324
  icon,
4368
4325
  onToggle
4369
4326
  }) {
4370
- return /* @__PURE__ */ jsxs5("section", { className: "space-y-0.5", children: [
4371
- label && /* @__PURE__ */ jsx7("p", { className: "px-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60", children: label }),
4372
- /* @__PURE__ */ jsx7("ul", { className: "space-y-0.5", children: candidates.map((candidate) => {
4327
+ return /* @__PURE__ */ jsxs4("section", { className: "space-y-0.5", children: [
4328
+ label && /* @__PURE__ */ jsx6("p", { className: "px-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60", children: label }),
4329
+ /* @__PURE__ */ jsx6("ul", { className: "space-y-0.5", children: candidates.map((candidate) => {
4373
4330
  const attached = attachedIds.has(candidate.id);
4374
4331
  const busy = busyId === candidate.id;
4375
- return /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5(
4332
+ return /* @__PURE__ */ jsx6("li", { children: /* @__PURE__ */ jsxs4(
4376
4333
  "button",
4377
4334
  {
4378
4335
  type: "button",
@@ -4385,15 +4342,15 @@ function CandidateSection({
4385
4342
  ),
4386
4343
  children: [
4387
4344
  icon,
4388
- /* @__PURE__ */ jsx7("span", { className: "flex-1 min-w-0 truncate text-foreground", children: candidate.title }),
4389
- /* @__PURE__ */ jsx7(
4345
+ /* @__PURE__ */ jsx6("span", { className: "flex-1 min-w-0 truncate text-foreground", children: candidate.title }),
4346
+ /* @__PURE__ */ jsx6(
4390
4347
  "span",
4391
4348
  {
4392
4349
  className: cn3(
4393
4350
  "flex h-5 w-5 items-center justify-center rounded-full shrink-0",
4394
4351
  attached ? "bg-primary text-primary-foreground" : "border border-border text-muted-foreground group-hover:border-primary/60"
4395
4352
  ),
4396
- children: busy ? /* @__PURE__ */ jsx7(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : attached ? /* @__PURE__ */ jsx7(CheckIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx7(PlusIcon, { className: "h-3 w-3" })
4353
+ children: busy ? /* @__PURE__ */ jsx6(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : attached ? /* @__PURE__ */ jsx6(CheckIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx6(PlusIcon, { className: "h-3 w-3" })
4397
4354
  }
4398
4355
  )
4399
4356
  ]
@@ -4449,7 +4406,7 @@ function CreateAndAttachFooter({
4449
4406
  }
4450
4407
  };
4451
4408
  if (!editing) {
4452
- return /* @__PURE__ */ jsxs5(
4409
+ return /* @__PURE__ */ jsxs4(
4453
4410
  "button",
4454
4411
  {
4455
4412
  type: "button",
@@ -4459,10 +4416,10 @@ function CreateAndAttachFooter({
4459
4416
  },
4460
4417
  className: "mt-2 flex min-h-11 w-full shrink-0 items-center justify-center gap-1.5 rounded-md border border-dashed border-border px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary/60 hover:text-foreground md:min-h-0",
4461
4418
  children: [
4462
- /* @__PURE__ */ jsx7(PlusIcon, { className: "h-4 w-4" }),
4419
+ /* @__PURE__ */ jsx6(PlusIcon, { className: "h-4 w-4" }),
4463
4420
  "New ",
4464
4421
  info.label,
4465
- seed ? /* @__PURE__ */ jsxs5("span", { className: "max-w-40 truncate text-muted-foreground/70", children: [
4422
+ seed ? /* @__PURE__ */ jsxs4("span", { className: "max-w-40 truncate text-muted-foreground/70", children: [
4466
4423
  "\u201C",
4467
4424
  seed,
4468
4425
  "\u201D"
@@ -4471,8 +4428,8 @@ function CreateAndAttachFooter({
4471
4428
  }
4472
4429
  );
4473
4430
  }
4474
- return /* @__PURE__ */ jsxs5("div", { className: "mt-2 flex shrink-0 items-center gap-1.5", children: [
4475
- /* @__PURE__ */ jsx7(
4431
+ return /* @__PURE__ */ jsxs4("div", { className: "mt-2 flex shrink-0 items-center gap-1.5", children: [
4432
+ /* @__PURE__ */ jsx6(
4476
4433
  Input,
4477
4434
  {
4478
4435
  autoFocus: true,
@@ -4491,17 +4448,17 @@ function CreateAndAttachFooter({
4491
4448
  style: { fontSize: 16 }
4492
4449
  }
4493
4450
  ),
4494
- /* @__PURE__ */ jsx7(
4451
+ /* @__PURE__ */ jsx6(
4495
4452
  "button",
4496
4453
  {
4497
4454
  type: "button",
4498
4455
  disabled: busy || !name.trim(),
4499
4456
  onClick: () => void submit(),
4500
4457
  className: "flex h-11 items-center gap-1 rounded-md bg-primary px-2.5 text-sm font-medium text-primary-foreground transition-opacity disabled:opacity-50 md:h-8",
4501
- children: busy ? /* @__PURE__ */ jsx7(SpinnerIcon, { className: "h-3.5 w-3.5 animate-spin" }) : "Create"
4458
+ children: busy ? /* @__PURE__ */ jsx6(SpinnerIcon, { className: "h-3.5 w-3.5 animate-spin" }) : "Create"
4502
4459
  }
4503
4460
  ),
4504
- /* @__PURE__ */ jsx7(
4461
+ /* @__PURE__ */ jsx6(
4505
4462
  "button",
4506
4463
  {
4507
4464
  type: "button",
@@ -4512,13 +4469,13 @@ function CreateAndAttachFooter({
4512
4469
  },
4513
4470
  title: "Cancel",
4514
4471
  className: "flex h-11 w-11 items-center justify-center rounded-md border border-border text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50 md:h-8 md:w-8",
4515
- children: /* @__PURE__ */ jsx7(XIcon2, { className: "h-4 w-4" })
4472
+ children: /* @__PURE__ */ jsx6(XIcon2, { className: "h-4 w-4" })
4516
4473
  }
4517
4474
  )
4518
4475
  ] });
4519
4476
  }
4520
4477
  function ListMessage({ children }) {
4521
- return /* @__PURE__ */ jsx7("div", { className: "flex items-center justify-center gap-2 py-8 text-[13px] text-muted-foreground", children });
4478
+ return /* @__PURE__ */ jsx6("div", { className: "flex items-center justify-center gap-2 py-8 text-[13px] text-muted-foreground", children });
4522
4479
  }
4523
4480
 
4524
4481
  // src/react/components/UniversalAssociationPicker.tsx
@@ -4530,17 +4487,17 @@ import { CheckIcon as CheckIcon2, Maximize2Icon as Maximize2Icon2, PlusIcon as P
4530
4487
  import { cn as cn4 } from "@ai-matrx/design-system";
4531
4488
  import { ExternalLinkIcon } from "@ai-matrx/design-system/icons";
4532
4489
  import { OutboundLink } from "@ai-matrx/kit/outbound-react";
4533
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
4490
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
4534
4491
  function DoorRef(props) {
4535
4492
  const { onOpen, ...refProps } = props;
4536
4493
  const { entityDoors } = useAssociationsUiPorts();
4537
4494
  const store = useAssociationsStore();
4538
4495
  const HostRef = entityDoors?.EntityRef;
4539
- if (HostRef) return /* @__PURE__ */ jsx8(HostRef, { ...refProps });
4496
+ if (HostRef) return /* @__PURE__ */ jsx7(HostRef, { ...refProps });
4540
4497
  const name = refProps.name ?? null;
4541
4498
  const href = store.registry.tryGetEntityInfo(refProps.token)?.hrefFor?.(refProps.id) ?? null;
4542
4499
  if (onOpen) {
4543
- return /* @__PURE__ */ jsx8(
4500
+ return /* @__PURE__ */ jsx7(
4544
4501
  "button",
4545
4502
  {
4546
4503
  type: "button",
@@ -4554,7 +4511,7 @@ function DoorRef(props) {
4554
4511
  );
4555
4512
  }
4556
4513
  if (href) {
4557
- return /* @__PURE__ */ jsxs6(
4514
+ return /* @__PURE__ */ jsxs5(
4558
4515
  "a",
4559
4516
  {
4560
4517
  href,
@@ -4565,19 +4522,19 @@ function DoorRef(props) {
4565
4522
  refProps.className
4566
4523
  ),
4567
4524
  children: [
4568
- /* @__PURE__ */ jsx8("span", { className: "min-w-0 truncate", children: name }),
4569
- /* @__PURE__ */ jsx8(ExternalLinkIcon, { className: "h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60" })
4525
+ /* @__PURE__ */ jsx7("span", { className: "min-w-0 truncate", children: name }),
4526
+ /* @__PURE__ */ jsx7(ExternalLinkIcon, { className: "h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60" })
4570
4527
  ]
4571
4528
  }
4572
4529
  );
4573
4530
  }
4574
- return /* @__PURE__ */ jsx8("span", { className: cn4("min-w-0 truncate", refProps.className), children: name });
4531
+ return /* @__PURE__ */ jsx7("span", { className: cn4("min-w-0 truncate", refProps.className), children: name });
4575
4532
  }
4576
4533
  function UnresolvedRef({ token, id }) {
4577
4534
  const { entityDoors } = useAssociationsUiPorts();
4578
4535
  const HostUnresolved = entityDoors?.UnresolvedRef;
4579
- if (HostUnresolved) return /* @__PURE__ */ jsx8(HostUnresolved, { token, id });
4580
- return /* @__PURE__ */ jsx8(
4536
+ if (HostUnresolved) return /* @__PURE__ */ jsx7(HostUnresolved, { token, id });
4537
+ return /* @__PURE__ */ jsx7(
4581
4538
  "span",
4582
4539
  {
4583
4540
  className: "inline-flex items-center rounded border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] text-muted-foreground",
@@ -4590,11 +4547,11 @@ function DoorControlsSlot(props) {
4590
4547
  const { entityDoors } = useAssociationsUiPorts();
4591
4548
  const store = useAssociationsStore();
4592
4549
  const HostControls = entityDoors?.DoorControls;
4593
- if (HostControls) return /* @__PURE__ */ jsx8(HostControls, { ...props });
4550
+ if (HostControls) return /* @__PURE__ */ jsx7(HostControls, { ...props });
4594
4551
  const href = store.registry.tryGetEntityInfo(props.token)?.hrefFor?.(props.id) ?? null;
4595
4552
  if (!href) return null;
4596
4553
  const label = props.name ? `Open ${props.name}` : `Open this ${props.token}`;
4597
- return /* @__PURE__ */ jsx8(
4554
+ return /* @__PURE__ */ jsx7(
4598
4555
  OutboundLink,
4599
4556
  {
4600
4557
  href,
@@ -4604,13 +4561,13 @@ function DoorControlsSlot(props) {
4604
4561
  "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
4605
4562
  props.className
4606
4563
  ),
4607
- children: /* @__PURE__ */ jsx8(ExternalLinkIcon, { className: "h-3 w-3" })
4564
+ children: /* @__PURE__ */ jsx7(ExternalLinkIcon, { className: "h-3 w-3" })
4608
4565
  }
4609
4566
  );
4610
4567
  }
4611
4568
 
4612
4569
  // src/react/components/UniversalAssociationPicker.tsx
4613
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
4570
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
4614
4571
  function attachedKey(token, id) {
4615
4572
  return `${token}:${id}`;
4616
4573
  }
@@ -4665,10 +4622,10 @@ function UniversalAssociationPicker(props) {
4665
4622
  groups.set(r.token, list);
4666
4623
  }
4667
4624
  const BrowseOverride = browseToken ? pickerOverrides?.[browseToken] : void 0;
4668
- return /* @__PURE__ */ jsxs7("div", { className: cn5("flex min-h-0 flex-1 flex-col gap-2", className), children: [
4669
- /* @__PURE__ */ jsxs7("div", { className: "relative", children: [
4670
- /* @__PURE__ */ jsx9(SearchIcon2, { className: "absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
4671
- /* @__PURE__ */ jsx9(
4625
+ return /* @__PURE__ */ jsxs6("div", { className: cn5("flex min-h-0 flex-1 flex-col gap-2", className), children: [
4626
+ /* @__PURE__ */ jsxs6("div", { className: "relative", children: [
4627
+ /* @__PURE__ */ jsx8(SearchIcon2, { className: "absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
4628
+ /* @__PURE__ */ jsx8(
4672
4629
  Input2,
4673
4630
  {
4674
4631
  autoFocus: true,
@@ -4682,9 +4639,9 @@ function UniversalAssociationPicker(props) {
4682
4639
  style: { fontSize: 16 }
4683
4640
  }
4684
4641
  ),
4685
- loading && browseToken === null && /* @__PURE__ */ jsx9(SpinnerIcon, { className: "absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 animate-spin text-muted-foreground" })
4642
+ loading && browseToken === null && /* @__PURE__ */ jsx8(SpinnerIcon, { className: "absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 animate-spin text-muted-foreground" })
4686
4643
  ] }),
4687
- /* @__PURE__ */ jsx9(
4644
+ /* @__PURE__ */ jsx8(
4688
4645
  "div",
4689
4646
  {
4690
4647
  role: "group",
@@ -4694,7 +4651,7 @@ function UniversalAssociationPicker(props) {
4694
4651
  const info = store.registry.getEntityInfo(t);
4695
4652
  const ChipIcon = info.Icon ?? DefaultEntityIcon;
4696
4653
  const active = browseToken === t;
4697
- return /* @__PURE__ */ jsxs7(
4654
+ return /* @__PURE__ */ jsxs6(
4698
4655
  "button",
4699
4656
  {
4700
4657
  type: "button",
@@ -4705,7 +4662,7 @@ function UniversalAssociationPicker(props) {
4705
4662
  active ? "border-primary/50 bg-primary/10 text-foreground" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent"
4706
4663
  ),
4707
4664
  children: [
4708
- /* @__PURE__ */ jsx9(ChipIcon, { className: "h-3 w-3" }),
4665
+ /* @__PURE__ */ jsx8(ChipIcon, { className: "h-3 w-3" }),
4709
4666
  info.labelPlural
4710
4667
  ]
4711
4668
  },
@@ -4718,17 +4675,17 @@ function UniversalAssociationPicker(props) {
4718
4675
  // The token's canonical host picker (e.g. the stored-files browser)
4719
4676
  // owns per-token browsing when registered — never a plain list twin.
4720
4677
  // It opens in its own window; this body says where it went.
4721
- /* @__PURE__ */ jsxs7(
4678
+ /* @__PURE__ */ jsxs6(
4722
4679
  "div",
4723
4680
  {
4724
4681
  role: "region",
4725
4682
  "aria-label": `${store.registry.getEntityInfo(browseToken).labelPlural} window`,
4726
4683
  className: "flex flex-1 flex-col items-center justify-center gap-3 px-4 py-8 text-center",
4727
4684
  children: [
4728
- /* @__PURE__ */ jsx9("p", { className: "text-sm text-foreground", children: overrideOpen ? `The ${store.registry.getEntityInfo(browseToken).labelPlural.toLowerCase()} window is open.` : `The ${store.registry.getEntityInfo(browseToken).labelPlural.toLowerCase()} window is closed.` }),
4729
- /* @__PURE__ */ jsx9("p", { className: "max-w-xs text-[12px] text-muted-foreground", children: overrideOpen ? "Check items there to attach them; uncheck to detach. Changes save as you go." : "Reopen it to pick more, or go back to search everything." }),
4730
- /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-center justify-center gap-2", children: [
4731
- /* @__PURE__ */ jsxs7(
4685
+ /* @__PURE__ */ jsx8("p", { className: "text-sm text-foreground", children: overrideOpen ? `The ${store.registry.getEntityInfo(browseToken).labelPlural.toLowerCase()} window is open.` : `The ${store.registry.getEntityInfo(browseToken).labelPlural.toLowerCase()} window is closed.` }),
4686
+ /* @__PURE__ */ jsx8("p", { className: "max-w-xs text-[12px] text-muted-foreground", children: overrideOpen ? "Check items there to attach them; uncheck to detach. Changes save as you go." : "Reopen it to pick more, or go back to search everything." }),
4687
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-wrap items-center justify-center gap-2", children: [
4688
+ /* @__PURE__ */ jsxs6(
4732
4689
  Button,
4733
4690
  {
4734
4691
  type: "button",
@@ -4739,12 +4696,12 @@ function UniversalAssociationPicker(props) {
4739
4696
  setOverrideMount((n) => n + 1);
4740
4697
  },
4741
4698
  children: [
4742
- /* @__PURE__ */ jsx9(Maximize2Icon2, { className: "mr-1.5 h-3.5 w-3.5" }),
4699
+ /* @__PURE__ */ jsx8(Maximize2Icon2, { className: "mr-1.5 h-3.5 w-3.5" }),
4743
4700
  overrideOpen ? "Bring window to front" : "Reopen window"
4744
4701
  ]
4745
4702
  }
4746
4703
  ),
4747
- /* @__PURE__ */ jsx9(
4704
+ /* @__PURE__ */ jsx8(
4748
4705
  Button,
4749
4706
  {
4750
4707
  type: "button",
@@ -4755,7 +4712,7 @@ function UniversalAssociationPicker(props) {
4755
4712
  }
4756
4713
  )
4757
4714
  ] }),
4758
- overrideOpen && /* @__PURE__ */ jsx9(
4715
+ overrideOpen && /* @__PURE__ */ jsx8(
4759
4716
  BrowseOverride,
4760
4717
  {
4761
4718
  open: true,
@@ -4775,7 +4732,7 @@ function UniversalAssociationPicker(props) {
4775
4732
  ]
4776
4733
  }
4777
4734
  )
4778
- ) : browseToken ? /* @__PURE__ */ jsx9("div", { className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ jsx9(
4735
+ ) : browseToken ? /* @__PURE__ */ jsx8("div", { className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ jsx8(
4779
4736
  AssociationCandidateBody,
4780
4737
  {
4781
4738
  token: browseToken,
@@ -4788,13 +4745,13 @@ function UniversalAssociationPicker(props) {
4788
4745
  onAttach: (id, title) => onAttach(browseToken, id, title),
4789
4746
  onDetach: (id) => onDetach(browseToken, id)
4790
4747
  }
4791
- ) }) : /* @__PURE__ */ jsx9(
4748
+ ) }) : /* @__PURE__ */ jsx8(
4792
4749
  "div",
4793
4750
  {
4794
4751
  role: "region",
4795
4752
  "aria-label": "Association search results",
4796
4753
  className: "-mx-1 min-h-24 flex-1 overflow-y-auto overscroll-contain px-1",
4797
- children: error ? /* @__PURE__ */ jsx9(
4754
+ children: error ? /* @__PURE__ */ jsx8(
4798
4755
  SearchFailureNotice,
4799
4756
  {
4800
4757
  error,
@@ -4802,8 +4759,8 @@ function UniversalAssociationPicker(props) {
4802
4759
  operation: "Search to attach",
4803
4760
  origin: "associations/UniversalAssociationPicker"
4804
4761
  }
4805
- ) : results.length === 0 && failures.length === 0 ? /* @__PURE__ */ jsx9("p", { className: "py-6 text-center text-[12px] text-muted-foreground", children: loading ? "Searching\u2026" : query.trim() ? "No matches \u2014 narrow with a type chip to browse." : "Nothing to attach yet. Type to search, or pick a type to browse." }) : /* @__PURE__ */ jsxs7("div", { className: "space-y-2", children: [
4806
- /* @__PURE__ */ jsx9(
4762
+ ) : results.length === 0 && failures.length === 0 ? /* @__PURE__ */ jsx8("p", { className: "py-6 text-center text-[12px] text-muted-foreground", children: loading ? "Searching\u2026" : query.trim() ? "No matches \u2014 narrow with a type chip to browse." : "Nothing to attach yet. Type to search, or pick a type to browse." }) : /* @__PURE__ */ jsxs6("div", { className: "space-y-2", children: [
4763
+ /* @__PURE__ */ jsx8(
4807
4764
  SearchFailureNotice,
4808
4765
  {
4809
4766
  error: null,
@@ -4812,20 +4769,20 @@ function UniversalAssociationPicker(props) {
4812
4769
  origin: "associations/UniversalAssociationPicker"
4813
4770
  }
4814
4771
  ),
4815
- source !== "search" && results.length > 0 && /* @__PURE__ */ jsx9("p", { className: "px-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60", children: source === "recents" ? "Recent" : "Browse" }),
4772
+ source !== "search" && results.length > 0 && /* @__PURE__ */ jsx8("p", { className: "px-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60", children: source === "recents" ? "Recent" : "Browse" }),
4816
4773
  [...groups.entries()].map(([token, items]) => {
4817
4774
  const info = store.registry.getEntityInfo(token);
4818
4775
  const GroupIcon = info.Icon ?? DefaultEntityIcon;
4819
- return /* @__PURE__ */ jsxs7("div", { className: "space-y-0.5", children: [
4820
- /* @__PURE__ */ jsxs7("p", { className: "flex items-center gap-1 px-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70", children: [
4821
- /* @__PURE__ */ jsx9(GroupIcon, { className: "h-3 w-3" }),
4776
+ return /* @__PURE__ */ jsxs6("div", { className: "space-y-0.5", children: [
4777
+ /* @__PURE__ */ jsxs6("p", { className: "flex items-center gap-1 px-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70", children: [
4778
+ /* @__PURE__ */ jsx8(GroupIcon, { className: "h-3 w-3" }),
4822
4779
  info.labelPlural
4823
4780
  ] }),
4824
- /* @__PURE__ */ jsx9("ul", { className: "space-y-0.5", children: items.map((c) => {
4781
+ /* @__PURE__ */ jsx8("ul", { className: "space-y-0.5", children: items.map((c) => {
4825
4782
  const key = attachedKey(c.token, c.id);
4826
4783
  const attached = attachedKeys.has(key);
4827
4784
  const busy = busyKey === key;
4828
- return /* @__PURE__ */ jsxs7(
4785
+ return /* @__PURE__ */ jsxs6(
4829
4786
  "li",
4830
4787
  {
4831
4788
  className: cn5(
@@ -4834,7 +4791,7 @@ function UniversalAssociationPicker(props) {
4834
4791
  attached && "bg-accent/40"
4835
4792
  ),
4836
4793
  children: [
4837
- /* @__PURE__ */ jsxs7(
4794
+ /* @__PURE__ */ jsxs6(
4838
4795
  "button",
4839
4796
  {
4840
4797
  type: "button",
@@ -4846,21 +4803,21 @@ function UniversalAssociationPicker(props) {
4846
4803
  "disabled:opacity-50"
4847
4804
  ),
4848
4805
  children: [
4849
- /* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1 truncate text-foreground", children: c.title }),
4850
- /* @__PURE__ */ jsx9(
4806
+ /* @__PURE__ */ jsx8("span", { className: "min-w-0 flex-1 truncate text-foreground", children: c.title }),
4807
+ /* @__PURE__ */ jsx8(
4851
4808
  "span",
4852
4809
  {
4853
4810
  className: cn5(
4854
4811
  "flex h-5 w-5 shrink-0 items-center justify-center rounded-full",
4855
4812
  attached ? "bg-primary text-primary-foreground" : "border border-border text-muted-foreground group-hover:border-primary/60"
4856
4813
  ),
4857
- children: busy ? /* @__PURE__ */ jsx9(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : attached ? /* @__PURE__ */ jsx9(CheckIcon2, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx9(PlusIcon2, { className: "h-3 w-3" })
4814
+ children: busy ? /* @__PURE__ */ jsx8(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : attached ? /* @__PURE__ */ jsx8(CheckIcon2, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx8(PlusIcon2, { className: "h-3 w-3" })
4858
4815
  }
4859
4816
  )
4860
4817
  ]
4861
4818
  }
4862
4819
  ),
4863
- /* @__PURE__ */ jsx9(
4820
+ /* @__PURE__ */ jsx8(
4864
4821
  DoorControlsSlot,
4865
4822
  {
4866
4823
  token: c.token,
@@ -4885,7 +4842,7 @@ function UniversalAssociationPicker(props) {
4885
4842
  import { useEffect as useEffect9, useState as useState8 } from "react";
4886
4843
  import { cn as cn6 } from "@ai-matrx/design-system";
4887
4844
  import { PinIcon, PlusIcon as PlusIcon3, XIcon as XIcon3 } from "@ai-matrx/design-system/icons";
4888
- import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
4845
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
4889
4846
  function metadataIsPinned(metadata) {
4890
4847
  return metadata !== null && typeof metadata === "object" && !Array.isArray(metadata) && Reflect.get(metadata, "pinned") === true;
4891
4848
  }
@@ -4896,9 +4853,9 @@ function AttachedItemsSheet(props) {
4896
4853
  const title = info.labelPlural;
4897
4854
  const containerName = props.container?.label ?? props.containerLabel;
4898
4855
  const filing = props.container?.direction === "outgoing";
4899
- const subtitle = props.container ? /* @__PURE__ */ jsxs8("span", { className: "inline-flex min-w-0 max-w-full items-center gap-1", children: [
4856
+ const subtitle = props.container ? /* @__PURE__ */ jsxs7("span", { className: "inline-flex min-w-0 max-w-full items-center gap-1", children: [
4900
4857
  filing ? "What this is filed under:" : "Attached to",
4901
- /* @__PURE__ */ jsx10(
4858
+ /* @__PURE__ */ jsx9(
4902
4859
  DoorRef,
4903
4860
  {
4904
4861
  token: props.container.type,
@@ -4909,16 +4866,16 @@ function AttachedItemsSheet(props) {
4909
4866
  )
4910
4867
  ] }) : props.containerLabel ? `Attached to ${props.containerLabel}` : "Attached items";
4911
4868
  if (!props.open) return null;
4912
- return /* @__PURE__ */ jsx10(
4869
+ return /* @__PURE__ */ jsx9(
4913
4870
  AssociationWindow,
4914
4871
  {
4915
4872
  open: props.open,
4916
4873
  onClose: () => props.onOpenChange(false),
4917
4874
  scopeId: `attached:${props.token}`,
4918
4875
  title,
4919
- icon: /* @__PURE__ */ jsx10(Icon, { className: "size-3.5 text-primary" }),
4876
+ icon: /* @__PURE__ */ jsx9(Icon, { className: "size-3.5 text-primary" }),
4920
4877
  subtitle,
4921
- children: /* @__PURE__ */ jsx10(
4878
+ children: /* @__PURE__ */ jsx9(
4922
4879
  AttachedItemsBody,
4923
4880
  {
4924
4881
  token: props.token,
@@ -5007,31 +4964,31 @@ function AttachedItemsBody({
5007
4964
  setBusyId(null);
5008
4965
  }
5009
4966
  };
5010
- return /* @__PURE__ */ jsxs8(Fragment2, { children: [
5011
- titleError ? /* @__PURE__ */ jsxs8("div", { className: "mb-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: [
4967
+ return /* @__PURE__ */ jsxs7(Fragment2, { children: [
4968
+ titleError ? /* @__PURE__ */ jsxs7("div", { className: "mb-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: [
5012
4969
  "Showing names recorded at attach time \u2014 they may be out of date.",
5013
4970
  " ",
5014
4971
  titleError
5015
4972
  ] }) : null,
5016
- /* @__PURE__ */ jsx10("div", { className: "flex-1 min-h-0 overflow-y-auto -mx-1 px-1", children: links.length === 0 ? /* @__PURE__ */ jsx10("div", { className: "flex items-center justify-center py-8 text-[13px] text-muted-foreground", children: "Nothing attached yet." }) : titles === null ? /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-center gap-2 py-8 text-[13px] text-muted-foreground", children: [
5017
- /* @__PURE__ */ jsx10(SpinnerIcon, { className: "h-4 w-4 animate-spin" }),
4973
+ /* @__PURE__ */ jsx9("div", { className: "flex-1 min-h-0 overflow-y-auto -mx-1 px-1", children: links.length === 0 ? /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center py-8 text-[13px] text-muted-foreground", children: "Nothing attached yet." }) : titles === null ? /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-center gap-2 py-8 text-[13px] text-muted-foreground", children: [
4974
+ /* @__PURE__ */ jsx9(SpinnerIcon, { className: "h-4 w-4 animate-spin" }),
5018
4975
  "Loading\u2026"
5019
- ] }) : /* @__PURE__ */ jsx10("ul", { className: "space-y-0.5", children: links.map((link) => {
4976
+ ] }) : /* @__PURE__ */ jsx9("ul", { className: "space-y-0.5", children: links.map((link) => {
5020
4977
  const resolved = titles.get(link.resourceId);
5021
4978
  const missing = !titles.has(link.resourceId);
5022
4979
  const name = resolved ?? link.label ?? (missing ? null : "Untitled");
5023
4980
  const busy = busyId === link.resourceId;
5024
4981
  const pinned = metadataIsPinned(link.metadata);
5025
- return /* @__PURE__ */ jsxs8(
4982
+ return /* @__PURE__ */ jsxs7(
5026
4983
  "li",
5027
4984
  {
5028
4985
  className: "group/entity-ref group flex items-center gap-2 rounded-md px-2.5 py-2 text-sm transition-colors hover:bg-accent",
5029
4986
  children: [
5030
- /* @__PURE__ */ jsx10(Icon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
5031
- /* @__PURE__ */ jsx10("span", { className: "flex-1 min-w-0 truncate", children: name === null ? (
4987
+ /* @__PURE__ */ jsx9(Icon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
4988
+ /* @__PURE__ */ jsx9("span", { className: "flex-1 min-w-0 truncate", children: name === null ? (
5032
4989
  // The X beside the row stays the one-click detach.
5033
- /* @__PURE__ */ jsx10(UnresolvedRef, { token, id: link.resourceId })
5034
- ) : /* @__PURE__ */ jsx10(
4990
+ /* @__PURE__ */ jsx9(UnresolvedRef, { token, id: link.resourceId })
4991
+ ) : /* @__PURE__ */ jsx9(
5035
4992
  DoorRef,
5036
4993
  {
5037
4994
  token,
@@ -5041,7 +4998,7 @@ function AttachedItemsBody({
5041
4998
  className: "text-foreground"
5042
4999
  }
5043
5000
  ) }),
5044
- onSetPinned ? /* @__PURE__ */ jsx10(
5001
+ onSetPinned ? /* @__PURE__ */ jsx9(
5045
5002
  "button",
5046
5003
  {
5047
5004
  type: "button",
@@ -5053,7 +5010,7 @@ function AttachedItemsBody({
5053
5010
  "flex h-6 w-6 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
5054
5011
  pinned ? "text-primary" : "text-muted-foreground"
5055
5012
  ),
5056
- children: /* @__PURE__ */ jsx10(
5013
+ children: /* @__PURE__ */ jsx9(
5057
5014
  PinIcon,
5058
5015
  {
5059
5016
  className: cn6(
@@ -5064,7 +5021,7 @@ function AttachedItemsBody({
5064
5021
  )
5065
5022
  }
5066
5023
  ) : null,
5067
- /* @__PURE__ */ jsx10(
5024
+ /* @__PURE__ */ jsx9(
5068
5025
  "button",
5069
5026
  {
5070
5027
  type: "button",
@@ -5075,7 +5032,7 @@ function AttachedItemsBody({
5075
5032
  "flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors",
5076
5033
  "hover:bg-destructive/10 hover:text-destructive disabled:opacity-50"
5077
5034
  ),
5078
- children: busy ? /* @__PURE__ */ jsx10(SpinnerIcon, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx10(XIcon3, { className: "h-3.5 w-3.5" })
5035
+ children: busy ? /* @__PURE__ */ jsx9(SpinnerIcon, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx9(XIcon3, { className: "h-3.5 w-3.5" })
5079
5036
  }
5080
5037
  )
5081
5038
  ]
@@ -5083,14 +5040,14 @@ function AttachedItemsBody({
5083
5040
  link.edgeId
5084
5041
  );
5085
5042
  }) }) }),
5086
- onAdd ? /* @__PURE__ */ jsxs8(
5043
+ onAdd ? /* @__PURE__ */ jsxs7(
5087
5044
  "button",
5088
5045
  {
5089
5046
  type: "button",
5090
5047
  onClick: onAdd,
5091
5048
  className: "mt-2 flex w-full items-center justify-center gap-1.5 rounded-md border border-border px-3 py-2 text-sm text-muted-foreground transition-colors hover:border-primary/60 hover:text-foreground",
5092
5049
  children: [
5093
- /* @__PURE__ */ jsx10(PlusIcon3, { className: "h-4 w-4" }),
5050
+ /* @__PURE__ */ jsx9(PlusIcon3, { className: "h-4 w-4" }),
5094
5051
  "Attach ",
5095
5052
  info.labelPlural.toLowerCase()
5096
5053
  ]
@@ -5153,7 +5110,7 @@ function getContentRoleMeta(role) {
5153
5110
 
5154
5111
  // src/react/components/AssociationCard.tsx
5155
5112
  import { PlusIcon as PlusIcon4 } from "@ai-matrx/design-system/icons";
5156
- import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
5113
+ import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
5157
5114
  function AssociationCard({
5158
5115
  token,
5159
5116
  container: containerProp,
@@ -5192,7 +5149,7 @@ function AssociationCard({
5192
5149
  const canDrillIn = count > 0;
5193
5150
  const countWord = filing ? "filed under" : "attached";
5194
5151
  const drillTitle = canDrillIn ? `View the ${info.labelPlural.toLowerCase()} attached to ${container.label ?? "this"}` : void 0;
5195
- return /* @__PURE__ */ jsxs9(Fragment3, { children: [
5152
+ return /* @__PURE__ */ jsxs8(Fragment3, { children: [
5196
5153
  look !== "tiles" ? (
5197
5154
  // ONE-LINE LOOKS (opt-in, off by default): small icon, UPPERCASE name,
5198
5155
  // count, then the "+".
@@ -5204,7 +5161,7 @@ function AssociationCard({
5204
5161
  // so the tap target's own 44px box centers the 28px circle with
5205
5162
  // 8px on every side. Never pass a layout class to a tap button —
5206
5163
  // its className lands on the ICON (the 2026-09-27 crooked "+").
5207
- /* @__PURE__ */ jsxs9(
5164
+ /* @__PURE__ */ jsxs8(
5208
5165
  "div",
5209
5166
  {
5210
5167
  "data-association-card": token,
@@ -5215,7 +5172,7 @@ function AssociationCard({
5215
5172
  className
5216
5173
  ),
5217
5174
  children: [
5218
- /* @__PURE__ */ jsxs9(
5175
+ /* @__PURE__ */ jsxs8(
5219
5176
  "button",
5220
5177
  {
5221
5178
  type: "button",
@@ -5228,13 +5185,13 @@ function AssociationCard({
5228
5185
  canDrillIn ? "cursor-pointer hover:text-foreground" : "cursor-default"
5229
5186
  ),
5230
5187
  children: [
5231
- /* @__PURE__ */ jsx11(Icon, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
5232
- /* @__PURE__ */ jsx11("span", { className: "min-w-0 truncate text-xs font-semibold uppercase tracking-wider text-foreground", children: info.labelPlural }),
5233
- loading ? /* @__PURE__ */ jsx11(SpinnerIcon, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsx11("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
5188
+ /* @__PURE__ */ jsx10(Icon, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
5189
+ /* @__PURE__ */ jsx10("span", { className: "min-w-0 truncate text-xs font-semibold uppercase tracking-wider text-foreground", children: info.labelPlural }),
5190
+ loading ? /* @__PURE__ */ jsx10(SpinnerIcon, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsx10("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
5234
5191
  ]
5235
5192
  }
5236
5193
  ),
5237
- canAttach && (look === "compact" ? /* @__PURE__ */ jsx11(
5194
+ canAttach && (look === "compact" ? /* @__PURE__ */ jsx10(
5238
5195
  PlusTapButton,
5239
5196
  {
5240
5197
  variant: "outline",
@@ -5242,7 +5199,7 @@ function AssociationCard({
5242
5199
  tooltip: false,
5243
5200
  onClick: () => setOpen(true)
5244
5201
  }
5245
- ) : /* @__PURE__ */ jsx11(
5202
+ ) : /* @__PURE__ */ jsx10(
5246
5203
  "button",
5247
5204
  {
5248
5205
  type: "button",
@@ -5250,13 +5207,13 @@ function AssociationCard({
5250
5207
  "aria-label": `Attach ${info.labelPlural.toLowerCase()}`,
5251
5208
  title: `Attach ${info.labelPlural.toLowerCase()}`,
5252
5209
  className: "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:h-7 lg:w-7",
5253
- children: /* @__PURE__ */ jsx11(PlusIcon4, { className: "h-4 w-4" })
5210
+ children: /* @__PURE__ */ jsx10(PlusIcon4, { className: "h-4 w-4" })
5254
5211
  }
5255
5212
  ))
5256
5213
  ]
5257
5214
  }
5258
5215
  )
5259
- ) : /* @__PURE__ */ jsxs9(
5216
+ ) : /* @__PURE__ */ jsxs8(
5260
5217
  "div",
5261
5218
  {
5262
5219
  "data-association-card": token,
@@ -5266,7 +5223,7 @@ function AssociationCard({
5266
5223
  className
5267
5224
  ),
5268
5225
  children: [
5269
- /* @__PURE__ */ jsx11(
5226
+ /* @__PURE__ */ jsx10(
5270
5227
  "span",
5271
5228
  {
5272
5229
  className: cn7(
@@ -5275,7 +5232,7 @@ function AssociationCard({
5275
5232
  )
5276
5233
  }
5277
5234
  ),
5278
- /* @__PURE__ */ jsxs9(
5235
+ /* @__PURE__ */ jsxs8(
5279
5236
  "button",
5280
5237
  {
5281
5238
  type: "button",
@@ -5287,7 +5244,7 @@ function AssociationCard({
5287
5244
  canDrillIn ? "cursor-pointer" : "cursor-default"
5288
5245
  ),
5289
5246
  children: [
5290
- /* @__PURE__ */ jsx11(
5247
+ /* @__PURE__ */ jsx10(
5291
5248
  "span",
5292
5249
  {
5293
5250
  className: cn7(
@@ -5295,20 +5252,20 @@ function AssociationCard({
5295
5252
  role.accentBg,
5296
5253
  role.accentText
5297
5254
  ),
5298
- children: /* @__PURE__ */ jsx11(Icon, { className: "h-4 w-4" })
5255
+ children: /* @__PURE__ */ jsx10(Icon, { className: "h-4 w-4" })
5299
5256
  }
5300
5257
  ),
5301
- /* @__PURE__ */ jsxs9("span", { className: "min-w-0 flex-1", children: [
5302
- /* @__PURE__ */ jsx11("span", { className: "block truncate text-sm font-medium text-foreground", children: info.labelPlural }),
5303
- /* @__PURE__ */ jsx11("span", { className: "block text-xs text-muted-foreground tabular-nums", children: loading ? /* @__PURE__ */ jsxs9("span", { className: "inline-flex items-center gap-1", children: [
5304
- /* @__PURE__ */ jsx11(SpinnerIcon, { className: "h-3 w-3 animate-spin" }),
5258
+ /* @__PURE__ */ jsxs8("span", { className: "min-w-0 flex-1", children: [
5259
+ /* @__PURE__ */ jsx10("span", { className: "block truncate text-sm font-medium text-foreground", children: info.labelPlural }),
5260
+ /* @__PURE__ */ jsx10("span", { className: "block text-xs text-muted-foreground tabular-nums", children: loading ? /* @__PURE__ */ jsxs8("span", { className: "inline-flex items-center gap-1", children: [
5261
+ /* @__PURE__ */ jsx10(SpinnerIcon, { className: "h-3 w-3 animate-spin" }),
5305
5262
  "Loading\u2026"
5306
5263
  ] }) : `${count} ${countWord}` })
5307
5264
  ] })
5308
5265
  ]
5309
5266
  }
5310
5267
  ),
5311
- canAttach && /* @__PURE__ */ jsx11(
5268
+ canAttach && /* @__PURE__ */ jsx10(
5312
5269
  "button",
5313
5270
  {
5314
5271
  type: "button",
@@ -5316,13 +5273,13 @@ function AssociationCard({
5316
5273
  "aria-label": `Attach ${info.labelPlural.toLowerCase()}`,
5317
5274
  title: `Attach ${info.labelPlural.toLowerCase()}`,
5318
5275
  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",
5319
- children: /* @__PURE__ */ jsx11(PlusIcon4, { className: "h-4 w-4" })
5276
+ children: /* @__PURE__ */ jsx10(PlusIcon4, { className: "h-4 w-4" })
5320
5277
  }
5321
5278
  )
5322
5279
  ]
5323
5280
  }
5324
5281
  ),
5325
- listOpen && /* @__PURE__ */ jsx11(
5282
+ listOpen && /* @__PURE__ */ jsx10(
5326
5283
  AttachedItemsSheet,
5327
5284
  {
5328
5285
  open: listOpen,
@@ -5341,7 +5298,7 @@ function AssociationCard({
5341
5298
  onSetPinned: (resourceId, pinned, role2) => setPinned(token, resourceId, pinned, role2 ?? void 0)
5342
5299
  }
5343
5300
  ),
5344
- canAttach && /* @__PURE__ */ jsx11(
5301
+ canAttach && /* @__PURE__ */ jsx10(
5345
5302
  AssociationPicker,
5346
5303
  {
5347
5304
  open,
@@ -5360,7 +5317,7 @@ function AssociationCard({
5360
5317
 
5361
5318
  // src/react/components/AssociationCardGrid.tsx
5362
5319
  import { cn as cn8 } from "@ai-matrx/design-system";
5363
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
5320
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
5364
5321
  var SIMPLE_GROUP_LABEL = "mb-1 text-xs font-medium uppercase tracking-wider text-muted-foreground";
5365
5322
  var SIMPLE_TILE_ROW = "flex flex-wrap gap-2 [&>*]:min-w-[16rem] [&>*]:flex-1";
5366
5323
  var TILE_GRID = "grid grid-cols-1 gap-2 @md:grid-cols-2 @3xl:grid-cols-3";
@@ -5369,11 +5326,11 @@ function GroupHeader({
5369
5326
  title,
5370
5327
  dotClassName
5371
5328
  }) {
5372
- if (look !== "tiles") return /* @__PURE__ */ jsx12("h3", { className: SIMPLE_GROUP_LABEL, children: title });
5373
- return /* @__PURE__ */ jsx12("div", { className: "mb-2.5 flex items-baseline gap-3 pl-1.5", children: dotClassName ? /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
5374
- /* @__PURE__ */ jsx12("span", { className: cn8("h-2.5 w-2.5 rounded-full", dotClassName) }),
5375
- /* @__PURE__ */ jsx12("h3", { className: "text-sm font-semibold text-foreground", children: title })
5376
- ] }) : /* @__PURE__ */ jsx12("h3", { className: "text-sm font-semibold text-foreground", children: title }) });
5329
+ if (look !== "tiles") return /* @__PURE__ */ jsx11("h3", { className: SIMPLE_GROUP_LABEL, children: title });
5330
+ return /* @__PURE__ */ jsx11("div", { className: "mb-2.5 flex items-baseline gap-3 pl-1.5", children: dotClassName ? /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
5331
+ /* @__PURE__ */ jsx11("span", { className: cn8("h-2.5 w-2.5 rounded-full", dotClassName) }),
5332
+ /* @__PURE__ */ jsx11("h3", { className: "text-sm font-semibold text-foreground", children: title })
5333
+ ] }) : /* @__PURE__ */ jsx11("h3", { className: "text-sm font-semibold text-foreground", children: title }) });
5377
5334
  }
5378
5335
  function AssociationCardGrid({
5379
5336
  tokens,
@@ -5386,13 +5343,13 @@ function AssociationCardGrid({
5386
5343
  const excluded = new Set(excludeTokens ?? []);
5387
5344
  const filing = primary?.direction === "outgoing";
5388
5345
  const links = useContainerLinks(containerLinksArgs(primary));
5389
- const base2 = tokens ?? store.registry.curatedTokens();
5346
+ const base = tokens ?? store.registry.curatedTokens();
5390
5347
  const withPresent = filing ? [
5391
- ...base2,
5348
+ ...base,
5392
5349
  ...links.presentTokens.filter(
5393
- (t) => isEntityTypeToken(t) && !base2.includes(t)
5350
+ (t) => isEntityTypeToken(t) && !base.includes(t)
5394
5351
  )
5395
- ] : base2;
5352
+ ] : base;
5396
5353
  const list = withPresent.filter(
5397
5354
  (token) => !excluded.has(token) && (!filing || isAssociationTargetType(token))
5398
5355
  );
@@ -5402,7 +5359,7 @@ function AssociationCardGrid({
5402
5359
  return !role || !roleIds.has(role);
5403
5360
  }) : [];
5404
5361
  const rowClass = look !== "tiles" ? SIMPLE_TILE_ROW : TILE_GRID;
5405
- return /* @__PURE__ */ jsxs10(
5362
+ return /* @__PURE__ */ jsxs9(
5406
5363
  "div",
5407
5364
  {
5408
5365
  "data-association-grid-look": look,
@@ -5413,8 +5370,8 @@ function AssociationCardGrid({
5413
5370
  (token) => store.registry.getEntityInfo(token).contentRole === role.id
5414
5371
  );
5415
5372
  if (inRole.length === 0) return null;
5416
- return /* @__PURE__ */ jsxs10("section", { children: [
5417
- /* @__PURE__ */ jsx12(
5373
+ return /* @__PURE__ */ jsxs9("section", { children: [
5374
+ /* @__PURE__ */ jsx11(
5418
5375
  GroupHeader,
5419
5376
  {
5420
5377
  look,
@@ -5422,18 +5379,18 @@ function AssociationCardGrid({
5422
5379
  dotClassName: role.accentBar
5423
5380
  }
5424
5381
  ),
5425
- /* @__PURE__ */ jsx12("div", { className: rowClass, children: inRole.map((token) => /* @__PURE__ */ jsx12(AssociationCard, { token, look }, token)) })
5382
+ /* @__PURE__ */ jsx11("div", { className: rowClass, children: inRole.map((token) => /* @__PURE__ */ jsx11(AssociationCard, { token, look }, token)) })
5426
5383
  ] }, role.id);
5427
5384
  }),
5428
- roleless.length > 0 && /* @__PURE__ */ jsxs10("section", { children: [
5429
- /* @__PURE__ */ jsx12(
5385
+ roleless.length > 0 && /* @__PURE__ */ jsxs9("section", { children: [
5386
+ /* @__PURE__ */ jsx11(
5430
5387
  GroupHeader,
5431
5388
  {
5432
5389
  look,
5433
5390
  title: "Filed under"
5434
5391
  }
5435
5392
  ),
5436
- /* @__PURE__ */ jsx12("div", { className: rowClass, children: roleless.map((token) => /* @__PURE__ */ jsx12(AssociationCard, { token, look }, token)) })
5393
+ /* @__PURE__ */ jsx11("div", { className: rowClass, children: roleless.map((token) => /* @__PURE__ */ jsx11(AssociationCard, { token, look }, token)) })
5437
5394
  ] })
5438
5395
  ]
5439
5396
  }
@@ -5445,7 +5402,7 @@ import { useState as useState10 } from "react";
5445
5402
  import { cn as cn9, Skeleton } from "@ai-matrx/design-system";
5446
5403
  import { PinIcon as PinIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@ai-matrx/design-system/icons";
5447
5404
  import { openOutbound } from "@ai-matrx/kit/outbound";
5448
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
5405
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
5449
5406
  function metadataIsPinned2(metadata) {
5450
5407
  return metadata !== null && typeof metadata === "object" && !Array.isArray(metadata) && Reflect.get(metadata, "pinned") === true;
5451
5408
  }
@@ -5556,15 +5513,15 @@ function AssociationList(props) {
5556
5513
  const grouped = groupRows(store, visibleRows);
5557
5514
  const isLoading = adapter.status === "loading" || adapter.status === "idle";
5558
5515
  const attachableTokens = tokenFilter ?? store.registry.listableTokens();
5559
- return /* @__PURE__ */ jsxs11("div", { className: cn9("flex flex-col gap-2 text-foreground", props.className), children: [
5560
- /* @__PURE__ */ jsxs11("div", { className: cn9("flex items-center gap-2 px-1", props.title === null ? "justify-end" : "justify-between"), children: [
5561
- props.title === null ? null : /* @__PURE__ */ jsxs11("h3", { className: "flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: [
5562
- /* @__PURE__ */ jsx13(Link2Icon, { className: "h-3.5 w-3.5" }),
5516
+ return /* @__PURE__ */ jsxs10("div", { className: cn9("flex flex-col gap-2 text-foreground", props.className), children: [
5517
+ /* @__PURE__ */ jsxs10("div", { className: cn9("flex items-center gap-2 px-1", props.title === null ? "justify-end" : "justify-between"), children: [
5518
+ props.title === null ? null : /* @__PURE__ */ jsxs10("h3", { className: "flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: [
5519
+ /* @__PURE__ */ jsx12(Link2Icon, { className: "h-3.5 w-3.5" }),
5563
5520
  props.title ?? "Resources",
5564
- visibleRows.length > 0 && /* @__PURE__ */ jsx13("span", { className: "rounded bg-muted px-1 text-[10px] font-medium text-muted-foreground", children: visibleRows.length })
5521
+ visibleRows.length > 0 && /* @__PURE__ */ jsx12("span", { className: "rounded bg-muted px-1 text-[10px] font-medium text-muted-foreground", children: visibleRows.length })
5565
5522
  ] }),
5566
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1.5", children: [
5567
- /* @__PURE__ */ jsxs11(
5523
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1.5", children: [
5524
+ /* @__PURE__ */ jsxs10(
5568
5525
  "button",
5569
5526
  {
5570
5527
  type: "button",
@@ -5574,19 +5531,19 @@ function AssociationList(props) {
5574
5531
  showUniversal ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground"
5575
5532
  ),
5576
5533
  children: [
5577
- /* @__PURE__ */ jsx13(PlusIcon5, { className: "h-3 w-3" }),
5534
+ /* @__PURE__ */ jsx12(PlusIcon5, { className: "h-3 w-3" }),
5578
5535
  "Add"
5579
5536
  ]
5580
5537
  }
5581
5538
  ),
5582
- /* @__PURE__ */ jsx13(
5539
+ /* @__PURE__ */ jsx12(
5583
5540
  "button",
5584
5541
  {
5585
5542
  type: "button",
5586
5543
  onClick: () => void adapter.reload(),
5587
5544
  title: "Refresh",
5588
5545
  className: "text-muted-foreground/60 transition-colors hover:text-foreground",
5589
- children: /* @__PURE__ */ jsx13(
5546
+ children: /* @__PURE__ */ jsx12(
5590
5547
  RefreshIcon,
5591
5548
  {
5592
5549
  className: cn9(
@@ -5599,7 +5556,7 @@ function AssociationList(props) {
5599
5556
  )
5600
5557
  ] })
5601
5558
  ] }),
5602
- showUniversal && /* @__PURE__ */ jsx13("div", { className: "rounded-md border border-border/60 bg-muted/30 p-2 max-h-80 flex flex-col", children: /* @__PURE__ */ jsx13(
5559
+ showUniversal && /* @__PURE__ */ jsx12("div", { className: "rounded-md border border-border/60 bg-muted/30 p-2 max-h-80 flex flex-col", children: /* @__PURE__ */ jsx12(
5603
5560
  UniversalAssociationPicker,
5604
5561
  {
5605
5562
  tokens: attachableTokens,
@@ -5609,9 +5566,9 @@ function AssociationList(props) {
5609
5566
  onDetach: (token, id) => adapter.detach(token, id)
5610
5567
  }
5611
5568
  ) }),
5612
- adapter.status === "error" && /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-2.5 py-2", children: [
5613
- /* @__PURE__ */ jsx13("span", { className: "truncate text-[11px] text-destructive", children: adapter.error || "Failed to load resources" }),
5614
- /* @__PURE__ */ jsx13(
5569
+ adapter.status === "error" && /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-2.5 py-2", children: [
5570
+ /* @__PURE__ */ jsx12("span", { className: "truncate text-[11px] text-destructive", children: adapter.error || "Failed to load resources" }),
5571
+ /* @__PURE__ */ jsx12(
5615
5572
  "button",
5616
5573
  {
5617
5574
  type: "button",
@@ -5621,17 +5578,17 @@ function AssociationList(props) {
5621
5578
  }
5622
5579
  )
5623
5580
  ] }),
5624
- adapter.status !== "error" && isLoading && visibleRows.length === 0 && /* @__PURE__ */ jsxs11("div", { className: "space-y-1.5 px-1", children: [
5625
- /* @__PURE__ */ jsx13(Skeleton, { className: "h-3 w-20" }),
5626
- /* @__PURE__ */ jsx13(Skeleton, { className: "h-7 w-full rounded-md" }),
5627
- /* @__PURE__ */ jsx13(Skeleton, { className: "h-7 w-3/4 rounded-md" })
5581
+ adapter.status !== "error" && isLoading && visibleRows.length === 0 && /* @__PURE__ */ jsxs10("div", { className: "space-y-1.5 px-1", children: [
5582
+ /* @__PURE__ */ jsx12(Skeleton, { className: "h-3 w-20" }),
5583
+ /* @__PURE__ */ jsx12(Skeleton, { className: "h-7 w-full rounded-md" }),
5584
+ /* @__PURE__ */ jsx12(Skeleton, { className: "h-7 w-3/4 rounded-md" })
5628
5585
  ] }),
5629
- adapter.status === "ready" && visibleRows.length === 0 && /* @__PURE__ */ jsx13("p", { className: "px-1 py-1 text-[11px] text-muted-foreground", children: "Nothing attached yet \u2014 use Add to link anything." }),
5630
- visibleRows.length > 0 && /* @__PURE__ */ jsx13("div", { className: "space-y-2.5", children: grouped.map(({ role, tokens: tokenGroups }) => {
5586
+ adapter.status === "ready" && visibleRows.length === 0 && /* @__PURE__ */ jsx12("p", { className: "px-1 py-1 text-[11px] text-muted-foreground", children: "Nothing attached yet \u2014 use Add to link anything." }),
5587
+ visibleRows.length > 0 && /* @__PURE__ */ jsx12("div", { className: "space-y-2.5", children: grouped.map(({ role, tokens: tokenGroups }) => {
5631
5588
  const roleMeta = getContentRoleMeta(role);
5632
- return /* @__PURE__ */ jsxs11("div", { className: "space-y-1.5", children: [
5633
- variant === "full" && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1.5 px-1", children: [
5634
- /* @__PURE__ */ jsx13(
5589
+ return /* @__PURE__ */ jsxs10("div", { className: "space-y-1.5", children: [
5590
+ variant === "full" && /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1.5 px-1", children: [
5591
+ /* @__PURE__ */ jsx12(
5635
5592
  "span",
5636
5593
  {
5637
5594
  className: cn9(
@@ -5640,7 +5597,7 @@ function AssociationList(props) {
5640
5597
  )
5641
5598
  }
5642
5599
  ),
5643
- /* @__PURE__ */ jsx13(
5600
+ /* @__PURE__ */ jsx12(
5644
5601
  "p",
5645
5602
  {
5646
5603
  className: cn9(
@@ -5653,28 +5610,28 @@ function AssociationList(props) {
5653
5610
  ] }),
5654
5611
  tokenGroups.map(({ info, token, rows: tokenRows }) => {
5655
5612
  const TokenIcon = info?.Icon ?? null;
5656
- return /* @__PURE__ */ jsxs11("div", { className: "space-y-0.5", children: [
5657
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-1 px-1", children: [
5658
- /* @__PURE__ */ jsxs11("p", { className: "flex items-center gap-1 text-[10px] font-medium text-muted-foreground/80", children: [
5659
- TokenIcon ? /* @__PURE__ */ jsx13(TokenIcon, { className: "h-3 w-3" }) : null,
5613
+ return /* @__PURE__ */ jsxs10("div", { className: "space-y-0.5", children: [
5614
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between gap-1 px-1", children: [
5615
+ /* @__PURE__ */ jsxs10("p", { className: "flex items-center gap-1 text-[10px] font-medium text-muted-foreground/80", children: [
5616
+ TokenIcon ? /* @__PURE__ */ jsx12(TokenIcon, { className: "h-3 w-3" }) : null,
5660
5617
  info?.labelPlural ?? titleize(token),
5661
- /* @__PURE__ */ jsx13("span", { className: "text-muted-foreground/50", children: tokenRows.length })
5618
+ /* @__PURE__ */ jsx12("span", { className: "text-muted-foreground/50", children: tokenRows.length })
5662
5619
  ] }),
5663
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1", children: [
5620
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1", children: [
5664
5621
  props.renderSectionActions && info ? props.renderSectionActions(info.token) : null,
5665
- info?.canListCandidates && /* @__PURE__ */ jsx13(
5622
+ info?.canListCandidates && /* @__PURE__ */ jsx12(
5666
5623
  "button",
5667
5624
  {
5668
5625
  type: "button",
5669
5626
  onClick: () => setPickerToken(info.token),
5670
5627
  title: `Add ${info.labelPlural}`,
5671
5628
  className: "rounded p-0.5 text-muted-foreground/60 transition-colors hover:bg-accent hover:text-foreground",
5672
- children: /* @__PURE__ */ jsx13(PlusIcon5, { className: "h-3 w-3" })
5629
+ children: /* @__PURE__ */ jsx12(PlusIcon5, { className: "h-3 w-3" })
5673
5630
  }
5674
5631
  )
5675
5632
  ] })
5676
5633
  ] }),
5677
- /* @__PURE__ */ jsx13("ul", { className: "space-y-0.5", children: tokenRows.map((row) => {
5634
+ /* @__PURE__ */ jsx12("ul", { className: "space-y-0.5", children: tokenRows.map((row) => {
5678
5635
  const busy = removingKeys.has(row.key);
5679
5636
  const custom = props.renderRow?.(row, {
5680
5637
  title: titleFor({
@@ -5687,9 +5644,9 @@ function AssociationList(props) {
5687
5644
  onOpen: () => openRow(row)
5688
5645
  });
5689
5646
  if (custom != null) {
5690
- return /* @__PURE__ */ jsx13("li", { children: custom }, row.key);
5647
+ return /* @__PURE__ */ jsx12("li", { children: custom }, row.key);
5691
5648
  }
5692
- return /* @__PURE__ */ jsx13("li", { children: /* @__PURE__ */ jsxs11(
5649
+ return /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsxs10(
5693
5650
  "div",
5694
5651
  {
5695
5652
  className: cn9(
@@ -5701,7 +5658,7 @@ function AssociationList(props) {
5701
5658
  token: row.token,
5702
5659
  id: row.resourceId,
5703
5660
  label: row.label
5704
- }) ? /* @__PURE__ */ jsx13("span", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx13(UnresolvedRef, { token: row.token, id: row.resourceId }) }) : /* @__PURE__ */ jsx13(
5661
+ }) ? /* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx12(UnresolvedRef, { token: row.token, id: row.resourceId }) }) : /* @__PURE__ */ jsx12(
5705
5662
  DoorRef,
5706
5663
  {
5707
5664
  token: row.token,
@@ -5717,9 +5674,9 @@ function AssociationList(props) {
5717
5674
  className: "min-w-0 flex-1 text-foreground"
5718
5675
  }
5719
5676
  ),
5720
- row.originRefs && row.originRefs.length > 0 ? /* @__PURE__ */ jsxs11("span", { className: "flex shrink-0 items-center gap-1 text-[10px] text-muted-foreground/60", children: [
5677
+ row.originRefs && row.originRefs.length > 0 ? /* @__PURE__ */ jsxs10("span", { className: "flex shrink-0 items-center gap-1 text-[10px] text-muted-foreground/60", children: [
5721
5678
  "via",
5722
- row.originRefs.map((origin) => /* @__PURE__ */ jsx13(
5679
+ row.originRefs.map((origin) => /* @__PURE__ */ jsx12(
5723
5680
  DoorRef,
5724
5681
  {
5725
5682
  token: origin.token,
@@ -5731,8 +5688,8 @@ function AssociationList(props) {
5731
5688
  },
5732
5689
  `${origin.token}:${origin.id}`
5733
5690
  ))
5734
- ] }) : row.originNote ? /* @__PURE__ */ jsx13("span", { className: "shrink-0 text-[10px] text-muted-foreground/60", children: row.originNote }) : null,
5735
- adapter.setPinned && info && row.removable && /* @__PURE__ */ jsx13(
5691
+ ] }) : row.originNote ? /* @__PURE__ */ jsx12("span", { className: "shrink-0 text-[10px] text-muted-foreground/60", children: row.originNote }) : null,
5692
+ adapter.setPinned && info && row.removable && /* @__PURE__ */ jsx12(
5736
5693
  "button",
5737
5694
  {
5738
5695
  type: "button",
@@ -5744,7 +5701,7 @@ function AssociationList(props) {
5744
5701
  "shrink-0 rounded p-0.5 transition-colors hover:!text-foreground",
5745
5702
  row.pinned ? "text-primary" : "text-muted-foreground/0 group-hover:text-muted-foreground"
5746
5703
  ),
5747
- children: pinningKeys.has(row.key) ? /* @__PURE__ */ jsx13(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx13(
5704
+ children: pinningKeys.has(row.key) ? /* @__PURE__ */ jsx12(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx12(
5748
5705
  PinIcon2,
5749
5706
  {
5750
5707
  className: cn9(
@@ -5755,7 +5712,7 @@ function AssociationList(props) {
5755
5712
  )
5756
5713
  }
5757
5714
  ),
5758
- row.removable && /* @__PURE__ */ jsx13(
5715
+ row.removable && /* @__PURE__ */ jsx12(
5759
5716
  "button",
5760
5717
  {
5761
5718
  type: "button",
@@ -5764,7 +5721,7 @@ function AssociationList(props) {
5764
5721
  title: "Detach",
5765
5722
  "aria-label": "Detach",
5766
5723
  className: "shrink-0 rounded p-0.5 text-muted-foreground/0 transition-colors group-hover:text-muted-foreground hover:!text-destructive disabled:opacity-50",
5767
- children: busy ? /* @__PURE__ */ jsx13(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx13(XIcon4, { className: "h-3 w-3" })
5724
+ children: busy ? /* @__PURE__ */ jsx12(SpinnerIcon, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx12(XIcon4, { className: "h-3 w-3" })
5768
5725
  }
5769
5726
  )
5770
5727
  ]
@@ -5775,7 +5732,7 @@ function AssociationList(props) {
5775
5732
  })
5776
5733
  ] }, role);
5777
5734
  }) }),
5778
- pickerToken && /* @__PURE__ */ jsx13(
5735
+ pickerToken && /* @__PURE__ */ jsx12(
5779
5736
  AssociationPicker,
5780
5737
  {
5781
5738
  open: true,
@@ -5835,7 +5792,7 @@ import { useRef as useRef8, useState as useState11 } from "react";
5835
5792
  import { Button as Button2, cn as cn10, Input as Input3 } from "@ai-matrx/design-system";
5836
5793
  import { PlusIcon as PlusIcon6 } from "@ai-matrx/design-system/icons";
5837
5794
  import { openOutbound as openOutbound2 } from "@ai-matrx/kit/outbound";
5838
- import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
5795
+ import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
5839
5796
  function AssociationCaptureToolbar({
5840
5797
  attach,
5841
5798
  uploadFolderPath,
@@ -6068,7 +6025,7 @@ function AssociationCaptureToolbar({
6068
6025
  }
6069
6026
  };
6070
6027
  const anyBuiltIn = actions.upload || actions.addFile || actions.newDocument;
6071
- return /* @__PURE__ */ jsxs12(
6028
+ return /* @__PURE__ */ jsxs11(
6072
6029
  "div",
6073
6030
  {
6074
6031
  className: cn10(
@@ -6089,11 +6046,11 @@ function AssociationCaptureToolbar({
6089
6046
  },
6090
6047
  onDrop: handleDrop,
6091
6048
  children: [
6092
- isDragOver ? /* @__PURE__ */ jsx14("div", { className: "pointer-events-none absolute inset-0 z-10 grid place-items-center bg-background/70", children: /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-2 rounded-md border border-primary/40 bg-card px-3 py-1.5 text-xs font-medium text-foreground", children: [
6093
- /* @__PURE__ */ jsx14(UploadIcon, { className: "size-3.5 text-primary" }),
6049
+ isDragOver ? /* @__PURE__ */ jsx13("div", { className: "pointer-events-none absolute inset-0 z-10 grid place-items-center bg-background/70", children: /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-2 rounded-md border border-primary/40 bg-card px-3 py-1.5 text-xs font-medium text-foreground", children: [
6050
+ /* @__PURE__ */ jsx13(UploadIcon, { className: "size-3.5 text-primary" }),
6094
6051
  "Drop to upload & attach"
6095
6052
  ] }) }) : null,
6096
- /* @__PURE__ */ jsx14(
6053
+ /* @__PURE__ */ jsx13(
6097
6054
  "input",
6098
6055
  {
6099
6056
  ref: fileInputRef,
@@ -6103,8 +6060,8 @@ function AssociationCaptureToolbar({
6103
6060
  onChange: handleFilesSelected
6104
6061
  }
6105
6062
  ),
6106
- showToolbar && (anyBuiltIn || extraActions) ? /* @__PURE__ */ jsx14("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border/60 px-1.5 py-1", children: namingDoc ? /* @__PURE__ */ jsxs12("div", { className: "flex flex-1 items-center gap-1.5 py-0.5", children: [
6107
- /* @__PURE__ */ jsx14(
6063
+ showToolbar && (anyBuiltIn || extraActions) ? /* @__PURE__ */ jsx13("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border/60 px-1.5 py-1", children: namingDoc ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-1 items-center gap-1.5 py-0.5", children: [
6064
+ /* @__PURE__ */ jsx13(
6108
6065
  Input3,
6109
6066
  {
6110
6067
  autoFocus: true,
@@ -6123,17 +6080,17 @@ function AssociationCaptureToolbar({
6123
6080
  style: { fontSize: 16 }
6124
6081
  }
6125
6082
  ),
6126
- /* @__PURE__ */ jsx14(
6083
+ /* @__PURE__ */ jsx13(
6127
6084
  "button",
6128
6085
  {
6129
6086
  type: "button",
6130
6087
  disabled: creatingDoc || !docName.trim(),
6131
6088
  onClick: () => void handleCreateDoc(),
6132
6089
  className: "flex h-7 items-center rounded-md bg-primary px-2 text-[11px] font-medium text-primary-foreground disabled:opacity-50",
6133
- children: creatingDoc ? /* @__PURE__ */ jsx14(SpinnerIcon, { className: "size-3.5 animate-spin" }) : "Create"
6090
+ children: creatingDoc ? /* @__PURE__ */ jsx13(SpinnerIcon, { className: "size-3.5 animate-spin" }) : "Create"
6134
6091
  }
6135
6092
  ),
6136
- /* @__PURE__ */ jsx14(
6093
+ /* @__PURE__ */ jsx13(
6137
6094
  "button",
6138
6095
  {
6139
6096
  type: "button",
@@ -6146,8 +6103,8 @@ function AssociationCaptureToolbar({
6146
6103
  children: "Cancel"
6147
6104
  }
6148
6105
  )
6149
- ] }) : /* @__PURE__ */ jsxs12(Fragment4, { children: [
6150
- actions.upload ? /* @__PURE__ */ jsx14(
6106
+ ] }) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
6107
+ actions.upload ? /* @__PURE__ */ jsx13(
6151
6108
  CaptureToolbarAction,
6152
6109
  {
6153
6110
  icon: isUploading ? SpinnerIcon : UploadIcon,
@@ -6157,7 +6114,7 @@ function AssociationCaptureToolbar({
6157
6114
  disabled: isPicking || isUploading
6158
6115
  }
6159
6116
  ) : null,
6160
- actions.addFile ? /* @__PURE__ */ jsx14(
6117
+ actions.addFile ? /* @__PURE__ */ jsx13(
6161
6118
  CaptureToolbarAction,
6162
6119
  {
6163
6120
  icon: isPicking ? SpinnerIcon : FolderOpenIcon,
@@ -6167,8 +6124,8 @@ function AssociationCaptureToolbar({
6167
6124
  disabled: isPicking || isUploading
6168
6125
  }
6169
6126
  ) : null,
6170
- (actions.upload || actions.addFile) && actions.newDocument ? /* @__PURE__ */ jsx14("span", { className: "mx-1 h-4 w-px bg-border" }) : null,
6171
- actions.newDocument ? /* @__PURE__ */ jsx14(
6127
+ (actions.upload || actions.addFile) && actions.newDocument ? /* @__PURE__ */ jsx13("span", { className: "mx-1 h-4 w-px bg-border" }) : null,
6128
+ actions.newDocument ? /* @__PURE__ */ jsx13(
6172
6129
  CaptureToolbarAction,
6173
6130
  {
6174
6131
  icon: creatingDoc ? SpinnerIcon : PlusIcon6,
@@ -6192,7 +6149,7 @@ function CaptureToolbarAction({
6192
6149
  disabled,
6193
6150
  spinning
6194
6151
  }) {
6195
- return /* @__PURE__ */ jsxs12(
6152
+ return /* @__PURE__ */ jsxs11(
6196
6153
  Button2,
6197
6154
  {
6198
6155
  type: "button",
@@ -6202,7 +6159,7 @@ function CaptureToolbarAction({
6202
6159
  disabled,
6203
6160
  className: "h-7 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground",
6204
6161
  children: [
6205
- /* @__PURE__ */ jsx14(Icon, { className: cn10("size-3.5", spinning && "animate-spin") }),
6162
+ /* @__PURE__ */ jsx13(Icon, { className: cn10("size-3.5", spinning && "animate-spin") }),
6206
6163
  label
6207
6164
  ]
6208
6165
  }
@@ -6211,7 +6168,7 @@ function CaptureToolbarAction({
6211
6168
 
6212
6169
  // src/react/lazyPorts.tsx
6213
6170
  import { Suspense, lazy } from "react";
6214
- import { jsx as jsx15 } from "react/jsx-runtime";
6171
+ import { jsx as jsx14 } from "react/jsx-runtime";
6215
6172
  function lazyComponent(load) {
6216
6173
  return lazy(async () => {
6217
6174
  const loaded = await load();
@@ -6221,14 +6178,14 @@ function lazyComponent(load) {
6221
6178
  function lazyWindowShell(load) {
6222
6179
  const Loaded = lazyComponent(load);
6223
6180
  return function LazyWindowShell(props) {
6224
- return /* @__PURE__ */ jsx15(Suspense, { fallback: null, children: /* @__PURE__ */ jsx15(Loaded, { ...props }) });
6181
+ return /* @__PURE__ */ jsx14(Suspense, { fallback: null, children: /* @__PURE__ */ jsx14(Loaded, { ...props }) });
6225
6182
  };
6226
6183
  }
6227
6184
  function lazyPickerOverride(load) {
6228
6185
  const Loaded = lazyComponent(load);
6229
6186
  return function LazyPickerOverride(props) {
6230
6187
  if (!props.open) return null;
6231
- return /* @__PURE__ */ jsx15(Suspense, { fallback: null, children: /* @__PURE__ */ jsx15(Loaded, { ...props }) });
6188
+ return /* @__PURE__ */ jsx14(Suspense, { fallback: null, children: /* @__PURE__ */ jsx14(Loaded, { ...props }) });
6232
6189
  };
6233
6190
  }
6234
6191
 
@@ -6355,7 +6312,7 @@ import {
6355
6312
  PopoverTrigger
6356
6313
  } from "@ai-matrx/design-system";
6357
6314
  import { CheckIcon as CheckIcon3, ChevronDownIcon, PlusIcon as PlusIcon7, XIcon as XIcon5 } from "@ai-matrx/design-system/icons";
6358
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
6315
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
6359
6316
  function AssociationEntitySelect({
6360
6317
  token,
6361
6318
  adapter,
@@ -6396,7 +6353,7 @@ function AssociationEntitySelect({
6396
6353
  if (id) close();
6397
6354
  else notifier.error(`Couldn't create the ${entityLabel}`);
6398
6355
  };
6399
- return /* @__PURE__ */ jsxs13(
6356
+ return /* @__PURE__ */ jsxs12(
6400
6357
  "div",
6401
6358
  {
6402
6359
  className: cn11(
@@ -6404,7 +6361,7 @@ function AssociationEntitySelect({
6404
6361
  className
6405
6362
  ),
6406
6363
  children: [
6407
- showIcon ? /* @__PURE__ */ jsx16(
6364
+ showIcon ? /* @__PURE__ */ jsx15(
6408
6365
  InfoIcon,
6409
6366
  {
6410
6367
  className: cn11(
@@ -6414,7 +6371,7 @@ function AssociationEntitySelect({
6414
6371
  "aria-hidden": true
6415
6372
  }
6416
6373
  ) : null,
6417
- active ? /* @__PURE__ */ jsx16(
6374
+ active ? /* @__PURE__ */ jsx15(
6418
6375
  EditableLabel,
6419
6376
  {
6420
6377
  value: active.title,
@@ -6433,8 +6390,8 @@ function AssociationEntitySelect({
6433
6390
  inputClassName: "text-xs font-medium"
6434
6391
  }
6435
6392
  ) : null,
6436
- active ? /* @__PURE__ */ jsx16(DoorControlsSlot, { token, id: active.id, name: active.title }) : null,
6437
- !active ? /* @__PURE__ */ jsx16(
6393
+ active ? /* @__PURE__ */ jsx15(DoorControlsSlot, { token, id: active.id, name: active.title }) : null,
6394
+ !active ? /* @__PURE__ */ jsx15(
6438
6395
  "span",
6439
6396
  {
6440
6397
  className: cn11(
@@ -6444,13 +6401,13 @@ function AssociationEntitySelect({
6444
6401
  children: adapter.loading ? "\u2026" : emptyLabel ?? info.labelPlural
6445
6402
  }
6446
6403
  ) : null,
6447
- /* @__PURE__ */ jsxs13(
6404
+ /* @__PURE__ */ jsxs12(
6448
6405
  Popover,
6449
6406
  {
6450
6407
  open,
6451
6408
  onOpenChange: (next) => next ? setOpen(true) : close(),
6452
6409
  children: [
6453
- /* @__PURE__ */ jsx16(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
6410
+ /* @__PURE__ */ jsx15(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
6454
6411
  "button",
6455
6412
  {
6456
6413
  type: "button",
@@ -6458,17 +6415,17 @@ function AssociationEntitySelect({
6458
6415
  title: `Switch or add ${info.labelPlural.toLowerCase()}`,
6459
6416
  "aria-label": `Switch or add ${info.labelPlural.toLowerCase()}`,
6460
6417
  children: [
6461
- items.length > 1 ? /* @__PURE__ */ jsxs13("span", { className: "tabular-nums", children: [
6418
+ items.length > 1 ? /* @__PURE__ */ jsxs12("span", { className: "tabular-nums", children: [
6462
6419
  activeIndex >= 0 ? activeIndex + 1 : "\u2014",
6463
6420
  "/",
6464
6421
  items.length
6465
6422
  ] }) : null,
6466
- /* @__PURE__ */ jsx16(ChevronDownIcon, { className: "size-3 opacity-60" })
6423
+ /* @__PURE__ */ jsx15(ChevronDownIcon, { className: "size-3 opacity-60" })
6467
6424
  ]
6468
6425
  }
6469
6426
  ) }),
6470
- /* @__PURE__ */ jsx16(PopoverContent, { sizing: "content", className: "p-0", align, children: /* @__PURE__ */ jsxs13(Command, { children: [
6471
- items.length > 5 ? /* @__PURE__ */ jsx16(
6427
+ /* @__PURE__ */ jsx15(PopoverContent, { sizing: "content", className: "p-0", align, children: /* @__PURE__ */ jsxs12(Command, { children: [
6428
+ items.length > 5 ? /* @__PURE__ */ jsx15(
6472
6429
  CommandInput,
6473
6430
  {
6474
6431
  value: query,
@@ -6476,9 +6433,9 @@ function AssociationEntitySelect({
6476
6433
  placeholder: `Search ${info.labelPlural.toLowerCase()}\u2026`
6477
6434
  }
6478
6435
  ) : null,
6479
- /* @__PURE__ */ jsxs13(CommandList, { children: [
6480
- /* @__PURE__ */ jsx16(CommandEmpty, { children: "No match." }),
6481
- items.length > 0 ? /* @__PURE__ */ jsx16(CommandGroup, { children: items.map((item) => /* @__PURE__ */ jsxs13(
6436
+ /* @__PURE__ */ jsxs12(CommandList, { children: [
6437
+ /* @__PURE__ */ jsx15(CommandEmpty, { children: "No match." }),
6438
+ items.length > 0 ? /* @__PURE__ */ jsx15(CommandGroup, { children: items.map((item) => /* @__PURE__ */ jsxs12(
6482
6439
  CommandItem,
6483
6440
  {
6484
6441
  value: `${item.title} ${item.id}`,
@@ -6489,7 +6446,7 @@ function AssociationEntitySelect({
6489
6446
  },
6490
6447
  className: "group/entity-ref group gap-2",
6491
6448
  children: [
6492
- /* @__PURE__ */ jsx16(
6449
+ /* @__PURE__ */ jsx15(
6493
6450
  CheckIcon3,
6494
6451
  {
6495
6452
  className: cn11(
@@ -6498,8 +6455,8 @@ function AssociationEntitySelect({
6498
6455
  )
6499
6456
  }
6500
6457
  ),
6501
- /* @__PURE__ */ jsx16("span", { className: "min-w-0 flex-1 truncate", children: item.title }),
6502
- /* @__PURE__ */ jsx16(
6458
+ /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 truncate", children: item.title }),
6459
+ /* @__PURE__ */ jsx15(
6503
6460
  "span",
6504
6461
  {
6505
6462
  className: "inline-flex shrink-0 items-center",
@@ -6507,7 +6464,7 @@ function AssociationEntitySelect({
6507
6464
  e.preventDefault();
6508
6465
  e.stopPropagation();
6509
6466
  },
6510
- children: /* @__PURE__ */ jsx16(
6467
+ children: /* @__PURE__ */ jsx15(
6511
6468
  DoorControlsSlot,
6512
6469
  {
6513
6470
  token,
@@ -6517,7 +6474,7 @@ function AssociationEntitySelect({
6517
6474
  )
6518
6475
  }
6519
6476
  ),
6520
- adapter.detach && item.id !== activeId ? /* @__PURE__ */ jsx16(
6477
+ adapter.detach && item.id !== activeId ? /* @__PURE__ */ jsx15(
6521
6478
  "button",
6522
6479
  {
6523
6480
  type: "button",
@@ -6532,7 +6489,7 @@ function AssociationEntitySelect({
6532
6489
  className: "grid size-5 shrink-0 place-items-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-destructive group-hover:opacity-100",
6533
6490
  title: `Remove this ${entityLabel} from here (does not delete it)`,
6534
6491
  "aria-label": `Remove ${item.title}`,
6535
- children: /* @__PURE__ */ jsx16(XIcon5, { className: "size-3" })
6492
+ children: /* @__PURE__ */ jsx15(XIcon5, { className: "size-3" })
6536
6493
  }
6537
6494
  ) : null
6538
6495
  ]
@@ -6540,9 +6497,9 @@ function AssociationEntitySelect({
6540
6497
  item.id
6541
6498
  )) }) : null
6542
6499
  ] }),
6543
- createSlot !== void 0 ? /* @__PURE__ */ jsx16("div", { className: "border-t border-border p-1", children: typeof createSlot === "function" ? createSlot(close) : createSlot }) : null,
6544
- createSlot === void 0 && adapter.createAndAttach ? /* @__PURE__ */ jsx16("div", { className: "border-t border-border p-1", children: creating ? /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1 px-1 py-0.5", children: [
6545
- /* @__PURE__ */ jsx16(
6500
+ createSlot !== void 0 ? /* @__PURE__ */ jsx15("div", { className: "border-t border-border p-1", children: typeof createSlot === "function" ? createSlot(close) : createSlot }) : null,
6501
+ createSlot === void 0 && adapter.createAndAttach ? /* @__PURE__ */ jsx15("div", { className: "border-t border-border p-1", children: creating ? /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-1 px-1 py-0.5", children: [
6502
+ /* @__PURE__ */ jsx15(
6546
6503
  "input",
6547
6504
  {
6548
6505
  autoFocus: true,
@@ -6566,17 +6523,17 @@ function AssociationEntitySelect({
6566
6523
  "aria-label": `New ${entityLabel} name`
6567
6524
  }
6568
6525
  ),
6569
- /* @__PURE__ */ jsx16(
6526
+ /* @__PURE__ */ jsx15(
6570
6527
  "button",
6571
6528
  {
6572
6529
  type: "button",
6573
6530
  disabled: busy || !draftName.trim(),
6574
6531
  onClick: () => void create(draftName),
6575
6532
  className: "inline-flex h-6 shrink-0 items-center rounded-md px-1.5 text-[10px] font-medium text-primary transition-colors hover:bg-accent disabled:opacity-50",
6576
- children: busy ? /* @__PURE__ */ jsx16(SpinnerIcon, { className: "size-3 animate-spin" }) : "Create"
6533
+ children: busy ? /* @__PURE__ */ jsx15(SpinnerIcon, { className: "size-3 animate-spin" }) : "Create"
6577
6534
  }
6578
6535
  )
6579
- ] }) : /* @__PURE__ */ jsxs13(
6536
+ ] }) : /* @__PURE__ */ jsxs12(
6580
6537
  "button",
6581
6538
  {
6582
6539
  type: "button",
@@ -6587,7 +6544,7 @@ function AssociationEntitySelect({
6587
6544
  },
6588
6545
  className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
6589
6546
  children: [
6590
- busy ? /* @__PURE__ */ jsx16(SpinnerIcon, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsx16(PlusIcon7, { className: "size-3.5" }),
6547
+ busy ? /* @__PURE__ */ jsx15(SpinnerIcon, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsx15(PlusIcon7, { className: "size-3.5" }),
6591
6548
  query.trim() ? `Create "${query.trim()}"` : `New ${info.label}`
6592
6549
  ]
6593
6550
  }
@@ -6677,7 +6634,7 @@ function buildCategoryHierarchy(categories) {
6677
6634
  }
6678
6635
 
6679
6636
  // src/react/components/CategorySelect.tsx
6680
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
6637
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
6681
6638
  var NONE = "__none__";
6682
6639
  var ROOT_PARENT = "__root__";
6683
6640
  function plural(noun) {
@@ -6713,9 +6670,9 @@ function CategorySelect({
6713
6670
  // The type-ahead matches the parent's name too, so someone who knows
6714
6671
  // the branch but not the leaf still finds it.
6715
6672
  keywords: parent ? parent.name : "",
6716
- render: depth === 0 ? /* @__PURE__ */ jsx17("span", { className: "font-medium", children: category.name }) : /* @__PURE__ */ jsxs14("span", { className: "flex items-center gap-1.5 pl-3 text-muted-foreground", children: [
6717
- /* @__PURE__ */ jsx17(CornerDownRightIcon, { className: "h-3.5 w-3.5 shrink-0" }),
6718
- /* @__PURE__ */ jsx17("span", { className: "text-foreground", children: category.name })
6673
+ render: depth === 0 ? /* @__PURE__ */ jsx16("span", { className: "font-medium", children: category.name }) : /* @__PURE__ */ jsxs13("span", { className: "flex items-center gap-1.5 pl-3 text-muted-foreground", children: [
6674
+ /* @__PURE__ */ jsx16(CornerDownRightIcon, { className: "h-3.5 w-3.5 shrink-0" }),
6675
+ /* @__PURE__ */ jsx16("span", { className: "text-foreground", children: category.name })
6719
6676
  ] })
6720
6677
  })) : categories.map((category) => ({
6721
6678
  value: category.id,
@@ -6762,8 +6719,8 @@ function CategorySelect({
6762
6719
  );
6763
6720
  return result.id;
6764
6721
  };
6765
- return /* @__PURE__ */ jsxs14("div", { children: [
6766
- /* @__PURE__ */ jsx17(
6722
+ return /* @__PURE__ */ jsxs13("div", { children: [
6723
+ /* @__PURE__ */ jsx16(
6767
6724
  CreatablePicker,
6768
6725
  {
6769
6726
  value: value ?? (allowNone ? NONE : null),
@@ -6779,18 +6736,18 @@ function CategorySelect({
6779
6736
  emptyLabel: `No ${noun} matches that.`,
6780
6737
  ...allowCreate ? { onCreate: create } : {},
6781
6738
  ...allowCreate && hierarchy.hasHierarchy ? {
6782
- createExtra: /* @__PURE__ */ jsxs14(Select, { value: createParentId, onValueChange: setCreateParentId, children: [
6783
- /* @__PURE__ */ jsx17(
6739
+ createExtra: /* @__PURE__ */ jsxs13(Select, { value: createParentId, onValueChange: setCreateParentId, children: [
6740
+ /* @__PURE__ */ jsx16(
6784
6741
  SelectTrigger,
6785
6742
  {
6786
6743
  className: "h-7 text-xs",
6787
6744
  "aria-label": `Put the new ${noun} under`,
6788
- children: /* @__PURE__ */ jsx17(SelectValue, {})
6745
+ children: /* @__PURE__ */ jsx16(SelectValue, {})
6789
6746
  }
6790
6747
  ),
6791
- /* @__PURE__ */ jsxs14(SelectContent, { children: [
6792
- /* @__PURE__ */ jsx17(SelectItem, { value: ROOT_PARENT, className: "text-xs", children: "Top level" }),
6793
- hierarchy.items.filter((item) => item.depth === 0).map((item) => /* @__PURE__ */ jsxs14(
6748
+ /* @__PURE__ */ jsxs13(SelectContent, { children: [
6749
+ /* @__PURE__ */ jsx16(SelectItem, { value: ROOT_PARENT, className: "text-xs", children: "Top level" }),
6750
+ hierarchy.items.filter((item) => item.depth === 0).map((item) => /* @__PURE__ */ jsxs13(
6794
6751
  SelectItem,
6795
6752
  {
6796
6753
  value: item.category.id,
@@ -6810,13 +6767,13 @@ function CategorySelect({
6810
6767
  selected === null && value !== null ? (
6811
6768
  // A stored id whose row this reader cannot see is not "nothing chosen":
6812
6769
  // saying so beats a blank box that looks like an unsaved field.
6813
- /* @__PURE__ */ jsxs14("p", { className: "mt-1 text-xs text-muted-foreground", children: [
6770
+ /* @__PURE__ */ jsxs13("p", { className: "mt-1 text-xs text-muted-foreground", children: [
6814
6771
  "This ",
6815
6772
  noun,
6816
6773
  " is no longer available to you."
6817
6774
  ] })
6818
6775
  ) : null,
6819
- error ? /* @__PURE__ */ jsx17("p", { className: "mt-1 text-xs text-destructive", children: error }) : null
6776
+ error ? /* @__PURE__ */ jsx16("p", { className: "mt-1 text-xs text-destructive", children: error }) : null
6820
6777
  ] });
6821
6778
  }
6822
6779
 
@@ -6843,7 +6800,7 @@ import {
6843
6800
  SelectChevron
6844
6801
  } from "@ai-matrx/design-system";
6845
6802
  import { CheckIcon as CheckIcon4, XIcon as XIcon6 } from "@ai-matrx/design-system/icons";
6846
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
6803
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
6847
6804
  var ROOT_PARENT2 = "__root__";
6848
6805
  function CategoryTagPicker({
6849
6806
  entityType,
@@ -6967,44 +6924,44 @@ function CategoryTagPicker({
6967
6924
  const exactMatch = categories.some(
6968
6925
  (c) => c.name.toLowerCase() === search.trim().toLowerCase()
6969
6926
  );
6970
- return /* @__PURE__ */ jsxs15("div", { className: "flex flex-wrap items-center gap-1.5", children: [
6971
- selected.map((c) => /* @__PURE__ */ jsxs15(
6927
+ return /* @__PURE__ */ jsxs14("div", { className: "flex flex-wrap items-center gap-1.5", children: [
6928
+ selected.map((c) => /* @__PURE__ */ jsxs14(
6972
6929
  Badge,
6973
6930
  {
6974
6931
  variant: "secondary",
6975
6932
  className: "gap-1 pr-1 text-xs font-medium",
6976
6933
  children: [
6977
6934
  showHierarchy ? hierarchyById.get(c.id)?.displayName ?? c.name : c.name,
6978
- /* @__PURE__ */ jsx18(
6935
+ /* @__PURE__ */ jsx17(
6979
6936
  "button",
6980
6937
  {
6981
6938
  type: "button",
6982
6939
  onClick: () => void toggle(c.id),
6983
6940
  className: "ml-0.5 rounded-full p-0.5 hover:bg-muted-foreground/20",
6984
6941
  "aria-label": `Remove ${c.name}`,
6985
- children: /* @__PURE__ */ jsx18(XIcon6, { className: "h-2.5 w-2.5" })
6942
+ children: /* @__PURE__ */ jsx17(XIcon6, { className: "h-2.5 w-2.5" })
6986
6943
  }
6987
6944
  )
6988
6945
  ]
6989
6946
  },
6990
6947
  c.id
6991
6948
  )),
6992
- /* @__PURE__ */ jsxs15(Popover2, { open, onOpenChange: setOpen, children: [
6993
- /* @__PURE__ */ jsx18(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs15(
6949
+ /* @__PURE__ */ jsxs14(Popover2, { open, onOpenChange: setOpen, children: [
6950
+ /* @__PURE__ */ jsx17(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs14(
6994
6951
  Button3,
6995
6952
  {
6996
6953
  variant: "outline",
6997
6954
  size: "sm",
6998
6955
  className: "h-7 gap-1 px-2 text-xs",
6999
6956
  children: [
7000
- /* @__PURE__ */ jsx18(Icon, { className: "h-3.5 w-3.5" }),
6957
+ /* @__PURE__ */ jsx17(Icon, { className: "h-3.5 w-3.5" }),
7001
6958
  selected.length === 0 ? addLabel : "Edit",
7002
- /* @__PURE__ */ jsx18(SelectChevron, { size: "sm" })
6959
+ /* @__PURE__ */ jsx17(SelectChevron, { size: "sm" })
7003
6960
  ]
7004
6961
  }
7005
6962
  ) }),
7006
- /* @__PURE__ */ jsx18(PopoverContent2, { sizing: "content", className: "p-0", align: "start", children: /* @__PURE__ */ jsxs15(Command2, { shouldFilter: false, children: [
7007
- /* @__PURE__ */ jsx18(
6963
+ /* @__PURE__ */ jsx17(PopoverContent2, { sizing: "content", className: "p-0", align: "start", children: /* @__PURE__ */ jsxs14(Command2, { shouldFilter: false, children: [
6964
+ /* @__PURE__ */ jsx17(
7008
6965
  CommandInput2,
7009
6966
  {
7010
6967
  placeholder: allowCreate ? "Search or create..." : "Search...",
@@ -7012,9 +6969,9 @@ function CategoryTagPicker({
7012
6969
  onValueChange: setSearch
7013
6970
  }
7014
6971
  ),
7015
- /* @__PURE__ */ jsxs15(CommandList2, { children: [
7016
- /* @__PURE__ */ jsx18(CommandEmpty2, { className: "px-2 py-3 text-xs text-muted-foreground", children: search.trim() ? "No match." : emptyText }),
7017
- /* @__PURE__ */ jsx18(CommandGroup2, { children: showHierarchy ? filteredHierarchy.map(({ category, depth, parent }) => /* @__PURE__ */ jsxs15(
6972
+ /* @__PURE__ */ jsxs14(CommandList2, { children: [
6973
+ /* @__PURE__ */ jsx17(CommandEmpty2, { className: "px-2 py-3 text-xs text-muted-foreground", children: search.trim() ? "No match." : emptyText }),
6974
+ /* @__PURE__ */ jsx17(CommandGroup2, { children: showHierarchy ? filteredHierarchy.map(({ category, depth, parent }) => /* @__PURE__ */ jsxs14(
7018
6975
  CommandItem2,
7019
6976
  {
7020
6977
  value: category.id,
@@ -7022,7 +6979,7 @@ function CategoryTagPicker({
7022
6979
  onSelect: () => void toggle(category.id),
7023
6980
  className: cn12("text-xs", depth === 1 && "pl-6"),
7024
6981
  children: [
7025
- /* @__PURE__ */ jsx18(
6982
+ /* @__PURE__ */ jsx17(
7026
6983
  CheckIcon4,
7027
6984
  {
7028
6985
  className: cn12(
@@ -7031,19 +6988,19 @@ function CategoryTagPicker({
7031
6988
  )
7032
6989
  }
7033
6990
  ),
7034
- depth === 1 ? /* @__PURE__ */ jsx18(CornerDownRightIcon, { className: "mr-1.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : null,
7035
- /* @__PURE__ */ jsx18("span", { className: cn12(depth === 0 && "font-medium"), children: category.name })
6991
+ depth === 1 ? /* @__PURE__ */ jsx17(CornerDownRightIcon, { className: "mr-1.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : null,
6992
+ /* @__PURE__ */ jsx17("span", { className: cn12(depth === 0 && "font-medium"), children: category.name })
7036
6993
  ]
7037
6994
  },
7038
6995
  category.id
7039
- )) : filtered.map((c) => /* @__PURE__ */ jsxs15(
6996
+ )) : filtered.map((c) => /* @__PURE__ */ jsxs14(
7040
6997
  CommandItem2,
7041
6998
  {
7042
6999
  value: c.id,
7043
7000
  onSelect: () => void toggle(c.id),
7044
7001
  className: "text-xs",
7045
7002
  children: [
7046
- /* @__PURE__ */ jsx18(
7003
+ /* @__PURE__ */ jsx17(
7047
7004
  CheckIcon4,
7048
7005
  {
7049
7006
  className: cn12(
@@ -7057,25 +7014,25 @@ function CategoryTagPicker({
7057
7014
  },
7058
7015
  c.id
7059
7016
  )) }),
7060
- allowCreate && search.trim() && !exactMatch ? /* @__PURE__ */ jsxs15(CommandGroup2, { children: [
7061
- showHierarchy ? /* @__PURE__ */ jsxs15("div", { className: "space-y-1.5 px-2 pb-2", children: [
7062
- /* @__PURE__ */ jsx18("p", { className: "text-[11px] font-medium text-muted-foreground", children: "Place in" }),
7063
- /* @__PURE__ */ jsxs15(
7017
+ allowCreate && search.trim() && !exactMatch ? /* @__PURE__ */ jsxs14(CommandGroup2, { children: [
7018
+ showHierarchy ? /* @__PURE__ */ jsxs14("div", { className: "space-y-1.5 px-2 pb-2", children: [
7019
+ /* @__PURE__ */ jsx17("p", { className: "text-[11px] font-medium text-muted-foreground", children: "Place in" }),
7020
+ /* @__PURE__ */ jsxs14(
7064
7021
  Select2,
7065
7022
  {
7066
7023
  value: createParentId,
7067
7024
  onValueChange: setCreateParentId,
7068
7025
  children: [
7069
- /* @__PURE__ */ jsx18(SelectTrigger2, { size: "sm", className: "bg-background", children: /* @__PURE__ */ jsx18(SelectValue2, {}) }),
7070
- /* @__PURE__ */ jsxs15(SelectContent2, { children: [
7071
- /* @__PURE__ */ jsx18(SelectItem2, { value: ROOT_PARENT2, children: "Top level" }),
7072
- hierarchy.roots.map((root) => /* @__PURE__ */ jsx18(SelectItem2, { value: root.id, children: root.name }, root.id))
7026
+ /* @__PURE__ */ jsx17(SelectTrigger2, { size: "sm", className: "bg-background", children: /* @__PURE__ */ jsx17(SelectValue2, {}) }),
7027
+ /* @__PURE__ */ jsxs14(SelectContent2, { children: [
7028
+ /* @__PURE__ */ jsx17(SelectItem2, { value: ROOT_PARENT2, children: "Top level" }),
7029
+ hierarchy.roots.map((root) => /* @__PURE__ */ jsx17(SelectItem2, { value: root.id, children: root.name }, root.id))
7073
7030
  ] })
7074
7031
  ]
7075
7032
  }
7076
7033
  )
7077
7034
  ] }) : null,
7078
- /* @__PURE__ */ jsxs15(
7035
+ /* @__PURE__ */ jsxs14(
7079
7036
  CommandItem2,
7080
7037
  {
7081
7038
  value: `__create__${search}`,
@@ -7083,7 +7040,7 @@ function CategoryTagPicker({
7083
7040
  disabled: creating,
7084
7041
  className: "text-xs text-primary",
7085
7042
  children: [
7086
- creating ? /* @__PURE__ */ jsx18(SpinnerIcon, { className: "mr-2 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx18(Icon, { className: "mr-2 h-3.5 w-3.5" }),
7043
+ creating ? /* @__PURE__ */ jsx17(SpinnerIcon, { className: "mr-2 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx17(Icon, { className: "mr-2 h-3.5 w-3.5" }),
7087
7044
  "Create \u201C",
7088
7045
  search.trim(),
7089
7046
  "\u201D"
@@ -7110,20 +7067,20 @@ function partKeyOf(comment) {
7110
7067
  // src/react/components/CommentBody.tsx
7111
7068
  import { Fragment as Fragment5 } from "react";
7112
7069
  import { cn as cn13 } from "@ai-matrx/design-system";
7113
- import { jsx as jsx19 } from "react/jsx-runtime";
7070
+ import { jsx as jsx18 } from "react/jsx-runtime";
7114
7071
  var INLINE = /(\*\*[^*\n]+\*\*|`[^`\n]+`|\*[^*\n]+\*)/g;
7115
7072
  function renderInline(text) {
7116
7073
  return text.split(INLINE).map((part, i) => {
7117
7074
  if (part.length > 4 && part.startsWith("**") && part.endsWith("**")) {
7118
- return /* @__PURE__ */ jsx19("strong", { children: part.slice(2, -2) }, i);
7075
+ return /* @__PURE__ */ jsx18("strong", { children: part.slice(2, -2) }, i);
7119
7076
  }
7120
7077
  if (part.length > 2 && part.startsWith("`") && part.endsWith("`")) {
7121
- return /* @__PURE__ */ jsx19("code", { className: "rounded bg-muted px-1 text-[0.9em]", children: part.slice(1, -1) }, i);
7078
+ return /* @__PURE__ */ jsx18("code", { className: "rounded bg-muted px-1 text-[0.9em]", children: part.slice(1, -1) }, i);
7122
7079
  }
7123
7080
  if (part.length > 2 && part.startsWith("*") && part.endsWith("*")) {
7124
- return /* @__PURE__ */ jsx19("em", { children: part.slice(1, -1) }, i);
7081
+ return /* @__PURE__ */ jsx18("em", { children: part.slice(1, -1) }, i);
7125
7082
  }
7126
- return /* @__PURE__ */ jsx19(Fragment5, { children: part }, i);
7083
+ return /* @__PURE__ */ jsx18(Fragment5, { children: part }, i);
7127
7084
  });
7128
7085
  }
7129
7086
  var BULLET = /^\s*[-*]\s+(.*)$/;
@@ -7134,14 +7091,14 @@ function renderBlocks(lines, keyPrefix) {
7134
7091
  const flushBullets = () => {
7135
7092
  if (!bullets.length) return;
7136
7093
  out.push(
7137
- /* @__PURE__ */ jsx19("ul", { className: "list-disc pl-5", children: bullets.map((b, i) => /* @__PURE__ */ jsx19("li", { children: renderInline(b) }, i)) }, `${keyPrefix}-u${out.length}`)
7094
+ /* @__PURE__ */ jsx18("ul", { className: "list-disc pl-5", children: bullets.map((b, i) => /* @__PURE__ */ jsx18("li", { children: renderInline(b) }, i)) }, `${keyPrefix}-u${out.length}`)
7138
7095
  );
7139
7096
  bullets = [];
7140
7097
  };
7141
7098
  const flushPara = () => {
7142
7099
  if (!para.length) return;
7143
7100
  out.push(
7144
- /* @__PURE__ */ jsx19("p", { className: "whitespace-pre-wrap", children: renderInline(para.join("\n")) }, `${keyPrefix}-p${out.length}`)
7101
+ /* @__PURE__ */ jsx18("p", { className: "whitespace-pre-wrap", children: renderInline(para.join("\n")) }, `${keyPrefix}-p${out.length}`)
7145
7102
  );
7146
7103
  para = [];
7147
7104
  };
@@ -7175,20 +7132,20 @@ function renderCommentMarkdown(body) {
7175
7132
  }
7176
7133
  return runs.map((run, i) => {
7177
7134
  const blocks = renderBlocks(run.lines, `r${i}`);
7178
- return run.quoted ? /* @__PURE__ */ jsx19(
7135
+ return run.quoted ? /* @__PURE__ */ jsx18(
7179
7136
  "blockquote",
7180
7137
  {
7181
7138
  className: "border-l-2 border-border pl-2 text-muted-foreground",
7182
7139
  children: blocks
7183
7140
  },
7184
7141
  i
7185
- ) : /* @__PURE__ */ jsx19(Fragment5, { children: blocks }, i);
7142
+ ) : /* @__PURE__ */ jsx18(Fragment5, { children: blocks }, i);
7186
7143
  });
7187
7144
  }
7188
7145
  function CommentBody({ body, className }) {
7189
7146
  const { commentBody: HostBody } = useAssociationsUiPorts();
7190
- if (HostBody) return /* @__PURE__ */ jsx19(HostBody, { body, className });
7191
- return /* @__PURE__ */ jsx19(
7147
+ if (HostBody) return /* @__PURE__ */ jsx18(HostBody, { body, className });
7148
+ return /* @__PURE__ */ jsx18(
7192
7149
  "div",
7193
7150
  {
7194
7151
  "data-comment-body": true,
@@ -7200,7 +7157,7 @@ function CommentBody({ body, className }) {
7200
7157
 
7201
7158
  // src/react/components/CommentThread.tsx
7202
7159
  import { formatRelativeTime } from "@ai-matrx/kit/format";
7203
- import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
7160
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
7204
7161
  var AUTHOR_DOOR_TOKEN = "user";
7205
7162
  var SYSTEM_AUTHOR_NAME = "AI Matrx";
7206
7163
  function resolveAuthor(comment, authorDisplay) {
@@ -7215,24 +7172,24 @@ function resolveAuthor(comment, authorDisplay) {
7215
7172
  isAgent: true
7216
7173
  };
7217
7174
  }
7218
- const base2 = {
7175
+ const base = {
7219
7176
  userId: comment.createdBy,
7220
7177
  email: comment.author.email,
7221
7178
  displayName: comment.author.displayName,
7222
7179
  avatarUrl: comment.author.avatarUrl
7223
7180
  };
7224
- const enriched = authorDisplay ? authorDisplay(base2) : null;
7225
- const name = enriched?.displayName ?? base2.displayName ?? base2.email ?? "Unknown user";
7181
+ const enriched = authorDisplay ? authorDisplay(base) : null;
7182
+ const name = enriched?.displayName ?? base.displayName ?? base.email ?? "Unknown user";
7226
7183
  return {
7227
7184
  name,
7228
- avatarUrl: enriched?.avatarUrl !== void 0 && enriched?.avatarUrl !== null ? enriched.avatarUrl : base2.avatarUrl,
7185
+ avatarUrl: enriched?.avatarUrl !== void 0 && enriched?.avatarUrl !== null ? enriched.avatarUrl : base.avatarUrl,
7229
7186
  userId: comment.createdBy,
7230
7187
  isAgent: false
7231
7188
  };
7232
7189
  }
7233
7190
  function AuthorAvatar({ author }) {
7234
7191
  if (author.avatarUrl) {
7235
- return /* @__PURE__ */ jsx20(
7192
+ return /* @__PURE__ */ jsx19(
7236
7193
  "img",
7237
7194
  {
7238
7195
  src: author.avatarUrl,
@@ -7241,7 +7198,7 @@ function AuthorAvatar({ author }) {
7241
7198
  }
7242
7199
  );
7243
7200
  }
7244
- return /* @__PURE__ */ jsx20(
7201
+ return /* @__PURE__ */ jsx19(
7245
7202
  "span",
7246
7203
  {
7247
7204
  "aria-hidden": true,
@@ -7256,7 +7213,7 @@ function AuthorName({
7256
7213
  }) {
7257
7214
  const DoorRef2 = entityDoors?.EntityRef;
7258
7215
  if (DoorRef2 && author.userId) {
7259
- return /* @__PURE__ */ jsx20(
7216
+ return /* @__PURE__ */ jsx19(
7260
7217
  DoorRef2,
7261
7218
  {
7262
7219
  token: AUTHOR_DOOR_TOKEN,
@@ -7267,7 +7224,7 @@ function AuthorName({
7267
7224
  }
7268
7225
  );
7269
7226
  }
7270
- return /* @__PURE__ */ jsx20("span", { className: "text-sm font-medium text-foreground", children: author.name });
7227
+ return /* @__PURE__ */ jsx19("span", { className: "text-sm font-medium text-foreground", children: author.name });
7271
7228
  }
7272
7229
  function CommentComposer({
7273
7230
  onSubmit,
@@ -7298,8 +7255,8 @@ function CommentComposer({
7298
7255
  }
7299
7256
  setBody("");
7300
7257
  }
7301
- return /* @__PURE__ */ jsxs16("form", { onSubmit: submit, className: "flex flex-col gap-1.5", children: [
7302
- /* @__PURE__ */ jsx20(
7258
+ return /* @__PURE__ */ jsxs15("form", { onSubmit: submit, className: "flex flex-col gap-1.5", children: [
7259
+ /* @__PURE__ */ jsx19(
7303
7260
  "textarea",
7304
7261
  {
7305
7262
  value: body,
@@ -7314,7 +7271,7 @@ function CommentComposer({
7314
7271
  className: "w-full resize-y rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
7315
7272
  }
7316
7273
  ),
7317
- error && /* @__PURE__ */ jsx20(
7274
+ error && /* @__PURE__ */ jsx19(
7318
7275
  ErrorBox2,
7319
7276
  {
7320
7277
  className: "text-xs text-destructive",
@@ -7324,10 +7281,10 @@ function CommentComposer({
7324
7281
  origin: "associations/CommentThread"
7325
7282
  }
7326
7283
  ),
7327
- error && signIn && isSignedOutMessage(error) && /* @__PURE__ */ jsx20(SignInAgain, { onClick: signIn }),
7328
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
7329
- /* @__PURE__ */ jsxs16(Button4, { type: "submit", size: "sm", disabled: !body.trim() || submitting, children: [
7330
- submitting && /* @__PURE__ */ jsx20(SpinnerIcon, { className: "mr-1 h-3 w-3 animate-spin" }),
7284
+ error && signIn && isSignedOutMessage(error) && /* @__PURE__ */ jsx19(SignInAgain, { onClick: signIn }),
7285
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
7286
+ /* @__PURE__ */ jsxs15(Button4, { type: "submit", size: "sm", disabled: !body.trim() || submitting, children: [
7287
+ submitting && /* @__PURE__ */ jsx19(SpinnerIcon, { className: "mr-1 h-3 w-3 animate-spin" }),
7331
7288
  submitLabel
7332
7289
  ] }),
7333
7290
  trailing
@@ -7369,7 +7326,7 @@ function CommentItem({
7369
7326
  notifier.error(res.error ?? "Could not delete the comment");
7370
7327
  }
7371
7328
  }
7372
- return /* @__PURE__ */ jsxs16(
7329
+ return /* @__PURE__ */ jsxs15(
7373
7330
  "div",
7374
7331
  {
7375
7332
  "data-comment-id": comment.id,
@@ -7378,15 +7335,15 @@ function CommentItem({
7378
7335
  depth > 0 && "border-l border-border pl-3"
7379
7336
  ),
7380
7337
  children: [
7381
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
7382
- /* @__PURE__ */ jsx20(AuthorAvatar, { author }),
7383
- /* @__PURE__ */ jsx20(AuthorName, { author, entityDoors }),
7384
- author.isAgent && /* @__PURE__ */ jsx20("span", { className: "rounded bg-muted px-1 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: "Agent" }),
7385
- showPart && partLabel && /* @__PURE__ */ jsxs16("span", { className: "truncate text-xs text-muted-foreground", title: partLabel, children: [
7338
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
7339
+ /* @__PURE__ */ jsx19(AuthorAvatar, { author }),
7340
+ /* @__PURE__ */ jsx19(AuthorName, { author, entityDoors }),
7341
+ author.isAgent && /* @__PURE__ */ jsx19("span", { className: "rounded bg-muted px-1 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: "Agent" }),
7342
+ showPart && partLabel && /* @__PURE__ */ jsxs15("span", { className: "truncate text-xs text-muted-foreground", title: partLabel, children: [
7386
7343
  "on ",
7387
7344
  partLabel
7388
7345
  ] }),
7389
- /* @__PURE__ */ jsx20(
7346
+ /* @__PURE__ */ jsx19(
7390
7347
  "span",
7391
7348
  {
7392
7349
  className: "text-xs text-muted-foreground",
@@ -7397,7 +7354,7 @@ function CommentItem({
7397
7354
  })
7398
7355
  }
7399
7356
  ),
7400
- edited && /* @__PURE__ */ jsx20(
7357
+ edited && /* @__PURE__ */ jsx19(
7401
7358
  "span",
7402
7359
  {
7403
7360
  className: "text-xs text-muted-foreground",
@@ -7406,7 +7363,7 @@ function CommentItem({
7406
7363
  }
7407
7364
  )
7408
7365
  ] }),
7409
- editing ? /* @__PURE__ */ jsx20("div", { className: "pl-8", children: /* @__PURE__ */ jsx20(
7366
+ editing ? /* @__PURE__ */ jsx19("div", { className: "pl-8", children: /* @__PURE__ */ jsx19(
7410
7367
  CommentComposer,
7411
7368
  {
7412
7369
  initialValue: comment.body,
@@ -7418,7 +7375,7 @@ function CommentItem({
7418
7375
  if (res.ok) setEditing(false);
7419
7376
  return res;
7420
7377
  },
7421
- trailing: /* @__PURE__ */ jsx20(
7378
+ trailing: /* @__PURE__ */ jsx19(
7422
7379
  Button4,
7423
7380
  {
7424
7381
  type: "button",
@@ -7429,10 +7386,10 @@ function CommentItem({
7429
7386
  }
7430
7387
  )
7431
7388
  }
7432
- ) }) : /* @__PURE__ */ jsx20(CommentBody, { body: comment.body, className: "pl-8" }),
7433
- !editing && /* @__PURE__ */ jsx20("div", { className: "flex items-center gap-1 pl-7", children: confirmingDelete ? /* @__PURE__ */ jsxs16(Fragment6, { children: [
7434
- /* @__PURE__ */ jsx20("span", { className: "text-xs text-destructive", children: "Deletes this comment for everyone." }),
7435
- /* @__PURE__ */ jsxs16(
7389
+ ) }) : /* @__PURE__ */ jsx19(CommentBody, { body: comment.body, className: "pl-8" }),
7390
+ !editing && /* @__PURE__ */ jsx19("div", { className: "flex items-center gap-1 pl-7", children: confirmingDelete ? /* @__PURE__ */ jsxs15(Fragment6, { children: [
7391
+ /* @__PURE__ */ jsx19("span", { className: "text-xs text-destructive", children: "Deletes this comment for everyone." }),
7392
+ /* @__PURE__ */ jsxs15(
7436
7393
  Button4,
7437
7394
  {
7438
7395
  type: "button",
@@ -7441,12 +7398,12 @@ function CommentItem({
7441
7398
  disabled: deleting,
7442
7399
  onClick: () => void confirmDelete(),
7443
7400
  children: [
7444
- deleting && /* @__PURE__ */ jsx20(SpinnerIcon, { className: "mr-1 h-3 w-3 animate-spin" }),
7401
+ deleting && /* @__PURE__ */ jsx19(SpinnerIcon, { className: "mr-1 h-3 w-3 animate-spin" }),
7445
7402
  "Delete"
7446
7403
  ]
7447
7404
  }
7448
7405
  ),
7449
- /* @__PURE__ */ jsx20(
7406
+ /* @__PURE__ */ jsx19(
7450
7407
  Button4,
7451
7408
  {
7452
7409
  type: "button",
@@ -7457,8 +7414,8 @@ function CommentItem({
7457
7414
  children: "Cancel"
7458
7415
  }
7459
7416
  )
7460
- ] }) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
7461
- /* @__PURE__ */ jsx20(
7417
+ ] }) : /* @__PURE__ */ jsxs15(Fragment6, { children: [
7418
+ /* @__PURE__ */ jsx19(
7462
7419
  "button",
7463
7420
  {
7464
7421
  type: "button",
@@ -7467,8 +7424,8 @@ function CommentItem({
7467
7424
  children: "Reply"
7468
7425
  }
7469
7426
  ),
7470
- isOwn && /* @__PURE__ */ jsxs16(Fragment6, { children: [
7471
- canEdit && /* @__PURE__ */ jsx20(
7427
+ isOwn && /* @__PURE__ */ jsxs15(Fragment6, { children: [
7428
+ canEdit && /* @__PURE__ */ jsx19(
7472
7429
  "button",
7473
7430
  {
7474
7431
  type: "button",
@@ -7477,7 +7434,7 @@ function CommentItem({
7477
7434
  children: "Edit"
7478
7435
  }
7479
7436
  ),
7480
- /* @__PURE__ */ jsx20(
7437
+ /* @__PURE__ */ jsx19(
7481
7438
  "button",
7482
7439
  {
7483
7440
  type: "button",
@@ -7488,9 +7445,9 @@ function CommentItem({
7488
7445
  )
7489
7446
  ] })
7490
7447
  ] }) }),
7491
- replying && /* @__PURE__ */ jsxs16("div", { className: "flex items-start gap-2 pl-8 pt-1", children: [
7492
- /* @__PURE__ */ jsx20(CornerDownRightIcon, { className: "mt-2 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
7493
- /* @__PURE__ */ jsx20("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx20(
7448
+ replying && /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-2 pl-8 pt-1", children: [
7449
+ /* @__PURE__ */ jsx19(CornerDownRightIcon, { className: "mt-2 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
7450
+ /* @__PURE__ */ jsx19("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx19(
7494
7451
  CommentComposer,
7495
7452
  {
7496
7453
  submitLabel: "Reply",
@@ -7507,7 +7464,7 @@ function CommentItem({
7507
7464
  }
7508
7465
  return res;
7509
7466
  },
7510
- trailing: /* @__PURE__ */ jsx20(
7467
+ trailing: /* @__PURE__ */ jsx19(
7511
7468
  Button4,
7512
7469
  {
7513
7470
  type: "button",
@@ -7520,7 +7477,7 @@ function CommentItem({
7520
7477
  }
7521
7478
  ) })
7522
7479
  ] }),
7523
- replies.length > 0 && /* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-3 pl-8 pt-1", children: replies.map((reply) => /* @__PURE__ */ jsx20(
7480
+ replies.length > 0 && /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-3 pl-8 pt-1", children: replies.map((reply) => /* @__PURE__ */ jsx19(
7524
7481
  CommentItem,
7525
7482
  {
7526
7483
  comment: reply,
@@ -7576,11 +7533,11 @@ function CommentThread({
7576
7533
  const roots = part ? tree.roots.filter((c) => partKeyOf(c) === part.key) : tree.roots;
7577
7534
  const shownCount = part ? countThread(roots, childrenOf) : thread.comments.length;
7578
7535
  const loading = (thread.status === "loading" || thread.status === "idle") && thread.comments.length === 0;
7579
- return /* @__PURE__ */ jsxs16("section", { className: cn14("flex flex-col gap-3", className), children: [
7580
- showHeader && /* @__PURE__ */ jsxs16("header", { className: "flex items-center gap-2", children: [
7581
- /* @__PURE__ */ jsx20("h3", { className: "text-sm font-semibold text-foreground", children: "Comments" }),
7582
- /* @__PURE__ */ jsx20("span", { className: "text-xs text-muted-foreground tabular-nums", children: shownCount }),
7583
- /* @__PURE__ */ jsx20(
7536
+ return /* @__PURE__ */ jsxs15("section", { className: cn14("flex flex-col gap-3", className), children: [
7537
+ showHeader && /* @__PURE__ */ jsxs15("header", { className: "flex items-center gap-2", children: [
7538
+ /* @__PURE__ */ jsx19("h3", { className: "text-sm font-semibold text-foreground", children: "Comments" }),
7539
+ /* @__PURE__ */ jsx19("span", { className: "text-xs text-muted-foreground tabular-nums", children: shownCount }),
7540
+ /* @__PURE__ */ jsx19(
7584
7541
  "button",
7585
7542
  {
7586
7543
  type: "button",
@@ -7588,11 +7545,11 @@ function CommentThread({
7588
7545
  "aria-label": "Refresh comments",
7589
7546
  title: "Refresh comments",
7590
7547
  className: "ml-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
7591
- children: thread.status === "loading" ? /* @__PURE__ */ jsx20(SpinnerIcon, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx20(RefreshIcon, { className: "h-3.5 w-3.5" })
7548
+ children: thread.status === "loading" ? /* @__PURE__ */ jsx19(SpinnerIcon, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx19(RefreshIcon, { className: "h-3.5 w-3.5" })
7592
7549
  }
7593
7550
  )
7594
7551
  ] }),
7595
- thread.error && /* @__PURE__ */ jsxs16(
7552
+ thread.error && /* @__PURE__ */ jsxs15(
7596
7553
  ErrorBox2,
7597
7554
  {
7598
7555
  as: "div",
@@ -7601,9 +7558,9 @@ function CommentThread({
7601
7558
  operation: "Load comments",
7602
7559
  origin: "associations/CommentThread",
7603
7560
  children: [
7604
- /* @__PURE__ */ jsx20("span", { className: "min-w-0 flex-1", children: thread.error }),
7605
- signInPort && isSignedOutMessage(thread.error) && /* @__PURE__ */ jsx20(SignInAgain, { onClick: signInPort }),
7606
- /* @__PURE__ */ jsx20(
7561
+ /* @__PURE__ */ jsx19("span", { className: "min-w-0 flex-1", children: thread.error }),
7562
+ signInPort && isSignedOutMessage(thread.error) && /* @__PURE__ */ jsx19(SignInAgain, { onClick: signInPort }),
7563
+ /* @__PURE__ */ jsx19(
7607
7564
  Button4,
7608
7565
  {
7609
7566
  type: "button",
@@ -7617,10 +7574,10 @@ function CommentThread({
7617
7574
  ]
7618
7575
  }
7619
7576
  ),
7620
- loading ? /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-3", "aria-hidden": true, "data-testid": "comments-loading", children: [
7621
- /* @__PURE__ */ jsx20(Skeleton2, { className: "h-12 w-full" }),
7622
- /* @__PURE__ */ jsx20(Skeleton2, { className: "h-12 w-4/5" })
7623
- ] }) : roots.length === 0 && !thread.error ? /* @__PURE__ */ jsx20("p", { className: "text-sm text-muted-foreground", children: "No comments yet." }) : /* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-4", children: roots.map((comment) => /* @__PURE__ */ jsx20(
7577
+ loading ? /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-3", "aria-hidden": true, "data-testid": "comments-loading", children: [
7578
+ /* @__PURE__ */ jsx19(Skeleton2, { className: "h-12 w-full" }),
7579
+ /* @__PURE__ */ jsx19(Skeleton2, { className: "h-12 w-4/5" })
7580
+ ] }) : roots.length === 0 && !thread.error ? /* @__PURE__ */ jsx19("p", { className: "text-sm text-muted-foreground", children: "No comments yet." }) : /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-4", children: roots.map((comment) => /* @__PURE__ */ jsx19(
7624
7581
  CommentItem,
7625
7582
  {
7626
7583
  comment,
@@ -7633,7 +7590,7 @@ function CommentThread({
7633
7590
  },
7634
7591
  comment.id
7635
7592
  )) }),
7636
- /* @__PURE__ */ jsx20(
7593
+ /* @__PURE__ */ jsx19(
7637
7594
  CommentComposer,
7638
7595
  {
7639
7596
  onSubmit: async (body) => {
@@ -7647,7 +7604,7 @@ function CommentThread({
7647
7604
  ] });
7648
7605
  }
7649
7606
  function SignInAgain({ onClick }) {
7650
- return /* @__PURE__ */ jsx20(Button4, { type: "button", size: "sm", variant: "outline", onClick, children: "Sign in" });
7607
+ return /* @__PURE__ */ jsx19(Button4, { type: "button", size: "sm", variant: "outline", onClick, children: "Sign in" });
7651
7608
  }
7652
7609
  export {
7653
7610
  AssociationCandidateBody,