@epam/ai-dial-chat-shared 1.3.0-dev.13 → 1.3.0-dev.130
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/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +5 -4
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +2 -2
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -2
- package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.js +1 -1
- package/components/ConfirmationView/ConfirmationView.d.ts +57 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.js +16 -15
- package/components/ConfirmationView/ConfirmationView.module.scss.js +6 -5
- 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 +7 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
- package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -2
- 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/ItemHeader/ItemHeader.module.scss.js +5 -4
- 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 +27 -27
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +9 -8
- 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/MarkdownRenderer.module.scss.js +9 -8
- 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/Math/MarkdownMathBlock.module.scss.js +5 -4
- 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 +35 -31
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +14 -13
- package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -2
- 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 +14 -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/PanelEmptyState/PanelEmptyState.js +12 -9
- package/components/PanelEmptyState/PanelEmptyState.module.scss.js +3 -2
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.module.scss.js +5 -4
- 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/breakpoint.js +1 -1
- 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 +65 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +296 -255
- package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +4 -0
- 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 +3 -6
- 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 +129 -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 +11 -0
- package/file-manager/index.d.ts.map +1 -0
- package/file-manager/labels.d.ts +175 -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/shell-styles.d.ts +11 -0
- package/file-manager/shell-styles.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +75 -0
- package/file-manager/upload-batch.d.ts.map +1 -0
- package/file-manager/upload-batch.js +6 -2
- package/file-manager/upload-queue.d.ts +45 -0
- package/file-manager/upload-queue.d.ts.map +1 -0
- package/file-manager/upload-queue.js +45 -13
- 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/file-manager.js +4 -4
- package/hooks/useAvailableHeightCap.d.ts +30 -0
- package/hooks/useAvailableHeightCap.d.ts.map +1 -0
- package/hooks/useAvailableHeightCap.js +1 -1
- 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/useIsMobile.js +1 -1
- 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/hooks/useUnsavedChangesGuard.js +1 -5
- 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/format-price.js +10 -10
- 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 +22 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/latex.js +47 -41
- 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-attachment-to-display.js +1 -1
- 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/mime-type.js +1 -1
- package/utils/prompt-variables.d.ts +62 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/prompt-variables.js +5 -9
- 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/utils/syntax-highlighting.js +8 -8
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
import { EntityHeaderItem } from '../../models/entity';
|
|
3
|
+
/** Props for EntityHeader. */
|
|
4
|
+
export interface EntityHeaderProps {
|
|
5
|
+
/** The entity to display. */
|
|
6
|
+
item: EntityHeaderItem;
|
|
7
|
+
/** Typography CSS class for the item name. Falls back to `ItemHeader`'s own default when omitted. */
|
|
8
|
+
nameClassName?: string;
|
|
9
|
+
/** CSS class for the entity type label. Default: 'dial-caption-lead-semi-text'. */
|
|
10
|
+
typeClassName?: string;
|
|
11
|
+
/** Visible type text, e.g. a translated type name. Default: the raw `item.type` value. */
|
|
12
|
+
typeLabel?: string;
|
|
13
|
+
/** CSS class applied to the icon badge, e.g. to set border-radius. Default: 'rounded-[14px]'. */
|
|
14
|
+
iconBadgeClassName?: string;
|
|
15
|
+
/** Typography CSS class for the version text. Falls back to `ItemHeader`'s own default when omitted. */
|
|
16
|
+
versionClassName?: string;
|
|
17
|
+
/** Whether to show `item.version` next to the title. Default: true. */
|
|
18
|
+
showVersion?: boolean;
|
|
19
|
+
/** Label for the featured tag shown when item.isFeatured is true. Default: 'Featured'. */
|
|
20
|
+
featuredLabel?: string;
|
|
21
|
+
/** Whether to render the featured tag. Default: true. */
|
|
22
|
+
hasFeaturedTag?: boolean;
|
|
23
|
+
/** Size of the deployment icon. Default: 48. */
|
|
24
|
+
iconSize?: number;
|
|
25
|
+
/** Search query string; when provided, matching text in the title is highlighted. */
|
|
26
|
+
query?: string;
|
|
27
|
+
/** Content pinned to the bottom of the text column via `mt-auto`, aligning its baseline with the avatar bottom. When provided, the column stretches to fill the icon height exactly. */
|
|
28
|
+
footer?: ReactNode;
|
|
29
|
+
/** CSS class for the featured chip. */
|
|
30
|
+
featuredChipClassName?: string;
|
|
31
|
+
/** Style override for the featured chip, merged over its default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
|
|
32
|
+
featuredChipStyle?: CSSProperties;
|
|
33
|
+
/** Arbitrary badge rendered before the featured chip, in the same top-end corner. Omitted (the default) renders nothing in that slot. */
|
|
34
|
+
statusBadge?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/** Reusable entity identity block: deployment icon, type label, name, version, and optional featured chip. */
|
|
37
|
+
export declare const EntityHeader: FC<EntityHeaderProps>;
|
|
38
|
+
//# sourceMappingURL=EntityHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityHeader.d.ts","sourceRoot":"","sources":["../../../src/components/EntityHeader/EntityHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO5D,8BAA8B;AAC9B,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,qGAAqG;IACrG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wGAAwG;IACxG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wLAAwL;IACxL,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uIAAuI;IACvI,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,yIAAyI;IACzI,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,8GAA8G;AAC9G,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+D9C,CAAC"}
|
|
@@ -22,7 +22,7 @@ var s = ({ item: s, nameClassName: c, versionClassName: l, showVersion: u = !0,
|
|
|
22
22
|
className: d,
|
|
23
23
|
label: f
|
|
24
24
|
}), (x != null || _ && s.isFeatured) && /* @__PURE__ */ o("div", {
|
|
25
|
-
className: "absolute
|
|
25
|
+
className: "absolute inset-e-0 top-[-6px] flex items-center gap-2",
|
|
26
26
|
children: [x, _ && s.isFeatured && /* @__PURE__ */ a(i, {
|
|
27
27
|
type: s.type,
|
|
28
28
|
label: g,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CatalogEntityType } from '../../types/entity-type';
|
|
3
|
+
/** Props for EntityTypeLabel. */
|
|
4
|
+
export interface EntityTypeLabelProps {
|
|
5
|
+
/** Entity category — resolves the label's color via ENTITY_TYPE_COLOR. */
|
|
6
|
+
type: CatalogEntityType;
|
|
7
|
+
/** CSS class for the label text. Default: 'dial-caption-lead-semi-text'. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Visible text, e.g. a translated type name. Default: the raw `type` value (`'MODEL'`, `'TOOLSET'`, …). */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Entity type label rendered as plain uppercase text — no pill, no background.
|
|
14
|
+
* Shared by the card grid (via AppIdentity) and the list view, so both
|
|
15
|
+
* densities of the catalog use the same type treatment.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EntityTypeLabel: FC<EntityTypeLabelProps>;
|
|
18
|
+
//# sourceMappingURL=EntityTypeLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityTypeLabel.d.ts","sourceRoot":"","sources":["../../../src/components/EntityTypeLabel/EntityTypeLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,iCAAiC;AACjC,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,IAAI,EAAE,iBAAiB,CAAC;IACxB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAQpD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { CatalogEntityType } from '../../types/entity-type';
|
|
3
|
+
/** Props for `FeaturedChip`. */
|
|
4
|
+
export interface FeaturedChipProps {
|
|
5
|
+
/** Label text shown inside the chip. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Typography class for the label. Defaults to the kit badge's `'dial-caption-lead-semi-text'`. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Entity category — picks the chip's default colours. */
|
|
10
|
+
type: CatalogEntityType;
|
|
11
|
+
/** Style overrides merged over the chip's default per-entity-type colors, e.g. `{ backgroundColor, color, border }`. */
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/** Featured badge rendered on a catalog card when `item.isFeatured` is true. */
|
|
15
|
+
export declare const FeaturedChip: FC<FeaturedChipProps>;
|
|
16
|
+
//# sourceMappingURL=FeaturedChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeaturedChip.d.ts","sourceRoot":"","sources":["../../../src/components/FeaturedChip/FeaturedChip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,mGAAmG;IACnG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,IAAI,EAAE,iBAAiB,CAAC;IACxB,wHAAwH;IACxH,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,gFAAgF;AAChF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAe9C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for `InitialsAvatar`. */
|
|
3
|
+
export interface InitialsAvatarProps {
|
|
4
|
+
/** Display name from which initials are derived. Empty string renders `"?"`. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Badge width and height in pixels. */
|
|
7
|
+
size: number;
|
|
8
|
+
/** Extra classes applied to the root element (e.g. `'shrink-0'`). */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Type-scale class for the initials. Defaults to none: the initials are semibold at 40% of `size`. */
|
|
11
|
+
textClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A square badge showing 1–2 initials derived from `name` on a deterministic colour background. */
|
|
14
|
+
export declare const InitialsAvatar: FC<InitialsAvatarProps>;
|
|
15
|
+
//# sourceMappingURL=InitialsAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitialsAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/InitialsAvatar/InitialsAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uGAAuG;IACvG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oGAAoG;AACpG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAclD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** CSS custom-property overrides for the `ItemHeader` component. */
|
|
3
|
+
export interface ItemHeaderColors {
|
|
4
|
+
/** Title text color. Defaults to `--text-primary`. */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Postfix text color. Defaults to `--text-secondary`. */
|
|
7
|
+
count?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Props for `ItemHeader`. */
|
|
10
|
+
export interface ItemHeaderProps {
|
|
11
|
+
/** Title text rendered in the heading element. */
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* Secondary value rendered after the title. A number (an item count) always
|
|
15
|
+
* renders in full; a string (a version) is capped at 30% of the row and
|
|
16
|
+
* truncates with a tooltip.
|
|
17
|
+
*/
|
|
18
|
+
postfix?: number | string;
|
|
19
|
+
/** CSS class applied to the title. Defaults to `'dial-h3-text'`. */
|
|
20
|
+
titleClassName?: string;
|
|
21
|
+
/** CSS class applied to the postfix. Defaults to `'dial-tiny-text'`. */
|
|
22
|
+
postfixClassName?: string;
|
|
23
|
+
/** CSS class applied to the header row. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Search query; when provided, the matching part of the title is highlighted. */
|
|
26
|
+
query?: string;
|
|
27
|
+
/** Optional content rendered at the trailing end of the header row. */
|
|
28
|
+
trailing?: ReactNode;
|
|
29
|
+
/** Color overrides applied as CSS custom properties. */
|
|
30
|
+
colors?: ItemHeaderColors;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the title shrinks and truncates with an ellipsis. When `false` the
|
|
33
|
+
* title keeps its full width and the rest of the row gives way instead.
|
|
34
|
+
* Defaults to `true`.
|
|
35
|
+
*/
|
|
36
|
+
shouldTruncateTitle?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** Item title header with optional numeric or string postfix and trailing slot. */
|
|
39
|
+
export declare const ItemHeader: FC<ItemHeaderProps>;
|
|
40
|
+
//# sourceMappingURL=ItemHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ItemHeader/ItemHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtC,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8BAA8B;AAC9B,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,wDAAwD;IACxD,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,mFAAmF;AACnF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAiF1C,CAAC"}
|
|
@@ -20,7 +20,10 @@ var s = ({ title: s, postfix: c, titleClassName: l = "dial-h3-text", postfixClas
|
|
|
20
20
|
query: f
|
|
21
21
|
}) : h ? /* @__PURE__ */ a(r, { text: s }) : s
|
|
22
22
|
}),
|
|
23
|
-
c
|
|
23
|
+
c == null ? null : typeof c == "number" ? /* @__PURE__ */ a("span", {
|
|
24
|
+
className: e("shrink-0 whitespace-nowrap", u, n.count),
|
|
25
|
+
children: c
|
|
26
|
+
}) : /* @__PURE__ */ a(r, {
|
|
24
27
|
className: e("max-w-[30%] shrink-0", u, n.count),
|
|
25
28
|
text: c
|
|
26
29
|
}),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/ItemHeader/ItemHeader.module.scss
|
|
2
|
+
var e = "_title_11w3i_1", t = "_count_11w3i_5", n = {
|
|
3
|
+
title: e,
|
|
4
|
+
count: t
|
|
4
5
|
};
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { t as count, n as default, e as title };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { CodeBlockTheme } from '../../../types/code-editor';
|
|
3
|
+
/** CSS custom-property overrides for the `MarkdownCodeBlock` component. */
|
|
4
|
+
export interface MarkdownCodeBlockColors {
|
|
5
|
+
/** Container background color. */
|
|
6
|
+
background?: string;
|
|
7
|
+
/** Container/header border color. */
|
|
8
|
+
border?: string;
|
|
9
|
+
/** Header background color. */
|
|
10
|
+
headerBackground?: string;
|
|
11
|
+
/** Language label text color. */
|
|
12
|
+
language?: string;
|
|
13
|
+
/** Copy button icon color once copied. */
|
|
14
|
+
copied?: string;
|
|
15
|
+
/** Scrollbar thumb/track color. */
|
|
16
|
+
scrollbar?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Props for {@link MarkdownCodeBlock}. */
|
|
19
|
+
export interface MarkdownCodeBlockProps {
|
|
20
|
+
/** Detected language from the fenced code block. Empty string for language-less blocks. */
|
|
21
|
+
language: string;
|
|
22
|
+
/** Raw code value with trailing newline stripped. */
|
|
23
|
+
value: string;
|
|
24
|
+
/** When true, the copy button is hidden (streaming in progress). */
|
|
25
|
+
isStreaming?: boolean;
|
|
26
|
+
/** Color theme for syntax highlighting. Defaults to `'dark'`. */
|
|
27
|
+
theme?: CodeBlockTheme;
|
|
28
|
+
/** Accessible label for the copy button. Defaults to `'Copy code'`. */
|
|
29
|
+
copyLabel?: string;
|
|
30
|
+
/** 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!'`. */
|
|
31
|
+
copiedLabel?: string;
|
|
32
|
+
/** Accessible label for the download button. Defaults to `'Download code'`. */
|
|
33
|
+
downloadLabel?: string;
|
|
34
|
+
/** When true, hides the download button while still showing copy. Defaults to `false`. */
|
|
35
|
+
hideDownload?: boolean;
|
|
36
|
+
/** Extra classes applied to the outer container element. */
|
|
37
|
+
containerClassName?: string;
|
|
38
|
+
/** Extra classes applied to the sticky header bar. */
|
|
39
|
+
headerClassName?: string;
|
|
40
|
+
/** Typography class for the `<code>` element (used when no language is detected). Defaults to `'dial-code-text'`. */
|
|
41
|
+
codeClassName?: string;
|
|
42
|
+
/** Whether the code keeps its own top padding below the header; `false` starts it right under the header. Defaults to `true`. */
|
|
43
|
+
hasContentTopPadding?: boolean;
|
|
44
|
+
/** 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`). */
|
|
45
|
+
languageLabelClassName?: string;
|
|
46
|
+
/** 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. */
|
|
47
|
+
title?: string;
|
|
48
|
+
/** Custom content rendered in the header in place of the plain label, e.g. a language/endpoint select. Defaults to the plain label text. */
|
|
49
|
+
titleSlot?: ReactNode;
|
|
50
|
+
/** Color overrides applied as CSS custom properties. */
|
|
51
|
+
colors?: MarkdownCodeBlockColors;
|
|
52
|
+
}
|
|
53
|
+
/** Renders a fenced or multi-line code block with syntax highlighting and a copy button. */
|
|
54
|
+
export declare const MarkdownCodeBlock: FC<MarkdownCodeBlockProps>;
|
|
55
|
+
//# sourceMappingURL=CodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAQ,KAAK,EAAE,EAAQ,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAW5D,2EAA2E;AAC3E,MAAM,WAAW,uBAAuB;IACtC,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iEAAiE;IACjE,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kLAAkL;IAClL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qHAAqH;IACrH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iIAAiI;IACjI,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qKAAqK;IACrK,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uLAAuL;IACvL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4IAA4I;IAC5I,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,wDAAwD;IACxD,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC;AAiBD,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA2JxD,CAAC"}
|
|
@@ -18,32 +18,32 @@ var C = {
|
|
|
18
18
|
}, w = h(async () => {
|
|
19
19
|
let { Prism: e } = await import("react-syntax-highlighter");
|
|
20
20
|
return { default: e };
|
|
21
|
-
}), T = g(({ language: h, value: g, isStreaming: T, theme: E = e.Dark, copyLabel: D = "Copy code", copiedLabel: O = "Copied!", downloadLabel: k = "Download code", hideDownload: A = !1,
|
|
22
|
-
let { isCopied:
|
|
21
|
+
}), T = g(({ language: h, value: g, isStreaming: T, theme: E = e.Dark, copyLabel: D = "Copy code", copiedLabel: O = "Copied!", downloadLabel: k = "Download code", hideDownload: A = !1, hasContentTopPadding: j = !0, containerClassName: M, headerClassName: N, codeClassName: P = "dial-code-text", languageLabelClassName: F = "dial-tiny-lead-semi-text", title: I, titleSlot: L, colors: R }) => {
|
|
22
|
+
let { isCopied: z, copy: B } = s(g), V = _(() => a(g), [g]), H = E === e.Light, U = () => {
|
|
23
23
|
r(g, `code.${i(h)}`);
|
|
24
|
-
},
|
|
25
|
-
className: "p-4",
|
|
24
|
+
}, W = /* @__PURE__ */ v("pre", {
|
|
25
|
+
className: j ? "p-4" : "px-4 pt-0 pb-4",
|
|
26
26
|
children: /* @__PURE__ */ v("code", {
|
|
27
|
-
className: t("whitespace-pre",
|
|
27
|
+
className: t("whitespace-pre", P),
|
|
28
28
|
children: g
|
|
29
29
|
})
|
|
30
|
+
}), G = n({
|
|
31
|
+
"--cm-code-block-bg": R?.background,
|
|
32
|
+
"--cm-code-block-border": R?.border,
|
|
33
|
+
"--cm-code-block-header-bg": R?.headerBackground,
|
|
34
|
+
"--cm-code-block-language": R?.language,
|
|
35
|
+
"--cm-code-block-copied": R?.copied,
|
|
36
|
+
"--cm-code-block-scrollbar": R?.scrollbar
|
|
30
37
|
});
|
|
31
38
|
return /* @__PURE__ */ y("div", {
|
|
32
|
-
style:
|
|
33
|
-
|
|
34
|
-
"--cm-code-block-border": L?.border,
|
|
35
|
-
"--cm-code-block-header-bg": L?.headerBackground,
|
|
36
|
-
"--cm-code-block-language": L?.language,
|
|
37
|
-
"--cm-code-block-copied": L?.copied,
|
|
38
|
-
"--cm-code-block-scrollbar": L?.scrollbar
|
|
39
|
-
}),
|
|
40
|
-
className: t("my-4 max-w-full rounded-xl border [overflow:clip]", c.container, V && c.containerLight, j, o.codeBlock),
|
|
39
|
+
style: G,
|
|
40
|
+
className: t("my-4 max-w-full [overflow:clip] rounded-xl border", c.container, H && c.containerLight, M, o.codeBlock),
|
|
41
41
|
children: [
|
|
42
42
|
/* @__PURE__ */ y("div", {
|
|
43
|
-
className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4",
|
|
44
|
-
children: [
|
|
45
|
-
className: t(c.languageLabel,
|
|
46
|
-
children:
|
|
43
|
+
className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4", L == null ? "py-2" : "py-0", c.header, N, o.codeBlockHeader),
|
|
44
|
+
children: [L ?? /* @__PURE__ */ v("span", {
|
|
45
|
+
className: t(c.languageLabel, F),
|
|
46
|
+
children: I ?? h
|
|
47
47
|
}), !T && /* @__PURE__ */ y("div", {
|
|
48
48
|
className: "flex items-center gap-1",
|
|
49
49
|
children: [!A && /* @__PURE__ */ v(p, {
|
|
@@ -53,9 +53,9 @@ var C = {
|
|
|
53
53
|
}),
|
|
54
54
|
"aria-label": k,
|
|
55
55
|
size: f.Small,
|
|
56
|
-
onClick:
|
|
56
|
+
onClick: U
|
|
57
57
|
}), /* @__PURE__ */ v(p, {
|
|
58
|
-
icon:
|
|
58
|
+
icon: z ? /* @__PURE__ */ v(b, {
|
|
59
59
|
size: u.SM,
|
|
60
60
|
className: c.copiedIcon,
|
|
61
61
|
"aria-hidden": !0,
|
|
@@ -67,15 +67,15 @@ var C = {
|
|
|
67
67
|
}),
|
|
68
68
|
"aria-label": D,
|
|
69
69
|
size: f.Small,
|
|
70
|
-
onClick:
|
|
70
|
+
onClick: B
|
|
71
71
|
})]
|
|
72
72
|
})]
|
|
73
73
|
}),
|
|
74
74
|
/* @__PURE__ */ v("div", {
|
|
75
75
|
className: t(c.scrollContainer, "max-h-[60vh] overflow-auto"),
|
|
76
76
|
dir: "ltr",
|
|
77
|
-
children: h &&
|
|
78
|
-
fallback:
|
|
77
|
+
children: h && V ? /* @__PURE__ */ v(m, {
|
|
78
|
+
fallback: W,
|
|
79
79
|
children: /* @__PURE__ */ v(w, {
|
|
80
80
|
language: h,
|
|
81
81
|
style: C[E] ?? l,
|
|
@@ -85,19 +85,19 @@ var C = {
|
|
|
85
85
|
background: "transparent",
|
|
86
86
|
fontSize: 14,
|
|
87
87
|
lineHeight: 1.5,
|
|
88
|
-
padding: "14px 16px",
|
|
88
|
+
padding: j ? "14px 16px" : "0 16px 14px",
|
|
89
89
|
letterSpacing: 0
|
|
90
90
|
},
|
|
91
|
-
codeTagProps: { className:
|
|
91
|
+
codeTagProps: { className: P },
|
|
92
92
|
children: g
|
|
93
93
|
})
|
|
94
|
-
}) :
|
|
94
|
+
}) : W
|
|
95
95
|
}),
|
|
96
96
|
/* @__PURE__ */ v("span", {
|
|
97
97
|
role: "status",
|
|
98
98
|
"aria-live": "polite",
|
|
99
99
|
className: "sr-only",
|
|
100
|
-
children:
|
|
100
|
+
children: z ? O : ""
|
|
101
101
|
})
|
|
102
102
|
]
|
|
103
103
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss
|
|
2
|
+
var e = "_container_sqe5k_1", t = "_containerLight_sqe5k_6", n = "_header_sqe5k_10", r = "_languageLabel_sqe5k_15", i = "_copiedIcon_sqe5k_19", a = "_scrollContainer_sqe5k_23", o = {
|
|
3
|
+
container: e,
|
|
4
|
+
containerLight: t,
|
|
5
|
+
header: n,
|
|
6
|
+
languageLabel: r,
|
|
7
|
+
copiedIcon: i,
|
|
8
|
+
scrollContainer: a
|
|
8
9
|
};
|
|
9
10
|
//#endregion
|
|
10
|
-
export { e as default };
|
|
11
|
+
export { e as container, t as containerLight, i as copiedIcon, o as default, n as header, r as languageLabel, a as scrollContainer };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/** Style map consumed by `react-syntax-highlighter`'s `Prism` renderer. */
|
|
3
|
+
type PrismStyleMap = Record<string, CSSProperties>;
|
|
4
|
+
/** Prism syntax-highlighting style map used by {@link MarkdownCodeBlock}, restrained to design-system CSS variables. */
|
|
5
|
+
export declare const restrainedSyntaxTheme: PrismStyleMap;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=syntax-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntax-theme.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/CodeBlock/syntax-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,2EAA2E;AAC3E,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAQnD,wHAAwH;AACxH,eAAO,MAAM,qBAAqB,EAAE,aA6DnC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Components, Options } from 'react-markdown';
|
|
3
|
+
import { CodeBlockTheme } from '../../types/code-editor';
|
|
4
|
+
import { MarkdownRendererClassNames } from './MarkdownRenderer';
|
|
5
|
+
import { MarkdownTableActionLabels } from './Table/MarkdownTable';
|
|
6
|
+
/** Props for the {@link MDMessageViewer} markdown renderer. */
|
|
7
|
+
interface MDMessageViewerProps {
|
|
8
|
+
/** Raw markdown string to render. */
|
|
9
|
+
content: string;
|
|
10
|
+
/**
|
|
11
|
+
* Renders `content` verbatim as escaped plain text instead of running the
|
|
12
|
+
* Markdown pipeline — the conversation's `plain_text` response format.
|
|
13
|
+
* Markdown-only props (`components`, `urlTransform`, the code-block and
|
|
14
|
+
* table labels) do not apply while it is set. Defaults to `false`.
|
|
15
|
+
*/
|
|
16
|
+
isPlainText?: boolean;
|
|
17
|
+
/** Enables gradual reveal for appended streaming content. */
|
|
18
|
+
isStreaming?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Label shown while `isStreaming` is true and no content has arrived yet.
|
|
21
|
+
* Forwarded to {@link MarkdownRenderer}. Defaults to `'Thinking'`.
|
|
22
|
+
*/
|
|
23
|
+
thinkingLabel?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Additional react-markdown component overrides merged on top of the
|
|
26
|
+
* built-in map. Use to inject custom React nodes (e.g. citation markers)
|
|
27
|
+
* into specific markdown elements without modifying the viewer directly.
|
|
28
|
+
*/
|
|
29
|
+
components?: Components;
|
|
30
|
+
/**
|
|
31
|
+
* Rewrites `href` and `src` values before they are rendered. Forwarded to
|
|
32
|
+
* {@link MarkdownRenderer}. Defaults to no extra rewrite.
|
|
33
|
+
*/
|
|
34
|
+
urlTransform?: (url: string) => string;
|
|
35
|
+
/** Extra rehype plugins forwarded to {@link MarkdownRenderer}. Defaults to none. */
|
|
36
|
+
rehypePlugins?: NonNullable<Options['rehypePlugins']>;
|
|
37
|
+
/** When `false`, raw HTML renders as literal text. Forwarded to {@link MarkdownRenderer}; defaults to `true`. */
|
|
38
|
+
isRawHtmlEnabled?: boolean;
|
|
39
|
+
/** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
40
|
+
codeBlockCopyLabel?: string;
|
|
41
|
+
/** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
|
|
42
|
+
codeBlockCopiedLabel?: string;
|
|
43
|
+
/** Accessible label for the code-block download button. Forwarded to {@link MarkdownRenderer}. */
|
|
44
|
+
codeBlockDownloadLabel?: string;
|
|
45
|
+
/** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
46
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
47
|
+
/** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
|
|
48
|
+
tableActionLabels?: MarkdownTableActionLabels;
|
|
49
|
+
/** Filename used when downloading a Markdown table as CSV. Forwarded to {@link MarkdownRenderer}. */
|
|
50
|
+
tableDownloadFilename?: string;
|
|
51
|
+
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
52
|
+
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
53
|
+
tableScrollRegionAriaLabel?: string;
|
|
54
|
+
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
55
|
+
mathScrollRegionAriaLabel?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
|
|
58
|
+
* pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
|
|
59
|
+
* stable reference: this component is memoised.
|
|
60
|
+
*/
|
|
61
|
+
classNames?: MarkdownRendererClassNames;
|
|
62
|
+
}
|
|
63
|
+
/** Renders message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
|
|
64
|
+
export declare const MDMessageViewer: FC<MDMessageViewerProps>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=MDMessageViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MDMessageViewer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/MDMessageViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,+DAA+D;AAC/D,UAAU,oBAAoB;IAC5B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,oFAAoF;IACpF,aAAa,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IACtD,iHAAiH;IACjH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kGAAkG;IAClG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iGAAiG;IACjG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kGAAkG;IAClG,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,2FAA2F;IAC3F,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,qGAAqG;IACrG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,+FAA+F;IAC/F,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,uGAAuG;IACvG,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC;AAED,yGAAyG;AACzG,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiDpD,CAAC"}
|
|
@@ -4,27 +4,29 @@ import { PlainTextRenderer as n } from "./PlainTextRenderer.js";
|
|
|
4
4
|
import { memo as r } from "react";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/MarkdownRenderer/MDMessageViewer.tsx
|
|
7
|
-
var a = r(({ content: r, isPlainText: a, isStreaming: o, thinkingLabel: s, components: c, urlTransform: l,
|
|
7
|
+
var a = r(({ content: r, isPlainText: a, isStreaming: o, thinkingLabel: s, components: c, urlTransform: l, rehypePlugins: u, isRawHtmlEnabled: d, codeBlockCopyLabel: f, codeBlockCopiedLabel: p, codeBlockDownloadLabel: m, codeBlockTheme: h, tableActionLabels: g, tableDownloadFilename: _, tableOnOpenInCanvas: v, tableScrollRegionAriaLabel: y, mathScrollRegionAriaLabel: b, classNames: x = t }) => a ? /* @__PURE__ */ i(n, {
|
|
8
8
|
content: r,
|
|
9
9
|
isStreaming: o,
|
|
10
10
|
thinkingLabel: s,
|
|
11
|
-
classNames:
|
|
11
|
+
classNames: x
|
|
12
12
|
}) : /* @__PURE__ */ i(e, {
|
|
13
13
|
content: r,
|
|
14
14
|
isStreaming: o,
|
|
15
15
|
thinkingLabel: s,
|
|
16
16
|
components: c,
|
|
17
17
|
urlTransform: l,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
rehypePlugins: u,
|
|
19
|
+
isRawHtmlEnabled: d,
|
|
20
|
+
codeBlockCopyLabel: f,
|
|
21
|
+
codeBlockCopiedLabel: p,
|
|
22
|
+
codeBlockDownloadLabel: m,
|
|
23
|
+
codeBlockTheme: h,
|
|
24
|
+
tableActionLabels: g,
|
|
25
|
+
tableDownloadFilename: _,
|
|
26
|
+
tableOnOpenInCanvas: v,
|
|
27
|
+
tableScrollRegionAriaLabel: y,
|
|
28
|
+
mathScrollRegionAriaLabel: b,
|
|
29
|
+
classNames: x
|
|
28
30
|
}));
|
|
29
31
|
//#endregion
|
|
30
32
|
export { a as MDMessageViewer };
|