@iblai/web-utils 1.1.11 → 1.1.13

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/package.json CHANGED
@@ -1,9 +1,16 @@
1
1
  {
2
2
  "name": "@iblai/web-utils",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.esm.js",
11
+ "require": "./dist/index.js"
12
+ }
13
+ },
7
14
  "files": [
8
15
  "dist"
9
16
  ],
@@ -1,3 +1,4 @@
1
+ import { type Reducer } from "@reduxjs/toolkit";
1
2
  import type { AdvancedTab } from "../../utils";
2
3
  import type { Message } from "../../hooks/chat/use-chat-v2";
3
4
  export type ChatState = Record<AdvancedTab, Message[]>;
@@ -25,7 +26,7 @@ export declare const STREAMING_CONTENT_BUFFER_THRESHOLD = 300;
25
26
  export declare const STREAMING_CONTENT_FLUSH_INTERVAL = 300;
26
27
  export declare const defaultSessionIds: SessionIds;
27
28
  export type ChatStatus = "idle" | "pending" | "streaming" | "stopped" | "error";
28
- type ChatSliceState = {
29
+ export type ChatSliceState = {
29
30
  chats: ChatState;
30
31
  isTyping: boolean;
31
32
  streaming: boolean;
@@ -53,7 +54,7 @@ type ChatSliceState = {
53
54
  lastArtifactContentFlushTime: number;
54
55
  };
55
56
  export declare const chatActions: import("@reduxjs/toolkit").CaseReducerActions<import("@reduxjs/toolkit").SliceCaseReducers<ChatSliceState>, string>;
56
- export declare const chatSliceReducerShared: import("@reduxjs/toolkit").Reducer<ChatSliceState>;
57
+ export declare const chatSliceReducerShared: Reducer<ChatSliceState>;
57
58
  export declare const selectChats: (state: {
58
59
  chatSliceShared: ChatSliceState;
59
60
  }) => ChatState;
@@ -135,4 +136,3 @@ export declare const selectLastArtifactContentFlushTime: (state: {
135
136
  export declare const selectStreamingArtifactFullContent: (state: {
136
137
  chatSliceShared: ChatSliceState;
137
138
  }) => string | null;
138
- export {};
@@ -1,4 +1,4 @@
1
- import { Slice } from "@reduxjs/toolkit";
1
+ import { type Slice, type Reducer } from "@reduxjs/toolkit";
2
2
  export interface AttachedFile {
3
3
  id: string;
4
4
  fileName: string;
@@ -17,4 +17,4 @@ export interface FilesState {
17
17
  }
18
18
  export declare const filesSlice: Slice<FilesState>;
19
19
  export declare const addFiles: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, removeFile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, clearFiles: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, updateFileProgress: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, updateFileStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, updateFileUrl: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, updateFileMetadata: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, updateFileRetryCount: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, updateFileUrlFromWebSocket: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
20
- export declare const filesReducer: import("@reduxjs/toolkit").Reducer<FilesState>;
20
+ export declare const filesReducer: Reducer<FilesState>;
@@ -70,61 +70,9 @@ export declare const ANONYMOUS_USERNAME = "anonymous";
70
70
  export declare const isAlphaNumeric32: (text: string) => boolean;
71
71
  export declare const getTimeAgo: typeof _getTimeAgo;
72
72
  export declare const getInitials: (fullName: string) => string;
73
- export declare const chatActions: import("@reduxjs/toolkit").CaseReducerActions<import("@reduxjs/toolkit").SliceCaseReducers<{
74
- chats: import("./features/chat/slice").ChatState;
75
- isTyping: boolean;
76
- streaming: boolean;
77
- currentStreamingMessage: import("./features/chat/slice").StreamingMessage;
78
- currentStreamingArtifact: import("./features/chat/slice").StreamingArtifact | null;
79
- activeTab: import("./utils").AdvancedTab;
80
- sessionId: string;
81
- sessionIds: import("./features/chat/slice").SessionIds;
82
- status: import("./features/chat/slice").ChatStatus;
83
- tools: string[];
84
- token: string | null;
85
- tokenEnabled: boolean;
86
- iframeContext: {
87
- hostInfo: {
88
- title: string;
89
- href: string;
90
- };
91
- pageContent: string;
92
- };
93
- documentFilter: Record<string, unknown> | null;
94
- shouldStartNewChat: boolean;
95
- showingSharedChat: boolean;
96
- artifactsEnabled: boolean;
97
- streamingArtifactContentBuffer: string;
98
- lastArtifactContentFlushTime: number;
99
- }>, string>;
73
+ export declare const chatActions: import("@reduxjs/toolkit").CaseReducerActions<import("@reduxjs/toolkit").SliceCaseReducers<import("./features/chat/slice").ChatSliceState>, string>;
100
74
  export declare const selectSessionId: (state: {
101
- chatSliceShared: {
102
- chats: import("./features/chat/slice").ChatState;
103
- isTyping: boolean;
104
- streaming: boolean;
105
- currentStreamingMessage: import("./features/chat/slice").StreamingMessage;
106
- currentStreamingArtifact: import("./features/chat/slice").StreamingArtifact | null;
107
- activeTab: import("./utils").AdvancedTab;
108
- sessionId: string;
109
- sessionIds: import("./features/chat/slice").SessionIds;
110
- status: import("./features/chat/slice").ChatStatus;
111
- tools: string[];
112
- token: string | null;
113
- tokenEnabled: boolean;
114
- iframeContext: {
115
- hostInfo: {
116
- title: string;
117
- href: string;
118
- };
119
- pageContent: string;
120
- };
121
- documentFilter: Record<string, unknown> | null;
122
- shouldStartNewChat: boolean;
123
- showingSharedChat: boolean;
124
- artifactsEnabled: boolean;
125
- streamingArtifactContentBuffer: string;
126
- lastArtifactContentFlushTime: number;
127
- };
75
+ chatSliceShared: import("./features/chat/slice").ChatSliceState;
128
76
  }) => string;
129
77
  export type { ChatMode } from "./types";
130
78
  export type { OAuthRequiredData, OAuthResolvedData, } from "./hooks/chat/use-chat-v2";
@@ -87,61 +87,9 @@ export declare const redirectToAuthSpa: typeof _redirectToAuthSpa;
87
87
  export declare const getAuthSpaJoinUrl: typeof _getAuthSpaJoinUrl;
88
88
  export declare const redirectToAuthSpaJoinTenant: typeof _redirectToAuthSpaJoinTenant;
89
89
  export declare const handleLogout: typeof _handleLogout;
90
- export declare const chatActions: import("@reduxjs/toolkit").CaseReducerActions<import("@reduxjs/toolkit").SliceCaseReducers<{
91
- chats: import("./features/chat/slice").ChatState;
92
- isTyping: boolean;
93
- streaming: boolean;
94
- currentStreamingMessage: import("./features/chat/slice").StreamingMessage;
95
- currentStreamingArtifact: import("./features/chat/slice").StreamingArtifact | null;
96
- activeTab: import("./utils").AdvancedTab;
97
- sessionId: string;
98
- sessionIds: import("./features/chat/slice").SessionIds;
99
- status: import("./features/chat/slice").ChatStatus;
100
- tools: string[];
101
- token: string | null;
102
- tokenEnabled: boolean;
103
- iframeContext: {
104
- hostInfo: {
105
- title: string;
106
- href: string;
107
- };
108
- pageContent: string;
109
- };
110
- documentFilter: Record<string, unknown> | null;
111
- shouldStartNewChat: boolean;
112
- showingSharedChat: boolean;
113
- artifactsEnabled: boolean;
114
- streamingArtifactContentBuffer: string;
115
- lastArtifactContentFlushTime: number;
116
- }>, string>;
90
+ export declare const chatActions: import("@reduxjs/toolkit").CaseReducerActions<import("@reduxjs/toolkit").SliceCaseReducers<import("./features/chat/slice").ChatSliceState>, string>;
117
91
  export declare const selectSessionId: (state: {
118
- chatSliceShared: {
119
- chats: import("./features/chat/slice").ChatState;
120
- isTyping: boolean;
121
- streaming: boolean;
122
- currentStreamingMessage: import("./features/chat/slice").StreamingMessage;
123
- currentStreamingArtifact: import("./features/chat/slice").StreamingArtifact | null;
124
- activeTab: import("./utils").AdvancedTab;
125
- sessionId: string;
126
- sessionIds: import("./features/chat/slice").SessionIds;
127
- status: import("./features/chat/slice").ChatStatus;
128
- tools: string[];
129
- token: string | null;
130
- tokenEnabled: boolean;
131
- iframeContext: {
132
- hostInfo: {
133
- title: string;
134
- href: string;
135
- };
136
- pageContent: string;
137
- };
138
- documentFilter: Record<string, unknown> | null;
139
- shouldStartNewChat: boolean;
140
- showingSharedChat: boolean;
141
- artifactsEnabled: boolean;
142
- streamingArtifactContentBuffer: string;
143
- lastArtifactContentFlushTime: number;
144
- };
92
+ chatSliceShared: import("./features/chat/slice").ChatSliceState;
145
93
  }) => string;
146
94
  export declare const AuthProvider: typeof _AuthProvider;
147
95
  export declare const TenantProvider: typeof _TenantProvider;
package/package.json CHANGED
@@ -1,9 +1,16 @@
1
1
  {
2
2
  "name": "@iblai/web-utils",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.esm.js",
11
+ "require": "./dist/index.js"
12
+ }
13
+ },
7
14
  "files": [
8
15
  "dist"
9
16
  ],