@arbidocs/react 0.3.114 → 0.3.116

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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
3
  import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, AgentStepEvent, ArtifactEvent } from '@arbidocs/sdk/browser';
4
- export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateMemoryRequest, CreateTaskRequest, MemoryResponse, MemorySearchRequest, MemorySearchResponse, MessageMetadataPayload, OutputTokensDetails, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserInputRequestEvent, UserMessageEvent } from '@arbidocs/sdk/browser';
4
+ export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateMemoryRequest, CreateTaskRequest, MemoryResponse, MemorySearchRequest, MemorySearchResponse, MessageMetadataPayload, OutputTokensDetails, ProjectInvoicesResponse, ProjectUsageResponse, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserDailyUsageResponse, UserInputRequestEvent, UserMessageEvent, WorkspaceChronologyOut } from '@arbidocs/sdk/browser';
5
5
  import * as _arbidocs_client from '@arbidocs/client';
6
6
  import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components } from '@arbidocs/client';
7
7
  export { WebSocketServerMessage, WsBatchCompleteMessage, WsNotificationResponse, WsPresenceUpdateMessage, WsResponseCompleteMessage, WsTaskUpdateMessage, isMessageType } from '@arbidocs/client';
@@ -28,6 +28,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
28
28
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
29
29
  import * as SelectPrimitive from '@radix-ui/react-select';
30
30
  import { Components } from 'react-markdown';
31
+ import * as lucide_react from 'lucide-react';
31
32
  import { LucideIcon, StickyNote } from 'lucide-react';
32
33
  import { ClassValue } from 'clsx';
33
34
 
@@ -354,6 +355,12 @@ declare const arbiQueryKeys: {
354
355
  tasks: () => readonly ["arbi", "tasks"];
355
356
  memories: (workspaceId: string) => readonly ["arbi", "memories", string];
356
357
  configs: () => readonly ["arbi", "configs"];
358
+ activity: () => readonly ["arbi", "activity"];
359
+ projects: () => readonly ["arbi", "projects"];
360
+ projectUsage: (projectExtId: string, monthsBack: number) => readonly ["arbi", "projectUsage", string, number];
361
+ projectInvoices: (projectExtId: string) => readonly ["arbi", "projectInvoices", string];
362
+ userUsageToday: () => readonly ["arbi", "userUsageToday"];
363
+ workspaceChronology: (workspaceId: string) => readonly ["arbi", "workspaceChronology", string];
357
364
  };
358
365
  /** List the logged-in user's workspaces. */
