@promptbook/editable 0.103.0-9 → 0.104.0-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/README.md +59 -35
- package/esm/index.es.js +203 -148
- package/esm/index.es.js.map +1 -1
- package/esm/typings/books/index.d.ts +0 -81
- package/esm/typings/servers.d.ts +9 -7
- 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 +22 -8
- package/esm/typings/src/_packages/core.index.d.ts +58 -18
- package/esm/typings/src/_packages/node.index.d.ts +2 -2
- package/esm/typings/src/_packages/remote-server.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +70 -8
- package/esm/typings/src/_packages/utils.index.d.ts +6 -0
- package/esm/typings/src/_packages/wizard.index.d.ts +4 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +20 -5
- package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +17 -1
- package/esm/typings/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +3 -2
- package/esm/typings/src/book-2.0/agent-source/computeAgentHash.d.ts +8 -0
- package/esm/typings/src/book-2.0/agent-source/createCommitmentRegex.d.ts +3 -3
- package/esm/typings/src/book-2.0/agent-source/createDefaultAgentName.d.ts +8 -0
- package/esm/typings/src/book-2.0/agent-source/normalizeAgentName.d.ts +9 -0
- package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +18 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.d.ts +1 -1
- package/esm/typings/src/book-2.0/agent-source/string_book.d.ts +3 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +6 -1
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +85 -14
- package/esm/typings/src/book-components/BookEditor/BookEditorActionbar.d.ts +18 -0
- package/esm/typings/src/book-components/BookEditor/BookEditorMonaco.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/AgentChat/AgentChat.d.ts +17 -0
- package/esm/typings/src/book-components/Chat/AgentChat/AgentChatProps.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +16 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.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/_common/ChatSaveFormatDefinition.d.ts +1 -1
- 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/Chat/types/ChatParticipant.d.ts +1 -1
- package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +67 -0
- package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +23 -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/HamburgerMenu/HamburgerMenu.d.ts +12 -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/icons/AboutIcon.d.ts +9 -0
- package/esm/typings/src/book-components/icons/CameraIcon.d.ts +11 -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/book-components/icons/MicIcon.d.ts +8 -0
- package/esm/typings/src/book-components/icons/SendIcon.d.ts +3 -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 +12 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +75 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +10 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +154 -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/pipeline-collection/constructors/createPipelineCollectionFromPromise.test.d.ts +1 -0
- 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/{book-2.0/commitments → commitments}/ACTION/ACTION.d.ts +5 -1
- package/esm/typings/src/commitments/CLOSED/CLOSED.d.ts +39 -0
- package/esm/typings/src/commitments/CLOSED/CLOSED.test.d.ts +4 -0
- package/esm/typings/src/commitments/COMPONENT/COMPONENT.d.ts +28 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/DELETE/DELETE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/FORMAT/FORMAT.d.ts +5 -1
- package/esm/typings/src/commitments/FROM/FROM.d.ts +34 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/GOAL/GOAL.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/KNOWLEDGE/KNOWLEDGE.d.ts +5 -5
- package/esm/typings/src/commitments/LANGUAGE/LANGUAGE.d.ts +35 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/MEMORY/MEMORY.d.ts +5 -1
- package/esm/typings/src/commitments/MESSAGE/AgentMessageCommitmentDefinition.d.ts +32 -0
- package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +32 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/MESSAGE/MESSAGE.d.ts +5 -1
- package/esm/typings/src/commitments/MESSAGE/UserMessageCommitmentDefinition.d.ts +32 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/META/META.d.ts +5 -1
- package/esm/typings/src/commitments/META_COLOR/META_COLOR.d.ts +48 -0
- package/esm/typings/src/commitments/META_FONT/META_FONT.d.ts +42 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/META_IMAGE/META_IMAGE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/META_LINK/META_LINK.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/MODEL/MODEL.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/NOTE/NOTE.d.ts +5 -1
- package/esm/typings/src/commitments/OPEN/OPEN.d.ts +35 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/PERSONA/PERSONA.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/RULE/RULE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/SAMPLE/SAMPLE.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/SCENARIO/SCENARIO.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/STYLE/STYLE.d.ts +5 -1
- package/esm/typings/src/commitments/USE/USE.d.ts +53 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +42 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_MCP/USE_MCP.d.ts +37 -0
- package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +38 -0
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BaseCommitmentDefinition.d.ts +14 -2
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/CommitmentDefinition.d.ts +6 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/NotYetImplementedCommitmentDefinition.d.ts +5 -1
- package/esm/typings/src/{book-2.0/commitments → commitments}/_base/createEmptyAgentModelRequirements.d.ts +1 -1
- package/esm/typings/src/commitments/index.d.ts +93 -0
- package/esm/typings/src/config.d.ts +24 -3
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +2 -0
- package/esm/typings/src/errors/0-index.d.ts +6 -0
- package/esm/typings/src/errors/DatabaseError.d.ts +12 -0
- package/esm/typings/src/errors/NotAllowed.d.ts +9 -0
- package/esm/typings/src/errors/WrappedError.d.ts +2 -2
- 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 +26 -2
- package/esm/typings/src/execution/PromptResult.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/usage-constants.d.ts +4 -124
- package/esm/typings/src/execution/utils/validatePromptResult.d.ts +2 -0
- package/esm/typings/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/utils/assertUniqueModels.d.ts +12 -0
- package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +72 -0
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +26 -4
- package/esm/typings/src/llm-providers/agent/AgentOptions.d.ts +19 -0
- package/esm/typings/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +17 -0
- package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +50 -0
- package/esm/typings/src/llm-providers/agent/RemoteAgentOptions.d.ts +11 -0
- package/esm/typings/src/llm-providers/agent/createAgentLlmExecutionTools.d.ts +1 -19
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/OllamaExecutionTools.d.ts +4 -0
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +60 -2
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +7 -1
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +13 -1
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +4 -0
- package/esm/typings/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +6 -6
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/openai-models.test.d.ts +4 -0
- package/esm/typings/src/other/templates/getTemplatesPipelineCollection.d.ts +1 -1
- package/esm/typings/src/pipeline/validatePipelineString.d.ts +2 -0
- 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/prepare/PrepareAndScrapeOptions.d.ts +1 -0
- package/esm/typings/src/remote-server/startAgentServer.d.ts +26 -0
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +4 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +3 -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/_common/PromptbookStorage.d.ts +1 -0
- package/esm/typings/src/storage/env-storage/$EnvStorage.d.ts +2 -1
- package/esm/typings/src/transpilers/_common/BookTranspiler.d.ts +33 -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 +16 -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 +16 -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/ModelRequirements.d.ts +13 -1
- package/esm/typings/src/types/ModelVariant.d.ts +1 -1
- package/esm/typings/src/types/Prompt.d.ts +13 -1
- package/esm/typings/src/types/Updatable.d.ts +19 -0
- package/esm/typings/src/types/typeAliases.d.ts +38 -2
- package/esm/typings/src/utils/color/$randomColor.d.ts +1 -0
- package/esm/typings/src/utils/color/Color.d.ts +16 -1
- package/esm/typings/src/utils/color/Color.test.d.ts +1 -0
- package/esm/typings/src/utils/color/css-colors.d.ts +1 -0
- package/esm/typings/src/utils/color/internal-utils/checkChannelValue.d.ts +0 -3
- package/esm/typings/src/utils/color/operators/darken.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/grayscale.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/lighten.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/mixWithColor.d.ts +1 -1
- package/esm/typings/src/utils/color/operators/saturate.d.ts +1 -1
- package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +16 -0
- package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -2
- 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 +27 -0
- package/esm/typings/src/utils/misc/computeHash.d.ts +11 -0
- package/esm/typings/src/utils/misc/computeHash.test.d.ts +1 -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/normalization/normalize-to-kebab-case.d.ts +2 -0
- package/esm/typings/src/utils/normalization/normalizeMessageText.d.ts +9 -0
- package/esm/typings/src/utils/normalization/normalizeMessageText.test.d.ts +1 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +3 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -0
- package/esm/typings/src/utils/normalization/titleToName.d.ts +2 -0
- package/esm/typings/src/utils/organization/$sideEffect.d.ts +2 -2
- package/esm/typings/src/utils/organization/$side_effect.d.ts +7 -0
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +2 -2
- package/esm/typings/src/utils/organization/keepUnused.d.ts +2 -2
- package/esm/typings/src/utils/organization/preserve.d.ts +3 -3
- package/esm/typings/src/utils/organization/really_any.d.ts +7 -0
- package/esm/typings/src/utils/random/$generateBookBoilerplate.d.ts +31 -0
- package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +9 -0
- package/esm/typings/src/utils/random/$randomFullnameWithColor.d.ts +13 -0
- package/esm/typings/src/utils/random/$randomItem.d.ts +9 -0
- package/esm/typings/src/utils/random/$randomSeed.d.ts +3 -0
- package/esm/typings/src/utils/random/$randomToken.d.ts +2 -0
- package/esm/typings/src/utils/random/CzechNamePool.d.ts +7 -0
- package/esm/typings/src/utils/random/EnglishNamePool.d.ts +7 -0
- package/esm/typings/src/utils/random/NamePool.d.ts +17 -0
- package/esm/typings/src/utils/random/getNamePool.d.ts +10 -0
- package/esm/typings/src/utils/serialization/$deepFreeze.d.ts +2 -1
- package/esm/typings/src/utils/serialization/asSerializable.d.ts +2 -2
- package/esm/typings/src/utils/serialization/serializeToPromptbookJavascript.d.ts +2 -2
- package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +2 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/esm/typings/src/wizard/$getCompiledBook.d.ts +1 -2
- package/package.json +5 -5
- package/umd/index.umd.js +177 -122
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/book-2.0/commitments/index.d.ts +0 -60
- 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 → book-2.0/agent-source/computeAgentHash.test.d.ts} +0 -0
- /package/esm/typings/src/{collection/constructors/createCollectionFromDirectory.test.d.ts → book-2.0/agent-source/normalizeAgentName.test.d.ts} +0 -0
- /package/esm/typings/src/{collection/constructors/createCollectionFromJson.test.d.ts → book-components/Chat/AgentChat/AgentChat.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{constructors/createCollectionFromPromise.test.d.ts → pipeline-collection/constructors/createPipelineCollectionFromDirectory.test.d.ts} +0 -0
- /package/esm/typings/src/{commands/_common/parseCommand.test.d.ts → collection/pipeline-collection/constructors/createPipelineCollectionFromJson.test.d.ts} +0 -0
- /package/esm/typings/src/collection/{collectionToJson.test.d.ts → pipeline-collection/pipelineCollectionToJson.test.d.ts} +0 -0
- /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BookCommitment.d.ts +0 -0
- /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/ParsedCommitment.d.ts +0 -0
|
@@ -1,7 +1,15 @@
|
|
|
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
|
-
import type { string_knowledge_source_content } from '../../types/typeAliases';
|
|
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`
|
|
39
|
+
*/
|
|
40
|
+
readonly height?: string_css_value | null;
|
|
41
|
+
/**
|
|
42
|
+
* Zoom level of the editor
|
|
43
|
+
*
|
|
44
|
+
* @default 1 (100%)
|
|
30
45
|
*/
|
|
31
|
-
readonly
|
|
46
|
+
readonly zoom?: number_percent & number_positive;
|
|
32
47
|
/**
|
|
33
48
|
* The book which is being edited.
|
|
34
49
|
*/
|
|
@@ -49,17 +64,73 @@ 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 upload button in the action bar.
|
|
86
|
+
* By default, the upload button is shown.
|
|
87
|
+
*/
|
|
88
|
+
readonly isUploadButtonShown?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* If true, shows the camera button in the action bar.
|
|
91
|
+
* By default, the camera button is shown on mobile devices.
|
|
92
|
+
*/
|
|
93
|
+
readonly isCameraButtonShown?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* If true, shows the download button in the action bar.
|
|
96
|
+
* By default, the download button is shown.
|
|
97
|
+
*/
|
|
98
|
+
readonly isDownloadButtonShown?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* If true, shows the about button in the action bar.
|
|
101
|
+
* By default, the about button is shown.
|
|
102
|
+
*/
|
|
103
|
+
readonly isAboutButtonShown?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* If true, shows the fullscreen button in the action bar.
|
|
106
|
+
* By default, the fullscreen button is shown.
|
|
107
|
+
*/
|
|
108
|
+
readonly isFullscreenButtonShown?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Callback function to handle fullscreen button click.
|
|
111
|
+
* Note: This is for internal use between BookEditor and BookEditorMonaco
|
|
112
|
+
* @private
|
|
113
|
+
*/
|
|
114
|
+
onFullscreenClick?(): void;
|
|
115
|
+
/**
|
|
116
|
+
* If true, the editor is in fullscreen mode.
|
|
117
|
+
* Note: This is for internal use between BookEditor and BookEditorMonaco
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
readonly isFullscreen?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* If defined, the editor will be synced with other editors with the same sync configuration.
|
|
123
|
+
*/
|
|
124
|
+
readonly sync?: {
|
|
125
|
+
/**
|
|
126
|
+
* The URL of the y-websocket server.
|
|
127
|
+
*/
|
|
128
|
+
readonly serverUrl: string;
|
|
129
|
+
/**
|
|
130
|
+
* The name of the room to join.
|
|
131
|
+
*/
|
|
132
|
+
readonly roomName: string;
|
|
133
|
+
};
|
|
63
134
|
};
|
|
64
135
|
/**
|
|
65
136
|
* Renders a book editor
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type BookEditorActionbarProps = {
|
|
2
|
+
value: string | undefined;
|
|
3
|
+
isDownloadButtonShown?: boolean;
|
|
4
|
+
isUploadButtonShown?: boolean;
|
|
5
|
+
isCameraButtonShown?: boolean;
|
|
6
|
+
isAboutButtonShown?: boolean;
|
|
7
|
+
isFullscreenButtonShown?: boolean;
|
|
8
|
+
onFullscreenClick?: () => void;
|
|
9
|
+
onUploadDocument?: () => void;
|
|
10
|
+
onTakePhoto?: () => void;
|
|
11
|
+
isFullscreen?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @private Internal component used by `BookEditor`
|
|
16
|
+
*/
|
|
17
|
+
export declare function BookEditorActionbar(props: BookEditorActionbarProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgentChatProps } from './AgentChatProps';
|
|
2
|
+
/**
|
|
3
|
+
* AgentChat component that provides chat functionality with LLM integration
|
|
4
|
+
*
|
|
5
|
+
* This component internally manages messages, participants, and task progress,
|
|
6
|
+
* and uses the provided LLM tools to generate responses via `LlmExecutionTools.callChatModel`.
|
|
7
|
+
*
|
|
8
|
+
* Note: There are multiple chat components:
|
|
9
|
+
* - `<Chat/>` renders chat as it is without any logic
|
|
10
|
+
* - `<AgentChat/>` connected to LLM Execution Tools of Promptbook
|
|
11
|
+
*
|
|
12
|
+
* @public exported from `@promptbook/components`
|
|
13
|
+
*/
|
|
14
|
+
export declare function AgentChat(props: AgentChatProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* TODO: !!!! Search ACRY ".meta.color" and make sure that we count that we count color can be array
|
|
17
|
+
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Agent } from '../../../llm-providers/agent/Agent';
|
|
2
|
+
import type { LlmChatProps } from '../LlmChat/LlmChatProps';
|
|
3
|
+
/**
|
|
4
|
+
* Props for AgentChat component, derived from LlmChatProps but with Agent-specific modifications
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/components`
|
|
7
|
+
*/
|
|
8
|
+
export type AgentChatProps = Omit<LlmChatProps, 'thread' | 'llmTools' | 'initialMessages' | 'userParticipantName' | 'llmParticipantName'> & {
|
|
9
|
+
/**
|
|
10
|
+
* The agent to chat with
|
|
11
|
+
*/
|
|
12
|
+
readonly agent: Agent;
|
|
13
|
+
};
|
|
@@ -3,6 +3,8 @@ import type { Promisable } from 'type-fest';
|
|
|
3
3
|
import type { string_chat_format_name } from '../save/_common/string_chat_format_name';
|
|
4
4
|
import type { ChatMessage } from '../types/ChatMessage';
|
|
5
5
|
import type { ChatParticipant } from '../types/ChatParticipant';
|
|
6
|
+
import { string_color } from '../../../types/typeAliases';
|
|
7
|
+
import { Color } from '../../../_packages/color.index';
|
|
6
8
|
/**
|
|
7
9
|
* @public exported from `@promptbook/components`
|
|
8
10
|
*/
|
|
@@ -44,6 +46,10 @@ export type ChatProps = {
|
|
|
44
46
|
* Determines whether the voice recognition button is rendered
|
|
45
47
|
*/
|
|
46
48
|
readonly isVoiceRecognitionButtonShown?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Optional callback to trigger voice input
|
|
51
|
+
*/
|
|
52
|
+
onVoiceInput?(): void;
|
|
47
53
|
/**
|
|
48
54
|
* The language code to use for voice recognition
|
|
49
55
|
*/
|
|
@@ -77,6 +83,16 @@ export type ChatProps = {
|
|
|
77
83
|
* adding feature–specific controls (e.g. Pause / Resume in MockedChat).
|
|
78
84
|
*/
|
|
79
85
|
readonly extraActions?: ReactNode;
|
|
86
|
+
/**
|
|
87
|
+
* Optional container to render the actions into (using React Portal).
|
|
88
|
+
* If provided, the actions toolbar will be rendered inside this element
|
|
89
|
+
* instead of its default position within the chat.
|
|
90
|
+
*/
|
|
91
|
+
readonly actionsContainer?: HTMLElement | null;
|
|
92
|
+
/**
|
|
93
|
+
* Color of the action buttons (send, reset, voice, etc.)
|
|
94
|
+
*/
|
|
95
|
+
readonly buttonColor?: string_color | Color;
|
|
80
96
|
/**
|
|
81
97
|
* Optional CSS class name which will be added to root <div/> element
|
|
82
98
|
*/
|
|
@@ -52,4 +52,9 @@ export type LlmChatProps = Omit<ChatProps, 'messages' | 'onMessage' | 'onChange'
|
|
|
52
52
|
* @default 'ASSISTANT'
|
|
53
53
|
*/
|
|
54
54
|
readonly llmParticipantName?: id;
|
|
55
|
+
/**
|
|
56
|
+
* Optional message to be automatically sent as if the user typed it.
|
|
57
|
+
* This is useful for seamless transitions from other pages.
|
|
58
|
+
*/
|
|
59
|
+
readonly autoExecuteMessage?: string;
|
|
55
60
|
};
|
|
@@ -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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Promisable } from 'type-fest';
|
|
2
2
|
import type { string_file_extension, string_mime_type } from '../../../../types/typeAliases';
|
|
3
3
|
import type { ChatMessage } from '../../types/ChatMessage';
|
|
4
|
-
import { ChatParticipant } from '../../types/ChatParticipant';
|
|
4
|
+
import type { ChatParticipant } from '../../types/ChatParticipant';
|
|
5
5
|
/**
|
|
6
6
|
* Plugin contract for chat export formatNames
|
|
7
7
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { string_book } from '../../../book-2.0/agent-source/string_book';
|
|
1
2
|
import type { id, string_color, string_person_fullname, string_url_image } from '../../../types/typeAliases';
|
|
2
3
|
import { Color } from '../../../utils/color/Color';
|
|
3
|
-
import type { string_book } from '../../../book-2.0/agent-source/string_book';
|
|
4
4
|
/**
|
|
5
5
|
* A participant in the chat
|
|
6
6
|
*
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import type { AgentBasicInformation } from '../../book-2.0/agent-source/AgentBasicInformation';
|
|
3
|
+
import { string_css_class } from '../../types/typeAliases';
|
|
4
|
+
/**
|
|
5
|
+
* @private props of PromptbookAgentIntegration component
|
|
6
|
+
*/
|
|
7
|
+
export type PromptbookAgentIntegrationProps = {
|
|
8
|
+
/**
|
|
9
|
+
* URL of the agent to connect to
|
|
10
|
+
*
|
|
11
|
+
* @example "http://s6.ptbk.io/benjamin-white"
|
|
12
|
+
*/
|
|
13
|
+
readonly agentUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* Form of the agent integration
|
|
16
|
+
*
|
|
17
|
+
* @default `seamless`
|
|
18
|
+
*
|
|
19
|
+
* - `seamless` Default, current behavior
|
|
20
|
+
* - `book` Show the Agent as a book in BookEditor
|
|
21
|
+
* - `chat` Show the Agent as a chat which is not floating but as AgentChat component
|
|
22
|
+
* - `profile` Show the Agent as a profile using
|
|
23
|
+
*/
|
|
24
|
+
readonly formfactor?: 'seamless' | 'book' | 'chat' | 'profile';
|
|
25
|
+
/**
|
|
26
|
+
* Optional metadata to show before the agent is connected
|
|
27
|
+
* Or to override the agent metadata if the agent does not provide it
|
|
28
|
+
*/
|
|
29
|
+
readonly meta?: Partial<AgentBasicInformation['meta']>;
|
|
30
|
+
/**
|
|
31
|
+
* Callback when the window is opened or closed
|
|
32
|
+
*/
|
|
33
|
+
onOpenChange?(isOpen: boolean): void;
|
|
34
|
+
/**
|
|
35
|
+
* Optional CSS class name which will be added to root element
|
|
36
|
+
*/
|
|
37
|
+
readonly className?: string_css_class;
|
|
38
|
+
/**
|
|
39
|
+
* Optional CSS style which will be added to root element
|
|
40
|
+
*/
|
|
41
|
+
readonly style?: CSSProperties;
|
|
42
|
+
/**
|
|
43
|
+
* Is the writing textarea automatically focused?
|
|
44
|
+
*
|
|
45
|
+
* @default false (to prevent focus being stolen when widget loads)
|
|
46
|
+
*/
|
|
47
|
+
readonly isFocusedOnLoad?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Use iframe instead of implementing the chat directly
|
|
50
|
+
*
|
|
51
|
+
* When `true`, the chat will be rendered in an iframe pointing to the agent's chat endpoint.
|
|
52
|
+
* When `false`, the chat will be rendered directly using React components.
|
|
53
|
+
*
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
readonly isIframeUsed?: boolean;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Renders a floating agent button that opens a chat window with the remote agent.
|
|
60
|
+
*
|
|
61
|
+
* @public exported from `@promptbook/components`
|
|
62
|
+
*/
|
|
63
|
+
export declare function PromptbookAgentIntegration(props: PromptbookAgentIntegrationProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* TODO: !!! Load the full branding
|
|
66
|
+
* TODO: !!! <promptbook-agent> element
|
|
67
|
+
*/
|
package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PromptbookAgentIntegrationProps } from './PromptbookAgentIntegration';
|
|
2
|
+
type PromptbookAgentSeamlessIntegrationProps = Omit<PromptbookAgentIntegrationProps, 'formfactor'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Use iframe instead of implementing the chat directly
|
|
5
|
+
*
|
|
6
|
+
* When `true`, the chat will be rendered in an iframe pointing to the agent's chat endpoint.
|
|
7
|
+
* When `false`, the chat will be rendered directly using React components.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
readonly isIframeUsed?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Renders a floating agent button that opens a chat window with the remote agent.
|
|
15
|
+
*
|
|
16
|
+
* @private component of PromptbookAgentIntegration
|
|
17
|
+
*/
|
|
18
|
+
export declare function PromptbookAgentSeamlessIntegration(props: PromptbookAgentSeamlessIntegrationProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
/**
|
|
21
|
+
* TODO: !!! Load the full branding
|
|
22
|
+
* TODO: !!! <promptbook-agent> element
|
|
23
|
+
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { 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 type { 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 {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type HamburgerMenuProps = {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @@@
|
|
8
|
+
*
|
|
9
|
+
* @private Internal component
|
|
10
|
+
*/
|
|
11
|
+
export declare function HamburgerMenu({ isOpen, onClick, className }: HamburgerMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
|
-
* @private internal subcomponent
|
|
4
|
+
* @private internal subcomponent used by various components
|
|
5
5
|
*/
|
|
6
6
|
export declare function Modal({ children, onClose, className, }: {
|
|
7
7
|
children: ReactNode;
|
|
@@ -9,5 +9,5 @@ export declare function Modal({ children, onClose, className, }: {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
}): import("react").ReactPortal;
|
|
11
11
|
/**
|
|
12
|
-
* TODO:
|
|
12
|
+
* TODO: Use this also for feedback modal in Chat component - Make modals DRY
|
|
13
13
|
*/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type TooltipProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The content to display in the tooltip
|
|
5
|
+
*/
|
|
6
|
+
content: string;
|
|
7
|
+
/**
|
|
8
|
+
* The element that triggers the tooltip
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The position of the tooltip relative to the trigger element
|
|
13
|
+
* @default "top"
|
|
14
|
+
*/
|
|
15
|
+
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
16
|
+
/**
|
|
17
|
+
* Optional delay before showing the tooltip (in milliseconds)
|
|
18
|
+
* @default 0
|
|
19
|
+
*/
|
|
20
|
+
delay?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Render the tooltip wrapper as a block-level element that spans full width.
|
|
23
|
+
* Useful when wrapping grid/list items so the clickable area matches the visual card.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
block?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Enable tooltip on touch devices. By default tooltips are disabled on touch to avoid
|
|
29
|
+
* stealing clicks from the underlying element (eg. agent card selection).
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
isEnabledOnTouch?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* If true, the tooltip will not be displayed but the content will still be rendered.
|
|
35
|
+
* In this case <Tooltip> is equivalent to a <React.Fragment> with the content.
|
|
36
|
+
*
|
|
37
|
+
* Note: Tooltip sometimes breaks the hover, temporarily disable via this prop
|
|
38
|
+
*/
|
|
39
|
+
isDisabled?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A tooltip component that displays additional information when hovering over an element
|
|
43
|
+
*
|
|
44
|
+
* @private Used internally in book components
|
|
45
|
+
*/
|
|
46
|
+
export declare function Tooltip({ content, children, position, delay, block, isEnabledOnTouch: enableOnTouch, isDisabled, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type CameraIconProps = {
|
|
2
|
+
size?: number;
|
|
3
|
+
color?: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* @@@
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/components`
|
|
9
|
+
*/
|
|
10
|
+
export declare function CameraIcon({ size, color }: CameraIconProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @@@
|
|
4
|
+
*
|
|
5
|
+
* @private internal subcomponent used by various components
|
|
6
|
+
*/
|
|
7
|
+
export declare function MenuIcon(props: SVGProps<SVGSVGElement> & {
|
|
8
|
+
size?: number;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* TODO: !!! Mark all components to not be used outside of browser
|
|
12
|
+
*/
|