@ai-matrx/associations 0.12.1 → 0.13.0

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-C78e8433.cjs';
4
- export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, a as AssociationCardProps, G as AssociationEntitySelect, H as AssociationEntitySelectAdapter, I as AssociationEntitySelectItem, c as AssociationEntitySelectProps, J as AssociationList, d as AssociationListProps, K as AssociationWindow, f as AssociationWindowProps, L as AssociationWriteResult, M as AttachedItemsSheet, g as AttachedItemsSheetProps, N as CaptureAttach, O as CaptureAttachResult, Q as CaptureToolbarAction, R as CategorySelect, C as CategorySelectProps, S as CategoryTagPicker, h as CategoryTagPickerProps, T as CommentComposer, V as CommentComposerProps, X as CommentThread, i as CommentThreadProps, Y as ContainerLink, Z as ContainerResourceRow, _ as ContainerResourcesAdapter, $ as DefaultEntityIcon, a0 as PrimaryContainerEntity, a1 as PrimaryEntity, a2 as PrimaryEntityProvider, a3 as PrimaryFiledEntity, a4 as TagPickerIcon, a5 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a6 as UseAssociationEntitySelectAdapterArgs, a7 as UseAssociationsArgs, a8 as UseAssociationsReturn, a9 as UseContainerLinksArgs, aa as UseContainerLinksReturn, ab as attachedKey, ac as buildCommentTree, ad as containerLinksArgs, ae as useAssociationEntitySelectAdapter, af as useAssociations, ag as useContainerLinks, ah as useContainerLinksAdapter, ai as useEntityRelationships, aj as usePrimaryEntity } from '../CommentThread-C78e8433.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-DP4sEzb2.cjs';
4
+ export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, a as AssociationCardProps, G as AssociationEntitySelect, H as AssociationEntitySelectAdapter, I as AssociationEntitySelectItem, c as AssociationEntitySelectProps, J as AssociationList, d as AssociationListProps, K as AssociationWindow, f as AssociationWindowProps, L as AssociationWriteResult, M as AttachedItemsSheet, g as AttachedItemsSheetProps, N as CaptureAttach, O as CaptureAttachResult, Q as CaptureToolbarAction, R as CategorySelect, C as CategorySelectProps, S as CategoryTagPicker, h as CategoryTagPickerProps, T as CommentComposer, V as CommentComposerProps, X as CommentThread, i as CommentThreadProps, Y as ContainerLink, Z as ContainerResourceRow, _ as ContainerResourcesAdapter, $ as DefaultEntityIcon, a0 as PrimaryContainerEntity, a1 as PrimaryEntity, a2 as PrimaryEntityProvider, a3 as PrimaryFiledEntity, a4 as TagPickerIcon, a5 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a6 as UseAssociationEntitySelectAdapterArgs, a7 as UseAssociationsArgs, a8 as UseAssociationsReturn, a9 as UseContainerLinksArgs, aa as UseContainerLinksReturn, ab as attachedKey, ac as buildCommentTree, ad as containerLinksArgs, ae as useAssociationEntitySelectAdapter, af as useAssociations, ag as useContainerLinks, ah as useContainerLinksAdapter, ai as useEntityRelationships, aj as usePrimaryEntity } from '../CommentThread-DP4sEzb2.cjs';
5
5
 
