@ai-matrx/associations 0.10.7 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog — @ai-matrx/associations
2
2
 
3
+ ## 0.11.1
4
+
5
+ Filed-under grid shows where things are actually filed:
6
+
7
+ * `research_topic` and `media_source_library` join `ASSOCIATION_TARGET_TYPES` — the containers
8
+ Sources are filed under (the landing door writes `processed_document → research_topic` and
9
+ `→ media_source_library`).
10
+ * In `direction: "outgoing"` the grid adds a card for every container the primary has an edge to
11
+ (not only the curated set) and draws containers with no content role (Libraries, topics, sites)
12
+ in a "Filed under" section — they were silently dropped, so every card read "0 filed under".
13
+ * `useContainerLinks` returns `presentTokens` (every token with at least one link).
14
+
15
+ ## 0.11.0
16
+
17
+ **Filed-under mode** — `direction: "outgoing"` on the primary entity. A thing that is filed under
18
+ containers (a Source under a project, a research topic, a Library) is now a first-class primary:
19
+
20
+ * `PrimaryEntity` is `PrimaryContainerEntity` (the default, `direction?: "incoming"`, a container
21
+ TARGET type — unchanged) or `PrimaryFiledEntity` (`direction: "outgoing"`, any registered token).
22
+ * `useContainerLinks({ …, direction: "outgoing" })` lists the primary's OUTGOING edges (the
23
+ containers it is filed under); `attach` writes `primary → container` as the same role-less edge
24
+ the landing door writes; `detach` / `setPinned` address that edge. A token that is not a
25
+ container type is refused before any write ("… cannot be filed under").
26
+ * `containerLinksArgs(primary)` — the one mapping the faces use, so the direction is never dropped.
27
+ * `AssociationCardGrid` / `AssociationCard` / `AssociationList` / `AttachedItemsSheet` /
28
+ `AssociationPicker` honour it: only container types are offered, counts read "N filed under",
29
+ the picker header reads "File X under a …" (`AssociationPickerProps.filing`).
30
+ * New root export `isAssociationTargetType` and type `AssociationDirection`.
31
+
32
+ Consumer action: none for containers. To show what an entity is filed under, pass
33
+ `{ type, id, orgId, label, direction: "outgoing" }` to `PrimaryEntityProvider`.
34
+
3
35
  ## 0.10.7
4
36
 
5
37
  Regenerated the entity vocabulary from the live registry (998 active tokens):
@@ -595,6 +595,11 @@ interface AssociationPickerProps {
595
595
  ok: boolean;
596
596
  error?: string;
597
597
  }>;
598
+ /**
599
+ * Filed-under mode: the primary is being FILED UNDER the picked items
600
+ * (`primary → item`), so the header says "File … under" not "Attach to".
601
+ */
602
+ filing?: boolean;
598
603
  }
599
604
  /** Per-token picker override map — absent tokens use the generic picker sheet. */
600
605
  type PickerOverrideMap = Partial<Record<EntityTypeToken, ComponentType<AssociationPickerProps>>>;
@@ -676,7 +681,7 @@ interface AssociationsConfig {
676
681
  authorDisplay?: AuthorDisplayPort;
677
682
  }
678
683
 
679
- 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"];
684
+ 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"];
680
685
  type AssociationTargetType = (typeof ASSOCIATION_TARGET_TYPES)[number];
