@promptbook/vercel 0.103.0-21 → 0.103.0-23
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/esm/index.es.js +1 -1
- package/esm/typings/src/_packages/components.index.d.ts +6 -4
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +18 -1
- package/esm/typings/src/book-components/BookEditor/BookEditorActionbar.d.ts +3 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +7 -4
- package/esm/typings/src/book-components/Qr/BrandedQrCode.d.ts +18 -0
- package/esm/typings/src/book-components/Qr/GenericQrCode.d.ts +10 -0
- package/esm/typings/src/book-components/Qr/PromptbookQrCode.d.ts +18 -0
- package/esm/typings/src/book-components/Qr/useQrCode.d.ts +15 -0
- package/esm/typings/src/book-components/icons/CloseIcon.d.ts +4 -8
- package/esm/typings/src/book-components/icons/ExitFullscreenIcon.d.ts +7 -0
- package/esm/typings/src/book-components/icons/FullscreenIcon.d.ts +7 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/esm/typings/src/book-components/BookEditor/config.d.ts +0 -11
package/esm/index.es.js
CHANGED
|
@@ -16,7 +16,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
16
16
|
* @generated
|
|
17
17
|
* @see https://github.com/webgptorg/promptbook
|
|
18
18
|
*/
|
|
19
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-
|
|
19
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-23';
|
|
20
20
|
/**
|
|
21
21
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
22
22
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -10,7 +10,6 @@ import { AvatarProfileFromSource } from '../book-components/AvatarProfile/Avatar
|
|
|
10
10
|
import { DEFAULT_BOOK_EDITOR_HEIGHT } from '../book-components/BookEditor/BookEditor';
|
|
11
11
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
12
12
|
import { BookEditor } from '../book-components/BookEditor/BookEditor';
|
|
13
|
-
import { DEFAULT_BOOK_FONT_CLASS } from '../book-components/BookEditor/config';
|
|
14
13
|
import { Chat } from '../book-components/Chat/Chat/Chat';
|
|
15
14
|
import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
|
|
16
15
|
import { useChatAutoScroll } from '../book-components/Chat/hooks/useChatAutoScroll';
|
|
@@ -44,13 +43,15 @@ import type { MessageButton } from '../book-components/Chat/utils/parseMessageBu
|
|
|
44
43
|
import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
|
|
45
44
|
import { ArrowIcon } from '../book-components/icons/ArrowIcon';
|
|
46
45
|
import { AttachmentIcon } from '../book-components/icons/AttachmentIcon';
|
|
47
|
-
import { CloseIcon } from '../book-components/icons/CloseIcon';
|
|
48
46
|
import { PauseIcon } from '../book-components/icons/PauseIcon';
|
|
49
47
|
import { PlayIcon } from '../book-components/icons/PlayIcon';
|
|
50
48
|
import { ResetIcon } from '../book-components/icons/ResetIcon';
|
|
51
49
|
import { SaveIcon } from '../book-components/icons/SaveIcon';
|
|
52
50
|
import { SendIcon } from '../book-components/icons/SendIcon';
|
|
53
51
|
import { TemplateIcon } from '../book-components/icons/TemplateIcon';
|
|
52
|
+
import { BrandedQrCode } from '../book-components/Qr/BrandedQrCode';
|
|
53
|
+
import { GenericQrCode } from '../book-components/Qr/GenericQrCode';
|
|
54
|
+
import { PromptbookQrCode } from '../book-components/Qr/PromptbookQrCode';
|
|
54
55
|
import { injectCssModuleIntoShadowRoot } from '../utils/misc/injectCssModuleIntoShadowRoot';
|
|
55
56
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
56
57
|
export type { AvatarChipProps };
|
|
@@ -64,7 +65,6 @@ export { AvatarProfileFromSource };
|
|
|
64
65
|
export { DEFAULT_BOOK_EDITOR_HEIGHT };
|
|
65
66
|
export type { BookEditorProps };
|
|
66
67
|
export { BookEditor };
|
|
67
|
-
export { DEFAULT_BOOK_FONT_CLASS };
|
|
68
68
|
export { Chat };
|
|
69
69
|
export type { ChatProps };
|
|
70
70
|
export { useChatAutoScroll };
|
|
@@ -98,11 +98,13 @@ export type { MessageButton };
|
|
|
98
98
|
export { parseMessageButtons };
|
|
99
99
|
export { ArrowIcon };
|
|
100
100
|
export { AttachmentIcon };
|
|
101
|
-
export { CloseIcon };
|
|
102
101
|
export { PauseIcon };
|
|
103
102
|
export { PlayIcon };
|
|
104
103
|
export { ResetIcon };
|
|
105
104
|
export { SaveIcon };
|
|
106
105
|
export { SendIcon };
|
|
107
106
|
export { TemplateIcon };
|
|
107
|
+
export { BrandedQrCode };
|
|
108
|
+
export { GenericQrCode };
|
|
109
|
+
export { PromptbookQrCode };
|
|
108
110
|
export { injectCssModuleIntoShadowRoot };
|
|
@@ -21,6 +21,7 @@ import type { string_chat_format_name } from '../book-components/Chat/save/_comm
|
|
|
21
21
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
22
22
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
23
23
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
24
|
+
import type { QrCodeOptions } from '../book-components/Qr/useQrCode';
|
|
24
25
|
import type { PipelineCollection } from '../collection/PipelineCollection';
|
|
25
26
|
import type { Command } from '../commands/_common/types/Command';
|
|
26
27
|
import type { CommandParser } from '../commands/_common/types/CommandParser';
|
|
@@ -354,6 +355,7 @@ export type { string_chat_format_name };
|
|
|
354
355
|
export type { ChatMessage };
|
|
355
356
|
export type { ChatParticipant };
|
|
356
357
|
export type { MessageButton };
|
|
358
|
+
export type { QrCodeOptions };
|
|
357
359
|
export type { PipelineCollection };
|
|
358
360
|
export type { Command };
|
|
359
361
|
export type { CommandParser };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
3
|
import { type string_book } from '../../book-2.0/agent-source/string_book';
|
|
4
4
|
import type { number_percent, number_positive, string_css_value, string_knowledge_source_content } from '../../types/typeAliases';
|
|
@@ -91,6 +91,23 @@ export type BookEditorProps = {
|
|
|
91
91
|
* By default, the about button is shown.
|
|
92
92
|
*/
|
|
93
93
|
readonly isAboutButtonShown?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* If true, shows the fullscreen button in the action bar.
|
|
96
|
+
* By default, the fullscreen button is shown.
|
|
97
|
+
*/
|
|
98
|
+
readonly isFullscreenButtonShown?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Callback function to handle fullscreen button click.
|
|
101
|
+
* Note: This is for internal use between BookEditor and BookEditorMonaco
|
|
102
|
+
* @private
|
|
103
|
+
*/
|
|
104
|
+
onFullscreenClick?(): void;
|
|
105
|
+
/**
|
|
106
|
+
* If true, the editor is in fullscreen mode.
|
|
107
|
+
* Note: This is for internal use between BookEditor and BookEditorMonaco
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
readonly isFullscreen?: boolean;
|
|
94
111
|
/**
|
|
95
112
|
* If defined, the editor will be synced with other editors with the same sync configuration.
|
|
96
113
|
*/
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { string_markdown } from '../../../types/typeAliases';
|
|
2
|
+
type MarkdownContentProps = {
|
|
3
|
+
content: string_markdown;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* Renders markdown content with support for code highlighting, math, and tables.
|
|
4
8
|
*
|
|
5
9
|
* @public exported from `@promptbook/components`
|
|
6
10
|
*/
|
|
7
|
-
export declare function MarkdownContent(
|
|
8
|
-
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function MarkdownContent(props: MarkdownContentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
10
13
|
/**
|
|
11
14
|
* TODO: !!! Split into multiple files
|
|
12
|
-
*/
|
|
15
|
+
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { QrCodeOptions } from './useQrCode';
|
|
2
|
+
type BrandedQrCodeProps = QrCodeOptions & {
|
|
3
|
+
/**
|
|
4
|
+
* Width and height of the QR code canvas
|
|
5
|
+
*
|
|
6
|
+
* @default 250
|
|
7
|
+
*/
|
|
8
|
+
size?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Additional CSS class names to apply to the container div
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @public exported from `@promptbook/components`
|
|
16
|
+
*/
|
|
17
|
+
export declare function BrandedQrCode(props: BrandedQrCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type GenericQrCodeProps = {
|
|
2
|
+
value: string | number;
|
|
3
|
+
size?: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @public exported from `@promptbook/components`
|
|
8
|
+
*/
|
|
9
|
+
export declare function GenericQrCode({ value, size, className }: GenericQrCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type PromptbookQrCodeProps = {
|
|
2
|
+
value: string | number;
|
|
3
|
+
/**
|
|
4
|
+
* Width and height of the QR code canvas
|
|
5
|
+
*
|
|
6
|
+
* @default 250
|
|
7
|
+
*/
|
|
8
|
+
size?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Additional CSS class names to apply to the container div
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @public exported from `@promptbook/components`
|
|
16
|
+
*/
|
|
17
|
+
export declare function PromptbookQrCode(props: PromptbookQrCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { QRCodeRenderersOptions } from 'qrcode';
|
|
3
|
+
import { string_url_image } from '../../types/typeAliases';
|
|
4
|
+
export type QrCodeOptions = QRCodeRenderersOptions & {
|
|
5
|
+
value: string | number;
|
|
6
|
+
logoSrc?: string_url_image;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* @private utility of QR code components
|
|
12
|
+
*/
|
|
13
|
+
export declare function useQrCode(options: QrCodeOptions): {
|
|
14
|
+
canvasRef: import("react").RefObject<HTMLCanvasElement | null>;
|
|
15
|
+
};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
size?: number;
|
|
3
|
-
color?: string;
|
|
4
|
-
};
|
|
1
|
+
import { JSX } from 'react';
|
|
5
2
|
/**
|
|
6
|
-
*
|
|
3
|
+
* Renders an icon that represents the close action
|
|
7
4
|
*
|
|
8
|
-
* @
|
|
5
|
+
* @private
|
|
9
6
|
*/
|
|
10
|
-
export declare function CloseIcon(
|
|
11
|
-
export {};
|
|
7
|
+
export declare function CloseIcon(): JSX.Element;
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.103.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.103.0-22`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/vercel",
|
|
3
|
-
"version": "0.103.0-
|
|
3
|
+
"version": "0.103.0-23",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"module": "./esm/index.es.js",
|
|
95
95
|
"typings": "./esm/typings/src/_packages/vercel.index.d.ts",
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@promptbook/core": "0.103.0-
|
|
97
|
+
"@promptbook/core": "0.103.0-23"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-23';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default font class name for the BookEditor component
|
|
3
|
-
* In Next.js environments, you can override this by importing the font directly
|
|
4
|
-
*
|
|
5
|
-
* @public exported from `@promptbook/components`
|
|
6
|
-
* @deprecated !!! Remove
|
|
7
|
-
*/
|
|
8
|
-
export declare const DEFAULT_BOOK_FONT_CLASS: any;
|
|
9
|
-
/**
|
|
10
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
11
|
-
*/
|