6
6
  interface AssociationsUiPorts {
7
7
  notifier?: AssociationsNotifier;
@@ -97,8 +97,6 @@ interface UseUniversalEntitySearchArgs {
97
97
  query: string;
98
98
  /** Restrict to these tokens; defaults to every listable token. */
99
99
  tokens?: EntityTypeToken[];
100
- /** Owner filter for the per-token candidate reads. */
101
- ownerId?: string | null;
102
100
  enabled?: boolean;
103
101
  perTokenLimit?: number;
104
102
  /**
@@ -115,6 +113,15 @@ interface UseUniversalEntitySearchArgs {
115
113
  * or the recents fallback).
116
114
  */
117
115
  type UniversalSearchSource = "search" | "recents" | "candidates";
116
+ /**
117
+ * One read that failed. `token` names the entity type whose candidate read
118
+ * failed; `null` means the recents read (favorites / last-viewed) failed.
119
+ */
120
+ interface UniversalSearchFailure {
121
+ token: EntityTypeToken | null;
122
+ error: string;
123
+ }
124
+ type UniversalSearchStatus = "loading" | "error" | "ready";
118
125
  interface UseUniversalEntitySearchReturn {
119
126
  results: UniversalCandidate[];
120
127
  /** True while the current query's sweep is in flight. */
@@ -123,9 +130,35 @@ interface UseUniversalEntitySearchReturn {
123
130
  isRecents: boolean;
124
131
  /** What the results are — lets the face label a browse vs recents vs hits. */
125
132
  source: UniversalSearchSource;
133
+ /** Every read that failed for the current results (partial or total). */
134
+ failures: UniversalSearchFailure[];
135
+ /**
136
+ * Non-null only when NOTHING could be read: every searched token failed
137
+ * (and, for recents, the recents read found nothing or failed too).
138
+ */
139
+ error: string | null;
140
+ status: UniversalSearchStatus;
126
141
  }
127
142
  declare function useUniversalEntitySearch(args: UseUniversalEntitySearchArgs): UseUniversalEntitySearchReturn;
128
143
 
144
+ interface SearchFailureNoticeProps {
145
+ /** `useUniversalEntitySearch().error` — set when nothing could be read. */
146
+ error: string | null;
147
+ /** `useUniversalEntitySearch().failures` — every read that failed. */
148
+ failures: UniversalSearchFailure[];
149
+ /** What the person was doing, for the error report ("Search to attach"). */
150
+ operation?: string;
151
+ /** Where this rendered, for the error report ("media/MediaSharePopover"). */
152
+ origin?: string;
153
+ className?: string;
154
+ }
155
+ /**
156
+ * "Couldn't search Notes, Tasks" / "Couldn't load recent items" — the plain
157
+ * sentence for a failure list. `labelFor` maps a token to its plural label.
158
+ */
159
+ declare function describeSearchFailures(failures: UniversalSearchFailure[], labelFor: (token: NonNullable<UniversalSearchFailure["token"]>) => string): string;
160
+ declare function SearchFailureNotice(props: SearchFailureNoticeProps): react.JSX.Element | null;
161
+
129
162
  interface UseAssociationCandidatesArgs {
130
163
  token: EntityTypeToken;
131
164
  /** Skip fetching (e.g. while the picker is closed). Defaults to true. */
@@ -304,4 +337,4 @@ interface ContentRoleMeta {
304
337
  declare const CONTENT_ROLES: ContentRoleMeta[];
305
338
  declare function getContentRoleMeta(role: ContentRole): ContentRoleMeta;
306
339
 
307
- export { AssociationCandidateBody, type AssociationCandidateBodyProps, AssociationPicker, type AssociationPickerBridge, type AssociationPickerBridgeOptions, AssociationPickerProps, AssociationsProvider, type AssociationsProviderProps, type AssociationsUiPorts, CONTENT_ROLES, CandidateRecord, type CategoryCreateResult, CategoryMutationResult, type ContentRoleMeta, DefaultWindowShell, type DefaultWindowShellProps, DoorControlsSlot, DoorRef, type EntityTitleRef, type PickerBridgeItem, UniversalCandidate, type UniversalSearchSource, UnresolvedRef, type UseAssociationCandidatesArgs, type UseAssociationCandidatesReturn, type UseCategoriesArgs, type UseCategoriesReturn, type UseCommentsArgs, type UseCommentsReturn, type UseEntityTitlesReturn, type UseUniversalEntitySearchArgs, type UseUniversalEntitySearchReturn, type WindowShellComponentProps, getContentRoleMeta, lazyPickerOverride, lazyWindowShell, useAssociationCandidates, useAssociationPickerBridge, useAssociationsStore, useAssociationsUiPorts, useCategories, useComments, useEntityTitles, useNotifier, useUniversalEntitySearch };
340
+ export { AssociationCandidateBody, type AssociationCandidateBodyProps, AssociationPicker, type AssociationPickerBridge, type AssociationPickerBridgeOptions, AssociationPickerProps, AssociationsProvider, type AssociationsProviderProps, type AssociationsUiPorts, CONTENT_ROLES, CandidateRecord, type CategoryCreateResult, CategoryMutationResult, type ContentRoleMeta, DefaultWindowShell, type DefaultWindowShellProps, DoorControlsSlot, DoorRef, type EntityTitleRef, type PickerBridgeItem, SearchFailureNotice, type SearchFailureNoticeProps, UniversalCandidate, type UniversalSearchFailure, type UniversalSearchSource, type UniversalSearchStatus, UnresolvedRef, type UseAssociationCandidatesArgs, type UseAssociationCandidatesReturn, type UseCategoriesArgs, type UseCategoriesReturn, type UseCommentsArgs, type UseCommentsReturn, type UseEntityTitlesReturn, type UseUniversalEntitySearchArgs, type UseUniversalEntitySearchReturn, type WindowShellComponentProps, describeSearchFailures, getContentRoleMeta, lazyPickerOverride, lazyWindowShell, useAssociationCandidates, useAssociationPickerBridge, useAssociationsStore, useAssociationsUiPorts, useCategories, useComments, useEntityTitles, useNotifier, useUniversalEntitySearch };
@@ -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-C78e8433.js';
4
- export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, a as AssociationCardProps, G as AssociationEntitySelect, H as AssociationEntitySelectAdapter, I as AssociationEntitySelectItem, c as AssociationEntitySelectProps, J as AssociationList, d as AssociationListProps, K as AssociationWindow, f as AssociationWindowProps, L as AssociationWriteResult, M as AttachedItemsSheet, g as AttachedItemsSheetProps, N as CaptureAttach, O as CaptureAttachResult, Q as CaptureToolbarAction, R as CategorySelect, C as CategorySelectProps, S as CategoryTagPicker, h as CategoryTagPickerProps, T as CommentComposer, V as CommentComposerProps, X as CommentThread, i as CommentThreadProps, Y as ContainerLink, Z as ContainerResourceRow, _ as ContainerResourcesAdapter, $ as DefaultEntityIcon, a0 as PrimaryContainerEntity, a1 as PrimaryEntity, a2 as PrimaryEntityProvider, a3 as PrimaryFiledEntity, a4 as TagPickerIcon, a5 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a6 as UseAssociationEntitySelectAdapterArgs, a7 as UseAssociationsArgs, a8 as UseAssociationsReturn, a9 as UseContainerLinksArgs, aa as UseContainerLinksReturn, ab as attachedKey, ac as buildCommentTree, ad as containerLinksArgs, ae as useAssociationEntitySelectAdapter, af as useAssociations, ag as useContainerLinks, ah as useContainerLinksAdapter, ai as useEntityRelationships, aj as usePrimaryEntity } from '../CommentThread-C78e8433.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-DP4sEzb2.js';
4
+ export { B as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, D as AssociationCard, F as AssociationCardGrid, b as AssociationCardGridProps, a as AssociationCardProps, G as AssociationEntitySelect, H as AssociationEntitySelectAdapter, I as AssociationEntitySelectItem, c as AssociationEntitySelectProps, J as AssociationList, d as AssociationListProps, K as AssociationWindow, f as AssociationWindowProps, L as AssociationWriteResult, M as AttachedItemsSheet, g as AttachedItemsSheetProps, N as CaptureAttach, O as CaptureAttachResult, Q as CaptureToolbarAction, R as CategorySelect, C as CategorySelectProps, S as CategoryTagPicker, h as CategoryTagPickerProps, T as CommentComposer, V as CommentComposerProps, X as CommentThread, i as CommentThreadProps, Y as ContainerLink, Z as ContainerResourceRow, _ as ContainerResourcesAdapter, $ as DefaultEntityIcon, a0 as PrimaryContainerEntity, a1 as PrimaryEntity, a2 as PrimaryEntityProvider, a3 as PrimaryFiledEntity, a4 as TagPickerIcon, a5 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a6 as UseAssociationEntitySelectAdapterArgs, a7 as UseAssociationsArgs, a8 as UseAssociationsReturn, a9 as UseContainerLinksArgs, aa as UseContainerLinksReturn, ab as attachedKey, ac as buildCommentTree, ad as containerLinksArgs, ae as useAssociationEntitySelectAdapter, af as useAssociations, ag as useContainerLinks, ah as useContainerLinksAdapter, ai as useEntityRelationships, aj as usePrimaryEntity } from '../CommentThread-DP4sEzb2.js';
5
5
 
6
6
  interface AssociationsUiPorts {
7
7
  notifier?: AssociationsNotifier;
@@ -97,8 +97,6 @@ interface UseUniversalEntitySearchArgs {
97
97
  query: string;
98
98
  /** Restrict to these tokens; defaults to every listable token. */
99
99
  tokens?: EntityTypeToken[];
100
- /** Owner filter for the per-token candidate reads. */
101
- ownerId?: string | null;
102
100
  enabled?: boolean;
103
101
  perTokenLimit?: number;
104
102
  /**
@@ -115,6 +113,15 @@ interface UseUniversalEntitySearchArgs {
115
113
  * or the recents fallback).
116
114
  */
117
115
  type UniversalSearchSource = "search" | "recents" | "candidates";
116
+ /**
117
+ * One read that failed. `token` names the entity type whose candidate read
118
+ * failed; `null` means the recents read (favorites / last-viewed) failed.
119
+ */
120
+ interface UniversalSearchFailure {
121
+ token: EntityTypeToken | null;
122
+ error: string;
123
+ }
124
+ type UniversalSearchStatus = "loading" | "error" | "ready";
118
125
  interface UseUniversalEntitySearchReturn {
119
126
  results: UniversalCandidate[];
120
127
  /** True while the current query's sweep is in flight. */
@@ -123,9 +130,35 @@ interface UseUniversalEntitySearchReturn {
123
130
  isRecents: boolean;
124
131
  /** What the results are — lets the face label a browse vs recents vs hits. */
125
132
  source: UniversalSearchSource;
133
+ /** Every read that failed for the current results (partial or total). */
134
+ failures: UniversalSearchFailure[];
135
+ /**
136
+ * Non-null only when NOTHING could be read: every searched token failed
137
+ * (and, for recents, the recents read found nothing or failed too).
138
+ */
139
+ error: string | null;
140
+ status: UniversalSearchStatus;
126
141
  }
127
142
  declare function useUniversalEntitySearch(args: UseUniversalEntitySearchArgs): UseUniversalEntitySearchReturn;
128
143
 
144
+ interface SearchFailureNoticeProps {
145
+ /** `useUniversalEntitySearch().error` — set when nothing could be read. */
146
+ error: string | null;
147
+ /** `useUniversalEntitySearch().failures` — every read that failed. */
148
+ failures: UniversalSearchFailure[];
149
+ /** What the person was doing, for the error report ("Search to attach"). */
150
+ operation?: string;
151
+ /** Where this rendered, for the error report ("media/MediaSharePopover"). */
152
+ origin?: string;
153
+ className?: string;
154
+ }
155
+ /**
156
+ * "Couldn't search Notes, Tasks" / "Couldn't load recent items" — the plain
157
+ * sentence for a failure list. `labelFor` maps a token to its plural label.
158
+ */
159
+ declare function describeSearchFailures(failures: UniversalSearchFailure[], labelFor: (token: NonNullable<UniversalSearchFailure["token"]>) => string): string;
160
+ declare function SearchFailureNotice(props: SearchFailureNoticeProps): react.JSX.Element | null;
161
+
129
162
  interface UseAssociationCandidatesArgs {
130
163
  token: EntityTypeToken;
131
164
  /** Skip fetching (e.g. while the picker is closed). Defaults to true. */
@@ -304,4 +337,4 @@ interface ContentRoleMeta {
304
337
  declare const CONTENT_ROLES: ContentRoleMeta[];
305
338
  declare function getContentRoleMeta(role: ContentRole): ContentRoleMeta;
306
339
 
307
- export { AssociationCandidateBody, type AssociationCandidateBodyProps, AssociationPicker, type AssociationPickerBridge, type AssociationPickerBridgeOptions, AssociationPickerProps, AssociationsProvider, type AssociationsProviderProps, type AssociationsUiPorts, CONTENT_ROLES, CandidateRecord, type CategoryCreateResult, CategoryMutationResult, type ContentRoleMeta, DefaultWindowShell, type DefaultWindowShellProps, DoorControlsSlot, DoorRef, type EntityTitleRef, type PickerBridgeItem, UniversalCandidate, type UniversalSearchSource, UnresolvedRef, type UseAssociationCandidatesArgs, type UseAssociationCandidatesReturn, type UseCategoriesArgs, type UseCategoriesReturn, type UseCommentsArgs, type UseCommentsReturn, type UseEntityTitlesReturn, type UseUniversalEntitySearchArgs, type UseUniversalEntitySearchReturn, type WindowShellComponentProps, getContentRoleMeta, lazyPickerOverride, lazyWindowShell, useAssociationCandidates, useAssociationPickerBridge, useAssociationsStore, useAssociationsUiPorts, useCategories, useComments, useEntityTitles, useNotifier, useUniversalEntitySearch };
340
+ export { AssociationCandidateBody, type AssociationCandidateBodyProps, AssociationPicker, type AssociationPickerBridge, type AssociationPickerBridgeOptions, AssociationPickerProps, AssociationsProvider, type AssociationsProviderProps, type AssociationsUiPorts, CONTENT_ROLES, CandidateRecord, type CategoryCreateResult, CategoryMutationResult, type ContentRoleMeta, DefaultWindowShell, type DefaultWindowShellProps, DoorControlsSlot, DoorRef, type EntityTitleRef, type PickerBridgeItem, SearchFailureNotice, type SearchFailureNoticeProps, UniversalCandidate, type UniversalSearchFailure, type UniversalSearchSource, type UniversalSearchStatus, UnresolvedRef, type UseAssociationCandidatesArgs, type UseAssociationCandidatesReturn, type UseCategoriesArgs, type UseCategoriesReturn, type UseCommentsArgs, type UseCommentsReturn, type UseEntityTitlesReturn, type UseUniversalEntitySearchArgs, type UseUniversalEntitySearchReturn, type WindowShellComponentProps, describeSearchFailures, getContentRoleMeta, lazyPickerOverride, lazyWindowShell, useAssociationCandidates, useAssociationPickerBridge, useAssociationsStore, useAssociationsUiPorts, useCategories, useComments, useEntityTitles, useNotifier, useUniversalEntitySearch };