@promptbook/vercel 0.103.0-20 → 0.103.0-22
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 +8 -4
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +15 -0
- 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/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/esm/typings/src/book-components/Chat/utils/renderMarkdown.d.ts +0 -21
- package/esm/typings/src/book-components/Chat/utils/renderMarkdown.test.d.ts +0 -1
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-22';
|
|
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
|
|
@@ -18,6 +18,7 @@ import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks
|
|
|
18
18
|
import { useSendMessageToLlmChat } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
|
|
19
19
|
import { LlmChat } from '../book-components/Chat/LlmChat/LlmChat';
|
|
20
20
|
import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
|
|
21
|
+
import { MarkdownContent } from '../book-components/Chat/MarkdownContent/MarkdownContent';
|
|
21
22
|
import { NORMAL_FLOW } from '../book-components/Chat/MockedChat/constants';
|
|
22
23
|
import { FAST_FLOW } from '../book-components/Chat/MockedChat/constants';
|
|
23
24
|
import { SLOW_FLOW } from '../book-components/Chat/MockedChat/constants';
|
|
@@ -41,8 +42,6 @@ import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
|
41
42
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
42
43
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
43
44
|
import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
|
|
44
|
-
import { renderMarkdown } from '../book-components/Chat/utils/renderMarkdown';
|
|
45
|
-
import { isMarkdownContent } from '../book-components/Chat/utils/renderMarkdown';
|
|
46
45
|
import { ArrowIcon } from '../book-components/icons/ArrowIcon';
|
|
47
46
|
import { AttachmentIcon } from '../book-components/icons/AttachmentIcon';
|
|
48
47
|
import { CloseIcon } from '../book-components/icons/CloseIcon';
|
|
@@ -52,6 +51,9 @@ import { ResetIcon } from '../book-components/icons/ResetIcon';
|
|
|
52
51
|
import { SaveIcon } from '../book-components/icons/SaveIcon';
|
|
53
52
|
import { SendIcon } from '../book-components/icons/SendIcon';
|
|
54
53
|
import { TemplateIcon } from '../book-components/icons/TemplateIcon';
|
|
54
|
+
import { BrandedQrCode } from '../book-components/Qr/BrandedQrCode';
|
|
55
|
+
import { GenericQrCode } from '../book-components/Qr/GenericQrCode';
|
|
56
|
+
import { PromptbookQrCode } from '../book-components/Qr/PromptbookQrCode';
|
|
55
57
|
import { injectCssModuleIntoShadowRoot } from '../utils/misc/injectCssModuleIntoShadowRoot';
|
|
56
58
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
57
59
|
export type { AvatarChipProps };
|
|
@@ -73,6 +75,7 @@ export type { SendMessageToLlmChatFunction };
|
|
|
73
75
|
export { useSendMessageToLlmChat };
|
|
74
76
|
export { LlmChat };
|
|
75
77
|
export type { LlmChatProps };
|
|
78
|
+
export { MarkdownContent };
|
|
76
79
|
export { NORMAL_FLOW };
|
|
77
80
|
export { FAST_FLOW };
|
|
78
81
|
export { SLOW_FLOW };
|
|
@@ -96,8 +99,6 @@ export type { ChatMessage };
|
|
|
96
99
|
export type { ChatParticipant };
|
|
97
100
|
export type { MessageButton };
|
|
98
101
|
export { parseMessageButtons };
|
|
99
|
-
export { renderMarkdown };
|
|
100
|
-
export { isMarkdownContent };
|
|
101
102
|
export { ArrowIcon };
|
|
102
103
|
export { AttachmentIcon };
|
|
103
104
|
export { CloseIcon };
|
|
@@ -107,4 +108,7 @@ export { ResetIcon };
|
|
|
107
108
|
export { SaveIcon };
|
|
108
109
|
export { SendIcon };
|
|
109
110
|
export { TemplateIcon };
|
|
111
|
+
export { BrandedQrCode };
|
|
112
|
+
export { GenericQrCode };
|
|
113
|
+
export { PromptbookQrCode };
|
|
110
114
|
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 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { string_markdown } from '../../../types/typeAliases';
|
|
2
|
+
type MarkdownContentProps = {
|
|
3
|
+
content: string_markdown;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Renders markdown content with support for code highlighting, math, and tables.
|
|
8
|
+
*
|
|
9
|
+
* @public exported from `@promptbook/components`
|
|
10
|
+
*/
|
|
11
|
+
export declare function MarkdownContent(props: MarkdownContentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
/**
|
|
14
|
+
* TODO: !!! Split into multiple files
|
|
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
|
+
};
|
|
@@ -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-21`).
|
|
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-22",
|
|
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-22"
|
|
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-22';
|
|
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,21 +0,0 @@
|
|
|
1
|
-
import type { string_html, string_markdown } from '../../../types/typeAliases';
|
|
2
|
-
/**
|
|
3
|
-
* Convert markdown content to HTML for display in chat messages
|
|
4
|
-
*
|
|
5
|
-
* @param markdown - The markdown content to convert
|
|
6
|
-
* @returns HTML string ready for rendering
|
|
7
|
-
*
|
|
8
|
-
* @public exported from `@promptbook/components`
|
|
9
|
-
* <- TODO: [🧠] Maybe export from `@promptbook/markdown-utils`
|
|
10
|
-
*/
|
|
11
|
-
export declare function renderMarkdown(markdown: string_markdown): string_html;
|
|
12
|
-
/**
|
|
13
|
-
* Check if content appears to be markdown (contains markdown syntax)
|
|
14
|
-
*
|
|
15
|
-
* @param content - Content to check
|
|
16
|
-
* @returns true if content appears to contain markdown syntax
|
|
17
|
-
*
|
|
18
|
-
* @public exported from `@promptbook/components`
|
|
19
|
-
* <- TODO: [🧠] Maybe export from `@promptbook/markdown-utils`
|
|
20
|
-
*/
|
|
21
|
-
export declare function isMarkdownContent(content: string): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|