@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,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ComponentType } from 'react';
3
- import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentMutationResult, e as AssociationPickerProps, x as EntityDoorProps, y as EntityRefProps, z as ContentRole } from '../CommentThread-oaeNU_5g.cjs';
4
- export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, G as AssociationCardLook, a as AssociationCardProps, H as AssociationEntitySelect, I as AssociationEntitySelectAdapter, J as AssociationEntitySelectItem, c as AssociationEntitySelectProps, K as AssociationList, d as AssociationListProps, L as AssociationWindow, f as AssociationWindowProps, M as AssociationWriteResult, N as AttachedItemsSheet, g as AttachedItemsSheetProps, O as CaptureAttach, Q as CaptureAttachResult, R as CaptureToolbarAction, S as CategorySelect, C as CategorySelectProps, T as CategoryTagPicker, h as CategoryTagPickerProps, V as CommentComposer, X as CommentComposerProps, Y as CommentThread, i as CommentThreadProps, Z as ContainerLink, _ as ContainerResourceRow, $ as ContainerResourcesAdapter, a0 as DefaultEntityIcon, a1 as PrimaryContainerEntity, a2 as PrimaryEntity, a3 as PrimaryEntityProvider, a4 as PrimaryFiledEntity, a5 as TagPickerIcon, a6 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a7 as UseAssociationEntitySelectAdapterArgs, a8 as UseAssociationsArgs, a9 as UseAssociationsReturn, aa as UseContainerLinksArgs, ab as UseContainerLinksReturn, ac as attachedKey, ad as buildCommentTree, ae as containerLinksArgs, af as linkDirection, ag as useAssociationEntitySelectAdapter, ah as useAssociations, ai as useContainerLinks, aj as useContainerLinksAdapter, ak as useEntityRelationships, al as usePrimaryEntity } from '../CommentThread-oaeNU_5g.cjs';
3
+ import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentMutationResult, e as AssociationPickerProps, x as EntityDoorProps, y as EntityRefProps, z as ContentRole } from '../CommentThread-CRR3jLBl.cjs';
4
+ export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, G as AssociationCardLook, a as AssociationCardProps, H as AssociationEntitySelect, I as AssociationEntitySelectAdapter, J as AssociationEntitySelectItem, c as AssociationEntitySelectProps, K as AssociationList, d as AssociationListProps, L as AssociationWindow, f as AssociationWindowProps, M as AssociationWriteResult, N as AttachedItemsSheet, g as AttachedItemsSheetProps, O as CaptureAttach, Q as CaptureAttachResult, R as CaptureToolbarAction, S as CategorySelect, C as CategorySelectProps, T as CategoryTagPicker, h as CategoryTagPickerProps, V as CommentComposer, X as CommentComposerProps, Y as CommentThread, i as CommentThreadProps, Z as ContainerLink, _ as ContainerResourceRow, $ as ContainerResourcesAdapter, a0 as DefaultEntityIcon, a1 as PrimaryContainerEntity, a2 as PrimaryEntity, a3 as PrimaryEntityProvider, a4 as PrimaryFiledEntity, a5 as TagPickerIcon, a6 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a7 as UseAssociationEntitySelectAdapterArgs, a8 as UseAssociationsArgs, a9 as UseAssociationsReturn, aa as UseContainerLinksArgs, ab as UseContainerLinksReturn, ac as attachedKey, ad as buildCommentTree, ae as containerLinksArgs, af as linkDirection, ag as useAssociationEntitySelectAdapter, ah as useAssociations, ai as useContainerLinks, aj as useContainerLinksAdapter, ak as useEntityRelationships, al as usePrimaryEntity } from '../CommentThread-CRR3jLBl.cjs';
5
5
 
