@ai-matrx/associations 0.13.23 → 0.13.26

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.
@@ -1,6 +1,6 @@
1
1
  import { ElementType, ComponentType, ReactNode } from 'react';
2
2
 
3
- declare const ASSOCIATION_TARGET_TYPES: readonly ["organization", "scope", "scope_type", "project", "task", "context_item", "thread", "war_room", "category", "conversation", "fc_set", "fc_card", "study_media", "assessment", "note", "file", "quiz_session", "agent", "agent_term_list", "research_tag", "skill", "surface", "plan_entity", "plan_node", "web_site", "seo_topic", "seo_keyword", "web_page", "web_screenshot", "party", "crm_outreach_list", "crm_deal", "rulebook", "research_topic", "media_source_library"];
3
+ declare const ASSOCIATION_TARGET_TYPES: readonly ["organization", "scope", "scope_type", "project", "task", "context_item", "thread", "war_room", "category", "conversation", "fc_set", "fc_card", "study_media", "assessment", "note", "file", "processed_document", "quiz_session", "agent", "agent_term_list", "research_tag", "skill", "surface", "plan_entity", "plan_node", "web_site", "seo_topic", "seo_keyword", "web_page", "web_screenshot", "party", "crm_outreach_list", "crm_deal", "rulebook", "research_topic", "media_source_library"];
4
4
  type AssociationTargetType = (typeof ASSOCIATION_TARGET_TYPES)[number];
5
5
  /** Runtime guard: is this token one of the deliberate container (target) types? */
6
6
  declare function isAssociationTargetType(value: unknown): value is AssociationTargetType;
@@ -1,6 +1,6 @@
1
1
  import { ElementType, ComponentType, ReactNode } from 'react';
2
2
 
3
- declare const ASSOCIATION_TARGET_TYPES: readonly ["organization", "scope", "scope_type", "project", "task", "context_item", "thread", "war_room", "category", "conversation", "fc_set", "fc_card", "study_media", "assessment", "note", "file", "quiz_session", "agent", "agent_term_list", "research_tag", "skill", "surface", "plan_entity", "plan_node", "web_site", "seo_topic", "seo_keyword", "web_page", "web_screenshot", "party", "crm_outreach_list", "crm_deal", "rulebook", "research_topic", "media_source_library"];
3
+ declare const ASSOCIATION_TARGET_TYPES: readonly ["organization", "scope", "scope_type", "project", "task", "context_item", "thread", "war_room", "category", "conversation", "fc_set", "fc_card", "study_media", "assessment", "note", "file", "processed_document", "quiz_session", "agent", "agent_term_list", "research_tag", "skill", "surface", "plan_entity", "plan_node", "web_site", "seo_topic", "seo_keyword", "web_page", "web_screenshot", "party", "crm_outreach_list", "crm_deal", "rulebook", "research_topic", "media_source_library"];
4
4
  type AssociationTargetType = (typeof ASSOCIATION_TARGET_TYPES)[number];
5
5
  /** Runtime guard: is this token one of the deliberate container (target) types? */
6
6
  declare function isAssociationTargetType(value: unknown): value is AssociationTargetType;