681
686
  interface AssociationEdge {
682
687
  id: string;
@@ -1445,6 +1450,37 @@ declare function useAssociations(args: UseAssociationsArgs): UseAssociationsRetu
1445
1450
  */
1446
1451
  declare const useEntityRelationships: typeof useAssociations;
1447
1452
 
1453
+ interface PrimaryEntityBase {
1454
+ id: string;
1455
+ /** Org to stamp on edges created here (org-scoped RLS / counts). */
1456
+ orgId?: string | null;
1457
+ /** Human label for headings (e.g. the org/scope name). */
1458
+ label?: string;
1459
+ }
1460
+ /** A container: its surfaces list what is attached INTO it (the default). */
1461
+ interface PrimaryContainerEntity extends PrimaryEntityBase {
1462
+ /** Container token — must be an association TARGET type. */
1463
+ type: AssociationTargetType;
1464
+ direction?: "incoming";
1465
+ }
1466
+ /**
1467
+ * A thing FILED UNDER containers (e.g. a Source under a project): its
1468
+ * surfaces list its own outgoing edges and "+" files it under a container.
1469
+ */
1470
+ interface PrimaryFiledEntity extends PrimaryEntityBase {
1471
+ /** Any registered entity type — it is the edge SOURCE. */
1472
+ type: EntityTypeToken;
1473
+ direction: "outgoing";
1474
+ }
1475
+ /** The primary entity a surface is anchored to. */
1476
+ type PrimaryEntity = PrimaryContainerEntity | PrimaryFiledEntity;
1477
+ declare function PrimaryEntityProvider({ value, children, }: {
1478
+ value: PrimaryEntity;
1479
+ children: ReactNode;
1480
+ }): react.JSX.Element;
1481
+ /** Read the surrounding primary entity, or null when unprovided. */
1482
+ declare function usePrimaryEntity(): PrimaryEntity | null;
1483
+
1448
1484
  interface ContainerLink {
1449
1485
  /** The edge id (for keys / removal). */
1450
1486
  edgeId: string;
@@ -1458,13 +1494,25 @@ interface ContainerLink {
1458
1494
  /** Per-edge props from `platform.associations.metadata` (e.g. representation). */
1459
1495
  metadata: unknown;
1460
1496
  }
1461
- interface UseContainerLinksArgs {
1462
- /** The primary entity — always an association TARGET (container). */
1463
- containerType: AssociationTargetType;
1497
+ interface UseContainerLinksBase {
1464
1498
  containerId: string | null;
1465
1499
  /** Org to stamp on new edges (for org-scoped RLS / counts). */
1466
1500
  orgId?: string | null;
1467
1501
  }
1502
+ /**
1503
+ * `incoming` (default): the primary is a container (edge TARGET) — links are
1504
+ * what is attached into it. `outgoing`: the primary is filed under containers
1505
+ * (edge SOURCE) — links are the containers it is filed under, and `attach`
1506
+ * writes `primary → container` (the same role-less edge the landing door
1507
+ * writes), refusing tokens that are not container types.
1508
+ */
1509
+ type UseContainerLinksArgs = (UseContainerLinksBase & {
1510
+ containerType: AssociationTargetType;
1511
+ direction?: "incoming";
1512
+ }) | (UseContainerLinksBase & {
1513
+ containerType: EntityTypeToken;
1514
+ direction: "outgoing";
1515
+ });
1468
1516
  interface UseContainerLinksReturn {
1469
1517
  status: ReturnType<typeof useAssociations>["status"];
1470
1518
  error: string | null;
@@ -1477,6 +1525,8 @@ interface UseContainerLinksReturn {
1477
1525
  attachedIdsFor: (token: EntityTypeToken) => Set<string>;
1478
1526
  /** Full link rows of `token` (for listing/removal). */
1479
1527
  linksFor: (token: EntityTypeToken) => ContainerLink[];
1528
+ /** Every token that has at least one link, in first-seen order. */
1529
+ presentTokens: string[];
1480
1530
  /** Attach a resource (source) to this container (target). */
1481
1531
  attach: (token: EntityTypeToken, resourceId: string, label?: string, metadata?: unknown, options?: {
1482
1532
  replaceMetadata?: boolean;
@@ -1496,6 +1546,11 @@ interface UseContainerLinksReturn {
1496
1546
  setPinned: (token: EntityTypeToken, resourceId: string, pinned: boolean, role?: string) => Promise<AssociationWriteResult>;
1497
1547
  }
1498
1548
  declare function useContainerLinks(args: UseContainerLinksArgs): UseContainerLinksReturn;
1549
+ /**
1550
+ * `useContainerLinks` args for a surface's primary entity — the ONE mapping
1551
+ * the faces (card, list) use, so a primary's direction is never dropped.
1552
+ */
1553
+ declare function containerLinksArgs(container: PrimaryEntity | null): UseContainerLinksArgs;
1499
1554
 
1500
1555
  interface AssociationEntitySelectItem {
1501
1556
  id: string;
@@ -1543,23 +1598,6 @@ interface UseAssociationEntitySelectAdapterArgs {
1543
1598
  }
1544
1599
  declare function useAssociationEntitySelectAdapter(args: UseAssociationEntitySelectAdapterArgs): AssociationEntitySelectAdapter;
1545
1600
 
1546
- /** The primary (container) entity a surface is anchored to. */
1547
- interface PrimaryEntity {
1548
- /** Container token — must be an association TARGET type. */
1549
- type: AssociationTargetType;
1550
- id: string;
1551
- /** Org to stamp on edges created here (org-scoped RLS / counts). */
1552
- orgId?: string | null;
1553
- /** Human label for headings (e.g. the org/scope name). */
1554
- label?: string;
1555
- }
1556
- declare function PrimaryEntityProvider({ value, children, }: {
1557
- value: PrimaryEntity;
1558
- children: ReactNode;
1559
- }): react.JSX.Element;
1560
- /** Read the surrounding primary entity, or null when unprovided. */
1561
- declare function usePrimaryEntity(): PrimaryEntity | null;
1562
-
1563
1601
  interface AssociationWindowProps {
1564
1602
  /** Controls mount — callers should also gate their JSX on this. */
1565
1603
  open: boolean;
@@ -1927,4 +1965,4 @@ declare function buildCommentTree(comments: readonly PlatformComment[]): {
1927
1965
  };
1928
1966
  declare function CommentThread({ token, id, orgId, showHeader, className, }: CommentThreadProps): react.JSX.Element;
1929
1967
 
1930
- export { DefaultEntityIcon as $, type AssociationCaptureToolbarProps as A, AssociationCaptureToolbar as B, type CategorySelectProps as C, AssociationCard as D, type EntityDoorsPort as E, AssociationCardGrid as F, AssociationEntitySelect as G, type AssociationEntitySelectAdapter as H, type AssociationEntitySelectItem as I, AssociationList as J, AssociationWindow as K, type AssociationWriteResult as L, AttachedItemsSheet as M, type CaptureAttach as N, type CaptureAttachResult as O, type PickerOverrideMap as P, CaptureToolbarAction as Q, CategorySelect as R, CategoryTagPicker as S, CommentComposer as T, type UniversalAssociationPickerProps as U, type CommentComposerProps as V, type WindowShellPort as W, CommentThread as X, type ContainerLink as Y, type ContainerResourceRow as Z, type ContainerResourcesAdapter as _, type AssociationCardProps as a, type PrimaryEntity as a0, PrimaryEntityProvider as a1, type TagPickerIcon as a2, UniversalAssociationPicker as a3, type UseAssociationEntitySelectAdapterArgs as a4, type UseAssociationsArgs as a5, type UseAssociationsReturn as a6, type UseContainerLinksArgs as a7, type UseContainerLinksReturn as a8, attachedKey as a9, buildCommentTree as aa, useAssociationEntitySelectAdapter as ab, useAssociations as ac, useContainerLinks as ad, useContainerLinksAdapter as ae, useEntityRelationships as af, usePrimaryEntity as ag, type AssociationCardGridProps as b, type AssociationEntitySelectProps as c, type AssociationListProps as d, type AssociationPickerProps as e, type AssociationWindowProps as f, type AttachedItemsSheetProps as g, type CategoryTagPickerProps as h, type CommentThreadProps as i, type AssociationsNotifier as j, type CapturePort as k, type AuthorDisplayPort as l, type AssociationsStore as m, type CategoryMutationResult as n, type CategoryDimension as o, type PlatformCategory as p, type CategoriesEntry as q, type EntityTypeToken as r, type UniversalCandidate as s, type CandidateRecord as t, type PlatformComment as u, type CommentsEntry as v, type CommentMutationResult as w, type EntityDoorProps as x, type EntityRefProps as y, type ContentRole as z };
1968
+ export { DefaultEntityIcon as $, type AssociationCaptureToolbarProps as A, AssociationCaptureToolbar as B, type CategorySelectProps as C, AssociationCard as D, type EntityDoorsPort as E, AssociationCardGrid as F, AssociationEntitySelect as G, type AssociationEntitySelectAdapter as H, type AssociationEntitySelectItem as I, AssociationList as J, AssociationWindow as K, type AssociationWriteResult as L, AttachedItemsSheet as M, type CaptureAttach as N, type CaptureAttachResult as O, type PickerOverrideMap as P, CaptureToolbarAction as Q, CategorySelect as R, CategoryTagPicker as S, CommentComposer as T, type UniversalAssociationPickerProps as U, type CommentComposerProps as V, type WindowShellPort as W, CommentThread as X, type ContainerLink as Y, type ContainerResourceRow as Z, type ContainerResourcesAdapter as _, type AssociationCardProps as a, type PrimaryContainerEntity as a0, type PrimaryEntity as a1, PrimaryEntityProvider as a2, type PrimaryFiledEntity as a3, type TagPickerIcon as a4, UniversalAssociationPicker as a5, type UseAssociationEntitySelectAdapterArgs as a6, type UseAssociationsArgs as a7, type UseAssociationsReturn as a8, type UseContainerLinksArgs as a9, type UseContainerLinksReturn as aa, attachedKey as ab, buildCommentTree as ac, containerLinksArgs as ad, useAssociationEntitySelectAdapter as ae, useAssociations as af, useContainerLinks as ag, useContainerLinksAdapter as ah, useEntityRelationships as ai, usePrimaryEntity as aj, type AssociationCardGridProps as b, type AssociationEntitySelectProps as c, type AssociationListProps as d, type AssociationPickerProps as e, type AssociationWindowProps as f, type AttachedItemsSheetProps as g, type CategoryTagPickerProps as h, type CommentThreadProps as i, type AssociationsNotifier as j, type CapturePort as k, type AuthorDisplayPort as l, type AssociationsStore as m, type CategoryMutationResult as n, type CategoryDimension as o, type PlatformCategory as p, type CategoriesEntry as q, type EntityTypeToken as r, type UniversalCandidate as s, type CandidateRecord as t, type PlatformComment as u, type CommentsEntry as v, type CommentMutationResult as w, type EntityDoorProps as x, type EntityRefProps as y, type ContentRole as z };
@@ -595,6 +595,11 @@ interface AssociationPickerProps {
595
595
  ok: boolean;
596
596
  error?: string;
597
597
  }>;
598
+ /**
599
+ * Filed-under mode: the primary is being FILED UNDER the picked items
600
+ * (`primary → item`), so the header says "File … under" not "Attach to".
601
+ */
602
+ filing?: boolean;
598
603
  }
599
604
  /** Per-token picker override map — absent tokens use the generic picker sheet. */
600
605
  type PickerOverrideMap = Partial<Record<EntityTypeToken, ComponentType<AssociationPickerProps>>>;
@@ -676,7 +681,7 @@ interface AssociationsConfig {
676
681
  authorDisplay?: AuthorDisplayPort;
677
682
  }
678
683
 
679
- 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"];
684
+ 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"];
680
685
  type AssociationTargetType = (typeof ASSOCIATION_TARGET_TYPES)[number];
681
686
  interface AssociationEdge {
682
687
  id: string;
@@ -1445,6 +1450,37 @@ declare function useAssociations(args: UseAssociationsArgs): UseAssociationsRetu
1445
1450
  */
1446
1451
  declare const useEntityRelationships: typeof useAssociations;
1447
1452
 
1453
+ interface PrimaryEntityBase {
1454
+ id: string;
1455
+ /** Org to stamp on edges created here (org-scoped RLS / counts). */
1456
+ orgId?: string | null;
1457
+ /** Human label for headings (e.g. the org/scope name). */
1458
+ label?: string;
1459
+ }
1460
+ /** A container: its surfaces list what is attached INTO it (the default). */
1461
+ interface PrimaryContainerEntity extends PrimaryEntityBase {
1462
+ /** Container token — must be an association TARGET type. */
1463
+ type: AssociationTargetType;
1464
+ direction?: "incoming";
1465
+ }
1466
+ /**
1467
+ * A thing FILED UNDER containers (e.g. a Source under a project): its
1468
+ * surfaces list its own outgoing edges and "+" files it under a container.
1469
+ */
1470
+ interface PrimaryFiledEntity extends PrimaryEntityBase {
1471
+ /** Any registered entity type — it is the edge SOURCE. */
1472
+ type: EntityTypeToken;
1473
+ direction: "outgoing";
1474
+ }
1475
+ /** The primary entity a surface is anchored to. */
1476
+ type PrimaryEntity = PrimaryContainerEntity | PrimaryFiledEntity;
1477
+ declare function PrimaryEntityProvider({ value, children, }: {
1478
+ value: PrimaryEntity;
1479
+ children: ReactNode;
1480
+ }): react.JSX.Element;
1481
+ /** Read the surrounding primary entity, or null when unprovided. */
1482
+ declare function usePrimaryEntity(): PrimaryEntity | null;
1483
+
1448
1484
  interface ContainerLink {
1449
1485
  /** The edge id (for keys / removal). */
1450
1486
  edgeId: string;
@@ -1458,13 +1494,25 @@ interface ContainerLink {
1458
1494
  /** Per-edge props from `platform.associations.metadata` (e.g. representation). */
1459
1495
  metadata: unknown;
1460
1496
  }
1461
- interface UseContainerLinksArgs {
1462
- /** The primary entity — always an association TARGET (container). */
1463
- containerType: AssociationTargetType;
1497
+ interface UseContainerLinksBase {
1464
1498
  containerId: string | null;
1465
1499
  /** Org to stamp on new edges (for org-scoped RLS / counts). */
1466
1500
  orgId?: string | null;
1467
1501
  }
1502
+ /**
1503
+ * `incoming` (default): the primary is a container (edge TARGET) — links are
1504
+ * what is attached into it. `outgoing`: the primary is filed under containers
1505
+ * (edge SOURCE) — links are the containers it is filed under, and `attach`
1506
+ * writes `primary → container` (the same role-less edge the landing door
1507
+ * writes), refusing tokens that are not container types.
1508
+ */
1509
+ type UseContainerLinksArgs = (UseContainerLinksBase & {
1510
+ containerType: AssociationTargetType;
1511
+ direction?: "incoming";
1512
+ }) | (UseContainerLinksBase & {
1513
+ containerType: EntityTypeToken;
1514
+ direction: "outgoing";
1515
+ });
1468
1516
  interface UseContainerLinksReturn {
1469
1517
  status: ReturnType<typeof useAssociations>["status"];
1470
1518
  error: string | null;
@@ -1477,6 +1525,8 @@ interface UseContainerLinksReturn {
1477
1525
  attachedIdsFor: (token: EntityTypeToken) => Set<string>;
1478
1526
  /** Full link rows of `token` (for listing/removal). */
1479
1527
  linksFor: (token: EntityTypeToken) => ContainerLink[];
1528
+ /** Every token that has at least one link, in first-seen order. */
1529
+ presentTokens: string[];
1480
1530
  /** Attach a resource (source) to this container (target). */
1481
1531
  attach: (token: EntityTypeToken, resourceId: string, label?: string, metadata?: unknown, options?: {
1482
1532
  replaceMetadata?: boolean;
@@ -1496,6 +1546,11 @@ interface UseContainerLinksReturn {
1496
1546
  setPinned: (token: EntityTypeToken, resourceId: string, pinned: boolean, role?: string) => Promise<AssociationWriteResult>;
1497
1547
  }
1498
1548
  declare function useContainerLinks(args: UseContainerLinksArgs): UseContainerLinksReturn;
1549
+ /**
1550
+ * `useContainerLinks` args for a surface's primary entity — the ONE mapping
1551
+ * the faces (card, list) use, so a primary's direction is never dropped.
1552
+ */
1553
+ declare function containerLinksArgs(container: PrimaryEntity | null): UseContainerLinksArgs;
1499
1554
 
1500
1555
  interface AssociationEntitySelectItem {
1501
1556
  id: string;
@@ -1543,23 +1598,6 @@ interface UseAssociationEntitySelectAdapterArgs {
1543
1598
  }
1544
1599
  declare function useAssociationEntitySelectAdapter(args: UseAssociationEntitySelectAdapterArgs): AssociationEntitySelectAdapter;
1545
1600
 
1546
- /** The primary (container) entity a surface is anchored to. */
1547
- interface PrimaryEntity {
1548
- /** Container token — must be an association TARGET type. */
1549
- type: AssociationTargetType;
1550
- id: string;
1551
- /** Org to stamp on edges created here (org-scoped RLS / counts). */
1552
- orgId?: string | null;
1553
- /** Human label for headings (e.g. the org/scope name). */
1554
- label?: string;
1555
- }
1556
- declare function PrimaryEntityProvider({ value, children, }: {
1557
- value: PrimaryEntity;
1558
- children: ReactNode;
1559
- }): react.JSX.Element;
1560
- /** Read the surrounding primary entity, or null when unprovided. */
1561
- declare function usePrimaryEntity(): PrimaryEntity | null;
1562
-
1563
1601
  interface AssociationWindowProps {
1564
1602
  /** Controls mount — callers should also gate their JSX on this. */
1565
1603
  open: boolean;
@@ -1927,4 +1965,4 @@ declare function buildCommentTree(comments: readonly PlatformComment[]): {
1927
1965
  };
1928
1966
  declare function CommentThread({ token, id, orgId, showHeader, className, }: CommentThreadProps): react.JSX.Element;
1929
1967
 
1930
- export { DefaultEntityIcon as $, type AssociationCaptureToolbarProps as A, AssociationCaptureToolbar as B, type CategorySelectProps as C, AssociationCard as D, type EntityDoorsPort as E, AssociationCardGrid as F, AssociationEntitySelect as G, type AssociationEntitySelectAdapter as H, type AssociationEntitySelectItem as I, AssociationList as J, AssociationWindow as K, type AssociationWriteResult as L, AttachedItemsSheet as M, type CaptureAttach as N, type CaptureAttachResult as O, type PickerOverrideMap as P, CaptureToolbarAction as Q, CategorySelect as R, CategoryTagPicker as S, CommentComposer as T, type UniversalAssociationPickerProps as U, type CommentComposerProps as V, type WindowShellPort as W, CommentThread as X, type ContainerLink as Y, type ContainerResourceRow as Z, type ContainerResourcesAdapter as _, type AssociationCardProps as a, type PrimaryEntity as a0, PrimaryEntityProvider as a1, type TagPickerIcon as a2, UniversalAssociationPicker as a3, type UseAssociationEntitySelectAdapterArgs as a4, type UseAssociationsArgs as a5, type UseAssociationsReturn as a6, type UseContainerLinksArgs as a7, type UseContainerLinksReturn as a8, attachedKey as a9, buildCommentTree as aa, useAssociationEntitySelectAdapter as ab, useAssociations as ac, useContainerLinks as ad, useContainerLinksAdapter as ae, useEntityRelationships as af, usePrimaryEntity as ag, type AssociationCardGridProps as b, type AssociationEntitySelectProps as c, type AssociationListProps as d, type AssociationPickerProps as e, type AssociationWindowProps as f, type AttachedItemsSheetProps as g, type CategoryTagPickerProps as h, type CommentThreadProps as i, type AssociationsNotifier as j, type CapturePort as k, type AuthorDisplayPort as l, type AssociationsStore as m, type CategoryMutationResult as n, type CategoryDimension as o, type PlatformCategory as p, type CategoriesEntry as q, type EntityTypeToken as r, type UniversalCandidate as s, type CandidateRecord as t, type PlatformComment as u, type CommentsEntry as v, type CommentMutationResult as w, type EntityDoorProps as x, type EntityRefProps as y, type ContentRole as z };
1968
+ export { DefaultEntityIcon as $, type AssociationCaptureToolbarProps as A, AssociationCaptureToolbar as B, type CategorySelectProps as C, AssociationCard as D, type EntityDoorsPort as E, AssociationCardGrid as F, AssociationEntitySelect as G, type AssociationEntitySelectAdapter as H, type AssociationEntitySelectItem as I, AssociationList as J, AssociationWindow as K, type AssociationWriteResult as L, AttachedItemsSheet as M, type CaptureAttach as N, type CaptureAttachResult as O, type PickerOverrideMap as P, CaptureToolbarAction as Q, CategorySelect as R, CategoryTagPicker as S, CommentComposer as T, type UniversalAssociationPickerProps as U, type CommentComposerProps as V, type WindowShellPort as W, CommentThread as X, type ContainerLink as Y, type ContainerResourceRow as Z, type ContainerResourcesAdapter as _, type AssociationCardProps as a, type PrimaryContainerEntity as a0, type PrimaryEntity as a1, PrimaryEntityProvider as a2, type PrimaryFiledEntity as a3, type TagPickerIcon as a4, UniversalAssociationPicker as a5, type UseAssociationEntitySelectAdapterArgs as a6, type UseAssociationsArgs as a7, type UseAssociationsReturn as a8, type UseContainerLinksArgs as a9, type UseContainerLinksReturn as aa, attachedKey as ab, buildCommentTree as ac, containerLinksArgs as ad, useAssociationEntitySelectAdapter as ae, useAssociations as af, useContainerLinks as ag, useContainerLinksAdapter as ah, useEntityRelationships as ai, usePrimaryEntity as aj, type AssociationCardGridProps as b, type AssociationEntitySelectProps as c, type AssociationListProps as d, type AssociationPickerProps as e, type AssociationWindowProps as f, type AttachedItemsSheetProps as g, type CategoryTagPickerProps as h, type CommentThreadProps as i, type AssociationsNotifier as j, type CapturePort as k, type AuthorDisplayPort as l, type AssociationsStore as m, type CategoryMutationResult as n, type CategoryDimension as o, type PlatformCategory as p, type CategoriesEntry as q, type EntityTypeToken as r, type UniversalCandidate as s, type CandidateRecord as t, type PlatformComment as u, type CommentsEntry as v, type CommentMutationResult as w, type EntityDoorProps as x, type EntityRefProps as y, type ContentRole as z };
package/dist/index.cjs CHANGED
@@ -26,6 +26,7 @@ __export(src_exports, {
26
26
  ENTITY_TYPE_TOKENS: () => ENTITY_TYPE_TOKENS,
27
27
  REFERENCE_CATEGORY_DISPLAY: () => REFERENCE_CATEGORY_DISPLAY,
28
28
  SCHEMA_DISPLAY: () => SCHEMA_DISPLAY,
29
+ isAssociationTargetType: () => isAssociationTargetType,
29
30
  isAssociationsRpcErr: () => isAssociationsRpcErr,
30
31
  isEntityTypeToken: () => isEntityTypeToken
31
32
  });
@@ -2137,9 +2138,16 @@ var ASSOCIATION_TARGET_TYPES = [
2137
2138
  // a CRM outreach list (a worked send/dial queue) — parties and resources attach into it
2138
2139
  "crm_deal",
2139
2140
  // a CRM deal (crm.deal) — people on it (role 'deal_contact'), tasks/files attach onto it
2140
- "rulebook"
2141
+ "rulebook",
2141
2142
  // a Masterwork Rulebook — its Scout interviews attach here (conversation→rulebook, role 'interview')
2143
+ "research_topic",
2144
+ // a research topic — Sources are filed under it (processed_document→research_topic, the landing door's edge)
2145
+ "media_source_library"
2146
+ // a media-catalog Library — Sources are catalogued into it (processed_document→media_source_library)
2142
2147
  ];
2148
+ function isAssociationTargetType(value) {
2149
+ return typeof value === "string" && ASSOCIATION_TARGET_TYPES.includes(value);
2150
+ }
2143
2151
 
2144
2152
  // src/results.ts
2145
2153
  function isAssociationsRpcErr(r) {