6
6
  interface AssociationsUiPorts {
7
7
  notifier?: AssociationsNotifier;
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ComponentType } from 'react';
3
- import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentMutationResult, e as AssociationPickerProps, x as EntityDoorProps, y as EntityRefProps, z as ContentRole } from '../CommentThread-oaeNU_5g.js';
4
- export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, G as AssociationCardLook, a as AssociationCardProps, H as AssociationEntitySelect, I as AssociationEntitySelectAdapter, J as AssociationEntitySelectItem, c as AssociationEntitySelectProps, K as AssociationList, d as AssociationListProps, L as AssociationWindow, f as AssociationWindowProps, M as AssociationWriteResult, N as AttachedItemsSheet, g as AttachedItemsSheetProps, O as CaptureAttach, Q as CaptureAttachResult, R as CaptureToolbarAction, S as CategorySelect, C as CategorySelectProps, T as CategoryTagPicker, h as CategoryTagPickerProps, V as CommentComposer, X as CommentComposerProps, Y as CommentThread, i as CommentThreadProps, Z as ContainerLink, _ as ContainerResourceRow, $ as ContainerResourcesAdapter, a0 as DefaultEntityIcon, a1 as PrimaryContainerEntity, a2 as PrimaryEntity, a3 as PrimaryEntityProvider, a4 as PrimaryFiledEntity, a5 as TagPickerIcon, a6 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a7 as UseAssociationEntitySelectAdapterArgs, a8 as UseAssociationsArgs, a9 as UseAssociationsReturn, aa as UseContainerLinksArgs, ab as UseContainerLinksReturn, ac as attachedKey, ad as buildCommentTree, ae as containerLinksArgs, af as linkDirection, ag as useAssociationEntitySelectAdapter, ah as useAssociations, ai as useContainerLinks, aj as useContainerLinksAdapter, ak as useEntityRelationships, al as usePrimaryEntity } from '../CommentThread-oaeNU_5g.js';
3
+ import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentMutationResult, e as AssociationPickerProps, x as EntityDoorProps, y as EntityRefProps, z as ContentRole } from '../CommentThread-CRR3jLBl.js';
4
+ export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, G as AssociationCardLook, a as AssociationCardProps, H as AssociationEntitySelect, I as AssociationEntitySelectAdapter, J as AssociationEntitySelectItem, c as AssociationEntitySelectProps, K as AssociationList, d as AssociationListProps, L as AssociationWindow, f as AssociationWindowProps, M as AssociationWriteResult, N as AttachedItemsSheet, g as AttachedItemsSheetProps, O as CaptureAttach, Q as CaptureAttachResult, R as CaptureToolbarAction, S as CategorySelect, C as CategorySelectProps, T as CategoryTagPicker, h as CategoryTagPickerProps, V as CommentComposer, X as CommentComposerProps, Y as CommentThread, i as CommentThreadProps, Z as ContainerLink, _ as ContainerResourceRow, $ as ContainerResourcesAdapter, a0 as DefaultEntityIcon, a1 as PrimaryContainerEntity, a2 as PrimaryEntity, a3 as PrimaryEntityProvider, a4 as PrimaryFiledEntity, a5 as TagPickerIcon, a6 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a7 as UseAssociationEntitySelectAdapterArgs, a8 as UseAssociationsArgs, a9 as UseAssociationsReturn, aa as UseContainerLinksArgs, ab as UseContainerLinksReturn, ac as attachedKey, ad as buildCommentTree, ae as containerLinksArgs, af as linkDirection, ag as useAssociationEntitySelectAdapter, ah as useAssociations, ai as useContainerLinks, aj as useContainerLinksAdapter, ak as useEntityRelationships, al as usePrimaryEntity } from '../CommentThread-CRR3jLBl.js';
5
5
 
