@promptbook/vercel 0.103.0-4 → 0.103.0-40
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/README.md +57 -21
- package/esm/index.es.js +23 -5
- package/esm/index.es.js.map +1 -1
- package/esm/typings/books/index.d.ts +0 -81
- package/esm/typings/src/_packages/browser.index.d.ts +6 -0
- package/esm/typings/src/_packages/cli.index.d.ts +4 -0
- package/esm/typings/src/_packages/components.index.d.ts +12 -8
- package/esm/typings/src/_packages/core.index.d.ts +30 -10
- package/esm/typings/src/_packages/node.index.d.ts +4 -2
- package/esm/typings/src/_packages/types.index.d.ts +18 -2
- package/esm/typings/src/_packages/wizard.index.d.ts +4 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +16 -0
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +76 -15
- package/esm/typings/src/book-components/BookEditor/BookEditorActionbar.d.ts +14 -0
- package/esm/typings/src/book-components/BookEditor/BookEditorMonaco.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +15 -0
- package/esm/typings/src/book-components/Chat/MockedChat/MockedChat.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +4 -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/book-components/_common/Dropdown/Dropdown.d.ts +15 -0
- package/esm/typings/src/book-components/_common/Modal/Modal.d.ts +2 -2
- package/esm/typings/src/book-components/_common/Tooltip/Tooltip.d.ts +47 -0
- package/esm/typings/src/book-components/_common/react-utils/classNames.d.ts +1 -1
- package/esm/typings/src/book-components/icons/AboutIcon.d.ts +9 -0
- package/esm/typings/src/book-components/icons/CloseIcon.d.ts +4 -8
- package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +9 -0
- 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/book-components/icons/MenuIcon.d.ts +12 -0
- package/esm/typings/src/cli/cli-commands/_boilerplate.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/about.d.ts +3 -1
- package/esm/typings/src/cli/cli-commands/hello.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/list-models.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/list-scrapers.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/login.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/make.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/prettify.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/run.d.ts +2 -1
- package/esm/typings/src/cli/cli-commands/{start-server.d.ts → start-agents-server.d.ts} +3 -2
- package/esm/typings/src/cli/cli-commands/start-pipelines-server.d.ts +15 -0
- package/esm/typings/src/cli/cli-commands/test-command.d.ts +2 -1
- package/esm/typings/src/cli/common/$addGlobalOptionsToCommand.d.ts +2 -1
- package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +36 -0
- package/esm/typings/src/collection/agent-collection/constructors/AgentCollectionInDirectory.d.ts +88 -0
- package/esm/typings/src/collection/{PipelineCollection.d.ts → pipeline-collection/PipelineCollection.d.ts} +7 -3
- package/esm/typings/src/collection/{SimplePipelineCollection.d.ts → pipeline-collection/SimplePipelineCollection.d.ts} +5 -5
- package/esm/typings/src/collection/{constructors/createCollectionFromDirectory.d.ts → pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts} +8 -11
- package/esm/typings/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +13 -0
- package/esm/typings/src/collection/{constructors/createCollectionFromPromise.d.ts → pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts} +6 -5
- package/esm/typings/src/collection/{constructors/createCollectionFromUrl.d.ts → pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts} +3 -3
- package/esm/typings/src/collection/{constructors/createSubcollection.d.ts → pipeline-collection/constructors/createPipelineSubcollection.d.ts} +3 -3
- package/esm/typings/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +13 -0
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +4 -5
- package/esm/typings/src/config.d.ts +22 -2
- package/esm/typings/src/errors/0-index.d.ts +3 -0
- package/esm/typings/src/errors/NotAllowed.d.ts +9 -0
- package/esm/typings/src/execution/AvailableModel.d.ts +1 -0
- package/esm/typings/src/execution/Executables.d.ts +3 -0
- package/esm/typings/src/execution/ExecutionTask.d.ts +12 -3
- package/esm/typings/src/execution/ExecutionTools.d.ts +5 -0
- package/esm/typings/src/execution/FilesystemTools.d.ts +1 -1
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +7 -1
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +5 -0
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +5 -0
- package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +5 -0
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +5 -0
- package/esm/typings/src/execution/utils/logLlmCall.d.ts +8 -0
- package/esm/typings/src/execution/utils/usage-constants.d.ts +4 -124
- package/esm/typings/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +2 -1
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +49 -0
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +9 -4
- package/esm/typings/src/llm-providers/agent/AgentOptions.d.ts +17 -0
- package/esm/typings/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +16 -0
- package/esm/typings/src/llm-providers/agent/createAgentLlmExecutionTools.d.ts +1 -19
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +28 -0
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +7 -1
- package/esm/typings/src/other/templates/getTemplatesPipelineCollection.d.ts +1 -1
- package/esm/typings/src/playground/permanent/_boilerplate.d.ts +5 -0
- package/esm/typings/src/playground/permanent/agent-with-browser-playground.d.ts +5 -0
- package/esm/typings/src/playground/playground.d.ts +0 -3
- package/esm/typings/src/playground/playground1.d.ts +2 -0
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +4 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +22 -8
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/document/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +1 -9
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +1 -12
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +1 -9
- package/esm/typings/src/storage/env-storage/$EnvStorage.d.ts +2 -1
- package/esm/typings/src/transpilers/_common/BookTranspiler.d.ts +29 -0
- package/esm/typings/src/transpilers/_common/BookTranspilerOptions.d.ts +18 -0
- package/esm/typings/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +15 -0
- package/esm/typings/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.d.ts +13 -0
- package/esm/typings/src/transpilers/formatted-book-in-markdown/register.d.ts +15 -0
- package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.d.ts +13 -0
- package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.test.d.ts +1 -0
- package/esm/typings/src/transpilers/openai-sdk/playground/playground.d.ts +5 -0
- package/esm/typings/src/transpilers/openai-sdk/register.d.ts +15 -0
- package/esm/typings/src/types/LlmCall.d.ts +20 -0
- package/esm/typings/src/types/Updatable.d.ts +19 -0
- package/esm/typings/src/types/typeAliases.d.ts +1 -1
- package/esm/typings/src/utils/execCommand/$execCommand.d.ts +2 -1
- package/esm/typings/src/utils/execCommand/$execCommands.d.ts +2 -1
- package/esm/typings/src/utils/files/$induceBookDownload.d.ts +13 -0
- package/esm/typings/src/utils/files/$induceFileDownload.d.ts +13 -0
- package/esm/typings/src/utils/files/ObjectUrl.d.ts +46 -0
- package/esm/typings/src/utils/files/listAllFiles.d.ts +2 -3
- package/esm/typings/src/utils/misc/aboutPromptbookInformation.d.ts +21 -0
- package/esm/typings/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +1 -0
- package/esm/typings/src/utils/misc/xAboutPromptbookInformation.d.ts +13 -0
- package/esm/typings/src/utils/organization/$side_effect.d.ts +7 -0
- package/esm/typings/src/utils/serialization/$deepFreeze.d.ts +2 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/esm/typings/src/wizard/$getCompiledBook.d.ts +1 -2
- package/package.json +4 -4
- package/umd/index.umd.js +23 -5
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/book-components/BookEditor/BookEditorInner.d.ts +0 -5
- package/esm/typings/src/book-components/BookEditor/BookEditorWrapper.d.ts +0 -9
- package/esm/typings/src/book-components/BookEditor/config.d.ts +0 -10
- package/esm/typings/src/book-components/Chat/utils/renderMarkdown.d.ts +0 -21
- package/esm/typings/src/collection/collectionToJson.d.ts +0 -13
- package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +0 -13
- /package/esm/typings/src/{book-components/Chat/utils/renderMarkdown.test.d.ts → collection/agent-collection/constructors/AgentCollectionInDirectory.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{constructors/createCollectionFromDirectory.test.d.ts → pipeline-collection/constructors/createPipelineCollectionFromDirectory.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{constructors/createCollectionFromJson.test.d.ts → pipeline-collection/constructors/createPipelineCollectionFromJson.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{constructors/createCollectionFromPromise.test.d.ts → pipeline-collection/constructors/createPipelineCollectionFromPromise.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{collectionToJson.test.d.ts → pipeline-collection/pipelineCollectionToJson.test.d.ts} +0 -0
|
@@ -7,9 +7,9 @@ import type { AvatarProfileProps } from '../book-components/AvatarProfile/Avatar
|
|
|
7
7
|
import { AvatarProfile } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
|
|
8
8
|
import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
|
9
9
|
import { AvatarProfileFromSource } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
|
10
|
+
import { DEFAULT_BOOK_EDITOR_HEIGHT } from '../book-components/BookEditor/BookEditor';
|
|
10
11
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
11
12
|
import { BookEditor } from '../book-components/BookEditor/BookEditor';
|
|
12
|
-
import { DEFAULT_BOOK_FONT_CLASS } from '../book-components/BookEditor/config';
|
|
13
13
|
import { Chat } from '../book-components/Chat/Chat/Chat';
|
|
14
14
|
import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
|
|
15
15
|
import { useChatAutoScroll } from '../book-components/Chat/hooks/useChatAutoScroll';
|
|
@@ -17,6 +17,7 @@ import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks
|
|
|
17
17
|
import { useSendMessageToLlmChat } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
|
|
18
18
|
import { LlmChat } from '../book-components/Chat/LlmChat/LlmChat';
|
|
19
19
|
import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
|
|
20
|
+
import { MarkdownContent } from '../book-components/Chat/MarkdownContent/MarkdownContent';
|
|
20
21
|
import { NORMAL_FLOW } from '../book-components/Chat/MockedChat/constants';
|
|
21
22
|
import { FAST_FLOW } from '../book-components/Chat/MockedChat/constants';
|
|
22
23
|
import { SLOW_FLOW } from '../book-components/Chat/MockedChat/constants';
|
|
@@ -40,18 +41,19 @@ import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
|
40
41
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
41
42
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
42
43
|
import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
|
|
43
|
-
import { renderMarkdown } from '../book-components/Chat/utils/renderMarkdown';
|
|
44
|
-
import { isMarkdownContent } from '../book-components/Chat/utils/renderMarkdown';
|
|
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';
|
|
56
|
+
import { AboutPromptbookInformation } from '../utils/misc/xAboutPromptbookInformation';
|
|
55
57
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
56
58
|
export type { AvatarChipProps };
|
|
57
59
|
export { AvatarChip };
|
|
@@ -61,9 +63,9 @@ export type { AvatarProfileProps };
|
|
|
61
63
|
export { AvatarProfile };
|
|
62
64
|
export type { AvatarProfileFromSourceProps };
|
|
63
65
|
export { AvatarProfileFromSource };
|
|
66
|
+
export { DEFAULT_BOOK_EDITOR_HEIGHT };
|
|
64
67
|
export type { BookEditorProps };
|
|
65
68
|
export { BookEditor };
|
|
66
|
-
export { DEFAULT_BOOK_FONT_CLASS };
|
|
67
69
|
export { Chat };
|
|
68
70
|
export type { ChatProps };
|
|
69
71
|
export { useChatAutoScroll };
|
|
@@ -71,6 +73,7 @@ export type { SendMessageToLlmChatFunction };
|
|
|
71
73
|
export { useSendMessageToLlmChat };
|
|
72
74
|
export { LlmChat };
|
|
73
75
|
export type { LlmChatProps };
|
|
76
|
+
export { MarkdownContent };
|
|
74
77
|
export { NORMAL_FLOW };
|
|
75
78
|
export { FAST_FLOW };
|
|
76
79
|
export { SLOW_FLOW };
|
|
@@ -94,15 +97,16 @@ export type { ChatMessage };
|
|
|
94
97
|
export type { ChatParticipant };
|
|
95
98
|
export type { MessageButton };
|
|
96
99
|
export { parseMessageButtons };
|
|
97
|
-
export { renderMarkdown };
|
|
98
|
-
export { isMarkdownContent };
|
|
99
100
|
export { ArrowIcon };
|
|
100
101
|
export { AttachmentIcon };
|
|
101
|
-
export { CloseIcon };
|
|
102
102
|
export { PauseIcon };
|
|
103
103
|
export { PlayIcon };
|
|
104
104
|
export { ResetIcon };
|
|
105
105
|
export { SaveIcon };
|
|
106
106
|
export { SendIcon };
|
|
107
107
|
export { TemplateIcon };
|
|
108
|
+
export { BrandedQrCode };
|
|
109
|
+
export { GenericQrCode };
|
|
110
|
+
export { PromptbookQrCode };
|
|
108
111
|
export { injectCssModuleIntoShadowRoot };
|
|
112
|
+
export { AboutPromptbookInformation };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
2
|
import { createAgentModelRequirements } from '../book-2.0/agent-source/createAgentModelRequirements';
|
|
3
3
|
import { createAgentModelRequirementsWithCommitments } from '../book-2.0/agent-source/createAgentModelRequirementsWithCommitments';
|
|
4
|
+
import { PADDING_LINES } from '../book-2.0/agent-source/padBook';
|
|
5
|
+
import { padBook } from '../book-2.0/agent-source/padBook';
|
|
4
6
|
import { parseAgentSource } from '../book-2.0/agent-source/parseAgentSource';
|
|
5
7
|
import { parseParameters } from '../book-2.0/agent-source/parseParameters';
|
|
6
8
|
import { isValidBook } from '../book-2.0/agent-source/string_book';
|
|
@@ -14,16 +16,17 @@ import { getAllCommitmentDefinitions } from '../book-2.0/commitments/index';
|
|
|
14
16
|
import { getAllCommitmentTypes } from '../book-2.0/commitments/index';
|
|
15
17
|
import { isCommitmentSupported } from '../book-2.0/commitments/index';
|
|
16
18
|
import { generatePlaceholderAgentProfileImageUrl } from '../book-2.0/utils/generatePlaceholderAgentProfileImageUrl';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
19
|
+
import { createPipelineCollectionFromJson } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromJson';
|
|
20
|
+
import { createPipelineCollectionFromPromise } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromPromise';
|
|
21
|
+
import { createPipelineCollectionFromUrl } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromUrl';
|
|
22
|
+
import { createPipelineSubcollection } from '../collection/pipeline-collection/constructors/createPipelineSubcollection';
|
|
23
|
+
import { pipelineCollectionToJson } from '../collection/pipeline-collection/pipelineCollectionToJson';
|
|
22
24
|
import { NAME } from '../config';
|
|
23
25
|
import { ADMIN_EMAIL } from '../config';
|
|
24
26
|
import { ADMIN_GITHUB_NAME } from '../config';
|
|
25
27
|
import { CLAIM } from '../config';
|
|
26
28
|
import { PROMPTBOOK_COLOR } from '../config';
|
|
29
|
+
import { PROMPTBOOK_SYNTAX_COLORS } from '../config';
|
|
27
30
|
import { PROMPTBOOK_CHAT_COLOR } from '../config';
|
|
28
31
|
import { USER_CHAT_COLOR } from '../config';
|
|
29
32
|
import { DEFAULT_BOOK_TITLE } from '../config';
|
|
@@ -41,6 +44,7 @@ import { DEFAULT_MAX_EXECUTION_ATTEMPTS } from '../config';
|
|
|
41
44
|
import { DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH } from '../config';
|
|
42
45
|
import { DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL } from '../config';
|
|
43
46
|
import { DEFAULT_BOOKS_DIRNAME } from '../config';
|
|
47
|
+
import { DEFAULT_AGENTS_DIRNAME } from '../config';
|
|
44
48
|
import { DEFAULT_DOWNLOAD_CACHE_DIRNAME } from '../config';
|
|
45
49
|
import { DEFAULT_EXECUTION_CACHE_DIRNAME } from '../config';
|
|
46
50
|
import { DEFAULT_SCRAPE_CACHE_DIRNAME } from '../config';
|
|
@@ -79,6 +83,7 @@ import { ExpectError } from '../errors/ExpectError';
|
|
|
79
83
|
import { KnowledgeScrapeError } from '../errors/KnowledgeScrapeError';
|
|
80
84
|
import { LimitReachedError } from '../errors/LimitReachedError';
|
|
81
85
|
import { MissingToolsError } from '../errors/MissingToolsError';
|
|
86
|
+
import { NotAllowed } from '../errors/NotAllowed';
|
|
82
87
|
import { NotFoundError } from '../errors/NotFoundError';
|
|
83
88
|
import { NotYetImplementedError } from '../errors/NotYetImplementedError';
|
|
84
89
|
import { ParseError } from '../errors/ParseError';
|
|
@@ -126,6 +131,7 @@ import { limitTotalUsage } from '../llm-providers/_common/utils/count-total-usag
|
|
|
126
131
|
import { getSingleLlmExecutionTools } from '../llm-providers/_multiple/getSingleLlmExecutionTools';
|
|
127
132
|
import { joinLlmExecutionTools } from '../llm-providers/_multiple/joinLlmExecutionTools';
|
|
128
133
|
import { MultipleLlmExecutionTools } from '../llm-providers/_multiple/MultipleLlmExecutionTools';
|
|
134
|
+
import { Agent } from '../llm-providers/agent/Agent';
|
|
129
135
|
import { AgentLlmExecutionTools } from '../llm-providers/agent/AgentLlmExecutionTools';
|
|
130
136
|
import { createAgentLlmExecutionTools } from '../llm-providers/agent/createAgentLlmExecutionTools';
|
|
131
137
|
import { _AgentMetadata } from '../llm-providers/agent/register-configuration';
|
|
@@ -168,14 +174,20 @@ import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/registe
|
|
|
168
174
|
import { BlackholeStorage } from '../storage/blackhole/BlackholeStorage';
|
|
169
175
|
import { MemoryStorage } from '../storage/memory/MemoryStorage';
|
|
170
176
|
import { PrefixStorage } from '../storage/utils/PrefixStorage';
|
|
177
|
+
import { $bookTranspilersRegister } from '../transpilers/_common/register/$bookTranspilersRegister';
|
|
178
|
+
import { FormattedBookInMarkdownTranspiler } from '../transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler';
|
|
179
|
+
import { OpenAiSdkTranspiler } from '../transpilers/openai-sdk/OpenAiSdkTranspiler';
|
|
171
180
|
import { MODEL_VARIANTS } from '../types/ModelVariant';
|
|
172
181
|
import { NonTaskSectionTypes } from '../types/SectionType';
|
|
173
182
|
import { SectionTypes } from '../types/SectionType';
|
|
174
183
|
import { TaskTypes } from '../types/TaskType';
|
|
184
|
+
import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
|
|
175
185
|
import { REMOTE_SERVER_URLS } from '../../servers';
|
|
176
186
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
177
187
|
export { createAgentModelRequirements };
|
|
178
188
|
export { createAgentModelRequirementsWithCommitments };
|
|
189
|
+
export { PADDING_LINES };
|
|
190
|
+
export { padBook };
|
|
179
191
|
export { parseAgentSource };
|
|
180
192
|
export { parseParameters };
|
|
181
193
|
export { isValidBook };
|
|
@@ -189,16 +201,17 @@ export { getAllCommitmentDefinitions };
|
|
|
189
201
|
export { getAllCommitmentTypes };
|
|
190
202
|
export { isCommitmentSupported };
|
|
191
203
|
export { generatePlaceholderAgentProfileImageUrl };
|
|
192
|
-
export {
|
|
193
|
-
export {
|
|
194
|
-
export {
|
|
195
|
-
export {
|
|
196
|
-
export {
|
|
204
|
+
export { createPipelineCollectionFromJson };
|
|
205
|
+
export { createPipelineCollectionFromPromise };
|
|
206
|
+
export { createPipelineCollectionFromUrl };
|
|
207
|
+
export { createPipelineSubcollection };
|
|
208
|
+
export { pipelineCollectionToJson };
|
|
197
209
|
export { NAME };
|
|
198
210
|
export { ADMIN_EMAIL };
|
|
199
211
|
export { ADMIN_GITHUB_NAME };
|
|
200
212
|
export { CLAIM };
|
|
201
213
|
export { PROMPTBOOK_COLOR };
|
|
214
|
+
export { PROMPTBOOK_SYNTAX_COLORS };
|
|
202
215
|
export { PROMPTBOOK_CHAT_COLOR };
|
|
203
216
|
export { USER_CHAT_COLOR };
|
|
204
217
|
export { DEFAULT_BOOK_TITLE };
|
|
@@ -216,6 +229,7 @@ export { DEFAULT_MAX_EXECUTION_ATTEMPTS };
|
|
|
216
229
|
export { DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH };
|
|
217
230
|
export { DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL };
|
|
218
231
|
export { DEFAULT_BOOKS_DIRNAME };
|
|
232
|
+
export { DEFAULT_AGENTS_DIRNAME };
|
|
219
233
|
export { DEFAULT_DOWNLOAD_CACHE_DIRNAME };
|
|
220
234
|
export { DEFAULT_EXECUTION_CACHE_DIRNAME };
|
|
221
235
|
export { DEFAULT_SCRAPE_CACHE_DIRNAME };
|
|
@@ -254,6 +268,7 @@ export { ExpectError };
|
|
|
254
268
|
export { KnowledgeScrapeError };
|
|
255
269
|
export { LimitReachedError };
|
|
256
270
|
export { MissingToolsError };
|
|
271
|
+
export { NotAllowed };
|
|
257
272
|
export { NotFoundError };
|
|
258
273
|
export { NotYetImplementedError };
|
|
259
274
|
export { ParseError };
|
|
@@ -301,6 +316,7 @@ export { limitTotalUsage };
|
|
|
301
316
|
export { getSingleLlmExecutionTools };
|
|
302
317
|
export { joinLlmExecutionTools };
|
|
303
318
|
export { MultipleLlmExecutionTools };
|
|
319
|
+
export { Agent };
|
|
304
320
|
export { AgentLlmExecutionTools };
|
|
305
321
|
export { createAgentLlmExecutionTools };
|
|
306
322
|
export { _AgentMetadata };
|
|
@@ -343,8 +359,12 @@ export { _WebsiteScraperMetadataRegistration };
|
|
|
343
359
|
export { BlackholeStorage };
|
|
344
360
|
export { MemoryStorage };
|
|
345
361
|
export { PrefixStorage };
|
|
362
|
+
export { $bookTranspilersRegister };
|
|
363
|
+
export { FormattedBookInMarkdownTranspiler };
|
|
364
|
+
export { OpenAiSdkTranspiler };
|
|
346
365
|
export { MODEL_VARIANTS };
|
|
347
366
|
export { NonTaskSectionTypes };
|
|
348
367
|
export { SectionTypes };
|
|
349
368
|
export { TaskTypes };
|
|
369
|
+
export { aboutPromptbookInformation };
|
|
350
370
|
export { REMOTE_SERVER_URLS };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
|
-
import {
|
|
2
|
+
import { AgentCollectionInDirectory } from '../collection/agent-collection/constructors/AgentCollectionInDirectory';
|
|
3
|
+
import { createPipelineCollectionFromDirectory } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory';
|
|
3
4
|
import { $provideExecutablesForNode } from '../executables/$provideExecutablesForNode';
|
|
4
5
|
import { $provideExecutionToolsForNode } from '../execution/utils/$provideExecutionToolsForNode';
|
|
5
6
|
import { $provideLlmToolsConfigurationFromEnv } from '../llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv';
|
|
@@ -11,7 +12,8 @@ import { FileCacheStorage } from '../storage/file-cache-storage/FileCacheStorage
|
|
|
11
12
|
import { $execCommand } from '../utils/execCommand/$execCommand';
|
|
12
13
|
import { $execCommands } from '../utils/execCommand/$execCommands';
|
|
13
14
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
14
|
-
export {
|
|
15
|
+
export { AgentCollectionInDirectory };
|
|
16
|
+
export { createPipelineCollectionFromDirectory };
|
|
15
17
|
export { $provideExecutablesForNode };
|
|
16
18
|
export { $provideExecutionToolsForNode };
|
|
17
19
|
export { $provideLlmToolsConfigurationFromEnv };
|
|
@@ -21,7 +21,9 @@ 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 {
|
|
24
|
+
import type { QrCodeOptions } from '../book-components/Qr/useQrCode';
|
|
25
|
+
import type { AgentCollection } from '../collection/agent-collection/AgentCollection';
|
|
26
|
+
import type { PipelineCollection } from '../collection/pipeline-collection/PipelineCollection';
|
|
25
27
|
import type { Command } from '../commands/_common/types/Command';
|
|
26
28
|
import type { CommandParser } from '../commands/_common/types/CommandParser';
|
|
27
29
|
import type { PipelineBothCommandParser } from '../commands/_common/types/CommandParser';
|
|
@@ -98,7 +100,8 @@ import type { LlmToolsOptions } from '../llm-providers/_common/register/LlmTools
|
|
|
98
100
|
import type { CacheItem } from '../llm-providers/_common/utils/cache/CacheItem';
|
|
99
101
|
import type { CacheLlmToolsOptions } from '../llm-providers/_common/utils/cache/CacheLlmToolsOptions';
|
|
100
102
|
import type { LlmExecutionToolsWithTotalUsage } from '../llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage';
|
|
101
|
-
import type {
|
|
103
|
+
import type { AgentOptions } from '../llm-providers/agent/AgentOptions';
|
|
104
|
+
import type { CreateAgentLlmExecutionToolsOptions } from '../llm-providers/agent/CreateAgentLlmExecutionToolsOptions';
|
|
102
105
|
import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
103
106
|
import type { AnthropicClaudeExecutionToolsNonProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
104
107
|
import type { AnthropicClaudeExecutionToolsProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
@@ -166,7 +169,10 @@ import type { PostprocessingFunction } from '../scripting/javascript/JavascriptE
|
|
|
166
169
|
import type { PromptbookStorage } from '../storage/_common/PromptbookStorage';
|
|
167
170
|
import type { FileCacheStorageOptions } from '../storage/file-cache-storage/FileCacheStorageOptions';
|
|
168
171
|
import type { IndexedDbStorageOptions } from '../storage/local-storage/utils/IndexedDbStorageOptions';
|
|
172
|
+
import type { BookTranspiler } from '../transpilers/_common/BookTranspiler';
|
|
173
|
+
import type { BookTranspilerOptions } from '../transpilers/_common/BookTranspilerOptions';
|
|
169
174
|
import type { IntermediateFilesStrategy } from '../types/IntermediateFilesStrategy';
|
|
175
|
+
import type { LlmCall } from '../types/LlmCall';
|
|
170
176
|
import type { ModelRequirements } from '../types/ModelRequirements';
|
|
171
177
|
import type { CompletionModelRequirements } from '../types/ModelRequirements';
|
|
172
178
|
import type { ChatModelRequirements } from '../types/ModelRequirements';
|
|
@@ -306,6 +312,7 @@ import type { number_kilobytes } from '../types/typeAliases';
|
|
|
306
312
|
import type { number_megabytes } from '../types/typeAliases';
|
|
307
313
|
import type { number_gigabytes } from '../types/typeAliases';
|
|
308
314
|
import type { number_terabytes } from '../types/typeAliases';
|
|
315
|
+
import type { Updatable } from '../types/Updatable';
|
|
309
316
|
import type { ColorTransformer } from '../utils/color/operators/ColorTransformer';
|
|
310
317
|
import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';
|
|
311
318
|
import type { ExecCommandOptions } from '../utils/execCommand/ExecCommandOptions';
|
|
@@ -314,6 +321,7 @@ import type { CodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown';
|
|
|
314
321
|
import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection';
|
|
315
322
|
import type { Registered } from '../utils/misc/$Register';
|
|
316
323
|
import type { Registration } from '../utils/misc/$Register';
|
|
324
|
+
import type { AboutPromptbookInformationOptions } from '../utils/misc/aboutPromptbookInformation';
|
|
317
325
|
import type { FromtoItems } from '../utils/misc/FromtoItems';
|
|
318
326
|
import type { InjectCssModuleIntoShadowRootOptions } from '../utils/misc/injectCssModuleIntoShadowRoot';
|
|
319
327
|
import type { string_keyword } from '../utils/normalization/IKeywords';
|
|
@@ -354,6 +362,8 @@ export type { string_chat_format_name };
|
|
|
354
362
|
export type { ChatMessage };
|
|
355
363
|
export type { ChatParticipant };
|
|
356
364
|
export type { MessageButton };
|
|
365
|
+
export type { QrCodeOptions };
|
|
366
|
+
export type { AgentCollection };
|
|
357
367
|
export type { PipelineCollection };
|
|
358
368
|
export type { Command };
|
|
359
369
|
export type { CommandParser };
|
|
@@ -431,6 +441,7 @@ export type { LlmToolsOptions };
|
|
|
431
441
|
export type { CacheItem };
|
|
432
442
|
export type { CacheLlmToolsOptions };
|
|
433
443
|
export type { LlmExecutionToolsWithTotalUsage };
|
|
444
|
+
export type { AgentOptions };
|
|
434
445
|
export type { CreateAgentLlmExecutionToolsOptions };
|
|
435
446
|
export type { AnthropicClaudeExecutionToolsOptions };
|
|
436
447
|
export type { AnthropicClaudeExecutionToolsNonProxiedOptions };
|
|
@@ -499,7 +510,10 @@ export type { PostprocessingFunction };
|
|
|
499
510
|
export type { PromptbookStorage };
|
|
500
511
|
export type { FileCacheStorageOptions };
|
|
501
512
|
export type { IndexedDbStorageOptions };
|
|
513
|
+
export type { BookTranspiler };
|
|
514
|
+
export type { BookTranspilerOptions };
|
|
502
515
|
export type { IntermediateFilesStrategy };
|
|
516
|
+
export type { LlmCall };
|
|
503
517
|
export type { ModelRequirements };
|
|
504
518
|
export type { CompletionModelRequirements };
|
|
505
519
|
export type { ChatModelRequirements };
|
|
@@ -639,6 +653,7 @@ export type { number_kilobytes };
|
|
|
639
653
|
export type { number_megabytes };
|
|
640
654
|
export type { number_gigabytes };
|
|
641
655
|
export type { number_terabytes };
|
|
656
|
+
export type { Updatable };
|
|
642
657
|
export type { ColorTransformer };
|
|
643
658
|
export type { PipelineEditableSerialized };
|
|
644
659
|
export type { ExecCommandOptions };
|
|
@@ -647,6 +662,7 @@ export type { CodeBlock };
|
|
|
647
662
|
export type { MarkdownSection };
|
|
648
663
|
export type { Registered };
|
|
649
664
|
export type { Registration };
|
|
665
|
+
export type { AboutPromptbookInformationOptions };
|
|
650
666
|
export type { FromtoItems };
|
|
651
667
|
export type { InjectCssModuleIntoShadowRootOptions };
|
|
652
668
|
export type { string_keyword };
|
|
@@ -29,6 +29,8 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
|
|
|
29
29
|
import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
|
|
30
30
|
import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
|
|
31
31
|
import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
|
|
32
|
+
import { _FormattedBookInMarkdownTranspilerRegistration } from '../transpilers/formatted-book-in-markdown/register';
|
|
33
|
+
import { _OpenAiSdkTranspilerRegistration } from '../transpilers/openai-sdk/register';
|
|
32
34
|
import { wizard } from '../wizard/wizard';
|
|
33
35
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
34
36
|
export { _AnthropicClaudeMetadataRegistration };
|
|
@@ -61,4 +63,6 @@ export { _PdfScraperRegistration };
|
|
|
61
63
|
export { _PdfScraperMetadataRegistration };
|
|
62
64
|
export { _WebsiteScraperRegistration };
|
|
63
65
|
export { _WebsiteScraperMetadataRegistration };
|
|
66
|
+
export { _FormattedBookInMarkdownTranspilerRegistration };
|
|
67
|
+
export { _OpenAiSdkTranspilerRegistration };
|
|
64
68
|
export { wizard };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { string_book } from './string_book';
|
|
2
|
+
/**
|
|
3
|
+
* Number of padding lines to add at the end of the book content
|
|
4
|
+
*
|
|
5
|
+
* @public exported from `@promptbook/core`
|
|
6
|
+
*/
|
|
7
|
+
export declare const PADDING_LINES = 11;
|
|
8
|
+
/**
|
|
9
|
+
* A function that adds padding to the book content
|
|
10
|
+
*
|
|
11
|
+
* @public exported from `@promptbook/core`
|
|
12
|
+
*/
|
|
13
|
+
export declare function padBook(content: string_book): string_book;
|
|
14
|
+
/**
|
|
15
|
+
* TODO: [🧠] Maybe export
|
|
16
|
+
*/
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
|
-
import type
|
|
4
|
-
import type { string_knowledge_source_content } from '../../types/typeAliases';
|
|
3
|
+
import { type string_book } from '../../book-2.0/agent-source/string_book';
|
|
4
|
+
import type { number_percent, number_positive, string_css_value, string_knowledge_source_content } from '../../types/typeAliases';
|
|
5
|
+
/**
|
|
6
|
+
* Default height of the book editor
|
|
7
|
+
*
|
|
8
|
+
* Note: This height is computed based on the number of lines in the default book + padding multiplied by an estimated line height.
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/components`
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_BOOK_EDITOR_HEIGHT: number;
|
|
5
13
|
/**
|
|
6
14
|
* Props of `BookEditor`
|
|
7
15
|
*
|
|
@@ -12,10 +20,6 @@ export type BookEditorProps = {
|
|
|
12
20
|
* The source of the agent to be displayed in the editor.
|
|
13
21
|
*/
|
|
14
22
|
readonly agentSource?: string_book;
|
|
15
|
-
/**
|
|
16
|
-
* Callback function to be called when the editor is closed.
|
|
17
|
-
*/
|
|
18
|
-
onClose?(): void;
|
|
19
23
|
/**
|
|
20
24
|
* Additional CSS classes to apply to the editor container.
|
|
21
25
|
*/
|
|
@@ -25,10 +29,21 @@ export type BookEditorProps = {
|
|
|
25
29
|
*/
|
|
26
30
|
readonly style?: CSSProperties;
|
|
27
31
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
32
|
+
* Height of the `BookEditor` component
|
|
33
|
+
*
|
|
34
|
+
* - You can use any valid CSS value, e.g., `500px`, `100%`, `50vh`, etc.
|
|
35
|
+
* - If not set, the default height is `DEFAULT_BOOK_EDITOR_HEIGHT`.
|
|
36
|
+
* - If set to `null`, the height should be controlled entirely via `className` or `style`, otherwise the editor will have zero height.
|
|
37
|
+
*
|
|
38
|
+
* @default `DEFAULT_BOOK_EDITOR_HEIGHT`
|
|
30
39
|
*/
|
|
31
|
-
readonly
|
|
40
|
+
readonly height?: string_css_value | null;
|
|
41
|
+
/**
|
|
42
|
+
* Zoom level of the editor
|
|
43
|
+
*
|
|
44
|
+
* @default 1 (100%)
|
|
45
|
+
*/
|
|
46
|
+
readonly zoom?: number_percent & number_positive;
|
|
32
47
|
/**
|
|
33
48
|
* The book which is being edited.
|
|
34
49
|
*/
|
|
@@ -49,17 +64,63 @@ export type BookEditorProps = {
|
|
|
49
64
|
* If true, disables border radius making the editor have sharp corners
|
|
50
65
|
*/
|
|
51
66
|
readonly isBorderRadiusDisabled?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* If true, shows the footer with book title and version information.
|
|
54
|
-
* By default, the footer is hidden.
|
|
55
|
-
*/
|
|
56
|
-
readonly isFooterShown?: boolean;
|
|
57
67
|
/**
|
|
58
68
|
* If true, the editor is in read-only mode
|
|
59
69
|
*
|
|
60
70
|
* @default false
|
|
61
71
|
*/
|
|
62
72
|
readonly isReadonly?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Optional translations for the component
|
|
75
|
+
*/
|
|
76
|
+
readonly translations?: {
|
|
77
|
+
/**
|
|
78
|
+
* Message to show when trying to edit a readonly editor
|
|
79
|
+
*
|
|
80
|
+
* @default "You cannot edit this book"
|
|
81
|
+
*/
|
|
82
|
+
readonly readonlyMessage?: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* If true, shows the download button in the action bar.
|
|
86
|
+
* By default, the download button is shown.
|
|
87
|
+
*/
|
|
88
|
+
readonly isDownloadButtonShown?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* If true, shows the about button in the action bar.
|
|
91
|
+
* By default, the about button is shown.
|
|
92
|
+
*/
|
|
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;
|
|
111
|
+
/**
|
|
112
|
+
* If defined, the editor will be synced with other editors with the same sync configuration.
|
|
113
|
+
*/
|
|
114
|
+
readonly sync?: {
|
|
115
|
+
/**
|
|
116
|
+
* The URL of the y-websocket server.
|
|
117
|
+
*/
|
|
118
|
+
readonly serverUrl: string;
|
|
119
|
+
/**
|
|
120
|
+
* The name of the room to join.
|
|
121
|
+
*/
|
|
122
|
+
readonly roomName: string;
|
|
123
|
+
};
|
|
63
124
|
};
|
|
64
125
|
/**
|
|
65
126
|
* Renders a book editor
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type BookEditorActionbarProps = {
|
|
2
|
+
value: string | undefined;
|
|
3
|
+
isDownloadButtonShown?: boolean;
|
|
4
|
+
isAboutButtonShown?: boolean;
|
|
5
|
+
isFullscreenButtonShown?: boolean;
|
|
6
|
+
onFullscreenClick?: () => void;
|
|
7
|
+
isFullscreen?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @private Internal component used by `BookEditor`
|
|
12
|
+
*/
|
|
13
|
+
export declare function BookEditorActionbar(props: BookEditorActionbarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -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
|
+
*/
|
|
@@ -42,6 +42,11 @@ export type MockedChatDelayConfig = {
|
|
|
42
42
|
* If true, disables typing effect and shows full message at once (BLOCKY_FLOW)
|
|
43
43
|
*/
|
|
44
44
|
blocky?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* This prop will allow to show N first messages immediately, while the rest will be typed out with delays
|
|
47
|
+
* @default 0
|
|
48
|
+
*/
|
|
49
|
+
showIntermediateMessages?: number;
|
|
45
50
|
};
|
|
46
51
|
/**
|
|
47
52
|
* Props for MockedChat component
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
type DropdownProps = {
|
|
3
|
+
actions: Array<{
|
|
4
|
+
icon: JSX.Element;
|
|
5
|
+
name: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @@@
|
|
11
|
+
*
|
|
12
|
+
* @private internal subcomponent used by various components
|
|
13
|
+
*/
|
|
14
|
+
export declare function Dropdown({ actions }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|