@epam/ai-dial-chat-shared 1.3.0-dev.35 → 1.3.0-dev.37
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/ConfirmationView.d.ts +57 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- 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/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -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/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 +36 -0
- package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +53 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
- 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 +62 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +137 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- 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/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 +31 -0
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
- 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 +18 -0
- package/entry-points/markdown.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +52 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
- 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 +156 -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.d.ts +77 -3167
- package/index.d.ts.map +1 -0
- package/markdown.d.ts +2 -465
- 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/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 +1 -1
- 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/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/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/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
|
@@ -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,62 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Components } 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
|
+
/** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
36
|
+
codeBlockCopyLabel?: string;
|
|
37
|
+
/** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
|
|
38
|
+
codeBlockCopiedLabel?: string;
|
|
39
|
+
/** Accessible label for the code-block download button. Forwarded to {@link MarkdownRenderer}. */
|
|
40
|
+
codeBlockDownloadLabel?: string;
|
|
41
|
+
/** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
42
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
43
|
+
/** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
|
|
44
|
+
tableActionLabels?: MarkdownTableActionLabels;
|
|
45
|
+
/** Filename used when downloading a Markdown table as CSV. Forwarded to {@link MarkdownRenderer}. */
|
|
46
|
+
tableDownloadFilename?: string;
|
|
47
|
+
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
48
|
+
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
49
|
+
tableScrollRegionAriaLabel?: string;
|
|
50
|
+
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}. */
|
|
51
|
+
mathScrollRegionAriaLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
|
|
54
|
+
* pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
|
|
55
|
+
* stable reference: this component is memoised.
|
|
56
|
+
*/
|
|
57
|
+
classNames?: MarkdownRendererClassNames;
|
|
58
|
+
}
|
|
59
|
+
/** Renders assistant message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
|
|
60
|
+
export declare const MDMessageViewer: FC<MDMessageViewerProps>;
|
|
61
|
+
export {};
|
|
62
|
+
//# 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,MAAM,gBAAgB,CAAC;AACjD,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,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,mHAAmH;AACnH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA6CpD,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Components, Options } from 'react-markdown';
|
|
3
|
+
import { CodeBlockTheme } from '../../types/code-editor';
|
|
4
|
+
import { MarkdownTableActionLabels, MarkdownTableClassNames } from './Table/MarkdownTable';
|
|
5
|
+
/** Per-element className overrides passed to {@link MarkdownRenderer}. */
|
|
6
|
+
export interface MarkdownRendererClassNames extends MarkdownTableClassNames {
|
|
7
|
+
/** Class on `<h1>`. */
|
|
8
|
+
h1?: string;
|
|
9
|
+
/** Class on `<h2>`. */
|
|
10
|
+
h2?: string;
|
|
11
|
+
/** Class on `<h3>`. */
|
|
12
|
+
h3?: string;
|
|
13
|
+
/** Class on `<h4>`. */
|
|
14
|
+
h4?: string;
|
|
15
|
+
/** Class on `<h5>`. */
|
|
16
|
+
h5?: string;
|
|
17
|
+
/** Class on `<h6>`. */
|
|
18
|
+
h6?: string;
|
|
19
|
+
/** Classes on `<p>` elements. */
|
|
20
|
+
p?: string;
|
|
21
|
+
/** Extra classes on `<ul>` (base: `list-disc ps-[2em]`). */
|
|
22
|
+
ul?: string;
|
|
23
|
+
/** Extra classes on `<ol>` (base: `list-decimal ps-[2em]`). */
|
|
24
|
+
ol?: string;
|
|
25
|
+
/** Typography class for `<strong>`. Defaults to `'dial-body-paragraph-semi-text'` — the semibold step matching the default `p` class. */
|
|
26
|
+
strong?: string;
|
|
27
|
+
/** Typography class for `<em>`. Defaults to `'italic'`. */
|
|
28
|
+
em?: string;
|
|
29
|
+
/** Extra classes on the {@link MarkdownCodeBlock} outer container. */
|
|
30
|
+
codeBlockContainer?: string;
|
|
31
|
+
/** Extra classes on the {@link MarkdownCodeBlock} header bar. */
|
|
32
|
+
codeBlockHeader?: string;
|
|
33
|
+
/** Typography class for the `<code>` element inside a code block. Defaults to `'dial-code-text'`. */
|
|
34
|
+
codeFont?: string;
|
|
35
|
+
/** Extra classes on inline `<code>` (base: `rounded px-1 py-0.5`). */
|
|
36
|
+
codeInline?: string;
|
|
37
|
+
/** Typography class for inline `<code>`. Defaults to `'dial-code-text'`. */
|
|
38
|
+
codeInlineFont?: string;
|
|
39
|
+
/** Extra classes on `<blockquote>` (base uses a logical start border and padding). */
|
|
40
|
+
blockquote?: string;
|
|
41
|
+
/** Extra classes on `<a>` (base uses the accent text color and an offset underline). */
|
|
42
|
+
link?: string;
|
|
43
|
+
/** Extra classes on `<hr>` separators. */
|
|
44
|
+
hr?: string;
|
|
45
|
+
/** Extra classes on deleted text rendered by GFM. */
|
|
46
|
+
del?: string;
|
|
47
|
+
/** Extra classes on `<th>` and `<td>` (base includes borders, spacing, and text wrapping). */
|
|
48
|
+
tableCell?: string;
|
|
49
|
+
/** Extra classes on `<td>` only (applied before `tableCell`, e.g. a body-cell background). */
|
|
50
|
+
tableBodyCell?: string;
|
|
51
|
+
/** Extra classes on `<th>` only (applied alongside `tableCell`). */
|
|
52
|
+
tableHeader?: string;
|
|
53
|
+
/** Typography class for `<th>` cells. Defaults to `'dial-tiny-lead-semi-text'`. Text color is set separately via `colors.tableHeaderText`. */
|
|
54
|
+
tableHeaderFont?: string;
|
|
55
|
+
/** Extra classes on the scrollable wrapper around block (display) LaTeX formulas. */
|
|
56
|
+
mathBlock?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Props for {@link MarkdownRenderer}. */
|
|
59
|
+
export interface MarkdownRendererProps {
|
|
60
|
+
/** Raw markdown string to render. */
|
|
61
|
+
content: string;
|
|
62
|
+
/** Classes applied to the renderer root. */
|
|
63
|
+
containerClassName?: string;
|
|
64
|
+
/** When true, appended content is revealed gradually for smoother streaming updates. */
|
|
65
|
+
isStreaming?: boolean;
|
|
66
|
+
/** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
|
|
67
|
+
streamCharactersPerSecond?: number;
|
|
68
|
+
/** Per-element styling classes. Merged with structural base classes inside the component. Defaults to no overrides (`{}`). */
|
|
69
|
+
classNames?: MarkdownRendererClassNames;
|
|
70
|
+
/**
|
|
71
|
+
* Full component overrides merged on top of the built-in map.
|
|
72
|
+
* Use for elements not covered by `classNames`.
|
|
73
|
+
*/
|
|
74
|
+
components?: Components;
|
|
75
|
+
/**
|
|
76
|
+
* Rewrites `href` and `src` values before they are rendered. The result is
|
|
77
|
+
* still passed through react-markdown's protocol allowlist. Hosts use this
|
|
78
|
+
* to map DIAL file ids (`files/{bucket}/{path}`) to download URLs. Defaults
|
|
79
|
+
* to no extra rewrite.
|
|
80
|
+
*/
|
|
81
|
+
urlTransform?: (url: string) => string;
|
|
82
|
+
/** Extra rehype plugins, applied after the built-in KaTeX pass. Defaults to none. */
|
|
83
|
+
rehypePlugins?: NonNullable<Options['rehypePlugins']>;
|
|
84
|
+
/**
|
|
85
|
+
* Label shown with a shimmer animation while `isStreaming` is true and no content has arrived yet.
|
|
86
|
+
* Defaults to `'Thinking'`. Pass a translated string from the consuming app.
|
|
87
|
+
*/
|
|
88
|
+
thinkingLabel?: string;
|
|
89
|
+
/** Accessible label for the copy button in code blocks. Defaults to `'Copy code'`. */
|
|
90
|
+
codeBlockCopyLabel?: string;
|
|
91
|
+
/** Accessible label for the copy button after copying. Defaults to `'Copied!'`. */
|
|
92
|
+
codeBlockCopiedLabel?: string;
|
|
93
|
+
/** Accessible label for the download button in code blocks. Defaults to `'Download code'`. */
|
|
94
|
+
codeBlockDownloadLabel?: string;
|
|
95
|
+
/** Syntax highlight color theme for code blocks and tables. Defaults to `'dark'`. */
|
|
96
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
97
|
+
/** Color overrides applied as CSS custom properties. */
|
|
98
|
+
colors?: MarkdownRendererColors;
|
|
99
|
+
/** Localized labels for Markdown table actions. Supplying them enables the action bar. */
|
|
100
|
+
tableActionLabels?: MarkdownTableActionLabels;
|
|
101
|
+
/** Filename used when downloading a Markdown table as CSV. Defaults to `'table.csv'`. */
|
|
102
|
+
tableDownloadFilename?: string;
|
|
103
|
+
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
104
|
+
/** Accessible label for a table's horizontally scrollable region. Defaults to `'Scrollable table'`. */
|
|
105
|
+
tableScrollRegionAriaLabel?: string;
|
|
106
|
+
/** Accessible label for a block formula's horizontally scrollable region. Defaults to `'Scrollable formula'`. */
|
|
107
|
+
mathScrollRegionAriaLabel?: string;
|
|
108
|
+
}
|
|
109
|
+
/** CSS custom-property overrides for the `MarkdownRenderer` component. */
|
|
110
|
+
export interface MarkdownRendererColors {
|
|
111
|
+
/** Primary color of the "thinking" shimmer gradient. */
|
|
112
|
+
thinkingPrimary?: string;
|
|
113
|
+
/** Secondary color of the "thinking" shimmer gradient. */
|
|
114
|
+
thinkingSecondary?: string;
|
|
115
|
+
/** Border color for `<hr>` separators and table cell borders. */
|
|
116
|
+
border?: string;
|
|
117
|
+
/** Border color for the `<blockquote>` start border. Defaults to `--stroke-primary`. */
|
|
118
|
+
blockquoteBorder?: string;
|
|
119
|
+
/** Text color for `<blockquote>` content. Defaults to `--text-secondary`. */
|
|
120
|
+
blockquoteText?: string;
|
|
121
|
+
/** Text color for `<a>` links. Defaults to `--text-accent`. */
|
|
122
|
+
linkText?: string;
|
|
123
|
+
/** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus`. */
|
|
124
|
+
linkFocus?: string;
|
|
125
|
+
/** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
|
|
126
|
+
tableHeaderText?: string;
|
|
127
|
+
/** Text color for `<h6>` headings. Defaults to `--text-secondary`. */
|
|
128
|
+
headingSixText?: string;
|
|
129
|
+
/** Background color for inline `<code>` spans. Defaults to `--bg-layer-raised`. */
|
|
130
|
+
inlineCodeBackground?: string;
|
|
131
|
+
/** Text color for inline `<code>` spans. Defaults to `--text-primary`. */
|
|
132
|
+
inlineCodeText?: string;
|
|
133
|
+
}
|
|
134
|
+
export declare const defaultMarkdownComponents: Components;
|
|
135
|
+
/** Markdown renderer with GFM support. Styling is driven by `classNames`; structural overrides via `components`. */
|
|
136
|
+
export declare const MarkdownRenderer: FC<MarkdownRendererProps>;
|
|
137
|
+
//# sourceMappingURL=MarkdownRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/MarkdownRenderer.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** Props for {@link MarkdownMathBlock}. */
|
|
3
|
+
export interface MarkdownMathBlockProps {
|
|
4
|
+
/** Rendered KaTeX output — the `<math display="block">` element and its subtree. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Extra classes on the scroll container. */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Accessible label for the horizontally scrollable region. Defaults to `'Scrollable formula'`. */
|
|
9
|
+
scrollRegionAriaLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Wraps KaTeX display math in a horizontally scrollable region so a formula
|
|
13
|
+
* wider than the message column stays reachable instead of being clipped.
|
|
14
|
+
* The region only becomes a labelled, keyboard-focusable landmark while it
|
|
15
|
+
* actually overflows, so ordinary formulas add no tab stop or noise.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MarkdownMathBlock: FC<MarkdownMathBlockProps>;
|
|
18
|
+
//# sourceMappingURL=MarkdownMathBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownMathBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Math/MarkdownMathBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAQ,MAAM,OAAO,CAAC;AAMtD,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,QAAQ,EAAE,SAAS,CAAC;IACpB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mGAAmG;IACnG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAqCxD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MarkdownRendererClassNames, MarkdownRendererColors } from './MarkdownRenderer';
|
|
3
|
+
/** Props for {@link PlainTextRenderer}. */
|
|
4
|
+
export interface PlainTextRendererProps {
|
|
5
|
+
/** Message text. Rendered verbatim — never parsed as Markdown or HTML. */
|
|
6
|
+
content: string;
|
|
7
|
+
/** Classes applied to the renderer root. */
|
|
8
|
+
containerClassName?: string;
|
|
9
|
+
/** When true, appended content is revealed gradually for smoother streaming updates. */
|
|
10
|
+
isStreaming?: boolean;
|
|
11
|
+
/** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
|
|
12
|
+
streamCharactersPerSecond?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Typography classes. Only `p` is read — the single paragraph the renderer
|
|
15
|
+
* emits — so the same object a Markdown message is styled with keeps both
|
|
16
|
+
* formats on one type scale.
|
|
17
|
+
*/
|
|
18
|
+
classNames?: Pick<MarkdownRendererClassNames, 'p'>;
|
|
19
|
+
/**
|
|
20
|
+
* Label shown with a shimmer animation while `isStreaming` is true and no
|
|
21
|
+
* content has arrived yet. Defaults to `'Thinking'`.
|
|
22
|
+
*/
|
|
23
|
+
thinkingLabel?: string;
|
|
24
|
+
/** Color overrides applied as CSS custom properties. */
|
|
25
|
+
colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Renders message text as plain text: no Markdown pipeline, no raw HTML, no
|
|
29
|
+
* syntax highlighting. The text is a React text child, so it is escaped by
|
|
30
|
+
* construction — a table, a heading, or `**bold**` reaches the reader exactly
|
|
31
|
+
* as the model emitted it, which is what a conversation's `plain_text`
|
|
32
|
+
* response format promises.
|
|
33
|
+
*
|
|
34
|
+
* Lives beside {@link MarkdownRenderer} because it is the other half of the
|
|
35
|
+
* same choice: both render an assistant message body, and both are selected
|
|
36
|
+
* by `MDMessageViewer` from the conversation's response format.
|
|
37
|
+
*/
|
|
38
|
+
export declare const PlainTextRenderer: FC<PlainTextRendererProps>;
|
|
39
|
+
//# sourceMappingURL=PlainTextRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlainTextRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/PlainTextRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAG5B,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wFAAwF;IACxF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;IACnD;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,MAAM,CAAC,EAAE,IAAI,CACX,sBAAsB,EACtB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;CACH;AAKD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAuCxD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { MarkdownTableActionLabels } from './table-serialization';
|
|
3
|
+
export { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, MARKDOWN_TABLE_CSV_MIME_TYPE, MarkdownTableCopyFormat, serializeMarkdownTableRows, type MarkdownTableActionLabels, } from './table-serialization';
|
|
4
|
+
export type { MarkdownTableHeaderAction } from './useMarkdownTableActions/useMarkdownTableActions';
|
|
5
|
+
/** Per-element className overrides for {@link MarkdownTable}. */
|
|
6
|
+
export interface MarkdownTableClassNames {
|
|
7
|
+
/** Extra classes on the outer table wrapper. */
|
|
8
|
+
tableWrapper?: string;
|
|
9
|
+
/** Typography class for the table. Defaults to `'dial-small-text'`. */
|
|
10
|
+
tableFont?: string;
|
|
11
|
+
/** Extra classes on the scrollable table region. */
|
|
12
|
+
tableScrollContainer?: string;
|
|
13
|
+
}
|
|
14
|
+
/** CSS custom-property overrides for the `MarkdownTable` component. */
|
|
15
|
+
export interface MarkdownTableColors {
|
|
16
|
+
/** Scroll container border color. */
|
|
17
|
+
border?: string;
|
|
18
|
+
/** Scrollbar thumb/track color. */
|
|
19
|
+
scrollbar?: string;
|
|
20
|
+
/** Edge-fade mask color; only its alpha is used. Defaults to `--stroke-focus-black`. */
|
|
21
|
+
fade?: string;
|
|
22
|
+
/** Divider color between rows. Defaults to `--stroke-tertiary`. */
|
|
23
|
+
rowDivider?: string;
|
|
24
|
+
/** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
|
|
25
|
+
rowHoverBackground?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Props for {@link MarkdownTable}. */
|
|
28
|
+
export interface MarkdownTableProps {
|
|
29
|
+
/** Table body/children rendered inside the scrollable wrapper (typically `<thead>`/`<tbody>` from react-markdown). */
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
/** Per-element className overrides. */
|
|
32
|
+
classNames: MarkdownTableClassNames;
|
|
33
|
+
/** Color overrides applied as CSS custom properties. */
|
|
34
|
+
colors?: MarkdownTableColors;
|
|
35
|
+
/** Localized labels for table actions. Supplying them enables the action bar. */
|
|
36
|
+
actionLabels?: MarkdownTableActionLabels;
|
|
37
|
+
/** Filename used when downloading the table as CSV. Defaults to `'table.csv'`. */
|
|
38
|
+
downloadFilename?: string;
|
|
39
|
+
/** When true, table actions are hidden while content is still arriving. */
|
|
40
|
+
isStreaming?: boolean;
|
|
41
|
+
onOpenInCanvas?: (markdown: string) => void;
|
|
42
|
+
/** Accessible label for the horizontally scrollable region. Defaults to `'Scrollable table'`. */
|
|
43
|
+
scrollRegionAriaLabel?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Renders a responsive Markdown table with an end fade while more columns are available. */
|
|
46
|
+
export declare const MarkdownTable: FC<MarkdownTableProps>;
|
|
47
|
+
//# sourceMappingURL=MarkdownTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTable.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/MarkdownTable.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EAAE,EACP,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAQf,OAAO,EAKL,KAAK,yBAAyB,EAC/B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,wCAAwC,EACxC,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,yBAAyB,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AAEnG,iEAAiE;AACjE,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,sHAAsH;IACtH,QAAQ,EAAE,SAAS,CAAC;IACpB,uCAAuC;IACvC,UAAU,EAAE,uBAAuB,CAAC;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,iFAAiF;IACjF,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,iGAAiG;IACjG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAID,6FAA6F;AAC7F,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA6JhD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** A single action rendered by {@link TableHeader}. */
|
|
3
|
+
export interface TableHeaderAction {
|
|
4
|
+
/** Stable accessible name and tooltip text. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Decorative icon content rendered inside the action button. */
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
/** Called when the action button is activated. */
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** Props for {@link TableHeader}. */
|
|
12
|
+
export interface TableHeaderProps {
|
|
13
|
+
/** Content rendered at the inline start of the header. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
/** Action descriptors rendered as icon buttons at the inline end. */
|
|
16
|
+
actions?: TableHeaderAction[];
|
|
17
|
+
/** Extra classes merged onto the header. */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Reusable table header with caller-supplied leading content and actions. */
|
|
21
|
+
export declare const TableHeader: FC<TableHeaderProps>;
|
|
22
|
+
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,SAAS,CAAC;IAChB,kDAAkD;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8EAA8E;AAC9E,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAgC5C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum MarkdownTableCopyFormat {
|
|
2
|
+
Csv = "csv",
|
|
3
|
+
Markdown = "markdown"
|
|
4
|
+
}
|
|
5
|
+
/** Default filename used when downloading a Markdown table as CSV. */
|
|
6
|
+
export declare const DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME = "table.csv";
|
|
7
|
+
/** MIME type used when downloading a Markdown table as CSV. */
|
|
8
|
+
export declare const MARKDOWN_TABLE_CSV_MIME_TYPE = "text/csv;charset=utf-8";
|
|
9
|
+
export interface MarkdownTableActionLabels {
|
|
10
|
+
copyLabel?: string;
|
|
11
|
+
copiedLabel?: string;
|
|
12
|
+
downloadCsvLabel?: string;
|
|
13
|
+
openInCanvasLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const serializeMarkdownTableRows: (rows: readonly HTMLTableRowElement[], format: MarkdownTableCopyFormat) => string;
|
|
16
|
+
//# sourceMappingURL=table-serialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-serialization.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/table-serialization.ts"],"names":[],"mappings":"AAAA,oBAAY,uBAAuB;IACjC,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB;AAED,sEAAsE;AACtE,eAAO,MAAM,wCAAwC,cAAc,CAAC;AACpE,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AAErE,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAsID,eAAO,MAAM,0BAA0B,GACrC,MAAM,SAAS,mBAAmB,EAAE,EACpC,QAAQ,uBAAuB,KAC9B,MAiBF,CAAC"}
|
package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MarkdownTableActionLabels } from '../table-serialization';
|
|
3
|
+
/** A table action rendered as an icon button. */
|
|
4
|
+
export interface MarkdownTableHeaderAction {
|
|
5
|
+
/** Stable accessible name and tooltip text. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Decorative icon content. */
|
|
8
|
+
icon: ReactNode;
|
|
9
|
+
/** Called when the action is activated. */
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
}
|
|
12
|
+
/** Params for {@link useMarkdownTableActions}. */
|
|
13
|
+
export interface UseMarkdownTableActionsParams {
|
|
14
|
+
/** Localized labels for table actions. `undefined` yields no actions. */
|
|
15
|
+
actionLabels: MarkdownTableActionLabels | undefined;
|
|
16
|
+
/** Whether the table has just been copied (shows a checkmark on the copy button). */
|
|
17
|
+
isCopied: boolean;
|
|
18
|
+
/** Called when the copy action is activated. */
|
|
19
|
+
onCopy: () => void;
|
|
20
|
+
/** Called when the download-as-CSV action is activated. */
|
|
21
|
+
onDownloadCsv: () => void;
|
|
22
|
+
/** Called when the open-in-canvas action is activated. Omit to hide that action. */
|
|
23
|
+
onOpenInCanvas?: () => void;
|
|
24
|
+
}
|
|
25
|
+
/** Builds the {@link MarkdownTableHeaderAction} list for a table's action bar from its localized labels. */
|
|
26
|
+
export declare const useMarkdownTableActions: ({ actionLabels, isCopied, onCopy, onDownloadCsv, onOpenInCanvas, }: UseMarkdownTableActionsParams) => MarkdownTableHeaderAction[];
|
|
27
|
+
//# sourceMappingURL=useMarkdownTableActions.d.ts.map
|
package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMarkdownTableActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,iDAAiD;AACjD,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,yEAAyE;IACzE,YAAY,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACpD,qFAAqF;IACrF,QAAQ,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,4GAA4G;AAC5G,eAAO,MAAM,uBAAuB,GAAI,oEAMrC,6BAA6B,KAAG,yBAAyB,EAyD3D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for {@link MarkdownTaskCheckbox}. */
|
|
3
|
+
export interface MarkdownTaskCheckboxProps {
|
|
4
|
+
/** Whether the GFM task-list item is checked. Defaults to `false`. */
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Read-only checkbox for GFM task-list items (`- [ ]` / `- [x]`). */
|
|
8
|
+
export declare const MarkdownTaskCheckbox: FC<MarkdownTaskCheckboxProps>;
|
|
9
|
+
//# sourceMappingURL=MarkdownTaskCheckbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTaskCheckbox.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAM9D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MarkdownRendererColors } from './MarkdownRenderer';
|
|
3
|
+
/** Props for {@link ThinkingShimmer}. */
|
|
4
|
+
export interface ThinkingShimmerProps {
|
|
5
|
+
/** Text rendered with the shimmer animation. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Gradient color overrides applied as CSS custom properties. */
|
|
8
|
+
colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The "thinking" placeholder both message renderers show while a stream has
|
|
12
|
+
* started but no content has arrived yet. Owns the mapping from the public
|
|
13
|
+
* color props to the gradient's CSS variables — `thinkingPrimary` drives
|
|
14
|
+
* `--cm-thinking-inverted` — so that mapping exists in one place.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ThinkingShimmer: FC<ThinkingShimmerProps>;
|
|
17
|
+
//# sourceMappingURL=ThinkingShimmer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThinkingShimmer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/ThinkingShimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,MAAM,CAAC,EAAE,IAAI,CACX,sBAAsB,EACtB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;CACH;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAapD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MarkdownRendererClassNames } from './MarkdownRenderer';
|
|
2
|
+
/** Default typography classNames for rendering markdown with full visual hierarchy. */
|
|
3
|
+
export declare const DEFAULT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
4
|
+
/**
|
|
5
|
+
* {@link DEFAULT_MARKDOWN_CLASS_NAMES} with the body copy one step down the
|
|
6
|
+
* type scale. Headings, code, and tables are unchanged — only the text that
|
|
7
|
+
* dominates a long answer shrinks, so more of it fits on a narrow viewport.
|
|
8
|
+
*/
|
|
9
|
+
export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
10
|
+
//# sourceMappingURL=markdown-class-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-class-names.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/markdown-class-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,uFAAuF;AACvF,eAAO,MAAM,4BAA4B,EAAE,0BAe1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,0BAI1C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Minimal hast node shape walked by {@link rehypePreserveSpaces}. */
|
|
2
|
+
interface HastNodeLike {
|
|
3
|
+
/** Node type — `'element'`, `'text'`, `'root'`, … */
|
|
4
|
+
type: string;
|
|
5
|
+
/** Tag name of an element node. */
|
|
6
|
+
tagName?: string;
|
|
7
|
+
/** Text of a text node. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Child nodes of a parent node. */
|
|
10
|
+
children?: HastNodeLike[];
|
|
11
|
+
}
|
|
12
|
+
/** Rehype plugin that keeps runs of consecutive spaces in prose visible instead of letting HTML collapse them to one. */
|
|
13
|
+
export declare const rehypePreserveSpaces: () => (tree: HastNodeLike) => void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=markdown-whitespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-whitespace.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/markdown-whitespace.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,UAAU,YAAY;IACpB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AA8BD,yHAAyH;AACzH,eAAO,MAAM,oBAAoB,SAAU,MAAM,YAAY,SAE5D,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for {@link MarkdownWithPlaceholders}. */
|
|
3
|
+
export interface MarkdownWithPlaceholdersProps {
|
|
4
|
+
/** Raw markdown string to render, read-only. */
|
|
5
|
+
content: string;
|
|
6
|
+
/** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
|
|
7
|
+
headingClassName?: string;
|
|
8
|
+
/** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Copy code'`. */
|
|
9
|
+
codeBlockCopyLabel?: string;
|
|
10
|
+
/** Status announced after a code block has been copied. Forwarded to {@link MarkdownRenderer}; defaults to `'Copied!'`. */
|
|
11
|
+
codeBlockCopiedLabel?: string;
|
|
12
|
+
/** Accessible label for the download button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Download code'`. */
|
|
13
|
+
codeBlockDownloadLabel?: string;
|
|
14
|
+
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable table'`. */
|
|
15
|
+
tableScrollRegionAriaLabel?: string;
|
|
16
|
+
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable formula'`. */
|
|
17
|
+
mathScrollRegionAriaLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renders read-only markdown with every `{{param}}` token wrapped in a
|
|
21
|
+
* `cat-prompt-variable`-classed span the host can style apart from the
|
|
22
|
+
* surrounding prose.
|
|
23
|
+
*/
|
|
24
|
+
export declare const MarkdownWithPlaceholders: FC<MarkdownWithPlaceholdersProps>;
|
|
25
|
+
//# sourceMappingURL=MarkdownWithPlaceholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithPlaceholders.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6HAA6H;IAC7H,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2HAA2H;IAC3H,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qIAAqI;IACrI,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iIAAiI;IACjI,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,2IAA2I;IAC3I,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAKD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAsBtE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** CSS custom-property overrides for the `PanelEmptyState` component. */
|
|
3
|
+
export interface PanelEmptyStateColors {
|
|
4
|
+
/** Label text color. */
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Props for `PanelEmptyState`. */
|
|
8
|
+
export interface PanelEmptyStateProps {
|
|
9
|
+
/** Primary message of the empty state. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Color overrides applied as CSS custom properties. */
|
|
12
|
+
colors?: PanelEmptyStateColors;
|
|
13
|
+
/** CSS class applied to the label text. Defaults to `'dial-tiny-text'`. */
|
|
14
|
+
labelClassName?: string;
|
|
15
|
+
/** CSS class applied to the empty-state container. */
|
|
16
|
+
containerClassName?: string;
|
|
17
|
+
/** Decorative illustration above the label. Defaults to the kit's `NoDataContent` document mark. */
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/** Centered empty-state block for use inside a sidebar panel body. */
|
|
21
|
+
export declare const PanelEmptyState: FC<PanelEmptyStateProps>;
|
|
22
|
+
//# sourceMappingURL=PanelEmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelEmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/PanelEmptyState/PanelEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtD,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oGAAoG;IACpG,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,sEAAsE;AACtE,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAuBpD,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { EntityHeaderItem } from '../../models/entity';
|
|
3
|
+
/** CSS custom-property overrides for the `ResourceSummary` row. */
|
|
4
|
+
export interface ResourceSummaryColors {
|
|
5
|
+
/** Row border color. Defaults to `--stroke-tertiary`. */
|
|
6
|
+
border?: string;
|
|
7
|
+
/** Row background color. Defaults to `--bg-layer-sunken`. */
|
|
8
|
+
background?: string;
|
|
9
|
+
/** Version tag border color. Defaults to `--stroke-tertiary`. */
|
|
10
|
+
versionTagBorder?: string;
|
|
11
|
+
/** Version tag background color. Defaults to `--bg-control-accent-alpha`. */
|
|
12
|
+
versionTagBackground?: string;
|
|
13
|
+
/** Version tag text color. Defaults to `--text-accent`. */
|
|
14
|
+
versionTagText?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Typography overrides for the `ResourceSummary` row. */
|
|
17
|
+
export interface ResourceSummaryTypography {
|
|
18
|
+
/** Typography class applied to the version tag. Defaults to `'dial-tiny-text'`. */
|
|
19
|
+
versionTagClassName?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Style overrides for `ResourceSummary`. */
|
|
22
|
+
export interface ResourceSummaryStyles {
|
|
23
|
+
/** Color overrides applied as CSS custom properties. */
|
|
24
|
+
colors?: ResourceSummaryColors;
|
|
25
|
+
/** Typography class overrides. */
|
|
26
|
+
typography?: ResourceSummaryTypography;
|
|
27
|
+
}
|
|
28
|
+
/** Props for `ResourceSummary`. */
|
|
29
|
+
export interface ResourceSummaryProps {
|
|
30
|
+
/** Entity shown in the row as an icon, type label, name, and version tag. Ignored when `children` is set. */
|
|
31
|
+
item?: EntityHeaderItem;
|
|
32
|
+
/** Row content rendered instead of the entity header and version tag. */
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
/** Version tag text; `{version}` is replaced with `item.version`. The tag is omitted when `item.version` is empty. Defaults to `'Version {version} · current'`. */
|
|
35
|
+
versionLabel?: string;
|
|
36
|
+
/** Whether the version is shown as a trailing tag. When `false` it is shown inline after the name instead. Defaults to `true`. */
|
|
37
|
+
hasVersionTag?: boolean;
|
|
38
|
+
/** Size of the entity icon. Defaults to `40`. */
|
|
39
|
+
iconSize?: number;
|
|
40
|
+
/** CSS class applied to the row. */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Style overrides. */
|
|
43
|
+
styles?: ResourceSummaryStyles;
|
|
44
|
+
/** Color overrides applied as CSS custom properties. Prefer `styles.colors`. */
|
|
45
|
+
colors?: ResourceSummaryColors;
|
|
46
|
+
}
|
|
47
|
+
/** Bordered summary row pairing an entity's identity block with its current-version tag. */
|
|
48
|
+
export declare const ResourceSummary: FC<ResourceSummaryProps>;
|
|
49
|
+
//# sourceMappingURL=ResourceSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceSummary/ResourceSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,mEAAmE;AACnE,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0DAA0D;AAC1D,MAAM,WAAW,yBAAyB;IACxC,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,kCAAkC;IAClC,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACxC;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,6GAA6G;IAC7G,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mKAAmK;IACnK,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kIAAkI;IAClI,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,gFAAgF;IAChF,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED,4FAA4F;AAC5F,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2DpD,CAAC"}
|