@epam/ai-dial-chat-shared 1.1.0-dev.29 → 1.1.0-dev.293
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/CopyButton/CopyButton.d.ts +17 -0
- package/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts +1 -10
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -1
- package/components/EntityHeader/EntityHeader.d.ts +32 -0
- package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts +16 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
- package/components/FeaturedChip/FeaturedChip.d.ts +14 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts +3 -4
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -1
- package/components/ItemHeader/ItemHeader.d.ts +36 -0
- package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +10 -7
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/components/MarkdownRenderer/MDMessageViewer.d.ts +7 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -1
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +23 -12
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +8 -5
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -1
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +1 -5
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -1
- package/components/MarkdownRenderer/markdown-class-names.d.ts +6 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -1
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +15 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.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 +2 -0
- package/constants/icon.d.ts.map +1 -1
- package/constants/mime-types.d.ts +3 -6
- package/constants/mime-types.d.ts.map +1 -1
- package/hooks/useCodeCopy.d.ts +1 -9
- package/hooks/useCodeCopy.d.ts.map +1 -1
- package/hooks/useCollapsedText.d.ts +3 -7
- package/hooks/useCollapsedText.d.ts.map +1 -1
- package/hooks/useTableScroll.d.ts +1 -0
- package/hooks/useTableScroll.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.d.ts +19 -2
- package/index.d.ts.map +1 -1
- package/index.js +32626 -8227
- package/models/chat.d.ts +81 -38
- package/models/chat.d.ts.map +1 -1
- package/models/conversation-classification.d.ts +9 -0
- package/models/conversation-classification.d.ts.map +1 -0
- package/models/conversation-transfer.d.ts +28 -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 +2 -8
- package/models/deployment-configuration.d.ts.map +1 -1
- package/models/entity.d.ts +15 -0
- package/models/entity.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 +13 -4
- package/types/entity-type.d.ts +10 -0
- package/types/entity-type.d.ts.map +1 -0
- package/types/mime-type.d.ts +9 -9
- package/types/mime-type.d.ts.map +1 -1
- package/utils/avatar-color.d.ts +3 -6
- package/utils/avatar-color.d.ts.map +1 -1
- package/utils/build-css-vars.d.ts +1 -4
- package/utils/build-css-vars.d.ts.map +1 -1
- package/utils/copy-to-clipboard.d.ts +13 -11
- package/utils/copy-to-clipboard.d.ts.map +1 -1
- package/utils/file-download.d.ts +4 -0
- package/utils/file-download.d.ts.map +1 -1
- package/utils/format-last-used.d.ts +1 -6
- package/utils/format-last-used.d.ts.map +1 -1
- 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 +1 -7
- package/utils/initials.d.ts.map +1 -1
- package/utils/latex.d.ts +11 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/message-attachment-to-display.d.ts +1 -1
- package/utils/message-attachment-to-display.d.ts.map +1 -1
- package/utils/message.d.ts +1 -7
- package/utils/message.d.ts.map +1 -1
- package/utils/mime-type.d.ts +11 -0
- package/utils/mime-type.d.ts.map +1 -0
- package/utils/prompt-variables.d.ts +38 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/string-utils.d.ts +6 -0
- package/utils/string-utils.d.ts.map +1 -1
- package/components/Highlight/Highlight.d.ts +0 -26
- package/components/Highlight/Highlight.d.ts.map +0 -1
- package/types/overlay/overlay-protocol.d.ts +0 -308
- package/types/overlay/overlay-protocol.d.ts.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementSize } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
export interface CopyButtonProps {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
isCopied: boolean;
|
|
7
|
+
copyLabel: string;
|
|
8
|
+
copiedLabel: string;
|
|
9
|
+
size?: ElementSize;
|
|
10
|
+
/** Accessible label for the button; falls back to `copyLabel` when omitted. */
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
iconSize?: number;
|
|
13
|
+
iconCopy?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const CopyIconButton: FC<CopyButtonProps>;
|
|
16
|
+
export declare const CopyButton: FC<CopyButtonProps>;
|
|
17
|
+
//# sourceMappingURL=CopyButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../../src/components/CopyButton/CopyButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AACD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CA2B9C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsB1C,CAAC"}
|
|
@@ -31,15 +31,6 @@ export interface DeploymentIconProps {
|
|
|
31
31
|
/** Style overrides. */
|
|
32
32
|
styles?: DeploymentIconStyles;
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Renders a deployment icon inside a rounded badge.
|
|
36
|
-
* The `size` prop is the outer badge dimension in pixels.
|
|
37
|
-
* The icon image is inset by ~11 % (matching Figma) to leave a visible backdrop.
|
|
38
|
-
* On image load error, or when `src` is absent, renders `InitialsAvatar` derived from
|
|
39
|
-
* `initialsName` (or the custom `fallback` node when provided).
|
|
40
|
-
* When `src` changes, the previous image stays visible until the new one has
|
|
41
|
-
* finished preloading, avoiding the blank frame a browser shows while an
|
|
42
|
-
* `<img>`'s `src` attribute is swapped in place.
|
|
43
|
-
*/
|
|
34
|
+
/** Renders a deployment icon inside a rounded badge, falling back to initials or a custom node when no image is available. */
|
|
44
35
|
export declare const DeploymentIcon: FC<DeploymentIconProps>;
|
|
45
36
|
//# sourceMappingURL=DeploymentIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeploymentIcon.d.ts","sourceRoot":"","sources":["../../../src/components/DeploymentIcon/DeploymentIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAM7E,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,6FAA6F;IAC7F,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,uBAAuB;IACvB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED
|
|
1
|
+
{"version":3,"file":"DeploymentIcon.d.ts","sourceRoot":"","sources":["../../../src/components/DeploymentIcon/DeploymentIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAM7E,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,6FAA6F;IAC7F,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,uBAAuB;IACvB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,8HAA8H;AAC9H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8FlD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { 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
|
+
/** CSS class applied to the icon badge, e.g. to set border-radius. Default: 'rounded-[14px]'. */
|
|
12
|
+
iconBadgeClassName?: string;
|
|
13
|
+
/** Typography CSS class for the version text. Falls back to `ItemHeader`'s own default when omitted. */
|
|
14
|
+
versionClassName?: string;
|
|
15
|
+
/** Whether to show `item.version` next to the title. Default: true. */
|
|
16
|
+
showVersion?: boolean;
|
|
17
|
+
/** Label for the featured tag shown when item.isFeatured is true. Default: 'Featured'. */
|
|
18
|
+
featuredLabel?: string;
|
|
19
|
+
/** Whether to render the featured tag. Default: true. */
|
|
20
|
+
hasFeaturedTag?: boolean;
|
|
21
|
+
/** Size of the deployment icon. Default: 48. */
|
|
22
|
+
iconSize?: number;
|
|
23
|
+
/** Search query string; when provided, matching text in the title is highlighted. */
|
|
24
|
+
query?: string;
|
|
25
|
+
/** 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. */
|
|
26
|
+
footer?: ReactNode;
|
|
27
|
+
/** CSS class for the featured chip. */
|
|
28
|
+
featuredChipClassName?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Reusable entity identity block: deployment icon, type label, name, version, and optional featured chip. */
|
|
31
|
+
export declare const EntityHeader: FC<EntityHeaderProps>;
|
|
32
|
+
//# 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,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,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,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;CAChC;AAED,8GAA8G;AAC9G,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAoD9C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Entity type label rendered as plain uppercase text — no pill, no background.
|
|
12
|
+
* Shared by the card grid (via AppIdentity) and the list view, so both
|
|
13
|
+
* densities of the catalog use the same type treatment.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EntityTypeLabel: FC<EntityTypeLabelProps>;
|
|
16
|
+
//# 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;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAOpD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { 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
|
+
/** Additional CSS class for typography overrides. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Entity category — resolves the label's color via ENTITY_TYPE_COLOR. */
|
|
10
|
+
type: CatalogEntityType;
|
|
11
|
+
}
|
|
12
|
+
/** Featured badge rendered on a catalog card when `item.isFeatured` is true. */
|
|
13
|
+
export declare const FeaturedChip: FC<FeaturedChipProps>;
|
|
14
|
+
//# sourceMappingURL=FeaturedChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeaturedChip.d.ts","sourceRoot":"","sources":["../../../src/components/FeaturedChip/FeaturedChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAK3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,gFAAgF;AAChF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAoB9C,CAAC"}
|
|
@@ -7,10 +7,9 @@ export interface InitialsAvatarProps {
|
|
|
7
7
|
size: number;
|
|
8
8
|
/** Extra classes applied to the root element (e.g. `'shrink-0'`). */
|
|
9
9
|
className?: string;
|
|
10
|
+
/** Extra classes applied to the initials text element (e.g. `'dial-h3-text'`). */
|
|
11
|
+
textClassName?: string;
|
|
10
12
|
}
|
|
11
|
-
/**
|
|
12
|
-
* A square badge showing 1–2 initials derived from `name` on a deterministic
|
|
13
|
-
* colour background. Used as the fallback when a deployment has no icon image.
|
|
14
|
-
*/
|
|
13
|
+
/** A square badge showing 1–2 initials derived from `name` on a deterministic colour background. */
|
|
15
14
|
export declare const InitialsAvatar: FC<InitialsAvatarProps>;
|
|
16
15
|
//# sourceMappingURL=InitialsAvatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialsAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/InitialsAvatar/InitialsAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InitialsAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/InitialsAvatar/InitialsAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,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,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oGAAoG;AACpG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAiClD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
/** Secondary value rendered after the title, such as a version or an item count. */
|
|
14
|
+
postfix?: number | string;
|
|
15
|
+
/** CSS class applied to the title. Defaults to `'dial-h3-text'`. */
|
|
16
|
+
titleClassName?: string;
|
|
17
|
+
/** CSS class applied to the postfix. Defaults to `'dial-tiny-text'`. */
|
|
18
|
+
postfixClassName?: string;
|
|
19
|
+
/** CSS class applied to the header row. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Search query; when provided, the matching part of the title is highlighted. */
|
|
22
|
+
query?: string;
|
|
23
|
+
/** Optional content rendered at the trailing end of the header row. */
|
|
24
|
+
trailing?: ReactNode;
|
|
25
|
+
/** Color overrides applied as CSS custom properties. */
|
|
26
|
+
colors?: ItemHeaderColors;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the title shrinks and truncates with an ellipsis. When `false` the
|
|
29
|
+
* title keeps its full width and the rest of the row gives way instead.
|
|
30
|
+
* Defaults to `true`.
|
|
31
|
+
*/
|
|
32
|
+
shouldTruncateTitle?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Item title header with optional numeric or string postfix and trailing slot. */
|
|
35
|
+
export declare const ItemHeader: FC<ItemHeaderProps>;
|
|
36
|
+
//# 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,oFAAoF;IACpF,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,CA0D1C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { CodeBlockTheme } from '../../../types/code-editor';
|
|
3
3
|
/** CSS custom-property overrides for the `MarkdownCodeBlock` component. */
|
|
4
4
|
export interface MarkdownCodeBlockColors {
|
|
@@ -27,24 +27,27 @@ export interface MarkdownCodeBlockProps {
|
|
|
27
27
|
theme?: CodeBlockTheme;
|
|
28
28
|
/** Accessible label for the copy button. Defaults to `'Copy code'`. */
|
|
29
29
|
copyLabel?: string;
|
|
30
|
-
/**
|
|
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
31
|
copiedLabel?: string;
|
|
32
32
|
/** Accessible label for the download button. Defaults to `'Download code'`. */
|
|
33
33
|
downloadLabel?: string;
|
|
34
|
+
/** When true, hides the download button while still showing copy. Defaults to `false`. */
|
|
35
|
+
hideDownload?: boolean;
|
|
34
36
|
/** Extra classes applied to the outer container element. */
|
|
35
37
|
containerClassName?: string;
|
|
36
38
|
/** Extra classes applied to the sticky header bar. */
|
|
37
39
|
headerClassName?: string;
|
|
38
40
|
/** Typography class for the `<code>` element (used when no language is detected). Defaults to `'dial-code-text'`. */
|
|
39
41
|
codeClassName?: string;
|
|
40
|
-
/** CSS class applied to the language label in the header. Defaults to `'dial-tiny-semi-text
|
|
42
|
+
/** 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`). */
|
|
41
43
|
languageLabelClassName?: string;
|
|
44
|
+
/** 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. */
|
|
45
|
+
title?: string;
|
|
46
|
+
/** Custom content rendered in the header in place of the plain label, e.g. a language/endpoint select. Defaults to the plain label text. */
|
|
47
|
+
titleSlot?: ReactNode;
|
|
42
48
|
/** Color overrides applied as CSS custom properties. */
|
|
43
49
|
colors?: MarkdownCodeBlockColors;
|
|
44
50
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Renders a fenced or multiline code block with a sticky header (language label + copy button),
|
|
47
|
-
* syntax highlighting via Prism, a height-constrained scrollable body, and always-LTR code direction.
|
|
48
|
-
*/
|
|
51
|
+
/** Renders a fenced or multi-line code block with syntax highlighting and a copy button. */
|
|
49
52
|
export declare const MarkdownCodeBlock: FC<MarkdownCodeBlockProps>;
|
|
50
53
|
//# sourceMappingURL=CodeBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,EAAQ,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAU5D,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,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;AAOD,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAmIxD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Components } from 'react-markdown';
|
|
3
3
|
import { CodeBlockTheme } from '../../types/code-editor';
|
|
4
|
+
import { MarkdownRendererClassNames } from './MarkdownRenderer';
|
|
4
5
|
/** Props for the {@link MDMessageViewer} markdown renderer. */
|
|
5
6
|
interface MDMessageViewerProps {
|
|
6
7
|
/** Raw markdown string to render. */
|
|
@@ -24,6 +25,12 @@ interface MDMessageViewerProps {
|
|
|
24
25
|
codeBlockCopiedLabel?: string;
|
|
25
26
|
/** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
|
|
26
27
|
codeBlockTheme?: CodeBlockTheme;
|
|
28
|
+
/**
|
|
29
|
+
* Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
|
|
30
|
+
* pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
|
|
31
|
+
* stable reference: this component is memoised.
|
|
32
|
+
*/
|
|
33
|
+
classNames?: MarkdownRendererClassNames;
|
|
27
34
|
}
|
|
28
35
|
/** Renders assistant message content as formatted markdown. */
|
|
29
36
|
export declare const MDMessageViewer: FC<MDMessageViewerProps>;
|
|
@@ -1 +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;
|
|
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,+DAA+D;AAC/D,UAAU,oBAAoB;IAC5B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,kGAAkG;IAClG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iGAAiG;IACjG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2FAA2F;IAC3F,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC;AAED,+DAA+D;AAC/D,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsBpD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { Components } from 'react-markdown';
|
|
2
|
+
import { Components, Options } from 'react-markdown';
|
|
3
3
|
import { CodeBlockTheme } from '../../types/code-editor';
|
|
4
4
|
import { MarkdownTableClassNames } from './Table/MarkdownTable';
|
|
5
5
|
/** Per-element className overrides passed to {@link MarkdownRenderer}. */
|
|
@@ -22,7 +22,7 @@ export interface MarkdownRendererClassNames extends MarkdownTableClassNames {
|
|
|
22
22
|
ul?: string;
|
|
23
23
|
/** Extra classes on `<ol>` (base: `list-decimal ps-5`). */
|
|
24
24
|
ol?: string;
|
|
25
|
-
/** Typography class for `<strong>`. Defaults to `'
|
|
25
|
+
/** Typography class for `<strong>`. Defaults to `'dial-body-paragraph-semi-text'` — the semibold step matching the default `p` class. */
|
|
26
26
|
strong?: string;
|
|
27
27
|
/** Typography class for `<em>`. Defaults to `'italic'`. */
|
|
28
28
|
em?: string;
|
|
@@ -55,7 +55,7 @@ export interface MarkdownRendererClassNames extends MarkdownTableClassNames {
|
|
|
55
55
|
tableBodyCell?: string;
|
|
56
56
|
/** Extra classes on `<th>` only (applied alongside `tableCell`). */
|
|
57
57
|
tableHeader?: string;
|
|
58
|
-
/** Typography class for `<th>` cells. Defaults to `'
|
|
58
|
+
/** Typography class for `<th>` cells. Defaults to `'dial-tiny-lead-semi-text'`. Text color is set separately via `colors.tableHeaderText`. */
|
|
59
59
|
tableHeaderFont?: string;
|
|
60
60
|
}
|
|
61
61
|
/** Props for {@link MarkdownRenderer}. */
|
|
@@ -73,6 +73,8 @@ export interface MarkdownRendererProps {
|
|
|
73
73
|
* Use for elements not covered by `classNames`.
|
|
74
74
|
*/
|
|
75
75
|
components?: Components;
|
|
76
|
+
/** Extra rehype plugins, applied after the built-in KaTeX pass. Defaults to none. */
|
|
77
|
+
rehypePlugins?: NonNullable<Options['rehypePlugins']>;
|
|
76
78
|
/**
|
|
77
79
|
* Label shown with a shimmer animation while `isStreaming` is true and no content has arrived yet.
|
|
78
80
|
* Defaults to `'Thinking'`. Pass a translated string from the consuming app.
|
|
@@ -86,10 +88,7 @@ export interface MarkdownRendererProps {
|
|
|
86
88
|
codeBlockTheme?: CodeBlockTheme;
|
|
87
89
|
/** Color overrides applied as CSS custom properties. */
|
|
88
90
|
colors?: MarkdownRendererColors;
|
|
89
|
-
/**
|
|
90
|
-
* Accessible label announced for a table's horizontally scrollable region.
|
|
91
|
-
* Defaults to `'Scrollable table'`.
|
|
92
|
-
*/
|
|
91
|
+
/** Accessible label for a table's horizontally scrollable region. Defaults to `'Scrollable table'`. */
|
|
93
92
|
tableScrollRegionAriaLabel?: string;
|
|
94
93
|
}
|
|
95
94
|
/** CSS custom-property overrides for the `MarkdownRenderer` component. */
|
|
@@ -100,12 +99,24 @@ export interface MarkdownRendererColors {
|
|
|
100
99
|
thinkingSecondary?: string;
|
|
101
100
|
/** Border color for `<hr>` separators and table cell borders. */
|
|
102
101
|
border?: string;
|
|
102
|
+
/** Border color for the `<blockquote>` start border. Defaults to `--stroke-primary`. */
|
|
103
|
+
blockquoteBorder?: string;
|
|
104
|
+
/** Text color for `<blockquote>` content. Defaults to `--text-secondary`. */
|
|
105
|
+
blockquoteText?: string;
|
|
106
|
+
/** Text color for `<a>` links. Defaults to `--text-accent`. */
|
|
107
|
+
linkText?: string;
|
|
108
|
+
/** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus-black`. */
|
|
109
|
+
linkFocus?: string;
|
|
110
|
+
/** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
|
|
111
|
+
tableHeaderText?: string;
|
|
112
|
+
/** Text color for `<h6>` headings. Defaults to `--text-secondary`. */
|
|
113
|
+
headingSixText?: string;
|
|
114
|
+
/** Background color for inline `<code>` spans. Defaults to `--bg-layer-raised`. */
|
|
115
|
+
inlineCodeBackground?: string;
|
|
116
|
+
/** Text color for inline `<code>` spans. Defaults to `--text-primary`. */
|
|
117
|
+
inlineCodeText?: string;
|
|
103
118
|
}
|
|
104
|
-
/**
|
|
105
|
-
* Shared component definitions for elements whose rendering is identical across
|
|
106
|
-
* all consumers. These are merged after `classNames`-built components and before
|
|
107
|
-
* explicit `components` overrides, so consumers can still override them.
|
|
108
|
-
*/
|
|
119
|
+
/** Default react-markdown component overrides shared across all consumers. */
|
|
109
120
|
export declare const defaultMarkdownComponents: Components;
|
|
110
121
|
/** Markdown renderer with GFM support. Styling is driven by `classNames`; structural overrides via `components`. */
|
|
111
122
|
export declare const MarkdownRenderer: FC<MarkdownRendererProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/MarkdownRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAsB,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/MarkdownRenderer.tsx"],"names":[],"mappings":"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"}
|
|
@@ -3,7 +3,7 @@ import { FC, ReactNode } from 'react';
|
|
|
3
3
|
export interface MarkdownTableClassNames {
|
|
4
4
|
/** Extra classes on the outer table wrapper. */
|
|
5
5
|
tableWrapper?: string;
|
|
6
|
-
/** Typography class for the table. Defaults to `'text
|
|
6
|
+
/** Typography class for the table. Defaults to `'dial-small-text'`. */
|
|
7
7
|
tableFont?: string;
|
|
8
8
|
}
|
|
9
9
|
/** CSS custom-property overrides for the `MarkdownTable` component. */
|
|
@@ -14,6 +14,12 @@ export interface MarkdownTableColors {
|
|
|
14
14
|
scrollbar?: string;
|
|
15
15
|
/** Edge-fade mask color. */
|
|
16
16
|
fade?: string;
|
|
17
|
+
/** Divider color between rows. Defaults to `--stroke-tertiary`. */
|
|
18
|
+
rowDivider?: string;
|
|
19
|
+
/** Background of even-indexed body rows. Defaults to `--bg-layer-base`. */
|
|
20
|
+
rowZebraBackground?: string;
|
|
21
|
+
/** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
|
|
22
|
+
rowHoverBackground?: string;
|
|
17
23
|
}
|
|
18
24
|
/** Props for {@link MarkdownTable}. */
|
|
19
25
|
export interface MarkdownTableProps {
|
|
@@ -23,10 +29,7 @@ export interface MarkdownTableProps {
|
|
|
23
29
|
classNames: MarkdownTableClassNames;
|
|
24
30
|
/** Color overrides applied as CSS custom properties. */
|
|
25
31
|
colors?: MarkdownTableColors;
|
|
26
|
-
/**
|
|
27
|
-
* Accessible label announced for the horizontally scrollable region.
|
|
28
|
-
* Defaults to `'Scrollable table'`.
|
|
29
|
-
*/
|
|
32
|
+
/** Accessible label for the horizontally scrollable region. Defaults to `'Scrollable table'`. */
|
|
30
33
|
scrollRegionAriaLabel?: string;
|
|
31
34
|
}
|
|
32
35
|
/** Renders a responsive Markdown table with an end fade while more columns are available. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownTable.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/MarkdownTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAQ,MAAM,OAAO,CAAC;AAMtD,iEAAiE;AACjE,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"MarkdownTable.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/MarkdownTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAQ,MAAM,OAAO,CAAC;AAMtD,iEAAiE;AACjE,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,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,iGAAiG;IACjG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,6FAA6F;AAC7F,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkEhD,CAAC"}
|
|
@@ -4,10 +4,6 @@ export interface MarkdownTaskCheckboxProps {
|
|
|
4
4
|
/** Whether the GFM task-list item is checked. Defaults to `false`. */
|
|
5
5
|
checked?: boolean;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Read-only checkbox rendered for GFM task-list items (`- [ ]` / `- [x]`),
|
|
9
|
-
* styled with the design-system {@link DialCheckbox}. The wrapping span keeps the
|
|
10
|
-
* control inline with the surrounding list-item text regardless of the checkbox layout.
|
|
11
|
-
*/
|
|
7
|
+
/** Read-only checkbox for GFM task-list items (`- [ ]` / `- [x]`). */
|
|
12
8
|
export declare const MarkdownTaskCheckbox: FC<MarkdownTaskCheckboxProps>;
|
|
13
9
|
//# sourceMappingURL=MarkdownTaskCheckbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownTaskCheckbox.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,
|
|
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"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { MarkdownRendererClassNames } from './MarkdownRenderer';
|
|
2
2
|
/** Default typography classNames for rendering markdown with full visual hierarchy. */
|
|
3
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;
|
|
4
10
|
//# sourceMappingURL=markdown-class-names.d.ts.map
|
|
@@ -1 +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,
|
|
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,0BAc1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,0BAI1C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders read-only markdown with every `{{param}}` token wrapped in a
|
|
11
|
+
* `cat-prompt-variable`-classed span the host can style apart from the
|
|
12
|
+
* surrounding prose.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MarkdownWithPlaceholders: FC<MarkdownWithPlaceholdersProps>;
|
|
15
|
+
//# 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;CAC3B;AAKD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAoBtE,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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CatalogEntityType } from '../types/entity-type';
|
|
2
|
+
/** Text color per entity type — used for the type label, featured chip, and drop shadow. */
|
|
3
|
+
export declare const ENTITY_TYPE_COLOR: Record<CatalogEntityType, string>;
|
|
4
|
+
/** Background color per entity type — used for the featured chip surface. */
|
|
5
|
+
export declare const ENTITY_TYPE_BG_COLOR: Record<CatalogEntityType, string>;
|
|
6
|
+
//# sourceMappingURL=entity-colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-colors.d.ts","sourceRoot":"","sources":["../../src/constants/entity-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAM/D,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAMlE,CAAC"}
|
package/constants/icon.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { DIAL_ICON_SIZE } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
/** Base props for medium-sized Tabler icons (MD size, stroke 1.5, `aria-hidden`). */
|
|
2
3
|
export declare const BASE_MD_ICON_PROPS: {
|
|
3
4
|
size: DIAL_ICON_SIZE;
|
|
4
5
|
stroke: number;
|
|
5
6
|
'aria-hidden': boolean;
|
|
6
7
|
};
|
|
8
|
+
/** Base props for large Tabler icons (LG size, stroke 1.5, `aria-hidden`). */
|
|
7
9
|
export declare const BASE_LG_ICON_PROPS: {
|
|
8
10
|
size: DIAL_ICON_SIZE;
|
|
9
11
|
stroke: number;
|
package/constants/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/constants/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/constants/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,qFAAqF;AACrF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Maps MIME types to their canonical file extension.
|
|
3
|
-
* Covers cases where the subtype differs from the common extension
|
|
4
|
-
* (e.g. `text/markdown` → `md`, `image/jpeg` → `jpg`) and vendor/x- types
|
|
5
|
-
* whose subtype is not a usable extension on its own.
|
|
6
|
-
*/
|
|
1
|
+
/** Maps MIME types to canonical file extensions. */
|
|
7
2
|
export declare const MIME_TYPE_EXT_MAP: Record<string, string>;
|
|
3
|
+
/** MIME type wildcard that matches any content type. */
|
|
8
4
|
export declare const MIME_TYPE_WILDCARD = "*/*";
|
|
5
|
+
/** MIME type prefix shared by all audio content types. */
|
|
9
6
|
export declare const MIME_TYPE_AUDIO_PREFIX = "audio/";
|
|
10
7
|
//# sourceMappingURL=mime-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mime-types.d.ts","sourceRoot":"","sources":["../../src/constants/mime-types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mime-types.d.ts","sourceRoot":"","sources":["../../src/constants/mime-types.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsCpD,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,WAAW,CAAC"}
|
package/hooks/useCodeCopy.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Manages clipboard copy state for code blocks.
|
|
3
|
-
*
|
|
4
|
-
* Calls `copyToClipboard` synchronously within the user-gesture handler
|
|
5
|
-
* (required by the Clipboard API). `isCopied` is set to `true` only when the
|
|
6
|
-
* write succeeds; it stays `true` for `resetDelay` milliseconds (default 2 s)
|
|
7
|
-
* then resets to `false`. The timeout is cleared on unmount to prevent
|
|
8
|
-
* setState-on-unmount.
|
|
9
|
-
*/
|
|
1
|
+
/** Returns `isCopied` state and a `copy` callback; `isCopied` resets to `false` after `resetDelay` ms. */
|
|
10
2
|
export declare const useCodeCopy: (value: string, resetDelay?: number) => {
|
|
11
3
|
isCopied: boolean;
|
|
12
4
|
copy: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCodeCopy.d.ts","sourceRoot":"","sources":["../../src/hooks/useCodeCopy.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"useCodeCopy.d.ts","sourceRoot":"","sources":["../../src/hooks/useCodeCopy.ts"],"names":[],"mappings":"AAKA,0GAA0G;AAC1G,eAAO,MAAM,WAAW,GACtB,OAAO,MAAM,EACb,mBAAmC,KAClC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CA0BvC,CAAC"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
+
/** Options for `useCollapsedText`. */
|
|
1
2
|
export interface UseCollapsedTextOptions {
|
|
2
3
|
/** Content identity used to reset long text to the collapsed state when it changes. */
|
|
3
4
|
text: string;
|
|
4
5
|
/** Maximum number of text lines shown while collapsed. */
|
|
5
6
|
collapsedLineCount: number;
|
|
6
7
|
}
|
|
8
|
+
/** Return value of `useCollapsedText`. */
|
|
7
9
|
export interface UseCollapsedTextResult<T extends HTMLElement> {
|
|
8
|
-
/**
|
|
9
|
-
* Ref callback attached to the text element whose rendered height should
|
|
10
|
-
* be measured. Using a callback (rather than a `RefObject`) ensures
|
|
11
|
-
* measurement re-runs as soon as the node mounts, even if the element is
|
|
12
|
-
* hidden behind a conditional (e.g. a loading skeleton) when `text` first
|
|
13
|
-
* becomes available.
|
|
14
|
-
*/
|
|
10
|
+
/** Ref callback attached to the text element to measure its rendered height. */
|
|
15
11
|
textRef: (node: T | null) => void;
|
|
16
12
|
/** Whether the full text is currently hidden behind the collapsed viewport. */
|
|
17
13
|
isTextCollapsed: boolean;
|