@@ -1755,6 +1755,8 @@ var ASSOCIATION_TARGET_TYPES = [
1755
1755
  // a note — the origin a converted study artifact links back to (artifact→note 'source' lineage, P4)
1756
1756
  "file",
1757
1757
  // a file (card→file media + source lineage)
1758
+ "processed_document",
1759
+ // a processed source document (study-aid source lineage and kit membership)
1758
1760
  "quiz_session",
1759
1761
  // a quiz a card is used in
1760
1762
  "agent",
@@ -3867,7 +3869,7 @@ function AttachedItemsBody({
3867
3869
  // src/react/components/AssociationCard.tsx
3868
3870
  var import_react16 = require("react");
3869
3871
  var import_design_system7 = require("@ai-matrx/design-system");
3870
- var import_tap_target = require("@ai-matrx/design-system/tap-target");
3872
+ var import_buttons = require("@ai-matrx/tap-target/buttons");
3871
3873
 
3872
3874
  // src/react/contentRoles.ts
3873
3875
  var CONTENT_ROLES = [
@@ -3957,21 +3959,25 @@ function AssociationCard({
3957
3959
  const countWord = filing ? "filed under" : "attached";
3958
3960
  const drillTitle = canDrillIn ? `View the ${info.labelPlural.toLowerCase()} attached to ${container.label ?? "this"}` : void 0;
3959
3961
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
3960
- look === "simplified" ? (
3961
- // SIMPLIFIED (opt-in, off by default): one header line — small icon,
3962
- // UPPERCASE name, count, round ghost "+" — the same geometry as the
3963
- // CRM record's SectionCard header, so the two sit flush together.
3964
- // TapTargetButton puts `className` on its ICON, not the button: never
3965
- // pass layout classes there (an `ml-auto` pushed the "+" glyph off
3966
- // center inside its circle). The flex-1 drill button already puts the
3967
- // "+" at the end of the row.
3962
+ look !== "tiles" ? (
3963
+ // ONE-LINE LOOKS (opt-in, off by default): small icon, UPPERCASE name,
3964
+ // count, then the "+".
3965
+ // - "simplified": the classic square "+" (the same button the tiles
3966
+ // use), 6px from the card edge on every side at every width.
3967
+ // - "compact": the real PlusTapButton in its OUTLINE variant (never
3968
+ // glass — glass only reads over a see-through surface). Nothing
3969
+ // around it: no card padding on its side and no vertical padding,
3970
+ // so the tap target's own 44px box centers the 28px circle with
3971
+ // 8px on every side. Never pass a layout class to a tap button —
3972
+ // its className lands on the ICON (the 2026-09-27 crooked "+").
3968
3973
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3969
3974
  "div",
3970
3975
  {
3971
3976
  "data-association-card": token,
3972
- "data-association-card-look": "simplified",
3977
+ "data-association-card-look": look,
3973
3978
  className: (0, import_design_system7.cn)(
3974
- "flex min-h-8 items-center gap-x-1.5 rounded-md border border-border bg-card px-2.5 py-1 sm:py-0 lg:pointer-fine:[--matrx-tap-target-size:1.75rem]",
3979
+ "flex items-center gap-x-1.5 rounded-md border border-border bg-card pl-2.5",
3980
+ look === "simplified" ? "py-1.5 pr-1.5" : "py-0 pr-0",
3975
3981
  className
3976
3982
  ),
3977
3983
  children: [
@@ -3984,7 +3990,7 @@ function AssociationCard({
3984
3990
  title: drillTitle,
3985
3991
  "aria-label": loading ? info.labelPlural : `${info.labelPlural}: ${count} ${countWord}`,
3986
3992
  className: (0, import_design_system7.cn)(
3987
- "flex min-h-8 min-w-0 flex-1 items-center gap-x-1.5 text-left",
3993
+ "flex min-h-7 min-w-0 flex-1 items-center gap-x-1.5 text-left",
3988
3994
  canDrillIn ? "cursor-pointer hover:text-foreground" : "cursor-default"
3989
3995
  ),
3990
3996
  children: [
@@ -3994,15 +4000,25 @@ function AssociationCard({
3994
4000
  ]
3995
4001
  }
3996
4002
  ),
3997
- canAttach && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3998
- import_tap_target.TapTargetButton,
4003
+ canAttach && (look === "compact" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4004
+ import_buttons.PlusTapButton,
3999
4005
  {
4006
+ variant: "outline",
4000
4007
  ariaLabel: `Attach ${info.labelPlural.toLowerCase()}`,
4001
4008
  tooltip: false,
4009
+ onClick: () => setOpen(true)
4010
+ }
4011
+ ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4012
+ "button",
4013
+ {
4014
+ type: "button",
4002
4015
  onClick: () => setOpen(true),
4003
- icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PlusIcon, { className: "h-4 w-4" })
4016
+ "aria-label": `Attach ${info.labelPlural.toLowerCase()}`,
4017
+ title: `Attach ${info.labelPlural.toLowerCase()}`,
4018
+ 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",
4019
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PlusIcon, { className: "h-4 w-4" })
4004
4020
  }
4005
- )
4021
+ ))
4006
4022
  ]
4007
4023
  }
4008
4024
  )
@@ -4120,7 +4136,7 @@ function GroupHeader({
4120
4136
  tagline,
4121
4137
  dotClassName
4122
4138
  }) {
4123
- if (look === "simplified") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: SIMPLE_GROUP_LABEL, children: title });
4139
+ if (look !== "tiles") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: SIMPLE_GROUP_LABEL, children: title });
4124
4140
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "mb-2.5 flex items-baseline gap-3 pl-1.5", children: [
4125
4141
  dotClassName ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
4126
4142
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: (0, import_design_system8.cn)("h-2.5 w-2.5 rounded-full", dotClassName) }),
@@ -4155,12 +4171,12 @@ function AssociationCardGrid({
4155
4171
  const role = store.registry.getEntityInfo(token).contentRole;
4156
4172
  return !role || !roleIds.has(role);
4157
4173
  }) : [];
4158
- const rowClass = look === "simplified" ? SIMPLE_TILE_ROW : TILE_GRID;
4174
+ const rowClass = look !== "tiles" ? SIMPLE_TILE_ROW : TILE_GRID;
4159
4175
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
4160
4176
  "div",
4161
4177
  {
4162
4178
  "data-association-grid-look": look,
4163
- className: (0, import_design_system8.cn)("@container", look === "simplified" ? "space-y-3" : "space-y-5", className),
4179
+ className: (0, import_design_system8.cn)("@container", look !== "tiles" ? "space-y-3" : "space-y-5", className),
4164
4180
  children: [
4165
4181
  CONTENT_ROLES.map((role) => {
4166
4182
  const inRole = list.filter(