6
6
  interface AssociationsUiPorts {
7
7
  notifier?: AssociationsNotifier;
@@ -1690,6 +1690,8 @@ var ASSOCIATION_TARGET_TYPES = [
1690
1690
  // a note — the origin a converted study artifact links back to (artifact→note 'source' lineage, P4)
1691
1691
  "file",
1692
1692
  // a file (card→file media + source lineage)
1693
+ "processed_document",
1694
+ // a processed source document (study-aid source lineage and kit membership)
1693
1695
  "quiz_session",
1694
1696
  // a quiz a card is used in
1695
1697
  "agent",
@@ -3808,7 +3810,7 @@ function AttachedItemsBody({
3808
3810
  // src/react/components/AssociationCard.tsx
3809
3811
  import { useState as useState10 } from "react";
3810
3812
  import { cn as cn7 } from "@ai-matrx/design-system";
3811
- import { TapTargetButton } from "@ai-matrx/design-system/tap-target";
3813
+ import { PlusTapButton } from "@ai-matrx/tap-target/buttons";
3812
3814
 
3813
3815
  // src/react/contentRoles.ts
3814
3816
  var CONTENT_ROLES = [
@@ -3898,21 +3900,25 @@ function AssociationCard({
3898
3900
  const countWord = filing ? "filed under" : "attached";
3899
3901
  const drillTitle = canDrillIn ? `View the ${info.labelPlural.toLowerCase()} attached to ${container.label ?? "this"}` : void 0;
3900
3902
  return /* @__PURE__ */ jsxs9(Fragment3, { children: [
3901
- look === "simplified" ? (
3902
- // SIMPLIFIED (opt-in, off by default): one header line — small icon,
3903
- // UPPERCASE name, count, round ghost "+" — the same geometry as the
3904
- // CRM record's SectionCard header, so the two sit flush together.
3905
- // TapTargetButton puts `className` on its ICON, not the button: never
3906
- // pass layout classes there (an `ml-auto` pushed the "+" glyph off
3907
- // center inside its circle). The flex-1 drill button already puts the
3908
- // "+" at the end of the row.
3903
+ look !== "tiles" ? (
3904
+ // ONE-LINE LOOKS (opt-in, off by default): small icon, UPPERCASE name,
3905
+ // count, then the "+".
3906
+ // - "simplified": the classic square "+" (the same button the tiles
3907
+ // use), 6px from the card edge on every side at every width.
3908
+ // - "compact": the real PlusTapButton in its OUTLINE variant (never
3909
+ // glass — glass only reads over a see-through surface). Nothing
3910
+ // around it: no card padding on its side and no vertical padding,
3911
+ // so the tap target's own 44px box centers the 28px circle with
3912
+ // 8px on every side. Never pass a layout class to a tap button —
3913
+ // its className lands on the ICON (the 2026-09-27 crooked "+").
3909
3914
  /* @__PURE__ */ jsxs9(
3910
3915
  "div",
3911
3916
  {
3912
3917
  "data-association-card": token,
3913
- "data-association-card-look": "simplified",
3918
+ "data-association-card-look": look,
3914
3919
  className: cn7(
3915
- "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]",
3920
+ "flex items-center gap-x-1.5 rounded-md border border-border bg-card pl-2.5",
3921
+ look === "simplified" ? "py-1.5 pr-1.5" : "py-0 pr-0",
3916
3922
  className
3917
3923
  ),
3918
3924
  children: [
@@ -3925,7 +3931,7 @@ function AssociationCard({
3925
3931
  title: drillTitle,
3926
3932
  "aria-label": loading ? info.labelPlural : `${info.labelPlural}: ${count} ${countWord}`,
3927
3933
  className: cn7(
3928
- "flex min-h-8 min-w-0 flex-1 items-center gap-x-1.5 text-left",
3934
+ "flex min-h-7 min-w-0 flex-1 items-center gap-x-1.5 text-left",
3929
3935
  canDrillIn ? "cursor-pointer hover:text-foreground" : "cursor-default"
3930
3936
  ),
3931
3937
  children: [
@@ -3935,15 +3941,25 @@ function AssociationCard({
3935
3941
  ]
3936
3942
  }
3937
3943
  ),
3938
- canAttach && /* @__PURE__ */ jsx11(
3939
- TapTargetButton,
3944
+ canAttach && (look === "compact" ? /* @__PURE__ */ jsx11(
3945
+ PlusTapButton,
3940
3946
  {
3947
+ variant: "outline",
3941
3948
  ariaLabel: `Attach ${info.labelPlural.toLowerCase()}`,
3942
3949
  tooltip: false,
3950
+ onClick: () => setOpen(true)
3951
+ }
3952
+ ) : /* @__PURE__ */ jsx11(
3953
+ "button",
3954
+ {
3955
+ type: "button",
3943
3956
  onClick: () => setOpen(true),
3944
- icon: /* @__PURE__ */ jsx11(PlusIcon, { className: "h-4 w-4" })
3957
+ "aria-label": `Attach ${info.labelPlural.toLowerCase()}`,
3958
+ title: `Attach ${info.labelPlural.toLowerCase()}`,
3959
+ 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",
3960
+ children: /* @__PURE__ */ jsx11(PlusIcon, { className: "h-4 w-4" })
3945
3961
  }
3946
- )
3962
+ ))
3947
3963
  ]
3948
3964
  }
3949
3965
  )
@@ -4061,7 +4077,7 @@ function GroupHeader({
4061
4077
  tagline,
4062
4078
  dotClassName
4063
4079
  }) {
4064
- if (look === "simplified") return /* @__PURE__ */ jsx12("h3", { className: SIMPLE_GROUP_LABEL, children: title });
4080
+ if (look !== "tiles") return /* @__PURE__ */ jsx12("h3", { className: SIMPLE_GROUP_LABEL, children: title });
4065
4081
  return /* @__PURE__ */ jsxs10("div", { className: "mb-2.5 flex items-baseline gap-3 pl-1.5", children: [
4066
4082
  dotClassName ? /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
4067
4083
  /* @__PURE__ */ jsx12("span", { className: cn8("h-2.5 w-2.5 rounded-full", dotClassName) }),
@@ -4096,12 +4112,12 @@ function AssociationCardGrid({
4096
4112
  const role = store.registry.getEntityInfo(token).contentRole;
4097
4113
  return !role || !roleIds.has(role);
4098
4114
  }) : [];
4099
- const rowClass = look === "simplified" ? SIMPLE_TILE_ROW : TILE_GRID;
4115
+ const rowClass = look !== "tiles" ? SIMPLE_TILE_ROW : TILE_GRID;
4100
4116
  return /* @__PURE__ */ jsxs10(
4101
4117
  "div",
4102
4118
  {
4103
4119
  "data-association-grid-look": look,
4104
- className: cn8("@container", look === "simplified" ? "space-y-3" : "space-y-5", className),
4120
+ className: cn8("@container", look !== "tiles" ? "space-y-3" : "space-y-5", className),
4105
4121
  children: [
4106
4122
  CONTENT_ROLES.map((role) => {
4107
4123
  const inRole = list.filter(