359
366
  declare function useWorkspaces(options?: {
@@ -629,6 +636,179 @@ declare function useConfigs(options?: {
629
636
  created_at: string;
630
637
  }[];
631
638
  }>, Error>;
639
+ /**
640
+ * List the caller's durable activity feed, newest first.
641
+ *
642
+ * Activity entries are backend-originated, to-self log lines that are always
643
+ * read — they are deliberately kept out of the normal notifications/DM feed and
644
+ * never affect the unread badge, so this is a separate, opt-in query.
645
+ */
646
+ declare function useActivity(options?: {
647
+ enabled?: boolean;
648
+ limit?: number;
649
+ offset?: number;
650
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
651
+ type: _arbidocs_client.components["schemas"]["NotificationType"];
652
+ external_id: string;
653
+ sender: {
654
+ external_id: string;
655
+ parent_ext_id?: string | null | undefined;
656
+ email: string;
657
+ given_name: string;
658
+ family_name?: string | null | undefined;
659
+ picture?: string | null | undefined;
660
+ encryption_public_key: string;
661
+ is_sso: boolean;
662
+ };
663
+ recipient: {
664
+ external_id: string;
665
+ parent_ext_id?: string | null | undefined;
666
+ email: string;
667
+ given_name: string;
668
+ family_name?: string | null | undefined;
669
+ picture?: string | null | undefined;
670
+ encryption_public_key: string;
671
+ is_sso: boolean;
672
+ };
673
+ workspace_ext_id?: string | null | undefined;
674
+ content?: string | null | undefined;
675
+ read: boolean;
676
+ created_at: string;
677
+ updated_at: string;
678
+ }[]>, Error>;
679
+ /** List the logged-in user's projects (billing accounts). */
680
+ declare function useProjects(options?: {
681
+ enabled?: boolean;
682
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
683
+ external_id: string;
684
+ name: string;
685
+ created_by: string;
686
+ packs: number;
687
+ subscription: string;
688
+ created_at: string;
689
+ quotas: {
690
+ storage_gb: {
691
+ used: number;
692
+ limit: number;
693
+ };
694
+ ai_credits: {
695
+ used: number;
696
+ limit: number;
697
+ };
698
+ collaborators: {
699
+ used: number;
700
+ limit: number;
701
+ };
702
+ budget_reset_at?: number | null | undefined;
703
+ };
704
+ daily_cap_per_user?: number | null | undefined;
705
+ price_id?: string | null | undefined;
706
+ plan?: string | null | undefined;
707
+ amount?: number | null | undefined;
708
+ currency?: string | null | undefined;
709
+ current_period_end?: number | null | undefined;
710
+ cancel_at_period_end?: boolean | null | undefined;
711
+ portal_url?: string | null | undefined;
712
+ }[]>, Error>;
713
+ /**
714
+ * AI usage + spend breakdown for a project's billing period. `monthsBack`
715
+ * selects the period (0 = current, 1 = previous month, …).
716
+ */
717
+ declare function useProjectUsage(projectExtId: string | undefined, monthsBack?: number, options?: {
718
+ enabled?: boolean;
719
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
720
+ project_ext_id: string;
721
+ period_start: string;
722
+ period_end: string;
723
+ total_spend: number;
724
+ total_tokens: number;
725
+ total_requests: number;
726
+ daily: _arbidocs_client.components["schemas"]["DailyUsage"][];
727
+ model_groups: {
728
+ [key: string]: _arbidocs_client.components["schemas"]["ModelGroupUsage"];
729
+ };
730
+ by_workspace: {
731
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
732
+ };
733
+ by_user: {
734
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
735
+ };
736
+ by_feature: {
737
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
738
+ };
739
+ invoice_pdf?: string | null;
740
+ }>, Error>;
741
+ /** One day of aggregated usage across projects (for a spend/token trend). */
742
+ interface AggregatedDailyUsage {
743
+ date: string;
744
+ spend: number;
745
+ totalTokens: number;
746
+ apiRequests: number;
747
+ }
748
+ /** One model group's aggregated usage across projects (for a breakdown). */
749
+ interface AggregatedModelGroupUsage {
750
+ model: string;
751
+ spend: number;
752
+ totalTokens: number;
753
+ promptTokens: number;
754
+ completionTokens: number;
755
+ successfulRequests: number;
756
+ }
757
+ /** Aggregated AI usage + spend across several projects. */
758
+ interface ProjectsUsageAggregate {
759
+ /** Summed spend across the projects, in USD (the metered currency). */
760
+ totalSpend: number;
761
+ /** Summed token count across the projects. */
762
+ totalTokens: number;
763
+ /** Summed API request count across the projects. */
764
+ totalRequests: number;
765
+ /** Per-day totals merged across every project, oldest first. */
766
+ daily: AggregatedDailyUsage[];
767
+ /** Per-model-group totals merged across every project, biggest spend first. */
768
+ modelGroups: AggregatedModelGroupUsage[];
769
+ /** True while any per-project query is still loading. */
770
+ isLoading: boolean;
771
+ /** True if any per-project query errored. */
772
+ isError: boolean;
773
+ }
774
+ /**
775
+ * Firm-wide AI usage + spend: aggregates {@link useProjectUsage} across several
776
+ * projects (e.g. all of a firm's matters) in parallel and merges the real totals,
777
+ * the daily trend, and the per-model breakdown. Shares the per-project query
778
+ * cache, so it costs nothing extra where a project's usage is already loaded.
779
+ * Numbers are genuine — zero projects (or zero billed work) yields zero totals;
780
+ * callers render that honestly.
781
+ */
782
+ declare function useProjectsUsage(projectExtIds: string[], monthsBack?: number, options?: {
783
+ enabled?: boolean;
784
+ }): ProjectsUsageAggregate;
785
+ /** List the Stripe invoices for a project's subscription. */
786
+ declare function useProjectInvoices(projectExtId: string | undefined, options?: {
787
+ enabled?: boolean;
788
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
789
+ project_ext_id: string;
790
+ invoices: _arbidocs_client.components["schemas"]["ProjectInvoice"][];
791
+ }>, Error>;
792
+ /** Today's deployment-wide credit spend for the current user. */
793
+ declare function useUserUsageToday(options?: {
794
+ enabled?: boolean;
795
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
796
+ credits_used: number;
797
+ }>, Error>;
798
+ /**
799
+ * The last-generated document-derived chronology (key case events / dates) for
800
+ * a workspace. Defaults to the currently open workspace when `workspaceId` is
801
+ * omitted.
802
+ */
803
+ declare function useWorkspaceChronology(workspaceId: string | undefined, options?: {
804
+ enabled?: boolean;
805
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
806
+ events?: {
807
+ [key: string]: unknown;
808
+ }[] | null;
809
+ generated_at?: string | null;
810
+ doc_count?: number | null;
811
+ }>, Error>;
632
812
 
633
813
  /**
634
814
  * Minimal, dependency-free tooltip — a drop-in API replacement for a Radix
@@ -1731,6 +1911,432 @@ interface UserEntityProps {
1731
1911
  }
1732
1912
  declare const UserEntity: React__default.NamedExoticComponent<UserEntityProps>;
1733
1913
 
1914
+ /** An icon component usable in the registry (lucide icons + custom SVG wrappers). */
1915
+ type EntityIconComponent = React__default.ComponentType<React__default.SVGAttributes<SVGElement> & {
1916
+ size?: number | string;
1917
+ className?: string;
1918
+ }>;
1919
+ /**
1920
+ * Entity Mappings — naming conventions + icons for every entity in the app.
1921
+ *
1922
+ * `WORKSPACE.ICONS.DEFAULT` is the generic `SquareM` here; the monolith injects a
1923
+ * rotated variant via {@link configureEntityRegistry}. The object is mutated in
1924
+ * place by that helper, so existing `ENTITY_MAPPINGS` references stay live.
1925
+ */
1926
+ declare const ENTITY_MAPPINGS: {
1927
+ PRODUCT: {
1928
+ NAMES: {
1929
+ SINGULAR: string;
1930
+ };
1931
+ ICONS: {
1932
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1933
+ };
1934
+ };
1935
+ SECTION: {
1936
+ NAMES: {
1937
+ SINGULAR: string;
1938
+ };
1939
+ ICONS: {
1940
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1941
+ };
1942
+ };
1943
+ WORKSPACE: {
1944
+ NAMES: {
1945
+ SINGULAR: string;
1946
+ PLURAL: string;
1947
+ };
1948
+ ICONS: {
1949
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1950
+ NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1951
+ LIST: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1952
+ SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1953
+ };
1954
+ };
1955
+ CONVERSATION: {
1956
+ NAMES: {
1957
+ SINGULAR: string;
1958
+ PLURAL: string;
1959
+ NEW: string;
1960
+ };
1961
+ ICONS: {
1962
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1963
+ OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1964
+ ACTIVE: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1965
+ NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1966
+ LIST: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1967
+ };
1968
+ };
1969
+ DOCUMENT: {
1970
+ NAMES: {
1971
+ SINGULAR: string;
1972
+ PLURAL: string;
1973
+ };
1974
+ ICONS: {
1975
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1976
+ OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1977
+ };
1978
+ };
1979
+ VIEWER: {
1980
+ NAMES: {
1981
+ SINGULAR: string;
1982
+ PLURAL: string;
1983
+ };
1984
+ ICONS: {
1985
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1986
+ OFF: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1987
+ };
1988
+ };
1989
+ TAG: {
1990
+ NAMES: {
1991
+ SINGULAR: string;
1992
+ PLURAL: string;
1993
+ };
1994
+ ICONS: {
1995
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1996
+ NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
1997
+ };
1998
+ };
1999
+ ANNOTATION: {
2000
+ NAMES: {
2001
+ SINGULAR: string;
2002
+ PLURAL: string;
2003
+ };
2004
+ ICONS: {
2005
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2006
+ NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2007
+ };
2008
+ };
2009
+ USER: {
2010
+ NAMES: {
2011
+ SINGULAR: string;
2012
+ PLURAL: string;
2013
+ };
2014
+ ICONS: {
2015
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2016
+ NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2017
+ SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2018
+ };
2019
+ };
2020
+ WORKSPACEUSER: {
2021
+ NAMES: {
2022
+ SINGULAR: string;
2023
+ PLURAL: string;
2024
+ };
2025
+ ICONS: {
2026
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2027
+ PLURAL: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2028
+ NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2029
+ SETTINGS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2030
+ };
2031
+ };
2032
+ CONTACT: {
2033
+ NAMES: {
2034
+ SINGULAR: string;
2035
+ PLURAL: string;
2036
+ };
2037
+ ICONS: {
2038
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2039
+ NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2040
+ };
2041
+ };
2042
+ TASK: {
2043
+ NAMES: {
2044
+ SINGULAR: string;
2045
+ PLURAL: string;
2046
+ };
2047
+ ICONS: {
2048
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2049
+ };
2050
+ };
2051
+ PROJECT: {
2052
+ NAMES: {
2053
+ SINGULAR: string;
2054
+ PLURAL: string;
2055
+ };
2056
+ ICONS: {
2057
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2058
+ };
2059
+ };
2060
+ SKILL: {
2061
+ NAMES: {
2062
+ SINGULAR: string;
2063
+ PLURAL: string;
2064
+ };
2065
+ ICONS: {
2066
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2067
+ };
2068
+ };
2069
+ ACCOUNT: {
2070
+ NAMES: {
2071
+ SINGULAR: string;
2072
+ };
2073
+ ICONS: {
2074
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2075
+ };
2076
+ };
2077
+ NOTIFICATIONS: {
2078
+ NAMES: {
2079
+ SINGULAR: string;
2080
+ PLURAL: string;
2081
+ };
2082
+ ICONS: {
2083
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2084
+ };
2085
+ };
2086
+ MESSAGE: {
2087
+ NAMES: {
2088
+ SINGULAR: string;
2089
+ PLURAL: string;
2090
+ };
2091
+ ICONS: {
2092
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2093
+ };
2094
+ };
2095
+ NOTIFICATION: {
2096
+ NAMES: {
2097
+ SINGULAR: string;
2098
+ PLURAL: string;
2099
+ };
2100
+ ICONS: {
2101
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2102
+ };
2103
+ };
2104
+ APP: {
2105
+ NAMES: {
2106
+ SINGULAR: string;
2107
+ PLURAL: string;
2108
+ };
2109
+ ICONS: {
2110
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2111
+ HOME: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2112
+ LOGOUT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2113
+ UPLOAD: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2114
+ };
2115
+ };
2116
+ HELP: {
2117
+ NAMES: {
2118
+ SINGULAR: string;
2119
+ PLURAL: string;
2120
+ };
2121
+ ICONS: {
2122
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2123
+ DOCS: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2124
+ FAQ: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2125
+ ABOUT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2126
+ };
2127
+ };
2128
+ USERSHIELD: {
2129
+ NAMES: {
2130
+ SINGULAR: string;
2131
+ PLURAL: string;
2132
+ };
2133
+ ICONS: {
2134
+ DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2135
+ };
2136
+ };
2137
+ };
2138
+ /** The set of registered entity types. */
2139
+ type EntityType = keyof typeof ENTITY_MAPPINGS;
2140
+ /** Deployment override for a single entity: extra/replacement names and icons. */
2141
+ interface EntityRegistryOverride {
2142
+ NAMES?: Record<string, string>;
2143
+ ICONS?: Record<string, EntityIconComponent>;
2144
+ }
2145
+ /**
2146
+ * Layer deployment-specific names/icons onto the canonical registry — call once
2147
+ * at app startup. Merges in place (so live `ENTITY_MAPPINGS` refs pick it up) and
2148
+ * only touches the keys you pass, e.g.:
2149
+ *
2150
+ * ```ts
2151
+ * configureEntityRegistry({
2152
+ * WORKSPACE: { NAMES: { SINGULAR: 'MatterSpace' }, ICONS: { DEFAULT: RotatedSquareM } },
2153
+ * })
2154
+ * ```
2155
+ */
2156
+ declare function configureEntityRegistry(overrides: Partial<Record<EntityType, EntityRegistryOverride>>): void;
2157
+ /**
2158
+ * Resolve the icon component for an entity type + variant, falling back to the
2159
+ * type's DEFAULT icon for unknown variants.
2160
+ */
2161
+ declare const getEntityIcon: (entityType: EntityType, variant?: string) => EntityIconComponent | undefined;
2162
+ /**
2163
+ * Display label for an entity type. `SINGULAR` (default); `PLURAL`/`SHORT`/`NEW`
2164
+ * fall back to derivations of the singular when not explicitly configured.
2165
+ */
2166
+ declare const getEntityLabel: (entityType: EntityType, form?: "SINGULAR" | "PLURAL" | "SHORT" | "NEW") => string;
2167
+ type EntityIconProps = {
2168
+ entityType: EntityType;
2169
+ variant?: string;
2170
+ className?: string;
2171
+ size?: number;
2172
+ color?: string;
2173
+ 'data-testid'?: string;
2174
+ onClick?: () => void;
2175
+ } & React__default.SVGAttributes<SVGElement>;
2176
+ /**
2177
+ * Render an entity's icon — the recommended way to show entity glyphs so all
2178
+ * icon choices stay centralised.
2179
+ */
2180
+ declare const EntityIcon: ({ entityType, variant, ...props }: EntityIconProps) => React__default.ReactElement<React__default.SVGAttributes<SVGElement> & {
2181
+ size?: number | string;
2182
+ className?: string;
2183
+ }, string | React__default.JSXElementConstructor<any>> | null;
2184
+ /** Centralised icons for private/shared visibility states. */
2185
+ declare const VISIBILITY_ICONS: {
2186
+ PRIVATE: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2187
+ SHARED: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2188
+ };
2189
+ /** Render the private/shared visibility glyph. */
2190
+ declare const VisibilityIcon: ({ isShared, ...props }: {
2191
+ isShared: boolean;
2192
+ className?: string;
2193
+ size?: number;
2194
+ color?: string;
2195
+ "data-testid"?: string;
2196
+ onClick?: () => void;
2197
+ } & React__default.SVGAttributes<SVGElement>) => React__default.FunctionComponentElement<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
2198
+
2199
+ /**
2200
+ * Entity colour system — the single source of truth for deriving a stable colour
2201
+ * from an entity id (workspace/tag/doc badges) shared across every app.
2202
+ *
2203
+ * ONE base palette (16 colours, indexed by the hex char at position 5 of an
2204
+ * entity id) + three opacity constants that shift every variant globally. Pure,
2205
+ * framework-free: no React, no store, no app `@/` imports.
2206
+ */
2207
+ /** Semantic placeholder colour for empty/pending states (gray-400). */
2208
+ declare const PLACEHOLDER_COLOR = "#9ca3af";
2209
+ /** Neutral gray for generic/unknown file types (slate-500). */
2210
+ declare const NEUTRAL_GRAY = "#64748b";
2211
+ /** Base palette — source of truth for all entity colours (hex char 0–f). */
2212
+ declare const BASE_COLORS: Record<string, string>;
2213
+ /**
2214
+ * Deterministic colour for an entity id. The 5th char (index 4) of the id selects
2215
+ * a base colour; the variant picks the opacity treatment.
2216
+ */
2217
+ declare function getEntityColor(entityId: string, variant?: 'light' | 'medium' | 'text'): string;
2218
+ /** Full badge colour set for an entity id: light background + solid text + border. */
2219
+ declare function getEntityColorStyles(entityId: string): {
2220
+ backgroundColor: string;
2221
+ color: string;
2222
+ borderColor: string;
2223
+ };
2224
+ /**
2225
+ * Colour for a workspace id — the MEDIUM (solid) variant, for white text on top.
2226
+ * Returns the `--primary` token when colours are disabled or the id is invalid,
2227
+ * so callers always get a paintable value.
2228
+ */
2229
+ declare const getWorkspaceColor: (workspaceId: string | undefined | null, useWorkspaceColors?: boolean) => string;
2230
+
2231
+ /**
2232
+ * Notification-type presentation primitives — the brand-neutral icon, colour and
2233
+ * label maps for every `NotificationType`, plus the workspace-membership phrasing
2234
+ * helpers. Kept in their own module (not a component file) so both the monolith's
2235
+ * AG-Grid notification centre and lightweight consumers (e.g. clarum's activity
2236
+ * feed) share one source of truth for "what does this notification type mean",
2237
+ * and so component files stay fast-refresh friendly.
2238
+ *
2239
+ * Deliberately decoupled: no store, no app `@/` imports — just lucide icon
2240
+ * components + semantic Tailwind token class names. Callers render the icon
2241
+ * themselves (`<Icon className={iconClassName} />`).
2242
+ */
2243
+
2244
+ /** Icon component, its colour class, and a short human label for a notification type. */
2245
+ interface NotificationTypeMeta {
2246
+ Icon: EntityIconComponent;
2247
+ /** Semantic Tailwind colour class for the glyph. */
2248
+ iconClassName: string;
2249
+ /** Short category label (e.g. "Added", "Usage 90%"). */
2250
+ label: string;
2251
+ }
2252
+ /**
2253
+ * Resolve the icon + colour + short label for a notification type.
2254
+ *
2255
+ * Workspace-membership events all share the workspace glyph — the specific role
2256
+ * lives in the Event sentence (see {@link getWorkspaceSentPhrase}), so the label
2257
+ * stays short ("Added", not "Added as collaborator"). Unknown types fall back to
2258
+ * an info glyph and the raw type string.
2259
+ */
2260
+ declare function getNotificationTypeMeta(type: string | null | undefined): NotificationTypeMeta;
2261
+ /** Whether a notification type is a workspace-membership event. */
2262
+ declare function isWorkspaceNotificationType(type: string): boolean;
2263
+ /**
2264
+ * Recipient-perspective action text ("you received"). Renders after the sender
2265
+ * pill: "[sender] added you as collaborator". The workspace renders in its own
2266
+ * column, so there's no trailing preposition.
2267
+ */
2268
+ declare function getWorkspaceActionText(type: string): string;
2269
+ /**
2270
+ * Sender-perspective phrasing ("you did this"). Renders around the affected
2271
+ * member pill — `{before} [member] {after}` — so it reads as an active sentence:
2272
+ * "You added [Jane] as collaborator" rather than the ambiguous "Added as
2273
+ * collaborator: Jane".
2274
+ */
2275
+ declare function getWorkspaceSentPhrase(type: string): {
2276
+ before: string;
2277
+ after: string;
2278
+ };
2279
+
2280
+ /**
2281
+ * Activity-event presentation — decodes the compact `{"event": ..., ...fields}`
2282
+ * JSON payload carried by durable `activity` notifications (recorded backend-side
2283
+ * by `log_activity`) into a glyph + human sentence.
2284
+ *
2285
+ * Distinct from `notification-types.ts`: that maps the notification *type* (a DM,
2286
+ * a workspace-membership change, a reward); this maps the *event* recorded on a
2287
+ * to-self activity line ("opened a workspace", "processed a document"). Entity
2288
+ * glyphs are sourced from the shared entity registry — one source of truth.
2289
+ */
2290
+
2291
+ /** Parsed activity payload — always has `event`, plus event-specific fields. */
2292
+ interface ActivityContent {
2293
+ event: string;
2294
+ [field: string]: unknown;
2295
+ }
2296
+ /** Rendered description of an activity line. */
2297
+ interface ActivityDescription {
2298
+ Icon: EntityIconComponent;
2299
+ /** Semantic Tailwind colour class for the glyph. */
2300
+ iconClassName: string;
2301
+ /** Human-readable one-line summary of what happened. */
2302
+ title: string;
2303
+ }
2304
+ /** Parse an activity notification's `content` JSON into `{event, ...fields}`, or null. */
2305
+ declare function parseActivityContent(content: string | null | undefined): ActivityContent | null;
2306
+ /**
2307
+ * Describe an activity line for display. Accepts either the raw `content` string
2308
+ * or an already-parsed {@link ActivityContent}. Unknown/unparseable events fall
2309
+ * back to a generic activity glyph and a humanised event name.
2310
+ */
2311
+ declare function describeActivity(content: string | ActivityContent | null | undefined): ActivityDescription;
2312
+
2313
+ /**
2314
+ * ActivityFeed — a presentational, self-fetching list of the current user's
2315
+ * durable activity (the to-self "you opened a workspace / processed a document"
2316
+ * log). Renders each line via the shared {@link describeActivity} descriptor, so
2317
+ * the glyph/label knowledge stays in one place and any app (clarum's dashboard,
2318
+ * a monolith panel) can drop this in.
2319
+ *
2320
+ * Pure semantic Tailwind tokens; no store, no app `@/` imports. Data comes from
2321
+ * the shared {@link useActivity} query.
2322
+ */
2323
+ interface ActivityFeedProps {
2324
+ /** Max entries to fetch/show. Default 20. */
2325
+ limit?: number;
2326
+ /** Extra classes for the outer container. */
2327
+ className?: string;
2328
+ /** Message shown when there's no activity yet. */
2329
+ emptyLabel?: string;
2330
+ /** Whether to fetch — defaults to enabled when logged in. */
2331
+ enabled?: boolean;
2332
+ 'data-testid'?: string;
2333
+ }
2334
+ /**
2335
+ * Renders the activity feed. Handles its own loading/empty/error states so a
2336
+ * consumer can place it directly (e.g. inside a dashboard card).
2337
+ */
2338
+ declare function ActivityFeed({ limit, className, emptyLabel, enabled, 'data-testid': testId, }: ActivityFeedProps): React.JSX.Element;
2339
+
1734
2340
  /**
1735
2341
  * DocumentTable — a reusable AG Grid (community) block that renders a
1736
2342
  * workspace's documents using the promoted entity pills.
@@ -1843,4 +2449,4 @@ declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState
1843
2449
 
1844
2450
  declare function cn(...inputs: ClassValue[]): string;
1845
2451
 
1846
- export { AiActionCard, AiAnswer, AiMarkdown, type AiRunOptions, type AiTaskStatus, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, AudIcon, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, ChatBubble, type ChatBubbleProps, Checkbox, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocIcon, DocQaPanel, DocSearch, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmlIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImgIcon, Input, Label, LinkedInIcon, type MessageArtifact, MessageArtifactCard, OpenAIIcon, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PresenceDisplayStatus, Progress, ProjectEntity, type ProjectEntityProps, type ProjectRelation, ProviderIcon, RadioGroup, RadioGroupItem, type RenderMarkdown, ScrollArea, ScrollBar, type SearchChunk, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, type TagEntityProps, type TagLike, Textarea, Toggle, ToggleGroup, ToggleGroupItem, type ToolResponses, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, UserEntity, type UserEntityProps, VidIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, getTagTypeIcon, getTagTypeLabel, markdownBaseComponents, redlineStats, textToArtifact, toRedlineMarkdown, toggleVariants, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useConfigs, useConversations, useDeleteAgents, useDocuments, useHealth, useMemories, useParsedDocument, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useWorkspaceDocs, useWorkspaces };
2452
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, AiMarkdown, type AiRunOptions, type AiTaskStatus, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, ChatBubble, type ChatBubbleProps, Checkbox, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocIcon, DocQaPanel, DocSearch, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, ImgIcon, Input, Label, LinkedInIcon, type MessageArtifact, MessageArtifactCard, NEUTRAL_GRAY, type NotificationTypeMeta, OpenAIIcon, PLACEHOLDER_COLOR, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PresenceDisplayStatus, Progress, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RadioGroup, RadioGroupItem, type RenderMarkdown, ScrollArea, ScrollBar, type SearchChunk, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, type TagEntityProps, type TagLike, Textarea, Toggle, ToggleGroup, ToggleGroupItem, type ToolResponses, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, TypingIndicator, UserEntity, type UserEntityProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, badgeVariants, buttonVariants, cardVariants, cn, configureEntityRegistry, describeActivity, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, markdownBaseComponents, parseActivityContent, redlineStats, textToArtifact, toRedlineMarkdown, toggleVariants, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useConfigs, useConversations, useDeleteAgents, useDocuments, useHealth, useMemories, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceChronology, useWorkspaceDocs, useWorkspaces };