@deepdesk/deepdesk-sdk 19.1.2-beta.1 → 19.2.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.
- package/dist/index.cjs.js +6 -6
- package/dist/index.d.mts +35 -28
- package/dist/index.d.ts +35 -28
- package/dist/index.esm.js +8 -8
- package/dist/index.iife.js +63 -63
- package/package.json +1 -1
- package/styles/index.js +1 -1
- package/styles.css +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
|
-
import { Middleware, Tuple } from '@reduxjs/toolkit';
|
|
5
3
|
import * as redux from 'redux';
|
|
6
4
|
import { Unsubscribe } from 'redux';
|
|
5
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
6
|
+
import { Middleware, Tuple } from '@reduxjs/toolkit';
|
|
7
7
|
|
|
8
8
|
declare const styles$s: {
|
|
9
9
|
readonly "content": string;
|
|
@@ -1398,6 +1398,7 @@ declare const reducers: redux.Reducer<{
|
|
|
1398
1398
|
insertLink: boolean;
|
|
1399
1399
|
addToPersonalCollection: boolean;
|
|
1400
1400
|
inlineSuggestions: boolean;
|
|
1401
|
+
autoSelectSuggestion: boolean;
|
|
1401
1402
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
1402
1403
|
floatingMenu: boolean;
|
|
1403
1404
|
detectSubmit: boolean;
|
|
@@ -1461,6 +1462,7 @@ declare const reducers: redux.Reducer<{
|
|
|
1461
1462
|
insertLink: boolean;
|
|
1462
1463
|
addToPersonalCollection: boolean;
|
|
1463
1464
|
inlineSuggestions: boolean;
|
|
1465
|
+
autoSelectSuggestion: boolean;
|
|
1464
1466
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
1465
1467
|
floatingMenu: boolean;
|
|
1466
1468
|
detectSubmit: boolean;
|
|
@@ -1525,6 +1527,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
|
|
|
1525
1527
|
insertLink: boolean;
|
|
1526
1528
|
addToPersonalCollection: boolean;
|
|
1527
1529
|
inlineSuggestions: boolean;
|
|
1530
|
+
autoSelectSuggestion: boolean;
|
|
1528
1531
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
1529
1532
|
floatingMenu: boolean;
|
|
1530
1533
|
detectSubmit: boolean;
|
|
@@ -1892,6 +1895,32 @@ interface Channel {
|
|
|
1892
1895
|
close(): void;
|
|
1893
1896
|
}
|
|
1894
1897
|
|
|
1898
|
+
type WebsocketOptions = {
|
|
1899
|
+
url: string;
|
|
1900
|
+
maxReconnectAttempts?: number;
|
|
1901
|
+
reconnectInterval?: number;
|
|
1902
|
+
shouldReconnect(): Promise<boolean>;
|
|
1903
|
+
};
|
|
1904
|
+
type EventCallback<T = any> = (data: T) => void;
|
|
1905
|
+
declare class WebsocketClient {
|
|
1906
|
+
options: WebsocketOptions;
|
|
1907
|
+
private socket;
|
|
1908
|
+
private eventListeners;
|
|
1909
|
+
private url;
|
|
1910
|
+
private maxReconnectAttempts;
|
|
1911
|
+
private reconnectInterval;
|
|
1912
|
+
private shouldReconnect;
|
|
1913
|
+
private cleanupCallbacks;
|
|
1914
|
+
constructor(options: WebsocketOptions);
|
|
1915
|
+
connect(): void;
|
|
1916
|
+
private setupListeners;
|
|
1917
|
+
private reconnect;
|
|
1918
|
+
send(event: string, data: any): void;
|
|
1919
|
+
on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
|
|
1920
|
+
close(): void;
|
|
1921
|
+
cleanup(): void;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1895
1924
|
type State = {
|
|
1896
1925
|
locale: Locale;
|
|
1897
1926
|
deanonymize: boolean;
|
|
@@ -1916,6 +1945,7 @@ type State = {
|
|
|
1916
1945
|
insertLink: boolean;
|
|
1917
1946
|
addToPersonalCollection: boolean;
|
|
1918
1947
|
inlineSuggestions: boolean;
|
|
1948
|
+
autoSelectSuggestion: boolean;
|
|
1919
1949
|
suggestionsPlacement: 'inline' | 'above' | 'below';
|
|
1920
1950
|
floatingMenu: boolean;
|
|
1921
1951
|
detectSubmit: boolean;
|
|
@@ -1929,32 +1959,6 @@ type State = {
|
|
|
1929
1959
|
type Settings = State;
|
|
1930
1960
|
declare const set: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<State>, "settings/set">;
|
|
1931
1961
|
|
|
1932
|
-
type WebsocketOptions = {
|
|
1933
|
-
url: string;
|
|
1934
|
-
maxReconnectAttempts?: number;
|
|
1935
|
-
reconnectInterval?: number;
|
|
1936
|
-
shouldReconnect(): Promise<boolean>;
|
|
1937
|
-
};
|
|
1938
|
-
type EventCallback<T = any> = (data: T) => void;
|
|
1939
|
-
declare class WebsocketClient {
|
|
1940
|
-
options: WebsocketOptions;
|
|
1941
|
-
private socket;
|
|
1942
|
-
private eventListeners;
|
|
1943
|
-
private url;
|
|
1944
|
-
private maxReconnectAttempts;
|
|
1945
|
-
private reconnectInterval;
|
|
1946
|
-
private shouldReconnect;
|
|
1947
|
-
private cleanupCallbacks;
|
|
1948
|
-
constructor(options: WebsocketOptions);
|
|
1949
|
-
connect(): void;
|
|
1950
|
-
private setupListeners;
|
|
1951
|
-
private reconnect;
|
|
1952
|
-
send(event: string, data: any): void;
|
|
1953
|
-
on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
|
|
1954
|
-
close(): void;
|
|
1955
|
-
cleanup(): void;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
1962
|
declare global {
|
|
1959
1963
|
interface Window {
|
|
1960
1964
|
clipboardData: any;
|
|
@@ -2140,6 +2144,7 @@ declare class DeepdeskSDK {
|
|
|
2140
2144
|
insertLink: boolean;
|
|
2141
2145
|
addToPersonalCollection: boolean;
|
|
2142
2146
|
inlineSuggestions: boolean;
|
|
2147
|
+
autoSelectSuggestion: boolean;
|
|
2143
2148
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
2144
2149
|
floatingMenu: boolean;
|
|
2145
2150
|
detectSubmit: boolean;
|
|
@@ -2186,6 +2191,7 @@ declare class DeepdeskSDK {
|
|
|
2186
2191
|
insertLink: boolean;
|
|
2187
2192
|
addToPersonalCollection: boolean;
|
|
2188
2193
|
inlineSuggestions: boolean;
|
|
2194
|
+
autoSelectSuggestion: boolean;
|
|
2189
2195
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
2190
2196
|
floatingMenu: boolean;
|
|
2191
2197
|
detectSubmit: boolean;
|
|
@@ -2583,6 +2589,7 @@ declare class DeepdeskSDK {
|
|
|
2583
2589
|
* @param settings.adminUrl: Admin URL (default: deepdeskUrl provided by DeepdeskSDK constructor)
|
|
2584
2590
|
* @param settings.productName: Product name (default: 'Deepdesk')
|
|
2585
2591
|
* @param settings.hasKeyboardInput: Whether keyboard input is enabled (default: true)
|
|
2592
|
+
* @param settings.autoSelectSuggestion: Automatically select the first text suggestion when suggestions arrive (default: false). When enabled, Space and Enter will not commit suggestions (use Tab instead), similar to inline suggestions.
|
|
2586
2593
|
*
|
|
2587
2594
|
* @example
|
|
2588
2595
|
* ```typescript
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
|
-
import { Middleware, Tuple } from '@reduxjs/toolkit';
|
|
5
3
|
import * as redux from 'redux';
|
|
6
4
|
import { Unsubscribe } from 'redux';
|
|
5
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
6
|
+
import { Middleware, Tuple } from '@reduxjs/toolkit';
|
|
7
7
|
|
|
8
8
|
declare const styles$s: {
|
|
9
9
|
readonly "content": string;
|
|
@@ -1398,6 +1398,7 @@ declare const reducers: redux.Reducer<{
|
|
|
1398
1398
|
insertLink: boolean;
|
|
1399
1399
|
addToPersonalCollection: boolean;
|
|
1400
1400
|
inlineSuggestions: boolean;
|
|
1401
|
+
autoSelectSuggestion: boolean;
|
|
1401
1402
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
1402
1403
|
floatingMenu: boolean;
|
|
1403
1404
|
detectSubmit: boolean;
|
|
@@ -1461,6 +1462,7 @@ declare const reducers: redux.Reducer<{
|
|
|
1461
1462
|
insertLink: boolean;
|
|
1462
1463
|
addToPersonalCollection: boolean;
|
|
1463
1464
|
inlineSuggestions: boolean;
|
|
1465
|
+
autoSelectSuggestion: boolean;
|
|
1464
1466
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
1465
1467
|
floatingMenu: boolean;
|
|
1466
1468
|
detectSubmit: boolean;
|
|
@@ -1525,6 +1527,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
|
|
|
1525
1527
|
insertLink: boolean;
|
|
1526
1528
|
addToPersonalCollection: boolean;
|
|
1527
1529
|
inlineSuggestions: boolean;
|
|
1530
|
+
autoSelectSuggestion: boolean;
|
|
1528
1531
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
1529
1532
|
floatingMenu: boolean;
|
|
1530
1533
|
detectSubmit: boolean;
|
|
@@ -1892,6 +1895,32 @@ interface Channel {
|
|
|
1892
1895
|
close(): void;
|
|
1893
1896
|
}
|
|
1894
1897
|
|
|
1898
|
+
type WebsocketOptions = {
|
|
1899
|
+
url: string;
|
|
1900
|
+
maxReconnectAttempts?: number;
|
|
1901
|
+
reconnectInterval?: number;
|
|
1902
|
+
shouldReconnect(): Promise<boolean>;
|
|
1903
|
+
};
|
|
1904
|
+
type EventCallback<T = any> = (data: T) => void;
|
|
1905
|
+
declare class WebsocketClient {
|
|
1906
|
+
options: WebsocketOptions;
|
|
1907
|
+
private socket;
|
|
1908
|
+
private eventListeners;
|
|
1909
|
+
private url;
|
|
1910
|
+
private maxReconnectAttempts;
|
|
1911
|
+
private reconnectInterval;
|
|
1912
|
+
private shouldReconnect;
|
|
1913
|
+
private cleanupCallbacks;
|
|
1914
|
+
constructor(options: WebsocketOptions);
|
|
1915
|
+
connect(): void;
|
|
1916
|
+
private setupListeners;
|
|
1917
|
+
private reconnect;
|
|
1918
|
+
send(event: string, data: any): void;
|
|
1919
|
+
on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
|
|
1920
|
+
close(): void;
|
|
1921
|
+
cleanup(): void;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1895
1924
|
type State = {
|
|
1896
1925
|
locale: Locale;
|
|
1897
1926
|
deanonymize: boolean;
|
|
@@ -1916,6 +1945,7 @@ type State = {
|
|
|
1916
1945
|
insertLink: boolean;
|
|
1917
1946
|
addToPersonalCollection: boolean;
|
|
1918
1947
|
inlineSuggestions: boolean;
|
|
1948
|
+
autoSelectSuggestion: boolean;
|
|
1919
1949
|
suggestionsPlacement: 'inline' | 'above' | 'below';
|
|
1920
1950
|
floatingMenu: boolean;
|
|
1921
1951
|
detectSubmit: boolean;
|
|
@@ -1929,32 +1959,6 @@ type State = {
|
|
|
1929
1959
|
type Settings = State;
|
|
1930
1960
|
declare const set: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<State>, "settings/set">;
|
|
1931
1961
|
|
|
1932
|
-
type WebsocketOptions = {
|
|
1933
|
-
url: string;
|
|
1934
|
-
maxReconnectAttempts?: number;
|
|
1935
|
-
reconnectInterval?: number;
|
|
1936
|
-
shouldReconnect(): Promise<boolean>;
|
|
1937
|
-
};
|
|
1938
|
-
type EventCallback<T = any> = (data: T) => void;
|
|
1939
|
-
declare class WebsocketClient {
|
|
1940
|
-
options: WebsocketOptions;
|
|
1941
|
-
private socket;
|
|
1942
|
-
private eventListeners;
|
|
1943
|
-
private url;
|
|
1944
|
-
private maxReconnectAttempts;
|
|
1945
|
-
private reconnectInterval;
|
|
1946
|
-
private shouldReconnect;
|
|
1947
|
-
private cleanupCallbacks;
|
|
1948
|
-
constructor(options: WebsocketOptions);
|
|
1949
|
-
connect(): void;
|
|
1950
|
-
private setupListeners;
|
|
1951
|
-
private reconnect;
|
|
1952
|
-
send(event: string, data: any): void;
|
|
1953
|
-
on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
|
|
1954
|
-
close(): void;
|
|
1955
|
-
cleanup(): void;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
1962
|
declare global {
|
|
1959
1963
|
interface Window {
|
|
1960
1964
|
clipboardData: any;
|
|
@@ -2140,6 +2144,7 @@ declare class DeepdeskSDK {
|
|
|
2140
2144
|
insertLink: boolean;
|
|
2141
2145
|
addToPersonalCollection: boolean;
|
|
2142
2146
|
inlineSuggestions: boolean;
|
|
2147
|
+
autoSelectSuggestion: boolean;
|
|
2143
2148
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
2144
2149
|
floatingMenu: boolean;
|
|
2145
2150
|
detectSubmit: boolean;
|
|
@@ -2186,6 +2191,7 @@ declare class DeepdeskSDK {
|
|
|
2186
2191
|
insertLink: boolean;
|
|
2187
2192
|
addToPersonalCollection: boolean;
|
|
2188
2193
|
inlineSuggestions: boolean;
|
|
2194
|
+
autoSelectSuggestion: boolean;
|
|
2189
2195
|
suggestionsPlacement: "inline" | "above" | "below";
|
|
2190
2196
|
floatingMenu: boolean;
|
|
2191
2197
|
detectSubmit: boolean;
|
|
@@ -2583,6 +2589,7 @@ declare class DeepdeskSDK {
|
|
|
2583
2589
|
* @param settings.adminUrl: Admin URL (default: deepdeskUrl provided by DeepdeskSDK constructor)
|
|
2584
2590
|
* @param settings.productName: Product name (default: 'Deepdesk')
|
|
2585
2591
|
* @param settings.hasKeyboardInput: Whether keyboard input is enabled (default: true)
|
|
2592
|
+
* @param settings.autoSelectSuggestion: Automatically select the first text suggestion when suggestions arrive (default: false). When enabled, Space and Enter will not commit suggestions (use Tab instead), similar to inline suggestions.
|
|
2586
2593
|
*
|
|
2587
2594
|
* @example
|
|
2588
2595
|
* ```typescript
|