export { AssociationsProvider, AssociationsProviderProps, AssociationsUiPorts, WindowShellComponentProps, lazyPickerOverride, lazyWindowShell, useAssociationsStore, useAssociationsUiPorts, useNotifier } from './provider/index.cjs'; export { i as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, j as AssociationCard, k as AssociationCardGrid, b as AssociationCardGridProps, l as AssociationCardLook, a as AssociationCardProps, m as AssociationEntitySelect, n as AssociationEntitySelectAdapter, o as AssociationEntitySelectItem, c as AssociationEntitySelectProps, p as AssociationList, d as AssociationListProps, q as AssociationWindow, e as AssociationWindowProps, r as AttachedItemsSheet, f as AttachedItemsSheetProps, s as CaptureAttach, t as CaptureAttachResult, u as CaptureToolbarAction, v as CategorySelect, C as CategorySelectProps, w as CategoryTagPicker, g as CategoryTagPickerProps, x as CommentComposer, y as CommentComposerProps, z as CommentThread, h as CommentThreadProps, B as ContainerLink, D as ContainerResourceRow, E as ContainerResourcesAdapter, F as DefaultEntityIcon, P as PostedComment, G as PrimaryContainerEntity, H as PrimaryEntity, I as PrimaryEntityProvider, J as PrimaryFiledEntity, T as TagPickerIcon, K as UniversalAssociationPicker, U as UniversalAssociationPickerProps, L as UseAssociationEntitySelectAdapterArgs, M as UseAssociationsArgs, N as UseAssociationsReturn, O as UseContainerLinksArgs, Q as UseContainerLinksReturn, R as attachedKey, S as buildCommentTree, V as containerLinksArgs, W as linkDirection, X as useAssociationEntitySelectAdapter, Y as useAssociations, Z as useContainerLinks, _ as useContainerLinksAdapter, $ as useEntityRelationships, a0 as usePrimaryEntity } from '../CommentThread-CR_y5zi-.cjs'; import { C as CategoryMutationResult, a as CategoryDimension, P as PlatformCategory, b as CategoriesEntry, E as EntityTypeToken, U as UniversalCandidate, c as CandidateRecord, d as PlatformComment, e as CommentsEntry, f as CommentAnchor, g as CommentMutationResult, A as AssociationPickerProps, h as EntityDoorProps, i as EntityRefProps, j as ContentRole } from '../store-BDkADbPU.cjs'; export { k as AssociationWriteResult } from '../store-BDkADbPU.cjs'; import * as react from 'react'; import { ReactNode } from 'react'; import '@ai-matrx/design-system/icons'; import '@ai-matrx/data/db'; interface EntityTitleRef { token: string; id: string; /** The edge label (or any already-known title) — wins when present. */ label?: string | null; } interface UseEntityTitlesReturn { /** Resolve the display title for one ref (never a UUID). */ titleFor: (ref: EntityTitleRef) => string; /** * True when this ref's target could NOT be resolved after a settled fetch — * the row is gone or the viewer has no access, and `titleFor` is returning a * generic fallback. Surfaces MUST render this loudly (and offer the detach). * Always false for tokens with no registered title column (nothing to * resolve there — silence is correct, not a failure). */ isUnresolved: (ref: EntityTitleRef) => boolean; /** True while any needed titles are still being fetched. */ loading: boolean; } declare function useEntityTitles(refs: EntityTitleRef[]): UseEntityTitlesReturn; /** Same shape as a mutation result; the create carries the new id. */ type CategoryCreateResult = CategoryMutationResult; interface UseCategoriesArgs { /** The facet to read/manage (`agent-shortcut`, `skill`, `industry`, …). */ dimension: CategoryDimension | null; /** Disable the auto-load on mount. Defaults to false (auto-load). */ autoLoad?: boolean; } interface UseCategoriesReturn { /** Every category visible to the caller in this facet (system + their orgs). */ categories: PlatformCategory[]; status: CategoriesEntry["status"]; error: string | null; fetchedAt: number | null; /** Create an org category in this facet. Returns the new id on success. */ create: (args: { name: string; orgId: string; parentId?: string | null; color?: string | null; icon?: string | null; slug?: string | null; }) => Promise; /** Replace one category's editable scalar fields. */ update: (args: { id: string; name: string; slug: string | null; color: string | null; icon: string | null; position: number | null; }) => Promise; /** Move a category to the root or directly under a root category. */ reparent: (id: string, parentId: string | null) => Promise; /** Soft-delete a leaf category. */ remove: (id: string) => Promise; /** Force a refetch of this facet's categories. */ reload: () => Promise; } declare function useCategories(args: UseCategoriesArgs): UseCategoriesReturn; interface UseUniversalEntitySearchArgs { query: string; /** Restrict to these tokens; defaults to every listable token. */ tokens?: EntityTypeToken[]; enabled?: boolean; perTokenLimit?: number; /** * What an empty query loads. Universal attach surfaces default to recents; * constrained value pickers use candidates so opening the picker immediately * shows the records that are available to select. `"recents"` falls back * to candidates when the person has no recents for the searched tokens. */ emptyQueryMode?: "recents" | "candidates"; } /** * What the current results ARE: `"search"` for a typed query, `"recents"` for * favorites/last-viewed, `"candidates"` for an empty-query browse (asked for, * or the recents fallback). */ type UniversalSearchSource = "search" | "recents" | "candidates"; /** * One read that failed. `token` names the entity type whose candidate read * failed; `null` means the recents read (favorites / last-viewed) failed. */ interface UniversalSearchFailure { token: EntityTypeToken | null; error: string; } type UniversalSearchStatus = "loading" | "error" | "ready"; interface UseUniversalEntitySearchReturn { results: UniversalCandidate[]; /** True while the current query's sweep is in flight. */ loading: boolean; /** True when `results` are recents (empty query), not search hits. */ isRecents: boolean; /** What the results are — lets the face label a browse vs recents vs hits. */ source: UniversalSearchSource; /** Every read that failed for the current results (partial or total). */ failures: UniversalSearchFailure[]; /** * Non-null only when NOTHING could be read: every searched token failed * (and, for recents, the recents read found nothing or failed too). */ error: string | null; status: UniversalSearchStatus; } declare function useUniversalEntitySearch(args: UseUniversalEntitySearchArgs): UseUniversalEntitySearchReturn; interface SearchFailureNoticeProps { /** `useUniversalEntitySearch().error` — set when nothing could be read. */ error: string | null; /** `useUniversalEntitySearch().failures` — every read that failed. */ failures: UniversalSearchFailure[]; /** What the person was doing, for the error report ("Search to attach"). */ operation?: string; /** Where this rendered, for the error report ("media/MediaSharePopover"). */ origin?: string; className?: string; } /** * "Couldn't search Notes, Tasks" / "Couldn't load recent items" — the plain * sentence for a failure list. `labelFor` maps a token to its plural label. */ declare function describeSearchFailures(failures: UniversalSearchFailure[], labelFor: (token: NonNullable) => string): string; declare function SearchFailureNotice(props: SearchFailureNoticeProps): react.JSX.Element | null; interface UseAssociationCandidatesArgs { token: EntityTypeToken; /** Skip fetching (e.g. while the picker is closed). Defaults to true. */ enabled?: boolean; search?: string; limit?: number; } interface UseAssociationCandidatesReturn { candidates: CandidateRecord[]; loading: boolean; error: string | null; reload: () => void; } declare function useAssociationCandidates(args: UseAssociationCandidatesArgs): UseAssociationCandidatesReturn; interface UseCommentsArgs { /** Entity-type token of the commented-on entity (writes-strict, C18). */ token: string; /** The entity's row id; null renders the idle entry and loads nothing. */ id: string | null; /** Disable the auto-load on mount. Defaults to false (auto-load). */ autoLoad?: boolean; } interface UseCommentsReturn { /** Every comment on the entity, flat, oldest→newest (thread by parentId). */ comments: readonly PlatformComment[]; status: CommentsEntry["status"]; error: string | null; fetchedAt: number | null; /** Post a comment; pass `parentId` to reply. Reloads the thread. */ add(body: string, opts?: { parentId?: string | null; orgId?: string | null; /** Point the comment at a part / passage of the record (a `part_anchor`). */ anchor?: CommentAnchor | null; }): Promise; /** Edit a comment body (author-only in the RPC). Reloads the thread. */ edit(commentId: string, body: string): Promise; /** Soft-delete a comment (author/org member in the RPC). Reloads. */ remove(commentId: string): Promise; /** Force a refetch of the thread. */ reload(): Promise; /** Lenient identity read for edit/delete-own gating; null when signed out. */ currentUserId: string | null; } declare function useComments(args: UseCommentsArgs): UseCommentsReturn; declare function AssociationPicker(props: AssociationPickerProps): react.JSX.Element | null; interface AssociationCandidateBodyProps { token: EntityTypeToken; /** Load candidates only while true (mirror of the surface's `open`). */ enabled: boolean; /** Org stamped onto rows created by the "+ New" footer. */ orgId?: string | null | undefined; attachedIds: Set; onAttach: (resourceId: string, title: string) => Promise<{ ok: boolean; error?: string; }>; onDetach: (resourceId: string) => Promise<{ ok: boolean; error?: string; }>; /** Wired to a per-token browse surface's back affordance. */ onClose?: () => void; } /** * The attach/detach body for ONE token — reused by the picker sheet and by * `UniversalAssociationPicker`'s per-token browse mode. Tokens with a * host-registered picker override are routed at the PICKER level (windowed * override component); this body is always the generic registry-driven list. */ declare function AssociationCandidateBody({ token, enabled, orgId, attachedIds, onAttach, onDetach, onClose, }: AssociationCandidateBodyProps): react.JSX.Element; interface DoorRefExtras { /** Container-owned opener — wins over hrefFor when the host EntityRef is absent. */ onOpen?: (() => void) | undefined; } /** * Render an entity's NAME with its doors, degrading per the port table. * The host `EntityRef` receives the measured prop subset when bound. */ declare function DoorRef(props: EntityRefProps & DoorRefExtras): react.JSX.Element; /** The unresolved-target chip, host-supplied or the package's plain one. */ declare function UnresolvedRef({ token, id }: { token: string; id: string; }): react.JSX.Element; /** * The door-control cluster, host-supplied or the package default. Every face * renders doors through THIS slot — never `entityDoors?.DoorControls` — so * the default reaches all of them at once. */ declare function DoorControlsSlot(props: EntityDoorProps): react.JSX.Element | null; interface DefaultWindowShellProps { /** Stable id — used for the accessible label association only. */ id: string; title: string; onClose: () => void; /** Small leading glyph beside the title. */ icon?: ReactNode; children: ReactNode; className?: string; } declare function DefaultWindowShell({ id, title, onClose, icon, children, className, }: DefaultWindowShellProps): react.ReactPortal | null; /** One thing the host's picker produced or selected. */ interface PickerBridgeItem { id: string; /** Human name — used verbatim in every loud outcome. */ name: string; } interface AssociationPickerBridgeOptions { /** * Where an item that was CREATED but could not be attached now lives * ("your Files"). Keeps the created-but-unlinked message honest instead of * letting the item look like it vanished. */ createdLocationLabel?: string; /** An action offered on that message, e.g. a door to the library. */ openCreatedLocation?: { label: string; onClick: () => void; }; /** Noun used in copy. Default "item". */ itemNoun?: string; } interface AssociationPickerBridge { /** * Attach a batch (the host's post-upload hand-off). Every terminal outcome * is loud: successes are confirmed, failures name the item AND where it * lives, and a thrown attach is captured to the errorSink. */ attachMany(items: PickerBridgeItem[]): Promise; /** Attach-or-detach one item, screaming on refusal. */ toggle(item: PickerBridgeItem): Promise; /** True while a batch or toggle is in flight (drive the host's spinner). */ busy: boolean; } declare function useAssociationPickerBridge(props: Pick, options?: AssociationPickerBridgeOptions): AssociationPickerBridge; interface CommentBodyProps { body: string; className?: string; } declare function CommentBody({ body, className }: CommentBodyProps): react.JSX.Element; interface ContentRoleMeta { id: ContentRole; /** Section heading. */ title: string; /** One-line "what is this bucket". */ tagline: string; /** Categorical accent classes (tint only — surfaces stay semantic). */ accentText: string; accentBg: string; accentBar: string; } /** Ordered for display: capability, data-in, data-out, both, structure. */ declare const CONTENT_ROLES: ContentRoleMeta[]; declare function getContentRoleMeta(role: ContentRole): ContentRoleMeta; export { AssociationCandidateBody, AssociationPicker, AssociationPickerProps, CONTENT_ROLES, CandidateRecord, CategoryMutationResult, CommentBody, DefaultWindowShell, DoorControlsSlot, DoorRef, SearchFailureNotice, UniversalCandidate, UnresolvedRef, describeSearchFailures, getContentRoleMeta, useAssociationCandidates, useAssociationPickerBridge, useCategories, useComments, useEntityTitles, useUniversalEntitySearch }; export type { AssociationCandidateBodyProps, AssociationPickerBridge, AssociationPickerBridgeOptions, CategoryCreateResult, CommentBodyProps, ContentRoleMeta, DefaultWindowShellProps, EntityTitleRef, PickerBridgeItem, SearchFailureNoticeProps, UniversalSearchFailure, UniversalSearchSource, UniversalSearchStatus, UseAssociationCandidatesArgs, UseAssociationCandidatesReturn, UseCategoriesArgs, UseCategoriesReturn, UseCommentsArgs, UseCommentsReturn, UseEntityTitlesReturn, UseUniversalEntitySearchArgs, UseUniversalEntitySearchReturn };