@epam/ai-dial-chat-shared 1.3.0-dev.10 → 1.3.0-dev.103
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/components/ConfirmationDialog/ConfirmationDialog.d.ts +41 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.js +3 -1
- package/components/ConfirmationView/ConfirmationView.d.ts +57 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.js +15 -14
- package/components/CopyButton/CopyButton.d.ts +19 -0
- package/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.js +34 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.js +37 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +6 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
- package/components/EntityHeader/EntityHeader.d.ts +38 -0
- package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/components/EntityHeader/EntityHeader.js +1 -1
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
- package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts +15 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.d.ts +40 -0
- package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.js +4 -1
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +55 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +25 -25
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts +66 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.js +14 -12
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +139 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.js +140 -133
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +1 -1
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/PlainTextRenderer.js +1 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +3 -3
- package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.js +18 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts +22 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.d.ts +33 -0
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.js +27 -17
- package/constants/breakpoint.d.ts +9 -0
- package/constants/breakpoint.d.ts.map +1 -0
- package/constants/dial.d.ts +5 -0
- package/constants/dial.d.ts.map +1 -0
- package/constants/entity-colors.d.ts +6 -0
- package/constants/entity-colors.d.ts.map +1 -0
- package/constants/icon.d.ts +14 -0
- package/constants/icon.d.ts.map +1 -0
- package/constants/markdown-editor.d.ts +2 -0
- package/constants/markdown-editor.d.ts.map +1 -0
- package/constants/mime-types.d.ts +27 -0
- package/constants/mime-types.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +13 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/constants/resizable-fields.d.ts +5 -0
- package/constants/resizable-fields.d.ts.map +1 -0
- package/constants/select-list.d.ts +4 -0
- package/constants/select-list.d.ts.map +1 -0
- package/constants/tag-input.d.ts +2 -0
- package/constants/tag-input.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +5 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/markdown.d.ts +19 -0
- package/entry-points/markdown.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +58 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +193 -190
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +2 -1
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +1 -1
- package/file-manager/attach-result.d.ts +9 -0
- package/file-manager/attach-result.d.ts.map +1 -0
- package/file-manager/file-manager-controller.d.ts +121 -0
- package/file-manager/file-manager-controller.d.ts.map +1 -0
- package/file-manager/file-manager-variant.d.ts +21 -0
- package/file-manager/file-manager-variant.d.ts.map +1 -0
- package/file-manager/file-upload-validation.d.ts +8 -0
- package/file-manager/file-upload-validation.d.ts.map +1 -0
- package/file-manager/index.d.ts +10 -0
- package/file-manager/index.d.ts.map +1 -0
- package/file-manager/labels.d.ts +158 -0
- package/file-manager/labels.d.ts.map +1 -0
- package/file-manager/path.d.ts +12 -0
- package/file-manager/path.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +29 -0
- package/file-manager/upload-batch.d.ts.map +1 -0
- package/file-manager/upload-queue.d.ts +5 -0
- package/file-manager/upload-queue.d.ts.map +1 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
- package/file-manager.d.ts +2 -506
- package/hooks/useAvailableHeightCap.d.ts +30 -0
- package/hooks/useAvailableHeightCap.d.ts.map +1 -0
- package/hooks/useCodeCopy.d.ts +6 -0
- package/hooks/useCodeCopy.d.ts.map +1 -0
- package/hooks/useCollapsedText.d.ts +27 -0
- package/hooks/useCollapsedText.d.ts.map +1 -0
- package/hooks/useHorizontalOverflow.d.ts +21 -0
- package/hooks/useHorizontalOverflow.d.ts.map +1 -0
- package/hooks/useIsMobile.d.ts +3 -0
- package/hooks/useIsMobile.d.ts.map +1 -0
- package/hooks/useStreamedMarkdownContent.d.ts +3 -0
- package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
- package/hooks/useTextRefinement.d.ts +44 -0
- package/hooks/useTextRefinement.d.ts.map +1 -0
- package/hooks/useUnsavedChangesGuard.d.ts +14 -0
- package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/index.css +3 -2
- package/index.d.ts +79 -3072
- package/index.d.ts.map +1 -0
- package/index.js +68 -64
- package/markdown.d.ts +2 -465
- package/markdown.js +3 -2
- package/models/annotation.d.ts +143 -0
- package/models/annotation.d.ts.map +1 -0
- package/models/application-visualizer.d.ts +67 -0
- package/models/application-visualizer.d.ts.map +1 -0
- package/models/auth.d.ts +26 -0
- package/models/auth.d.ts.map +1 -0
- package/models/chat.d.ts +407 -0
- package/models/chat.d.ts.map +1 -0
- package/models/conversation-classification.d.ts +9 -0
- package/models/conversation-classification.d.ts.map +1 -0
- package/models/conversation-transfer.d.ts +96 -0
- package/models/conversation-transfer.d.ts.map +1 -0
- package/models/custom-visualizer.d.ts +61 -0
- package/models/custom-visualizer.d.ts.map +1 -0
- package/models/deployment-configuration.d.ts +55 -0
- package/models/deployment-configuration.d.ts.map +1 -0
- package/models/deployment-features.d.ts +17 -0
- package/models/deployment-features.d.ts.map +1 -0
- package/models/deployment.d.ts +31 -0
- package/models/deployment.d.ts.map +1 -0
- package/models/dial-model.d.ts +19 -0
- package/models/dial-model.d.ts.map +1 -0
- package/models/entity.d.ts +15 -0
- package/models/entity.d.ts.map +1 -0
- package/models/import-export.d.ts +23 -0
- package/models/import-export.d.ts.map +1 -0
- package/models/inline-segment.d.ts +11 -0
- package/models/inline-segment.d.ts.map +1 -0
- package/models/locale.d.ts +19 -0
- package/models/locale.d.ts.map +1 -0
- package/models/text-refinement.d.ts +18 -0
- package/models/text-refinement.d.ts.map +1 -0
- package/models/theme.d.ts +36 -0
- package/models/theme.d.ts.map +1 -0
- package/models/tool-menu-item.d.ts +13 -0
- package/models/tool-menu-item.d.ts.map +1 -0
- package/package.json +3 -3
- package/types/attachment.d.ts +25 -0
- package/types/attachment.d.ts.map +1 -0
- package/types/code-editor.d.ts +8 -0
- package/types/code-editor.d.ts.map +1 -0
- package/types/entity-type.d.ts +10 -0
- package/types/entity-type.d.ts.map +1 -0
- package/types/file-manager-node.d.ts +17 -0
- package/types/file-manager-node.d.ts.map +1 -0
- package/types/mime-type.d.ts +59 -0
- package/types/mime-type.d.ts.map +1 -0
- package/utils/annotation.d.ts +29 -0
- package/utils/annotation.d.ts.map +1 -0
- package/utils/avatar-color.d.ts +10 -0
- package/utils/avatar-color.d.ts.map +1 -0
- package/utils/base64-json.d.ts +14 -0
- package/utils/base64-json.d.ts.map +1 -0
- package/utils/base64-json.js +4 -0
- package/utils/build-css-vars.d.ts +4 -0
- package/utils/build-css-vars.d.ts.map +1 -0
- package/utils/copy-to-clipboard.d.ts +18 -0
- package/utils/copy-to-clipboard.d.ts.map +1 -0
- package/utils/entity-field-limits.d.ts +11 -0
- package/utils/entity-field-limits.d.ts.map +1 -0
- package/utils/entity-type.d.ts +5 -0
- package/utils/entity-type.d.ts.map +1 -0
- package/utils/file-download.d.ts +21 -0
- package/utils/file-download.d.ts.map +1 -0
- package/utils/format-file-size.d.ts +3 -0
- package/utils/format-file-size.d.ts.map +1 -0
- package/utils/format-last-used.d.ts +3 -0
- package/utils/format-last-used.d.ts.map +1 -0
- package/utils/format-price.d.ts +7 -0
- package/utils/format-price.d.ts.map +1 -0
- package/utils/generate-uuid.d.ts +3 -0
- package/utils/generate-uuid.d.ts.map +1 -0
- package/utils/initials.d.ts +3 -0
- package/utils/initials.d.ts.map +1 -0
- package/utils/inline-segments.d.ts +38 -0
- package/utils/inline-segments.d.ts.map +1 -0
- package/utils/inline-segments.js +53 -0
- package/utils/is-audio-transcription-supported.d.ts +3 -0
- package/utils/is-audio-transcription-supported.d.ts.map +1 -0
- package/utils/is-skill-selection-unsupported.d.ts +3 -0
- package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
- package/utils/latex.d.ts +21 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/markdown-html.d.ts +14 -0
- package/utils/markdown-html.d.ts.map +1 -0
- package/utils/markdown-html.js +11 -0
- package/utils/merge-class.d.ts +4 -0
- package/utils/merge-class.d.ts.map +1 -0
- package/utils/message-attachment-to-display.d.ts +22 -0
- package/utils/message-attachment-to-display.d.ts.map +1 -0
- package/utils/message.d.ts +4 -0
- package/utils/message.d.ts.map +1 -0
- package/utils/mime-type.d.ts +22 -0
- package/utils/mime-type.d.ts.map +1 -0
- package/utils/prompt-variables.d.ts +62 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/string-utils.d.ts +11 -0
- package/utils/string-utils.d.ts.map +1 -0
- package/utils/syntax-highlighting.d.ts +8 -0
- package/utils/syntax-highlighting.d.ts.map +1 -0
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAClC,cAAc,0CAA0C,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,oCAAoC,CAAC;AACnD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,gEAAgE,CAAC;AAC/E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,gEAAgE,CAAC;AAC/E,cAAc,iDAAiD,CAAC;AAChE,cAAc,sDAAsD,CAAC;AACrE,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAY/C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC"}
|
package/index.js
CHANGED
|
@@ -9,67 +9,71 @@ import { CodeBlockTheme as v } from "./types/code-editor.js";
|
|
|
9
9
|
import { MIME_TYPE_ALIASES as y, MIME_TYPE_AUDIO_PREFIX as b, MIME_TYPE_EXT_MAP as x, MIME_TYPE_WILDCARD as S } from "./constants/mime-types.js";
|
|
10
10
|
import { getAttachmentTypeFromMime as C, getBaseMimeType as w, inferMimeTypeFromPath as T, normalizeMimeType as E, stripUrlQueryAndFragment as D } from "./utils/mime-type.js";
|
|
11
11
|
import { isAnnotationSelector as O, normalizePersistedHtmlTagAttachmentType as k, normalizeRawAnnotations as A } from "./utils/annotation.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
|
|
12
|
+
import { decodeJsonFromBase64 as j, encodeJsonToBase64 as M } from "./utils/base64-json.js";
|
|
13
|
+
import { PROHIBITED_CONVERSATION_NAME_CHARS_RE as N, getUtf8ByteLength as P, sanitizeConversationName as F, stripTrailingDots as I, truncateToUtf8Bytes as L } from "./utils/string-utils.js";
|
|
14
|
+
import { ENTITY_DESCRIPTION_MAX_LENGTH as R, ENTITY_INSTRUCTIONS_MAX_LENGTH as z, ENTITY_NAME_MAX_LENGTH as B, exceedsMaxLength as V, hasControlCharacters as H } from "./utils/entity-field-limits.js";
|
|
15
|
+
import { mergeClasses as U } from "./utils/merge-class.js";
|
|
16
|
+
import { buildCssVars as W } from "./utils/build-css-vars.js";
|
|
17
|
+
import { isStatusMessage as G } from "./utils/message.js";
|
|
18
|
+
import { messageAttachmentToDisplayAttachment as K, messageAttachmentsToDisplayAttachments as q } from "./utils/message-attachment-to-display.js";
|
|
19
|
+
import { isAudioTranscriptionSupported as J } from "./utils/is-audio-transcription-supported.js";
|
|
20
|
+
import { copyMarkdownAsRichText as Y, copyToClipboard as X, markdownToRichTextHtml as Z } from "./utils/copy-to-clipboard.js";
|
|
21
|
+
import { formatLastUsed as Q } from "./utils/format-last-used.js";
|
|
22
|
+
import { formatFileSize as $ } from "./utils/format-file-size.js";
|
|
23
|
+
import { formatCost as ee, formatPrice as te, formatUnitPrice as ne } from "./utils/format-price.js";
|
|
24
|
+
import { base64ToBlob as re, downloadTextFile as ie, ensureDownloadFilename as ae, getFileExtensionForLanguage as oe, triggerAnchorDownload as se, triggerBlobDownload as ce, tryBase64ToBytes as le } from "./utils/file-download.js";
|
|
25
|
+
import { isSyntaxHighlightingAllowed as ue } from "./utils/syntax-highlighting.js";
|
|
26
|
+
import { ENTITY_TYPE_BG_COLOR as de, ENTITY_TYPE_COLOR as fe } from "./constants/entity-colors.js";
|
|
27
|
+
import { PROMPT_PARAM_DEFAULT_SEPARATOR as pe, PROMPT_PARAM_PATTERN as me, PROMPT_VARIABLE_CLASS_NAME as he, buildPromptParamDefaults as ge, extractPromptParams as _e, rehypePromptVariables as ve, resolvePromptParams as ye } from "./utils/prompt-variables.js";
|
|
28
|
+
import { generateUUID as be } from "./utils/generate-uuid.js";
|
|
29
|
+
import { BASE_LG_ICON_PROPS as xe, BASE_MD_ICON_PROPS as Se } from "./constants/icon.js";
|
|
30
|
+
import { HIDDEN_FILE as Ce, PUBLIC_BUCKET as we } from "./constants/dial.js";
|
|
31
|
+
import { TAG_INPUT_TAG_CLASS_NAME as Te } from "./constants/tag-input.js";
|
|
32
|
+
import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as Ee, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as De, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as Oe, RESIZABLE_TEXTAREA_CLASS_NAME as ke } from "./constants/resizable-fields.js";
|
|
33
|
+
import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as Ae } from "./constants/markdown-editor.js";
|
|
34
|
+
import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as je, SELECT_LIST_MAX_HEIGHT_PX as Me } from "./constants/select-list.js";
|
|
35
|
+
import { DESKTOP_BREAKPOINT_PX as Ne, DESKTOP_MEDIA_QUERY as Pe, MOBILE_MAX_WIDTH_PX as Fe, MOBILE_MEDIA_QUERY as Ie } from "./constants/breakpoint.js";
|
|
36
|
+
import { InitialsAvatar as Le } from "./components/InitialsAvatar/InitialsAvatar.js";
|
|
37
|
+
import { DeploymentIcon as Re } from "./components/DeploymentIcon/DeploymentIcon.js";
|
|
38
|
+
import { CopyButton as ze, CopyIconButton as Be } from "./components/CopyButton/CopyButton.js";
|
|
39
|
+
import { extractInitials as Ve } from "./utils/initials.js";
|
|
40
|
+
import { pickAvatarColor as He } from "./utils/avatar-color.js";
|
|
41
|
+
import { PanelEmptyState as Ue } from "./components/PanelEmptyState/PanelEmptyState.js";
|
|
42
|
+
import { ItemHeader as We } from "./components/ItemHeader/ItemHeader.js";
|
|
43
|
+
import { EntityTypeLabel as Ge } from "./components/EntityTypeLabel/EntityTypeLabel.js";
|
|
44
|
+
import { FeaturedChip as Ke } from "./components/FeaturedChip/FeaturedChip.js";
|
|
45
|
+
import { EntityHeader as qe } from "./components/EntityHeader/EntityHeader.js";
|
|
46
|
+
import { ResourceSummary as Je } from "./components/ResourceSummary/ResourceSummary.js";
|
|
47
|
+
import { ConfirmationIdentityCard as Ye } from "./components/ConfirmationIdentityCard/ConfirmationIdentityCard.js";
|
|
48
|
+
import { ConfirmationIdentityRow as Xe } from "./components/ConfirmationIdentityRow/ConfirmationIdentityRow.js";
|
|
49
|
+
import { ConfirmationView as Ze } from "./components/ConfirmationView/ConfirmationView.js";
|
|
50
|
+
import { ConfirmationFooter as Qe } from "./components/ConfirmationView/ConfirmationFooter.js";
|
|
51
|
+
import { ConfirmationDialog as $e } from "./components/ConfirmationDialog/ConfirmationDialog.js";
|
|
52
|
+
import { DELETE_CONFIRMATION_MAX_LISTED_NAMES as et, DeleteConfirmationView as tt } from "./components/DeleteConfirmationView/DeleteConfirmationView.js";
|
|
53
|
+
import { DeleteConfirmationDialog as nt } from "./components/DeleteConfirmationDialog/DeleteConfirmationDialog.js";
|
|
54
|
+
import { TableHeader as rt } from "./components/MarkdownRenderer/Table/TableHeader.js";
|
|
55
|
+
import { TextRefinementState as it, useTextRefinement as at } from "./hooks/useTextRefinement.js";
|
|
56
|
+
import { TextRefinementField as ot } from "./components/TextRefinementField/TextRefinementField.js";
|
|
57
|
+
import { CHAT_SHARED_CLASS as st } from "./constants/public-class-names.js";
|
|
58
|
+
import { useCodeCopy as ct } from "./hooks/useCodeCopy.js";
|
|
59
|
+
import { restrainedSyntaxTheme as lt } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
|
|
60
|
+
import { MarkdownCodeBlock as ut } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
|
|
61
|
+
import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as dt, MARKDOWN_TABLE_CSV_MIME_TYPE as ft, MarkdownTableCopyFormat as pt, serializeMarkdownTableRows as mt } from "./components/MarkdownRenderer/Table/table-serialization.js";
|
|
62
|
+
import { MarkdownTable as ht } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
|
|
63
|
+
import { MarkdownRenderer as gt, defaultMarkdownComponents as _t } from "./components/MarkdownRenderer/MarkdownRenderer.js";
|
|
64
|
+
import { COMPACT_MARKDOWN_CLASS_NAMES as vt, DEFAULT_MARKDOWN_CLASS_NAMES as yt } from "./components/MarkdownRenderer/markdown-class-names.js";
|
|
65
|
+
import { PlainTextRenderer as bt } from "./components/MarkdownRenderer/PlainTextRenderer.js";
|
|
66
|
+
import { MDMessageViewer as xt } from "./components/MarkdownRenderer/MDMessageViewer.js";
|
|
67
|
+
import { MarkdownWithPlaceholders as St } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
|
|
68
|
+
import { buildInlineSegmentSource as Ct, createInlineSegmentComponents as wt, createRehypeInlineSegments as Tt } from "./utils/inline-segments.js";
|
|
69
|
+
import { useCollapsedText as Et } from "./hooks/useCollapsedText.js";
|
|
70
|
+
import { useAvailableHeightCap as Dt } from "./hooks/useAvailableHeightCap.js";
|
|
71
|
+
import { useIsMobile as Ot } from "./hooks/useIsMobile.js";
|
|
72
|
+
import { useUnsavedChangesGuard as kt } from "./hooks/useUnsavedChangesGuard.js";
|
|
73
|
+
import { DialFileManagerActionProfile as At, DialFileManagerVariant as jt } from "./file-manager/file-manager-variant.js";
|
|
74
|
+
import { getParentFolderPath as Mt, isHiddenPath as Nt } from "./file-manager/path.js";
|
|
75
|
+
import { FileUploadStatus as Pt, isUploadInProgress as Ft } from "./file-manager/upload-batch.js";
|
|
76
|
+
import { useGridEditingScroll as It } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
|
|
77
|
+
import { OperationLoaderModal as Lt } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
|
|
78
|
+
import { isSkillSelectionUnsupported as Rt } from "./utils/is-skill-selection-unsupported.js";
|
|
79
|
+
export { p as AttachmentErrorReason, m as AttachmentType, xe as BASE_LG_ICON_PROPS, Se as BASE_MD_ICON_PROPS, o as BackgroundGenerationStatus, st as CHAT_SHARED_CLASS, vt as COMPACT_MARKDOWN_CLASS_NAMES, h as CatalogEntityType, v as CodeBlockTheme, $e as ConfirmationDialog, Qe as ConfirmationFooter, Ye as ConfirmationIdentityCard, Xe as ConfirmationIdentityRow, Ze as ConfirmationView, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, ze as CopyButton, Be as CopyIconButton, yt as DEFAULT_MARKDOWN_CLASS_NAMES, dt as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, et as DELETE_CONFIRMATION_MAX_LISTED_NAMES, Ne as DESKTOP_BREAKPOINT_PX, Pe as DESKTOP_MEDIA_QUERY, nt as DeleteConfirmationDialog, tt as DeleteConfirmationView, Re as DeploymentIcon, At as DialFileManagerActionProfile, jt as DialFileManagerVariant, R as ENTITY_DESCRIPTION_MAX_LENGTH, z as ENTITY_INSTRUCTIONS_MAX_LENGTH, B as ENTITY_NAME_MAX_LENGTH, de as ENTITY_TYPE_BG_COLOR, fe as ENTITY_TYPE_COLOR, qe as EntityHeader, Ge as EntityTypeLabel, Ke as FeaturedChip, g as FileExtension, Pt as FileUploadStatus, a as FilterTab, Ce as HIDDEN_FILE, Le as InitialsAvatar, We as ItemHeader, Ee as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, De as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, Ae as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, ft as MARKDOWN_TABLE_CSV_MIME_TYPE, xt as MDMessageViewer, _ as MIMEType, y as MIME_TYPE_ALIASES, b as MIME_TYPE_AUDIO_PREFIX, x as MIME_TYPE_EXT_MAP, S as MIME_TYPE_WILDCARD, Fe as MOBILE_MAX_WIDTH_PX, Ie as MOBILE_MEDIA_QUERY, ut as MarkdownCodeBlock, gt as MarkdownRenderer, ht as MarkdownTable, pt as MarkdownTableCopyFormat, St as MarkdownWithPlaceholders, s as MessageRating, c as MessageRole, Lt as OperationLoaderModal, N as PROHIBITED_CONVERSATION_NAME_CHARS_RE, pe as PROMPT_PARAM_DEFAULT_SEPARATOR, me as PROMPT_PARAM_PATTERN, he as PROMPT_VARIABLE_CLASS_NAME, we as PUBLIC_BUCKET, Ue as PanelEmptyState, bt as PlainTextRenderer, Oe as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, ke as RESIZABLE_TEXTAREA_CLASS_NAME, l as RequestStatus, Je as ResourceSummary, f as ResponseFormat, je as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, Me as SELECT_LIST_MAX_HEIGHT_PX, u as StageStatus, d as StatusEvent, Te as TAG_INPUT_TAG_CLASS_NAME, rt as TableHeader, ot as TextRefinementField, it as TextRefinementState, re as base64ToBlob, W as buildCssVars, Ct as buildInlineSegmentSource, ge as buildPromptParamDefaults, Y as copyMarkdownAsRichText, X as copyToClipboard, wt as createInlineSegmentComponents, Tt as createRehypeInlineSegments, j as decodeJsonFromBase64, _t as defaultMarkdownComponents, ie as downloadTextFile, M as encodeJsonToBase64, ae as ensureDownloadFilename, V as exceedsMaxLength, Ve as extractInitials, _e as extractPromptParams, ee as formatCost, $ as formatFileSize, Q as formatLastUsed, te as formatPrice, ne as formatUnitPrice, be as generateUUID, C as getAttachmentTypeFromMime, w as getBaseMimeType, oe as getFileExtensionForLanguage, Mt as getParentFolderPath, P as getUtf8ByteLength, H as hasControlCharacters, T as inferMimeTypeFromPath, O as isAnnotationSelector, J as isAudioTranscriptionSupported, Nt as isHiddenPath, Rt as isSkillSelectionUnsupported, G as isStatusMessage, ue as isSyntaxHighlightingAllowed, Ft as isUploadInProgress, Z as markdownToRichTextHtml, U as mergeClasses, K as messageAttachmentToDisplayAttachment, q as messageAttachmentsToDisplayAttachments, E as normalizeMimeType, k as normalizePersistedHtmlTagAttachmentType, A as normalizeRawAnnotations, He as pickAvatarColor, ve as rehypePromptVariables, ye as resolvePromptParams, lt as restrainedSyntaxTheme, F as sanitizeConversationName, mt as serializeMarkdownTableRows, I as stripTrailingDots, D as stripUrlQueryAndFragment, se as triggerAnchorDownload, ce as triggerBlobDownload, L as truncateToUtf8Bytes, le as tryBase64ToBytes, Dt as useAvailableHeightCap, ct as useCodeCopy, Et as useCollapsedText, It as useGridEditingScroll, Ot as useIsMobile, at as useTextRefinement, kt as useUnsavedChangesGuard };
|
package/markdown.d.ts
CHANGED
|
@@ -1,465 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { FC } from 'react';
|
|
4
|
-
import { Options } from 'react-markdown';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
|
-
|
|
7
|
-
export declare const CHAT_SHARED_CLASS: {
|
|
8
|
-
/** The bordered container of a fenced code block. */
|
|
9
|
-
readonly codeBlock: "dial-chat-shared-code-block";
|
|
10
|
-
/** The code block's sticky header, holding the language label and actions. */
|
|
11
|
-
readonly codeBlockHeader: "dial-chat-shared-code-block-header";
|
|
12
|
-
/** The bordered container of a Markdown table. */
|
|
13
|
-
readonly table: "dial-chat-shared-table";
|
|
14
|
-
/** The scrolling box around a Markdown table, which owns its overflow. */
|
|
15
|
-
readonly tableScroll: "dial-chat-shared-table-scroll";
|
|
16
|
-
/** The scrolling box around a display-math block. */
|
|
17
|
-
readonly mathBlock: "dial-chat-shared-math-block";
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** Color theme for syntax highlighting. */
|
|
21
|
-
declare enum CodeBlockTheme {
|
|
22
|
-
/** Dark syntax-highlighting theme. */
|
|
23
|
-
Dark = "dark",
|
|
24
|
-
/** Light syntax-highlighting theme. */
|
|
25
|
-
Light = "light"
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* {@link DEFAULT_MARKDOWN_CLASS_NAMES} with the body copy one step down the
|
|
30
|
-
* type scale. Headings, code, and tables are unchanged — only the text that
|
|
31
|
-
* dominates a long answer shrinks, so more of it fits on a narrow viewport.
|
|
32
|
-
*/
|
|
33
|
-
export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
34
|
-
|
|
35
|
-
/** Default typography classNames for rendering markdown with full visual hierarchy. */
|
|
36
|
-
export declare const DEFAULT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
37
|
-
|
|
38
|
-
/** Default filename used when downloading a Markdown table as CSV. */
|
|
39
|
-
export declare const DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME = "table.csv";
|
|
40
|
-
|
|
41
|
-
export declare const defaultMarkdownComponents: Components;
|
|
42
|
-
|
|
43
|
-
/** MIME type used when downloading a Markdown table as CSV. */
|
|
44
|
-
export declare const MARKDOWN_TABLE_CSV_MIME_TYPE = "text/csv;charset=utf-8";
|
|
45
|
-
|
|
46
|
-
/** Renders a fenced or multi-line code block with syntax highlighting and a copy button. */
|
|
47
|
-
export declare const MarkdownCodeBlock: FC<MarkdownCodeBlockProps>;
|
|
48
|
-
|
|
49
|
-
/** CSS custom-property overrides for the `MarkdownCodeBlock` component. */
|
|
50
|
-
export declare interface MarkdownCodeBlockColors {
|
|
51
|
-
/** Container background color. */
|
|
52
|
-
background?: string;
|
|
53
|
-
/** Container/header border color. */
|
|
54
|
-
border?: string;
|
|
55
|
-
/** Header background color. */
|
|
56
|
-
headerBackground?: string;
|
|
57
|
-
/** Language label text color. */
|
|
58
|
-
language?: string;
|
|
59
|
-
/** Copy button icon color once copied. */
|
|
60
|
-
copied?: string;
|
|
61
|
-
/** Scrollbar thumb/track color. */
|
|
62
|
-
scrollbar?: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/** Props for {@link MarkdownCodeBlock}. */
|
|
66
|
-
export declare interface MarkdownCodeBlockProps {
|
|
67
|
-
/** Detected language from the fenced code block. Empty string for language-less blocks. */
|
|
68
|
-
language: string;
|
|
69
|
-
/** Raw code value with trailing newline stripped. */
|
|
70
|
-
value: string;
|
|
71
|
-
/** When true, the copy button is hidden (streaming in progress). */
|
|
72
|
-
isStreaming?: boolean;
|
|
73
|
-
/** Color theme for syntax highlighting. Defaults to `'dark'`. */
|
|
74
|
-
theme?: CodeBlockTheme;
|
|
75
|
-
/** Accessible label for the copy button. Defaults to `'Copy code'`. */
|
|
76
|
-
copyLabel?: string;
|
|
77
|
-
/** Message announced through the block's `aria-live="polite"` region after a copy completes. The copy button's own accessible name stays `copyLabel`. Defaults to `'Copied!'`. */
|
|
78
|
-
copiedLabel?: string;
|
|
79
|
-
/** Accessible label for the download button. Defaults to `'Download code'`. */
|
|
80
|
-
downloadLabel?: string;
|
|
81
|
-
/** When true, hides the download button while still showing copy. Defaults to `false`. */
|
|
82
|
-
hideDownload?: boolean;
|
|
83
|
-
/** Extra classes applied to the outer container element. */
|
|
84
|
-
containerClassName?: string;
|
|
85
|
-
/** Extra classes applied to the sticky header bar. */
|
|
86
|
-
headerClassName?: string;
|
|
87
|
-
/** Typography class for the `<code>` element (used when no language is detected). Defaults to `'dial-code-text'`. */
|
|
88
|
-
codeClassName?: string;
|
|
89
|
-
/** CSS class applied to the language label in the header. Defaults to `'dial-tiny-lead-semi-text'` plus the module's `.languageLabel` class (`--text-secondary`). */
|
|
90
|
-
languageLabelClassName?: string;
|
|
91
|
-
/** Header text shown in place of `language`, for blocks whose highlighting id is not the name to display (e.g. `bash` highlighted, `cURL` shown). Defaults to the `language` value. */
|
|
92
|
-
title?: string;
|
|
93
|
-
/** Custom content rendered in the header in place of the plain label, e.g. a language/endpoint select. Defaults to the plain label text. */
|
|
94
|
-
titleSlot?: ReactNode;
|
|
95
|
-
/** Color overrides applied as CSS custom properties. */
|
|
96
|
-
colors?: MarkdownCodeBlockColors;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/** Markdown renderer with GFM support. Styling is driven by `classNames`; structural overrides via `components`. */
|
|
100
|
-
export declare const MarkdownRenderer: FC<MarkdownRendererProps>;
|
|
101
|
-
|
|
102
|
-
/** Per-element className overrides passed to {@link MarkdownRenderer}. */
|
|
103
|
-
export declare interface MarkdownRendererClassNames extends MarkdownTableClassNames {
|
|
104
|
-
/** Class on `<h1>`. */
|
|
105
|
-
h1?: string;
|
|
106
|
-
/** Class on `<h2>`. */
|
|
107
|
-
h2?: string;
|
|
108
|
-
/** Class on `<h3>`. */
|
|
109
|
-
h3?: string;
|
|
110
|
-
/** Class on `<h4>`. */
|
|
111
|
-
h4?: string;
|
|
112
|
-
/** Class on `<h5>`. */
|
|
113
|
-
h5?: string;
|
|
114
|
-
/** Class on `<h6>`. */
|
|
115
|
-
h6?: string;
|
|
116
|
-
/** Classes on `<p>` elements. */
|
|
117
|
-
p?: string;
|
|
118
|
-
/** Extra classes on `<ul>` (base: `list-disc ps-[2em]`). */
|
|
119
|
-
ul?: string;
|
|
120
|
-
/** Extra classes on `<ol>` (base: `list-decimal ps-[2em]`). */
|
|
121
|
-
ol?: string;
|
|
122
|
-
/** Typography class for `<strong>`. Defaults to `'dial-body-paragraph-semi-text'` — the semibold step matching the default `p` class. */
|
|
123
|
-
strong?: string;
|
|
124
|
-
/** Typography class for `<em>`. Defaults to `'italic'`. */
|
|
125
|
-
em?: string;
|
|
126
|
-
/** Extra classes on the {@link MarkdownCodeBlock} outer container. */
|
|
127
|
-
codeBlockContainer?: string;
|
|
128
|
-
/** Extra classes on the {@link MarkdownCodeBlock} header bar. */
|
|
129
|
-
codeBlockHeader?: string;
|
|
130
|
-
/** Typography class for the `<code>` element inside a code block. Defaults to `'dial-code-text'`. */
|
|
131
|
-
codeFont?: string;
|
|
132
|
-
/** Extra classes on inline `<code>` (base: `rounded px-1 py-0.5`). */
|
|
133
|
-
codeInline?: string;
|
|
134
|
-
/** Typography class for inline `<code>`. Defaults to `'dial-code-text'`. */
|
|
135
|
-
codeInlineFont?: string;
|
|
136
|
-
/** Extra classes on `<blockquote>` (base uses a logical start border and padding). */
|
|
137
|
-
blockquote?: string;
|
|
138
|
-
/** Extra classes on `<a>` (base uses the accent text color and an offset underline). */
|
|
139
|
-
link?: string;
|
|
140
|
-
/** Extra classes on `<hr>` separators. */
|
|
141
|
-
hr?: string;
|
|
142
|
-
/** Extra classes on deleted text rendered by GFM. */
|
|
143
|
-
del?: string;
|
|
144
|
-
/** Extra classes on `<th>` and `<td>` (base includes borders, spacing, and text wrapping). */
|
|
145
|
-
tableCell?: string;
|
|
146
|
-
/** Extra classes on `<td>` only (applied before `tableCell`, e.g. a body-cell background). */
|
|
147
|
-
tableBodyCell?: string;
|
|
148
|
-
/** Extra classes on `<th>` only (applied alongside `tableCell`). */
|
|
149
|
-
tableHeader?: string;
|
|
150
|
-
/** Typography class for `<th>` cells. Defaults to `'dial-tiny-lead-semi-text'`. Text color is set separately via `colors.tableHeaderText`. */
|
|
151
|
-
tableHeaderFont?: string;
|
|
152
|
-
/** Extra classes on the scrollable wrapper around block (display) LaTeX formulas. */
|
|
153
|
-
mathBlock?: string;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/** CSS custom-property overrides for the `MarkdownRenderer` component. */
|
|
157
|
-
export declare interface MarkdownRendererColors {
|
|
158
|
-
/** Primary color of the "thinking" shimmer gradient. */
|
|
159
|
-
thinkingPrimary?: string;
|
|
160
|
-
/** Secondary color of the "thinking" shimmer gradient. */
|
|
161
|
-
thinkingSecondary?: string;
|
|
162
|
-
/** Border color for `<hr>` separators and table cell borders. */
|
|
163
|
-
border?: string;
|
|
164
|
-
/** Border color for the `<blockquote>` start border. Defaults to `--stroke-primary`. */
|
|
165
|
-
blockquoteBorder?: string;
|
|
166
|
-
/** Text color for `<blockquote>` content. Defaults to `--text-secondary`. */
|
|
167
|
-
blockquoteText?: string;
|
|
168
|
-
/** Text color for `<a>` links. Defaults to `--text-accent`. */
|
|
169
|
-
linkText?: string;
|
|
170
|
-
/** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus`. */
|
|
171
|
-
linkFocus?: string;
|
|
172
|
-
/** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
|
|
173
|
-
tableHeaderText?: string;
|
|
174
|
-
/** Text color for `<h6>` headings. Defaults to `--text-secondary`. */
|
|
175
|
-
headingSixText?: string;
|
|
176
|
-
/** Background color for inline `<code>` spans. Defaults to `--bg-layer-raised`. */
|
|
177
|
-
inlineCodeBackground?: string;
|
|
178
|
-
/** Text color for inline `<code>` spans. Defaults to `--text-primary`. */
|
|
179
|
-
inlineCodeText?: string;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/** Props for {@link MarkdownRenderer}. */
|
|
183
|
-
export declare interface MarkdownRendererProps {
|
|
184
|
-
/** Raw markdown string to render. */
|
|
185
|
-
content: string;
|
|
186
|
-
/** Classes applied to the renderer root. */
|
|
187
|
-
containerClassName?: string;
|
|
188
|
-
/** When true, appended content is revealed gradually for smoother streaming updates. */
|
|
189
|
-
isStreaming?: boolean;
|
|
190
|
-
/** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
|
|
191
|
-
streamCharactersPerSecond?: number;
|
|
192
|
-
/** Per-element styling classes. Merged with structural base classes inside the component. Defaults to no overrides (`{}`). */
|
|
193
|
-
classNames?: MarkdownRendererClassNames;
|
|
194
|
-
/**
|
|
195
|
-
* Full component overrides merged on top of the built-in map.
|
|
196
|
-
* Use for elements not covered by `classNames`.
|
|
197
|
-
*/
|
|
198
|
-
components?: Components;
|
|
199
|
-
/**
|
|
200
|
-
* Rewrites `href` and `src` values before they are rendered. The result is
|
|
201
|
-
* still passed through react-markdown's protocol allowlist. Hosts use this
|
|
202
|
-
* to map DIAL file ids (`files/{bucket}/{path}`) to download URLs. Defaults
|
|
203
|
-
* to no extra rewrite.
|
|
204
|
-
*/
|
|
205
|
-
urlTransform?: (url: string) => string;
|
|
206
|
-
/** Extra rehype plugins, applied after the built-in KaTeX pass. Defaults to none. */
|
|
207
|
-
rehypePlugins?: NonNullable<Options['rehypePlugins']>;
|
|
208
|
-
/**
|
|
209
|
-
* Label shown with a shimmer animation while `isStreaming` is true and no content has arrived yet.
|
|
210
|
-
* Defaults to `'Thinking'`. Pass a translated string from the consuming app.
|
|
211
|
-
*/
|
|
212
|
-
thinkingLabel?: string;
|
|
213
|
-
/** Accessible label for the copy button in code blocks. Defaults to `'Copy code'`. */
|
|
214
|
-
codeBlockCopyLabel?: string;
|
|
215
|
-
/** Accessible label for the copy button after copying. Defaults to `'Copied!'`. */
|
|
216
|
-
codeBlockCopiedLabel?: string;
|
|
217
|
-
/** Accessible label for the download button in code blocks. Defaults to `'Download code'`. */
|
|
218
|
-
codeBlockDownloadLabel?: string;
|
|
219
|
-
/** Syntax highlight color theme for code blocks and tables. Defaults to `'dark'`. */
|
|
220
|
-
codeBlockTheme?: CodeBlockTheme;
|
|
221
|
-
/** Color overrides applied as CSS custom properties. */
|
|
222
|
-
colors?: MarkdownRendererColors;
|
|
223
|
-
/** Localized labels for Markdown table actions. Supplying them enables the action bar. */
|
|
224
|
-
tableActionLabels?: MarkdownTableActionLabels;
|
|
225
|
-
/** Filename used when downloading a Markdown table as CSV. Defaults to `'table.csv'`. */
|
|
226
|
-
tableDownloadFilename?: string;
|
|
227
|
-
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
228
|
-
/** Accessible label for a table's horizontally scrollable region. Defaults to `'Scrollable table'`. */
|
|
229
|
-
tableScrollRegionAriaLabel?: string;
|
|
230
|
-
/** Accessible label for a block formula's horizontally scrollable region. Defaults to `'Scrollable formula'`. */
|
|
231
|
-
mathScrollRegionAriaLabel?: string;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/** Renders a responsive Markdown table with an end fade while more columns are available. */
|
|
235
|
-
export declare const MarkdownTable: FC<MarkdownTableProps>;
|
|
236
|
-
|
|
237
|
-
export declare interface MarkdownTableActionLabels {
|
|
238
|
-
copyLabel?: string;
|
|
239
|
-
copiedLabel?: string;
|
|
240
|
-
downloadCsvLabel?: string;
|
|
241
|
-
openInCanvasLabel?: string;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/** Per-element className overrides for {@link MarkdownTable}. */
|
|
245
|
-
export declare interface MarkdownTableClassNames {
|
|
246
|
-
/** Extra classes on the outer table wrapper. */
|
|
247
|
-
tableWrapper?: string;
|
|
248
|
-
/** Typography class for the table. Defaults to `'dial-small-text'`. */
|
|
249
|
-
tableFont?: string;
|
|
250
|
-
/** Extra classes on the scrollable table region. */
|
|
251
|
-
tableScrollContainer?: string;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/** CSS custom-property overrides for the `MarkdownTable` component. */
|
|
255
|
-
export declare interface MarkdownTableColors {
|
|
256
|
-
/** Scroll container border color. */
|
|
257
|
-
border?: string;
|
|
258
|
-
/** Scrollbar thumb/track color. */
|
|
259
|
-
scrollbar?: string;
|
|
260
|
-
/** Edge-fade mask color; only its alpha is used. Defaults to `--stroke-focus-black`. */
|
|
261
|
-
fade?: string;
|
|
262
|
-
/** Divider color between rows. Defaults to `--stroke-tertiary`. */
|
|
263
|
-
rowDivider?: string;
|
|
264
|
-
/** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
|
|
265
|
-
rowHoverBackground?: string;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export declare enum MarkdownTableCopyFormat {
|
|
269
|
-
Csv = "csv",
|
|
270
|
-
Markdown = "markdown"
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/** A table action rendered as an icon button. */
|
|
274
|
-
export declare interface MarkdownTableHeaderAction {
|
|
275
|
-
/** Stable accessible name and tooltip text. */
|
|
276
|
-
label: string;
|
|
277
|
-
/** Decorative icon content. */
|
|
278
|
-
icon: ReactNode;
|
|
279
|
-
/** Called when the action is activated. */
|
|
280
|
-
onClick: () => void;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/** Props for {@link MarkdownTable}. */
|
|
284
|
-
export declare interface MarkdownTableProps {
|
|
285
|
-
/** Table body/children rendered inside the scrollable wrapper (typically `<thead>`/`<tbody>` from react-markdown). */
|
|
286
|
-
children: ReactNode;
|
|
287
|
-
/** Per-element className overrides. */
|
|
288
|
-
classNames: MarkdownTableClassNames;
|
|
289
|
-
/** Color overrides applied as CSS custom properties. */
|
|
290
|
-
colors?: MarkdownTableColors;
|
|
291
|
-
/** Localized labels for table actions. Supplying them enables the action bar. */
|
|
292
|
-
actionLabels?: MarkdownTableActionLabels;
|
|
293
|
-
/** Filename used when downloading the table as CSV. Defaults to `'table.csv'`. */
|
|
294
|
-
downloadFilename?: string;
|
|
295
|
-
/** When true, table actions are hidden while content is still arriving. */
|
|
296
|
-
isStreaming?: boolean;
|
|
297
|
-
onOpenInCanvas?: (markdown: string) => void;
|
|
298
|
-
/** Accessible label for the horizontally scrollable region. Defaults to `'Scrollable table'`. */
|
|
299
|
-
scrollRegionAriaLabel?: string;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Renders read-only markdown with every `{{param}}` token wrapped in a
|
|
304
|
-
* `cat-prompt-variable`-classed span the host can style apart from the
|
|
305
|
-
* surrounding prose.
|
|
306
|
-
*/
|
|
307
|
-
export declare const MarkdownWithPlaceholders: FC<MarkdownWithPlaceholdersProps>;
|
|
308
|
-
|
|
309
|
-
/** Props for {@link MarkdownWithPlaceholders}. */
|
|
310
|
-
export declare interface MarkdownWithPlaceholdersProps {
|
|
311
|
-
/** Raw markdown string to render, read-only. */
|
|
312
|
-
content: string;
|
|
313
|
-
/** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
|
|
314
|
-
headingClassName?: string;
|
|
315
|
-
/** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Copy code'`. */
|
|
316
|
-
codeBlockCopyLabel?: string;
|
|
317
|
-
/** Status announced after a code block has been copied. Forwarded to {@link MarkdownRenderer}; defaults to `'Copied!'`. */
|
|
318
|
-
codeBlockCopiedLabel?: string;
|
|
319
|
-
/** Accessible label for the download button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Download code'`. */
|
|
320
|
-
codeBlockDownloadLabel?: string;
|
|
321
|
-
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable table'`. */
|
|
322
|
-
tableScrollRegionAriaLabel?: string;
|
|
323
|
-
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable formula'`. */
|
|
324
|
-
mathScrollRegionAriaLabel?: string;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/** Renders assistant message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
|
|
328
|
-
export declare const MDMessageViewer: FC<MDMessageViewerProps>;
|
|
329
|
-
|
|
330
|
-
/** Props for the {@link MDMessageViewer} markdown renderer. */
|
|
331
|
-
declare interface MDMessageViewerProps {
|
|
332
|
-
/** Raw markdown string to render. */
|
|
333
|
-
content: string;
|
|
334
|
-
/**
|
|
335
|
-
* Renders `content` verbatim as escaped plain text instead of running the
|
|
336
|
-
* Markdown pipeline — the conversation's `plain_text` response format.
|
|
337
|
-
* Markdown-only props (`components`, `urlTransform`, the code-block and
|
|
338
|
-
* table labels) do not apply while it is set. Defaults to `false`.
|
|
339
|
-
*/
|
|
340
|
-
isPlainText?: boolean;
|
|
341
|
-
/** Enables gradual reveal for appended streaming content. */
|
|
342
|
-
isStreaming?: boolean;
|
|
343
|
-
/**
|
|
344
|
-
* Label shown while `isStreaming` is true and no content has arrived yet.
|
|
345
|
-
* Forwarded to {@link MarkdownRenderer}. Defaults to `'Thinking'`.
|
|
346
|
-
*/
|
|
347
|
-
thinkingLabel?: string;
|
|
348
|
-
/**
|
|
349
|
-
* Additional react-markdown component overrides merged on top of the
|
|
350
|
-
* built-in map. Use to inject custom React nodes (e.g. citation markers)
|
|
351
|
-
* into specific markdown elements without modifying the viewer directly.
|
|
352
|
-
*/
|
|
353
|
-
components?: Components;
|
|
354
|
-
/**
|
|
355
|
-
* Rewrites `href` and `src` values before they are rendered. Forwarded to
|
|
356
|
-
* {@link MarkdownRenderer}. Defaults to no extra rewrite.
|
|
357
|
-
*/
|
|
358
|
-
urlTransform?: (url: string) => string;
|
|
359
|
-
/** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
360
|
-
codeBlockCopyLabel?: string;
|
|
361
|
-
/** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
|
|
362
|
-
codeBlockCopiedLabel?: string;
|
|
363
|
-
/** Accessible label for the code-block download button. Forwarded to {@link MarkdownRenderer}. */
|
|
364
|
-
codeBlockDownloadLabel?: string;
|
|
365
|
-
/** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
366
|
-
codeBlockTheme?: CodeBlockTheme;
|
|
367
|
-
/** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
|
|
368
|
-
tableActionLabels?: MarkdownTableActionLabels;
|
|
369
|
-
/** Filename used when downloading a Markdown table as CSV. Forwarded to {@link MarkdownRenderer}. */
|
|
370
|
-
tableDownloadFilename?: string;
|
|
371
|
-
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
372
|
-
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
373
|
-
tableScrollRegionAriaLabel?: string;
|
|
374
|
-
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
375
|
-
mathScrollRegionAriaLabel?: string;
|
|
376
|
-
/**
|
|
377
|
-
* Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
|
|
378
|
-
* pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
|
|
379
|
-
* stable reference: this component is memoised.
|
|
380
|
-
*/
|
|
381
|
-
classNames?: MarkdownRendererClassNames;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Renders message text as plain text: no Markdown pipeline, no raw HTML, no
|
|
386
|
-
* syntax highlighting. The text is a React text child, so it is escaped by
|
|
387
|
-
* construction — a table, a heading, or `**bold**` reaches the reader exactly
|
|
388
|
-
* as the model emitted it, which is what a conversation's `plain_text`
|
|
389
|
-
* response format promises.
|
|
390
|
-
*
|
|
391
|
-
* Lives beside {@link MarkdownRenderer} because it is the other half of the
|
|
392
|
-
* same choice: both render an assistant message body, and both are selected
|
|
393
|
-
* by `MDMessageViewer` from the conversation's response format.
|
|
394
|
-
*/
|
|
395
|
-
export declare const PlainTextRenderer: FC<PlainTextRendererProps>;
|
|
396
|
-
|
|
397
|
-
/** Props for {@link PlainTextRenderer}. */
|
|
398
|
-
export declare interface PlainTextRendererProps {
|
|
399
|
-
/** Message text. Rendered verbatim — never parsed as Markdown or HTML. */
|
|
400
|
-
content: string;
|
|
401
|
-
/** Classes applied to the renderer root. */
|
|
402
|
-
containerClassName?: string;
|
|
403
|
-
/** When true, appended content is revealed gradually for smoother streaming updates. */
|
|
404
|
-
isStreaming?: boolean;
|
|
405
|
-
/** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
|
|
406
|
-
streamCharactersPerSecond?: number;
|
|
407
|
-
/**
|
|
408
|
-
* Typography classes. Only `p` is read — the single paragraph the renderer
|
|
409
|
-
* emits — so the same object a Markdown message is styled with keeps both
|
|
410
|
-
* formats on one type scale.
|
|
411
|
-
*/
|
|
412
|
-
classNames?: Pick<MarkdownRendererClassNames, 'p'>;
|
|
413
|
-
/**
|
|
414
|
-
* Label shown with a shimmer animation while `isStreaming` is true and no
|
|
415
|
-
* content has arrived yet. Defaults to `'Thinking'`.
|
|
416
|
-
*/
|
|
417
|
-
thinkingLabel?: string;
|
|
418
|
-
/** Color overrides applied as CSS custom properties. */
|
|
419
|
-
colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/** Style map consumed by `react-syntax-highlighter`'s `Prism` renderer. */
|
|
423
|
-
declare type PrismStyleMap = Record<string, CSSProperties>;
|
|
424
|
-
|
|
425
|
-
/** Prism syntax-highlighting style map used by {@link MarkdownCodeBlock}, restrained to design-system CSS variables. */
|
|
426
|
-
export declare const restrainedSyntaxTheme: PrismStyleMap;
|
|
427
|
-
|
|
428
|
-
export declare const serializeMarkdownTableRows: (rows: readonly HTMLTableRowElement[], format: MarkdownTableCopyFormat) => string;
|
|
429
|
-
|
|
430
|
-
/** Returns `isCopied` state and a `copy` callback; `isCopied` resets to `false` after `resetDelay` ms. */
|
|
431
|
-
export declare const useCodeCopy: (value: string, resetDelay?: number) => {
|
|
432
|
-
isCopied: boolean;
|
|
433
|
-
copy: () => void;
|
|
434
|
-
};
|
|
435
|
-
|
|
436
|
-
/** Measures rendered text and owns the expand/collapse state for long plain-text content. */
|
|
437
|
-
export declare const useCollapsedText: <T extends HTMLElement = HTMLElement>({ text, collapsedLineCount, }: UseCollapsedTextOptions) => UseCollapsedTextResult<T>;
|
|
438
|
-
|
|
439
|
-
/** Options for `useCollapsedText`. */
|
|
440
|
-
export declare interface UseCollapsedTextOptions {
|
|
441
|
-
/** Content identity used to reset long text to the collapsed state when it changes. */
|
|
442
|
-
text: string;
|
|
443
|
-
/** Maximum number of text lines shown while collapsed. */
|
|
444
|
-
collapsedLineCount: number;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/** Return value of `useCollapsedText`. */
|
|
448
|
-
export declare interface UseCollapsedTextResult<T extends HTMLElement> {
|
|
449
|
-
/** Ref callback attached to the text element to measure its rendered height. */
|
|
450
|
-
textRef: (node: T | null) => void;
|
|
451
|
-
/** Whether the full text is currently hidden behind the collapsed viewport. */
|
|
452
|
-
isTextCollapsed: boolean;
|
|
453
|
-
/** Whether the measured text is taller than the collapsed viewport. */
|
|
454
|
-
isOverflowing: boolean;
|
|
455
|
-
/** Current collapsed viewport height in pixels. */
|
|
456
|
-
collapsedMaxHeight: number;
|
|
457
|
-
/** Full rendered text height in pixels. */
|
|
458
|
-
expandedMaxHeight: number;
|
|
459
|
-
/** Whether the expanded/collapsed control is currently in the collapsed state. */
|
|
460
|
-
isCollapsed: boolean;
|
|
461
|
-
/** Toggle between expanded and collapsed states. */
|
|
462
|
-
toggleCollapsed: () => void;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export { }
|
|
1
|
+
export * from './entry-points/markdown.js'
|
|
2
|
+
export {}
|