@botonic/webviews 2.26.0 → 2.27.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/CHANGELOG.md +13 -0
- package/index.css +1 -1
- package/index.js +16540 -5475
- package/lib/hooks/use-botonic-context-webviews.d.ts +3 -0
- package/lib/hooks/use-webview-close.d.ts +2 -1
- package/lib/hooks/use-webview-contents/hook.d.ts +4 -2
- package/lib/index.d.ts +1 -1
- package/lib/webview-context.d.ts +2 -1
- package/package.json +4 -4
- package/lib/hooks/use-bot-session.d.ts +0 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { BotonicContextWebviews } from '../../../../shared/src/index.ts';
|
|
1
2
|
export interface CloseWebviewOptions {
|
|
2
3
|
payload?: any;
|
|
3
4
|
path?: string;
|
|
4
5
|
params?: Record<string, string>;
|
|
5
6
|
}
|
|
6
|
-
export declare function useWebviewClose(
|
|
7
|
+
export declare function useWebviewClose(botonicContextWebviews?: BotonicContextWebviews): (options?: CloseWebviewOptions) => Promise<void>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { BotonicContextWebviews } from '../../../../../shared/src/index.ts';
|
|
1
2
|
import { MapContentsType, UseWebviewContents } from './types';
|
|
2
3
|
export interface UseWebviewContentsProps<T extends MapContentsType> {
|
|
3
|
-
|
|
4
|
+
/** Undefined until `useBotonicContextWebviews` finishes loading the GET webviews session. */
|
|
5
|
+
botonicContextWebviews?: BotonicContextWebviews;
|
|
4
6
|
params: Record<string, string>;
|
|
5
7
|
version?: 'draft' | 'latest' | string;
|
|
6
8
|
mapContents: Record<keyof T, string>;
|
|
7
9
|
}
|
|
8
|
-
export declare function useWebviewContents<T extends MapContentsType>({
|
|
10
|
+
export declare function useWebviewContents<T extends MapContentsType>({ botonicContextWebviews, params, version, mapContents, }: UseWebviewContentsProps<T>): UseWebviewContents<T>;
|
package/lib/index.d.ts
CHANGED
package/lib/webview-context.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { BotonicContextWebviews } from '../../../shared/src/index.ts';
|
|
1
2
|
import { ConfirmCloseOption } from '../../../webchat-core/src/index.ts';
|
|
2
3
|
import { CloseWebviewOptions } from './hooks/use-webview-close';
|
|
3
4
|
import { WebviewDefinition } from './webviews';
|
|
4
5
|
export interface WebviewContextType {
|
|
5
|
-
|
|
6
|
+
botonicContextWebviews?: BotonicContextWebviews;
|
|
6
7
|
params: Record<string, string>;
|
|
7
8
|
closeWebview: (options?: CloseWebviewOptions) => Promise<void>;
|
|
8
9
|
setWebviewTitle: (title: string) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/webviews",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@botonic/
|
|
16
|
-
"@botonic/webchat-core": "2.
|
|
17
|
-
"@lilara/foundations": ">=0.
|
|
15
|
+
"@botonic/shared": "2.27.0",
|
|
16
|
+
"@botonic/webchat-core": "2.27.0",
|
|
17
|
+
"@lilara/foundations": ">=0.6.0",
|
|
18
18
|
"class-variance-authority": "^0.7.0",
|
|
19
19
|
"react": "18.3.1"
|
|
20
20
|
},
|