@ai-matrx/associations 0.11.4 → 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-DDeqHgTk.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-DDeqHgTk.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,26 +97,68 @@ 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
  /**
105
103
  * What an empty query loads. Universal attach surfaces default to recents;
106
104
  * constrained value pickers use candidates so opening the picker immediately
107
- * shows the records that are available to select.
105
+ * shows the records that are available to select. `"recents"` falls back
106
+ * to candidates when the person has no recents for the searched tokens.
108
107
  */
109
108
  emptyQueryMode?: "recents" | "candidates";
110
109
  }
110
+ /**
111
+ * What the current results ARE: `"search"` for a typed query, `"recents"` for
112
+ * favorites/last-viewed, `"candidates"` for an empty-query browse (asked for,
113
+ * or the recents fallback).
114
+ */
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";
111
125
  interface UseUniversalEntitySearchReturn {
112
126
  results: UniversalCandidate[];
113
127
  /** True while the current query's sweep is in flight. */
114
128
  loading: boolean;
115
129
  /** True when `results` are recents (empty query), not search hits. */
116
130
  isRecents: boolean;
131
+ /** What the results are — lets the face label a browse vs recents vs hits. */
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;
117
141
  }
118
142
  declare function useUniversalEntitySearch(args: UseUniversalEntitySearchArgs): UseUniversalEntitySearchReturn;
119
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
+
120
162
  interface UseAssociationCandidatesArgs {
121
163
  token: EntityTypeToken;
122
164
  /** Skip fetching (e.g. while the picker is closed). Defaults to true. */
@@ -295,4 +337,4 @@ interface ContentRoleMeta {
295
337
  declare const CONTENT_ROLES: ContentRoleMeta[];
296
338
  declare function getContentRoleMeta(role: ContentRole): ContentRoleMeta;
297
339
 
298
- 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, 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-DDeqHgTk.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-DDeqHgTk.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,26 +97,68 @@ 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
  /**
105
103
  * What an empty query loads. Universal attach surfaces default to recents;
106
104
  * constrained value pickers use candidates so opening the picker immediately
107
- * shows the records that are available to select.
105
+ * shows the records that are available to select. `"recents"` falls back
106
+ * to candidates when the person has no recents for the searched tokens.
108
107
  */
109
108
  emptyQueryMode?: "recents" | "candidates";
110
109
  }
110
+ /**
111
+ * What the current results ARE: `"search"` for a typed query, `"recents"` for
112
+ * favorites/last-viewed, `"candidates"` for an empty-query browse (asked for,
113
+ * or the recents fallback).
114
+ */
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";
111
125
  interface UseUniversalEntitySearchReturn {
112
126
  results: UniversalCandidate[];
113
127
  /** True while the current query's sweep is in flight. */
114
128
  loading: boolean;
115
129
  /** True when `results` are recents (empty query), not search hits. */
116
130
  isRecents: boolean;
131
+ /** What the results are — lets the face label a browse vs recents vs hits. */
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;
117
141
  }
118
142
  declare function useUniversalEntitySearch(args: UseUniversalEntitySearchArgs): UseUniversalEntitySearchReturn;
119
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
+
120
162
  interface UseAssociationCandidatesArgs {
121
163
  token: EntityTypeToken;
122
164
  /** Skip fetching (e.g. while the picker is closed). Defaults to true. */
@@ -295,4 +337,4 @@ interface ContentRoleMeta {
295
337
  declare const CONTENT_ROLES: ContentRoleMeta[];
296
338
  declare function getContentRoleMeta(role: ContentRole): ContentRoleMeta;
297
339
 
298
- 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, 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 };