@epam/ai-dial-usage-dashboard 1.0.0-rc.7

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.
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { ModelLimitMetricCell, ModelLimitsLabels, ModelLimitsTypography } from '../../models/model-limits-props';
3
+ interface MetricCellProps {
4
+ cell: ModelLimitMetricCell;
5
+ label: string;
6
+ progressAriaLabel: string;
7
+ showProgress: boolean;
8
+ labels: ModelLimitsLabels;
9
+ typography: ModelLimitsTypography;
10
+ }
11
+ /** Renders one normalized Cost or Tokens value without owning its table-cell semantics. */
12
+ export declare const MetricCell: FC<MetricCellProps>;
13
+ export {};
14
+ //# sourceMappingURL=MetricCell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricCell.d.ts","sourceRoot":"","sources":["../../../src/components/ModelLimitsSection/MetricCell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,EAEjB,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AAczC,UAAU,eAAe;IACvB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAED,2FAA2F;AAC3F,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2F1C,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { FC } from 'react';
2
+ import { ModelLimitRow as ModelLimitRowData, ModelLimitPeriodStatuses, ModelLimitsLabels, ModelLimitsTypography } from '../../models/model-limits-props';
3
+ /** Grid template shared by the header row and every data row so columns stay aligned on desktop. */
4
+ export declare const MODEL_LIMITS_GRID_COLUMNS = "desktop:grid-cols-[minmax(12rem,1.25fr)_repeat(3,minmax(0,1fr))_minmax(8rem,10rem)]";
5
+ /** Props for `ModelLimitsRow`. */
6
+ export interface ModelLimitsRowProps {
7
+ /** The row's normalized data. */
8
+ row: ModelLimitRowData;
9
+ /** Localized strings shared by every row. */
10
+ labels: ModelLimitsLabels;
11
+ /** Host-derived overall Cost statuses for the fixed periods. */
12
+ periodStatuses: ModelLimitPeriodStatuses;
13
+ /** Typography class overrides. */
14
+ typography: ModelLimitsTypography;
15
+ /** Avatar badge dimension in pixels. */
16
+ avatarSize: number;
17
+ }
18
+ /** One data row of `ModelLimitsSection`: identity, three period comparisons, and host-derived Status. */
19
+ export declare const ModelLimitsRow: FC<ModelLimitsRowProps>;
20
+ //# sourceMappingURL=ModelLimitsRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelLimitsRow.d.ts","sourceRoot":"","sources":["../../../src/components/ModelLimitsSection/ModelLimitsRow.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,wBAAwB,EACxB,iBAAiB,EAEjB,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AAIzC,oGAAoG;AACpG,eAAO,MAAM,yBAAyB,wFACiD,CAAC;AAkCxF,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,GAAG,EAAE,iBAAiB,CAAC;IACvB,6CAA6C;IAC7C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,gEAAgE;IAChE,cAAc,EAAE,wBAAwB,CAAC;IACzC,kCAAkC;IAClC,UAAU,EAAE,qBAAqB,CAAC;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,yGAAyG;AACzG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAmIlD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ModelLimitsSectionProps } from '../../models/model-limits-props';
3
+ /** "Model limits" section: a fixed table comparing Cost and Tokens across three rolling periods. */
4
+ export declare const ModelLimitsSection: FC<ModelLimitsSectionProps>;
5
+ //# sourceMappingURL=ModelLimitsSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelLimitsSection.d.ts","sourceRoot":"","sources":["../../../src/components/ModelLimitsSection/ModelLimitsSection.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAEL,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AA+BzC,oGAAoG;AACpG,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA4I1D,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { ModelLimitPeriodCell, ModelLimitPeriodStatus, ModelLimitsLabels, ModelLimitsTypography } from '../../models/model-limits-props';
3
+ interface PeriodCellProps {
4
+ cell: ModelLimitPeriodCell;
5
+ periodLabel: string;
6
+ periodStatus: ModelLimitPeriodStatus;
7
+ labels: ModelLimitsLabels;
8
+ typography: ModelLimitsTypography;
9
+ }
10
+ /** One rolling-period table cell containing the period's Tokens progress and attributed Cost. */
11
+ export declare const PeriodCell: FC<PeriodCellProps>;
12
+ export {};
13
+ //# sourceMappingURL=PeriodCell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeriodCell.d.ts","sourceRoot":"","sources":["../../../src/components/ModelLimitsSection/PeriodCell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAGL,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AAKzC,UAAU,eAAe;IACvB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,sBAAsB,CAAC;IACrC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAmCD,iGAAiG;AACjG,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgC1C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { ModelLimitPeriodStatus } from '../../models/model-limits-props';
3
+ interface PeriodStatusIndicatorProps {
4
+ periodStatus: ModelLimitPeriodStatus;
5
+ }
6
+ /** Focusable overall Cost-limit indicator shared by desktop and mobile period labels. */
7
+ export declare const PeriodStatusIndicator: FC<PeriodStatusIndicatorProps>;
8
+ export {};
9
+ //# sourceMappingURL=PeriodStatusIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeriodStatusIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/ModelLimitsSection/PeriodStatusIndicator.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EACL,sBAAsB,EAEvB,MAAM,iCAAiC,CAAC;AAGzC,UAAU,0BAA0B;IAClC,YAAY,EAAE,sBAAsB,CAAC;CACtC;AAED,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAkChE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { UsageLimitCardProps } from '../../models/usage-limit-card-props';
3
+ /** One aggregate cost-limit card, rendered as its own independent box: title, always-visible status badge, prominent used amount, progress bar, and remaining/percent captions (or an "unlimited" state with no ratio). */
4
+ export declare const UsageLimitCard: FC<UsageLimitCardProps>;
5
+ //# sourceMappingURL=UsageLimitCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UsageLimitCard.d.ts","sourceRoot":"","sources":["../../../src/components/UsageLimitCard/UsageLimitCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EACL,mBAAmB,EAEpB,MAAM,qCAAqC,CAAC;AAiB7C,2NAA2N;AAC3N,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA2IlD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { UsageLimitCardGroupProps } from '../../models/usage-limit-card-props';
3
+ /** Renders each card as its own independent, equally-sized box: stacked on mobile, side by side on desktop. Renders nothing when `cards` is empty. */
4
+ export declare const UsageLimitCardGroup: FC<UsageLimitCardGroupProps>;
5
+ //# sourceMappingURL=UsageLimitCardGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UsageLimitCardGroup.d.ts","sourceRoot":"","sources":["../../../src/components/UsageLimitCardGroup/UsageLimitCardGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAG/E,sJAAsJ;AACtJ,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAwB5D,CAAC"}
package/index.css ADDED
@@ -0,0 +1,2 @@
1
+ ._card_zvzky_1{background:var(--uld-card-bg,var(--bg-layer-raised,#fcfcfc))}._title_zvzky_5{color:var(--uld-title,var(--text-primary,#161b2d))}._secondaryAmount_zvzky_9{color:var(--uld-secondary-amount,var(--text-secondary,#57647a))}._usedPercentLabel_zvzky_13{color:var(--uld-used-percent-label,var(--text-secondary,#57647a))}._amount_zvzky_18._defaultAccent_zvzky_23{color:var(--uld-default-accent,var(--text-info,#1d4ed8))}._amount_zvzky_18._warningAccent_zvzky_27{color:var(--uld-warning-accent,var(--text-warning,#7f6300))}._amount_zvzky_18._errorAccent_zvzky_31{color:var(--uld-error-accent,var(--text-error,#ae2f2f))}._progressTrack_zvzky_37{background:var(--uld-progress-track,var(--bg-layer-sunken,#eef1f7))!important}._progressFillDefault_zvzky_42>div{background:var(--uld-default-progress,var(--text-control-accent-hover,#5976e9))!important}._progressFillWarning_zvzky_46>div{background:var(--uld-warning-progress,var(--text-warning-icon,#eec840))!important}._progressFillDanger_zvzky_50>div{background:var(--uld-error-progress,var(--bg-control-error-active,#cc4545))!important}._defaultBadge_zvzky_54{background:var(--uld-default-badge-bg,var(--bg-success,#dbf1eb));color:var(--uld-default-badge-text,var(--text-success,#007274))}._warningBadge_zvzky_59{background:var(--uld-warning-badge-bg,var(--bg-warning,#faf0cf));color:var(--uld-warning-badge-text,var(--text-warning,#7f6300))}._errorBadge_zvzky_64{background:var(--uld-error-badge-bg,var(--bg-error,#f3d6d8));color:var(--uld-error-badge-text,var(--text-error,#ae2f2f))}._container_1nr7x_1{background:var(--mls-container-bg,var(--bg-layer-raised,#fcfcfc))}._heading_1nr7x_5{color:var(--mls-heading,var(--text-primary,#161b2d))}._headingCount_1nr7x_9{color:var(--mls-heading-count,var(--text-tertiary,#9fa6bd))}._columnHeader_1nr7x_13{color:var(--mls-column-header,var(--text-secondary,#57647a))}._headerRow_1nr7x_17{border-block-end:1px solid var(--mls-row-divider,var(--stroke-tertiary,#e0e6f0))}._row_1nr7x_21{border-block-start:1px solid var(--mls-row-divider,var(--stroke-tertiary,#e0e6f0))}._row_1nr7x_21:first-child{border-block-start:none}._mobileColumnLabel_1nr7x_29{color:var(--mls-column-header,var(--text-secondary,#57647a))}._name_1nr7x_33{color:var(--mls-name,var(--text-primary,#161b2d))}._modelType_1nr7x_37{color:var(--mls-model-type,var(--text-accent,#1d4ed8))}._version_1nr7x_41{color:var(--mls-version,var(--text-secondary,#57647a))}._value_1nr7x_45{color:var(--mls-value,var(--text-primary,#161b2d))}._secondaryValue_1nr7x_49{color:var(--mls-secondary-value,var(--text-secondary,#57647a))}._progressTrack_1nr7x_55{background:var(--mls-progress-track,var(--bg-layer-sunken,#eef1f7))!important}._progressFillDefault_1nr7x_60>div{background:var(--mls-progress-default,var(--text-control-accent-hover,#5976e9))!important}._progressFillWarning_1nr7x_64>div{background:var(--mls-progress-warning,var(--text-warning-icon,#eec840))!important}._progressFillError_1nr7x_68>div{background:var(--mls-progress-error,var(--bg-control-error-active,#cc4545))!important}._warningIndicator_1nr7x_72{color:var(--mls-indicator-warning,var(--text-warning-icon,#eec840))}._errorIndicator_1nr7x_76{color:var(--mls-indicator-error,var(--text-error,#ae2f2f))}._defaultBadge_1nr7x_80{background:var(--mls-badge-default-bg,var(--bg-success,#dbf1eb));color:var(--mls-badge-default-text,var(--text-success,#007274))}._warningBadge_1nr7x_85{background:var(--mls-badge-warning-bg,var(--bg-warning,#faf0cf));color:var(--mls-badge-warning-text,var(--text-warning,#7f6300))}._errorBadge_1nr7x_90{background:var(--mls-badge-error-bg,var(--bg-error,#f3d6d8));color:var(--mls-badge-error-text,var(--text-error,#ae2f2f))}._neutralStatus_1nr7x_95{color:var(--mls-badge-neutral-text,var(--text-secondary,#57647a))}
2
+ /*$vite$:1*/
package/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ export { UsageLimitCard } from './components/UsageLimitCard/UsageLimitCard';
2
+ export { UsageLimitCardGroup } from './components/UsageLimitCardGroup/UsageLimitCardGroup';
3
+ export { UsageLimitStatus } from './models/usage-limit-card-props';
4
+ export type { UsageLimitCardData, UsageLimitCardGroupColors, UsageLimitCardGroupLabels, UsageLimitCardGroupProps, UsageLimitCardGroupStyles, UsageLimitCardGroupTypography, UsageLimitCardProps, } from './models/usage-limit-card-props';
5
+ export { ModelLimitsSection } from './components/ModelLimitsSection/ModelLimitsSection';
6
+ export { ModelLimitMetricKind, ModelLimitStatus, } from './models/model-limits-props';
7
+ export type { ModelLimitMetricCell, ModelLimitPeriodCell, ModelLimitPeriodStatus, ModelLimitPeriodStatuses, ModelLimitRow, ModelLimitsColors, ModelLimitsLabels, ModelLimitsSectionProps, ModelLimitsStyles, ModelLimitsTypography, } from './models/model-limits-props';
8
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC"}
package/index.js ADDED
@@ -0,0 +1,511 @@
1
+ import { DeploymentIcon as e, InitialsAvatar as t, PanelEmptyState as n, buildCssVars as r, mergeClasses as i } from "@epam/ai-dial-chat-shared";
2
+ import { ElementSize as a, EllipsisTooltip as o, ProgressBar as s, Tooltip as c } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
4
+ import { createElement as f, forwardRef as p } from "react";
5
+ //#region src/models/usage-limit-card-props.ts
6
+ var m = /* @__PURE__ */ function(e) {
7
+ return e.Default = "default", e.RunningLow = "runningLow", e.LimitReached = "limitReached", e;
8
+ }({}), h = {
9
+ card: "_card_zvzky_1",
10
+ title: "_title_zvzky_5",
11
+ secondaryAmount: "_secondaryAmount_zvzky_9",
12
+ usedPercentLabel: "_usedPercentLabel_zvzky_13",
13
+ amount: "_amount_zvzky_18",
14
+ defaultAccent: "_defaultAccent_zvzky_23",
15
+ warningAccent: "_warningAccent_zvzky_27",
16
+ errorAccent: "_errorAccent_zvzky_31",
17
+ progressTrack: "_progressTrack_zvzky_37",
18
+ progressFillDefault: "_progressFillDefault_zvzky_42",
19
+ progressFillWarning: "_progressFillWarning_zvzky_46",
20
+ progressFillDanger: "_progressFillDanger_zvzky_50",
21
+ defaultBadge: "_defaultBadge_zvzky_54",
22
+ warningBadge: "_warningBadge_zvzky_59",
23
+ errorBadge: "_errorBadge_zvzky_64"
24
+ }, g = (e, t) => {
25
+ switch (e) {
26
+ case m.RunningLow: return t.runningLowBadgeLabel;
27
+ case m.LimitReached: return t.limitReachedBadgeLabel;
28
+ case m.Default: return t.defaultBadgeLabel;
29
+ }
30
+ }, _ = ({ data: e, labels: t, styles: n }) => {
31
+ let { colors: o, typography: c } = n ?? {}, { titleClassName: f = "dial-body-semi-text", amountClassName: p = "dial-display1-text", secondaryAmountClassName: _ = "dial-small-text", badgeClassName: v = "dial-caption-lead-semi-text", usedPercentLabelClassName: y = "dial-small-text" } = c ?? {}, b = r({
32
+ "--uld-card-bg": o?.cardBackground,
33
+ "--uld-title": o?.titleColor,
34
+ "--uld-default-accent": o?.defaultAccentColor,
35
+ "--uld-default-progress": o?.defaultProgressColor,
36
+ "--uld-warning-accent": o?.warningAccentColor,
37
+ "--uld-warning-progress": o?.warningProgressColor,
38
+ "--uld-error-accent": o?.errorAccentColor,
39
+ "--uld-error-progress": o?.errorProgressColor,
40
+ "--uld-secondary-amount": o?.secondaryAmountColor,
41
+ "--uld-progress-track": o?.progressTrackColor,
42
+ "--uld-default-badge-bg": o?.defaultBadgeBackground,
43
+ "--uld-default-badge-text": o?.defaultBadgeColor,
44
+ "--uld-warning-badge-bg": o?.warningBadgeBackground,
45
+ "--uld-warning-badge-text": o?.warningBadgeColor,
46
+ "--uld-error-badge-bg": o?.errorBadgeBackground,
47
+ "--uld-error-badge-text": o?.errorBadgeColor,
48
+ "--uld-used-percent-label": o?.usedPercentLabelColor
49
+ }), x = g(e.status, t);
50
+ return /* @__PURE__ */ d("div", {
51
+ className: i("flex min-w-0 flex-col gap-4 rounded-xl px-6 py-5 shadow-md", h.card),
52
+ style: b,
53
+ role: "group",
54
+ "aria-label": `${e.title}, ${e.periodDescription}`,
55
+ children: [/* @__PURE__ */ d("div", {
56
+ className: "flex items-center justify-between gap-2",
57
+ children: [/* @__PURE__ */ u("p", {
58
+ className: i("m-0", f, h.title),
59
+ children: e.title
60
+ }), /* @__PURE__ */ u("span", {
61
+ className: i("shrink-0 rounded-full px-2 py-1", v, e.status === m.Default && h.defaultBadge, e.status === m.RunningLow && h.warningBadge, e.status === m.LimitReached && h.errorBadge),
62
+ children: x
63
+ })]
64
+ }), /* @__PURE__ */ d("div", {
65
+ className: "flex flex-col gap-2",
66
+ children: [/* @__PURE__ */ d("p", {
67
+ className: "m-0 flex flex-wrap items-baseline gap-2",
68
+ children: [/* @__PURE__ */ u("span", {
69
+ className: i(p, h.amount, e.status === m.Default && h.defaultAccent, e.status === m.RunningLow && h.warningAccent, e.status === m.LimitReached && h.errorAccent),
70
+ children: e.usedLabel
71
+ }), !e.isUnlimited && e.totalLabel != null && /* @__PURE__ */ u("span", {
72
+ className: i(_, h.secondaryAmount),
73
+ children: t.usedOfTotalLabel({ total: e.totalLabel })
74
+ })]
75
+ }), !e.isUnlimited && e.usedPercent != null && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(s, {
76
+ value: Math.min(e.usedPercent, 100),
77
+ max: 100,
78
+ size: a.Small,
79
+ className: i("!h-1 w-full", h.progressTrack, e.status === m.Default && h.progressFillDefault, e.status === m.RunningLow && h.progressFillWarning, e.status === m.LimitReached && h.progressFillDanger),
80
+ "aria-label": e.title,
81
+ "aria-valuetext": e.progressAriaLabel
82
+ }), /* @__PURE__ */ d("div", {
83
+ className: "flex items-center justify-between gap-2",
84
+ children: [e.remainingLabel != null && /* @__PURE__ */ u("span", {
85
+ className: i(_, h.secondaryAmount),
86
+ children: t.remainingCaptionLabel({ remaining: e.remainingLabel })
87
+ }), /* @__PURE__ */ u("span", {
88
+ className: i("ms-auto", y, h.usedPercentLabel),
89
+ children: t.usedPercentLabel({ percent: Math.min(Math.round(e.usedPercent), 100) })
90
+ })]
91
+ })] })]
92
+ })]
93
+ });
94
+ }, v = ({ cards: e, labels: t, styles: n }) => e.length === 0 ? null : /* @__PURE__ */ u("div", {
95
+ className: "grid grid-cols-1 gap-4 desktop:grid-cols-[repeat(var(--uld-card-count),minmax(0,1fr))]",
96
+ style: { "--uld-card-count": e.length },
97
+ children: e.map((e) => /* @__PURE__ */ u(_, {
98
+ data: e,
99
+ labels: t,
100
+ styles: n
101
+ }, e.title))
102
+ }), y = {
103
+ outline: {
104
+ xmlns: "http://www.w3.org/2000/svg",
105
+ width: 24,
106
+ height: 24,
107
+ viewBox: "0 0 24 24",
108
+ fill: "none",
109
+ stroke: "currentColor",
110
+ strokeWidth: 2,
111
+ strokeLinecap: "round",
112
+ strokeLinejoin: "round"
113
+ },
114
+ filled: {
115
+ xmlns: "http://www.w3.org/2000/svg",
116
+ width: 24,
117
+ height: 24,
118
+ viewBox: "0 0 24 24",
119
+ fill: "currentColor",
120
+ stroke: "none"
121
+ }
122
+ }, b = (e, t, n, r) => {
123
+ let i = p(({ color: n = "currentColor", size: i = 24, stroke: a = 2, title: o, className: s, children: c, ...l }, u) => f("svg", {
124
+ ref: u,
125
+ ...y[e],
126
+ width: i,
127
+ height: i,
128
+ className: [
129
+ "tabler-icon",
130
+ `tabler-icon-${t}`,
131
+ s
132
+ ].join(" "),
133
+ ...e === "filled" ? { fill: n } : {
134
+ strokeWidth: a,
135
+ stroke: n
136
+ },
137
+ ...l
138
+ }, [
139
+ o && f("title", { key: "svg-title" }, o),
140
+ ...r.map(([e, t]) => f(e, t)),
141
+ ...Array.isArray(c) ? c : [c]
142
+ ]));
143
+ return i.displayName = `${n}`, i;
144
+ }, x = b("outline", "chart-bar", "ChartBar", [
145
+ ["path", {
146
+ d: "M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",
147
+ key: "svg-0"
148
+ }],
149
+ ["path", {
150
+ d: "M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",
151
+ key: "svg-1"
152
+ }],
153
+ ["path", {
154
+ d: "M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",
155
+ key: "svg-2"
156
+ }],
157
+ ["path", {
158
+ d: "M4 20h14",
159
+ key: "svg-3"
160
+ }]
161
+ ]), S = b("filled", "alert-circle-filled", "AlertCircleFilled", [["path", {
162
+ d: "M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm.01 13l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",
163
+ key: "svg-0"
164
+ }]]), C = b("filled", "alert-triangle-filled", "AlertTriangleFilled", [["path", {
165
+ d: "M12 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",
166
+ key: "svg-0"
167
+ }]]), w = /* @__PURE__ */ function(e) {
168
+ return e.WithinLimits = "within-limits", e.RunningLow = "running-low", e.LimitReached = "limit-reached", e.NoLimit = "no-limit", e.Unavailable = "unavailable", e;
169
+ }({}), T = /* @__PURE__ */ function(e) {
170
+ return e.Finite = "finite", e.Unlimited = "unlimited", e.Unavailable = "unavailable", e;
171
+ }({}), E = {
172
+ container: "_container_1nr7x_1",
173
+ heading: "_heading_1nr7x_5",
174
+ headingCount: "_headingCount_1nr7x_9",
175
+ columnHeader: "_columnHeader_1nr7x_13",
176
+ headerRow: "_headerRow_1nr7x_17",
177
+ row: "_row_1nr7x_21",
178
+ mobileColumnLabel: "_mobileColumnLabel_1nr7x_29",
179
+ name: "_name_1nr7x_33",
180
+ modelType: "_modelType_1nr7x_37",
181
+ version: "_version_1nr7x_41",
182
+ value: "_value_1nr7x_45",
183
+ secondaryValue: "_secondaryValue_1nr7x_49",
184
+ progressTrack: "_progressTrack_1nr7x_55",
185
+ progressFillDefault: "_progressFillDefault_1nr7x_60",
186
+ progressFillWarning: "_progressFillWarning_1nr7x_64",
187
+ progressFillError: "_progressFillError_1nr7x_68",
188
+ warningIndicator: "_warningIndicator_1nr7x_72",
189
+ errorIndicator: "_errorIndicator_1nr7x_76",
190
+ defaultBadge: "_defaultBadge_1nr7x_80",
191
+ warningBadge: "_warningBadge_1nr7x_85",
192
+ errorBadge: "_errorBadge_1nr7x_90",
193
+ neutralStatus: "_neutralStatus_1nr7x_95"
194
+ }, D = (e) => {
195
+ switch (e) {
196
+ case w.RunningLow: return E.progressFillWarning;
197
+ case w.LimitReached: return E.progressFillError;
198
+ default: return E.progressFillDefault;
199
+ }
200
+ }, O = ({ cell: e, label: t, progressAriaLabel: n, showProgress: r, labels: o, typography: c }) => {
201
+ let { valueClassName: l = "dial-small-text", secondaryValueClassName: f = "dial-tiny-text" } = c, p = /* @__PURE__ */ u("span", {
202
+ className: i(l, E.value),
203
+ children: e.usedLabel
204
+ });
205
+ return /* @__PURE__ */ d("div", {
206
+ className: "flex min-w-0 flex-col gap-1",
207
+ children: [
208
+ /* @__PURE__ */ d("span", {
209
+ className: "sr-only",
210
+ children: [t, ": "]
211
+ }),
212
+ e.kind === T.Unlimited && /* @__PURE__ */ u("div", {
213
+ className: "flex min-w-0 items-start gap-2",
214
+ role: "group",
215
+ "aria-label": n,
216
+ children: /* @__PURE__ */ d("div", {
217
+ className: "flex min-w-0 flex-col gap-1",
218
+ children: [p, /* @__PURE__ */ u("span", {
219
+ className: i(f, E.secondaryValue),
220
+ children: e.supportingLabel ?? o.noLimitLabel
221
+ })]
222
+ })
223
+ }),
224
+ e.kind === T.Unavailable && /* @__PURE__ */ u("div", {
225
+ className: "flex min-w-0 items-baseline gap-2",
226
+ role: "group",
227
+ "aria-label": n,
228
+ children: /* @__PURE__ */ u("span", {
229
+ className: i(f, E.secondaryValue),
230
+ children: o.unavailableLabel
231
+ })
232
+ }),
233
+ e.kind === T.Finite && /* @__PURE__ */ d("div", {
234
+ className: "flex min-w-0 flex-col gap-2",
235
+ children: [/* @__PURE__ */ u("div", {
236
+ className: "flex min-w-0 items-baseline gap-2",
237
+ role: "group",
238
+ "aria-label": n,
239
+ children: /* @__PURE__ */ d("div", {
240
+ className: "flex min-w-0 items-baseline gap-1 whitespace-nowrap",
241
+ children: [p, /* @__PURE__ */ d("span", {
242
+ className: i(l, E.secondaryValue),
243
+ children: ["/ ", e.totalLabel]
244
+ })]
245
+ })
246
+ }), r && /* @__PURE__ */ u(s, {
247
+ value: Math.min(e.usedPercent ?? 0, 100),
248
+ max: 100,
249
+ size: a.Small,
250
+ className: i("!h-1 w-full", E.progressTrack, D(e.status)),
251
+ "aria-label": n,
252
+ "aria-valuetext": e.ariaLabel
253
+ })]
254
+ })
255
+ ]
256
+ });
257
+ }, k = ({ periodStatus: e }) => {
258
+ let { status: t, tooltipLabel: n } = e;
259
+ if (n == null || t !== w.RunningLow && t !== w.LimitReached) return null;
260
+ let r = t === w.LimitReached ? S : C;
261
+ return /* @__PURE__ */ u(c, {
262
+ tooltip: n,
263
+ asChild: !0,
264
+ children: /* @__PURE__ */ u("span", {
265
+ role: "img",
266
+ "aria-label": n,
267
+ tabIndex: 0,
268
+ className: i("inline-flex size-11 shrink-0 items-center justify-center desktop:size-4", t === w.LimitReached ? E.errorIndicator : E.warningIndicator),
269
+ children: /* @__PURE__ */ u(r, {
270
+ "aria-hidden": !0,
271
+ size: 16
272
+ })
273
+ })
274
+ });
275
+ }, A = ({ cell: e, label: t, unavailableLabel: n, typography: r }) => {
276
+ let { secondaryValueClassName: a = "dial-tiny-text" } = r, o = e.kind === T.Unavailable;
277
+ return /* @__PURE__ */ d("div", {
278
+ className: "flex min-w-0 items-baseline gap-1",
279
+ children: [/* @__PURE__ */ d("span", {
280
+ className: "sr-only",
281
+ children: [t, ": "]
282
+ }), /* @__PURE__ */ u("span", {
283
+ className: i("min-w-0 break-words", a, E.secondaryValue),
284
+ title: o ? n : e.usedLabel,
285
+ children: o ? n : e.usedLabel
286
+ })]
287
+ });
288
+ }, j = ({ cell: e, periodLabel: t, periodStatus: n, labels: r, typography: a }) => /* @__PURE__ */ d("div", {
289
+ role: "cell",
290
+ className: "flex min-w-0 flex-col gap-2 py-2 desktop:py-0",
291
+ children: [
292
+ /* @__PURE__ */ d("div", {
293
+ className: i("dial-caption-lead-semi-text flex min-h-11 items-center justify-between gap-2 desktop:hidden", E.mobileColumnLabel),
294
+ children: [/* @__PURE__ */ u("span", { children: t }), /* @__PURE__ */ u(k, { periodStatus: n })]
295
+ }),
296
+ /* @__PURE__ */ u(O, {
297
+ cell: e.tokens,
298
+ label: r.tokensLabel,
299
+ progressAriaLabel: `${t} ${r.tokensLabel}`,
300
+ showProgress: !0,
301
+ labels: r,
302
+ typography: a
303
+ }),
304
+ /* @__PURE__ */ u(A, {
305
+ cell: e.cost,
306
+ label: r.costLabel,
307
+ unavailableLabel: r.unavailableLabel,
308
+ typography: a
309
+ })
310
+ ]
311
+ }), M = "desktop:grid-cols-[minmax(12rem,1.25fr)_repeat(3,minmax(0,1fr))_minmax(8rem,10rem)]", N = (e) => {
312
+ switch (e) {
313
+ case w.WithinLimits: return E.defaultBadge;
314
+ case w.RunningLow: return E.warningBadge;
315
+ case w.LimitReached: return E.errorBadge;
316
+ case w.NoLimit:
317
+ case w.Unavailable: return;
318
+ }
319
+ }, P = (e, t) => {
320
+ switch (e) {
321
+ case w.WithinLimits: return t.withinLimitsBadgeLabel;
322
+ case w.RunningLow: return t.runningLowBadgeLabel;
323
+ case w.LimitReached: return t.limitReachedBadgeLabel;
324
+ case w.NoLimit: return t.noLimitBadgeLabel;
325
+ case w.Unavailable: return t.unavailableBadgeLabel;
326
+ }
327
+ }, F = ({ row: n, labels: r, periodStatuses: a, typography: s, avatarSize: c }) => {
328
+ let { nameClassName: l = "dial-small-semi-text", modelTypeClassName: f = "dial-caption-lead-semi-text", versionClassName: p = "dial-small-text", valueClassName: m = "dial-small-text", badgeClassName: h = "dial-caption-lead-semi-text" } = s, g = n.status !== w.NoLimit && n.status !== w.Unavailable;
329
+ return /* @__PURE__ */ d("div", {
330
+ role: "row",
331
+ className: i("grid grid-cols-1 gap-2 px-4 py-3 desktop:min-h-16 desktop:items-center desktop:gap-4 desktop:px-6", M, E.row),
332
+ children: [
333
+ /* @__PURE__ */ d("div", {
334
+ role: "cell",
335
+ className: "flex min-w-0 items-center gap-3 overflow-hidden",
336
+ children: [/* @__PURE__ */ u("div", {
337
+ className: "shrink-0",
338
+ children: /* @__PURE__ */ u(e, {
339
+ src: n.avatarSrc,
340
+ size: c,
341
+ initialsName: n.name,
342
+ fallback: /* @__PURE__ */ u(t, {
343
+ name: n.name,
344
+ size: c,
345
+ className: "!rounded-xl",
346
+ textClassName: "!text-lg"
347
+ }),
348
+ styles: { badgeClassName: "!rounded-xl" }
349
+ })
350
+ }), /* @__PURE__ */ d("div", {
351
+ className: "flex min-w-0 flex-1 flex-col gap-0.5 overflow-hidden",
352
+ children: [/* @__PURE__ */ u("span", {
353
+ className: i(f, E.modelType),
354
+ children: r.modelTypeLabel
355
+ }), /* @__PURE__ */ d("div", {
356
+ className: "flex min-w-0 items-center gap-1 overflow-hidden",
357
+ children: [/* @__PURE__ */ u("span", {
358
+ className: i("min-w-0 flex-1 truncate", l, E.name),
359
+ title: n.name,
360
+ children: n.name
361
+ }), n.version != null && /* @__PURE__ */ u(o, {
362
+ text: n.version,
363
+ className: i("max-w-[30%] shrink-0", p, E.version)
364
+ })]
365
+ })]
366
+ })]
367
+ }),
368
+ /* @__PURE__ */ u(j, {
369
+ cell: n.last24Hours,
370
+ periodLabel: r.last24HoursColumnLabel,
371
+ periodStatus: a.last24Hours,
372
+ labels: r,
373
+ typography: s
374
+ }),
375
+ /* @__PURE__ */ u(j, {
376
+ cell: n.last7Days,
377
+ periodLabel: r.last7DaysColumnLabel,
378
+ periodStatus: a.last7Days,
379
+ labels: r,
380
+ typography: s
381
+ }),
382
+ /* @__PURE__ */ u(j, {
383
+ cell: n.last30Days,
384
+ periodLabel: r.last30DaysColumnLabel,
385
+ periodStatus: a.last30Days,
386
+ labels: r,
387
+ typography: s
388
+ }),
389
+ /* @__PURE__ */ d("div", {
390
+ role: "cell",
391
+ className: "flex min-w-0 flex-col gap-2 py-2 desktop:py-0",
392
+ children: [/* @__PURE__ */ u("span", {
393
+ className: i("dial-caption-lead-semi-text block desktop:hidden", E.mobileColumnLabel),
394
+ children: r.statusColumnLabel
395
+ }), g ? /* @__PURE__ */ u("span", {
396
+ className: i("inline-flex h-6 shrink-0 items-center rounded-full px-2", h, N(n.status)),
397
+ children: P(n.status, r)
398
+ }) : /* @__PURE__ */ u("span", {
399
+ className: i(m, E.neutralStatus),
400
+ children: P(n.status, r)
401
+ })]
402
+ })
403
+ ]
404
+ });
405
+ }, I = 40, L = ({ label: e, periodStatus: t, className: n }) => /* @__PURE__ */ d("span", {
406
+ role: "columnheader",
407
+ className: i("flex min-w-0 items-center justify-between gap-2", n, E.columnHeader),
408
+ children: [/* @__PURE__ */ u("span", {
409
+ className: "min-w-0 truncate",
410
+ children: e
411
+ }), /* @__PURE__ */ u(k, { periodStatus: t })]
412
+ }), R = ({ rows: e, labels: t, periodStatuses: a, styles: o, emptyStateIconSize: s = 48 }) => {
413
+ let { colors: c, typography: f = {} } = o ?? {}, { headingClassName: p = "dial-body-semi-text", headingCountClassName: m = "dial-tiny-semi-text", columnHeaderClassName: h = "dial-caption-lead-semi-text" } = f, g = r({
414
+ "--mls-container-bg": c?.containerBackground,
415
+ "--mls-heading": c?.headingColor,
416
+ "--mls-heading-count": c?.headingCountColor,
417
+ "--mls-column-header": c?.columnHeaderColor,
418
+ "--mls-row-divider": c?.rowDividerColor,
419
+ "--mls-name": c?.nameColor,
420
+ "--mls-model-type": c?.modelTypeColor,
421
+ "--mls-version": c?.versionColor,
422
+ "--mls-value": c?.valueColor,
423
+ "--mls-secondary-value": c?.secondaryValueColor,
424
+ "--mls-progress-track": c?.progressTrackColor,
425
+ "--mls-progress-default": c?.defaultProgressColor,
426
+ "--mls-progress-warning": c?.warningProgressColor,
427
+ "--mls-progress-error": c?.errorProgressColor,
428
+ "--mls-indicator-warning": c?.warningIndicatorColor,
429
+ "--mls-indicator-error": c?.errorIndicatorColor,
430
+ "--mls-badge-default-bg": c?.defaultBadgeBackground,
431
+ "--mls-badge-default-text": c?.defaultBadgeColor,
432
+ "--mls-badge-warning-bg": c?.warningBadgeBackground,
433
+ "--mls-badge-warning-text": c?.warningBadgeColor,
434
+ "--mls-badge-error-bg": c?.errorBadgeBackground,
435
+ "--mls-badge-error-text": c?.errorBadgeColor,
436
+ "--mls-badge-neutral-text": c?.neutralBadgeColor
437
+ }), _ = `${t.headingLabel} ${e.length}`;
438
+ return /* @__PURE__ */ d("div", {
439
+ className: "flex flex-col gap-4",
440
+ style: g,
441
+ children: [/* @__PURE__ */ u("div", {
442
+ className: "flex min-h-10 items-center",
443
+ children: /* @__PURE__ */ d("h3", {
444
+ className: "m-0 flex items-center gap-2",
445
+ children: [/* @__PURE__ */ u("span", {
446
+ className: i(p, E.heading),
447
+ children: t.headingLabel
448
+ }), /* @__PURE__ */ u("span", {
449
+ className: i(m, E.headingCount),
450
+ children: e.length
451
+ })]
452
+ })
453
+ }), /* @__PURE__ */ u("div", {
454
+ role: "table",
455
+ "aria-label": _,
456
+ className: i("overflow-hidden rounded-xl shadow-md", E.container),
457
+ children: e.length === 0 ? /* @__PURE__ */ u("div", {
458
+ className: "flex items-center justify-center px-6 py-10",
459
+ children: /* @__PURE__ */ u(n, {
460
+ icon: /* @__PURE__ */ u(x, {
461
+ "aria-hidden": !0,
462
+ size: s,
463
+ stroke: 1
464
+ }),
465
+ label: t.emptyStateLabel
466
+ })
467
+ }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("div", {
468
+ role: "row",
469
+ className: i("hidden gap-4 px-6 py-3 desktop:grid desktop:items-center", M, E.headerRow),
470
+ children: [
471
+ /* @__PURE__ */ u("span", {
472
+ role: "columnheader",
473
+ className: i(h, E.columnHeader),
474
+ children: t.itemColumnLabel
475
+ }),
476
+ /* @__PURE__ */ u(L, {
477
+ label: t.last24HoursColumnLabel,
478
+ periodStatus: a.last24Hours,
479
+ className: h
480
+ }),
481
+ /* @__PURE__ */ u(L, {
482
+ label: t.last7DaysColumnLabel,
483
+ periodStatus: a.last7Days,
484
+ className: h
485
+ }),
486
+ /* @__PURE__ */ u(L, {
487
+ label: t.last30DaysColumnLabel,
488
+ periodStatus: a.last30Days,
489
+ className: h
490
+ }),
491
+ /* @__PURE__ */ u("span", {
492
+ role: "columnheader",
493
+ className: i(h, E.columnHeader),
494
+ children: t.statusColumnLabel
495
+ })
496
+ ]
497
+ }), /* @__PURE__ */ u("div", {
498
+ role: "rowgroup",
499
+ children: e.map((e) => /* @__PURE__ */ u(F, {
500
+ row: e,
501
+ labels: t,
502
+ periodStatuses: a,
503
+ typography: f,
504
+ avatarSize: I
505
+ }, e.id))
506
+ })] })
507
+ })]
508
+ });
509
+ };
510
+ //#endregion
511
+ export { T as ModelLimitMetricKind, w as ModelLimitStatus, R as ModelLimitsSection, _ as UsageLimitCard, v as UsageLimitCardGroup, m as UsageLimitStatus };
@@ -0,0 +1,206 @@
1
+ /** Overall or per-metric severity of a model's limit usage, derived by the host from its usage ratio. */
2
+ export declare enum ModelLimitStatus {
3
+ /** Below the running-low threshold. Rendered with the default (blue) accent and a "within limits" badge. */
4
+ WithinLimits = "within-limits",
5
+ /** At or above the running-low threshold but below 100% used. Rendered with the warning (amber) accent and badge. */
6
+ RunningLow = "running-low",
7
+ /** At or above 100% used. Rendered with the error (red) accent and badge. */
8
+ LimitReached = "limit-reached",
9
+ /** Every supported metric on the row is unlimited. Rendered with a dedicated "No limit" badge. */
10
+ NoLimit = "no-limit",
11
+ /** No usable (finite or unlimited) metric exists on the row. Rendered with a dedicated "Unavailable" badge. */
12
+ Unavailable = "unavailable"
13
+ }
14
+ /** Which of the three normalized shapes a `ModelLimitMetricCell` carries. */
15
+ export declare enum ModelLimitMetricKind {
16
+ /** A usable total exists — renders `used / total` with a progress bar. */
17
+ Finite = "finite",
18
+ /** The host detected the unlimited sentinel; the renderer decides whether its metric shows supporting limit text. */
19
+ Unlimited = "unlimited",
20
+ /** The metric could not be determined — renders an explicit unavailable state, no progress bar. */
21
+ Unavailable = "unavailable"
22
+ }
23
+ /** One normalized, preformatted Cost or Tokens value for one `ModelLimitRow`. */
24
+ export interface ModelLimitMetricCell {
25
+ /** Which of the three rendering shapes this cell uses. */
26
+ kind: ModelLimitMetricKind;
27
+ /** Preformatted used amount, e.g. `'12,345'` or `'$3.60'`. Present for `Finite`/`Unlimited`. */
28
+ usedLabel?: string;
29
+ /** Preformatted total amount, e.g. `'50,000'`. Present for `Finite` only. */
30
+ totalLabel?: string;
31
+ /** Used percentage, not pre-clamped — may exceed 100. Present for `Finite` only; the cell clamps the visual progress fill at 100%, while `ariaLabel` conveys the real value. */
32
+ usedPercent?: number;
33
+ /** Status derived from `usedPercent` against the host's thresholds. Present for `Finite` only. */
34
+ status?: ModelLimitStatus;
35
+ /** Host-provided secondary text for an `Unlimited` metric, e.g. `'Follows cost limit'` or `'No limit'`. */
36
+ supportingLabel?: string;
37
+ /** Accessible text describing the cell's full value, present regardless of `kind` (e.g. `'12,345 of 50,000 tokens used'` or `'Not available'`). */
38
+ ariaLabel: string;
39
+ }
40
+ /** Normalized overall Cost status and optional explanatory tooltip for one period header. */
41
+ export interface ModelLimitPeriodStatus {
42
+ /** Host-derived status of the matching overall Cost limit. */
43
+ status: ModelLimitStatus;
44
+ /** Complete tooltip/accessibility text for warning and error indicators. */
45
+ tooltipLabel?: string;
46
+ }
47
+ /** Overall Cost statuses aligned with the three fixed comparison periods. */
48
+ export interface ModelLimitPeriodStatuses {
49
+ last24Hours: ModelLimitPeriodStatus;
50
+ last7Days: ModelLimitPeriodStatus;
51
+ last30Days: ModelLimitPeriodStatus;
52
+ }
53
+ /** Preformatted Cost and Tokens values for one rolling-period column. */
54
+ export interface ModelLimitPeriodCell {
55
+ /** Tokens usage and limit for the period. */
56
+ tokens: ModelLimitMetricCell;
57
+ /** Attributed cost for the period. */
58
+ cost: ModelLimitMetricCell;
59
+ }
60
+ /** One row of the Model tokens limits table: model identity, three rolling-period comparisons, and overall status. */
61
+ export interface ModelLimitRow {
62
+ /** Stable identifier for the row, e.g. the deployment ID. */
63
+ id: string;
64
+ /** Display name of the model. */
65
+ name: string;
66
+ /** Display version of the model, when known. */
67
+ version?: string;
68
+ /** Image URL for the model's avatar. When absent, an initials-based fallback derived from `name` is shown. */
69
+ avatarSrc?: string;
70
+ /** Cost and Tokens metrics for the rolling 24-hour period. */
71
+ last24Hours: ModelLimitPeriodCell;
72
+ /** Cost and Tokens metrics for the rolling 7-day period. */
73
+ last7Days: ModelLimitPeriodCell;
74
+ /** Cost and Tokens metrics for the rolling 30-day period. */
75
+ last30Days: ModelLimitPeriodCell;
76
+ /** Host-derived overall status across all model-token and overall Cost limit periods. */
77
+ status: ModelLimitStatus;
78
+ }
79
+ /** Localized strings shared by every row and by the section shell in `ModelLimitsSection`. */
80
+ export interface ModelLimitsLabels {
81
+ /** Section heading text, e.g. `'Model tokens limits'`. The row count is rendered separately. */
82
+ headingLabel: string;
83
+ /** Column header text for the Item (identity) column. */
84
+ itemColumnLabel: string;
85
+ /** Column header text for the rolling 24-hour period. */
86
+ last24HoursColumnLabel: string;
87
+ /** Column header text for the rolling 7-day period. */
88
+ last7DaysColumnLabel: string;
89
+ /** Column header text for the rolling 30-day period. */
90
+ last30DaysColumnLabel: string;
91
+ /** Column header text for the Status column. */
92
+ statusColumnLabel: string;
93
+ /** Non-visual accessible label for Tokens values inside every period cell. */
94
+ tokensLabel: string;
95
+ /** Non-visual accessible label for the value-only Cost amount in every period cell. */
96
+ costLabel: string;
97
+ /** Entity type shown above each model name. */
98
+ modelTypeLabel: string;
99
+ /** Text shown after an unlimited Tokens value, e.g. `'No limit'`. */
100
+ noLimitLabel: string;
101
+ /** Text shown in place of a value when the metric is unavailable, e.g. `'Not available'`. Must read as distinct from `noLimitLabel`. */
102
+ unavailableLabel: string;
103
+ /** Status badge text for `ModelLimitStatus.WithinLimits`. */
104
+ withinLimitsBadgeLabel: string;
105
+ /** Status badge text for `ModelLimitStatus.RunningLow`. */
106
+ runningLowBadgeLabel: string;
107
+ /** Status badge text for `ModelLimitStatus.LimitReached`. */
108
+ limitReachedBadgeLabel: string;
109
+ /** Status badge text for `ModelLimitStatus.NoLimit`. */
110
+ noLimitBadgeLabel: string;
111
+ /** Status badge text for `ModelLimitStatus.Unavailable`. */
112
+ unavailableBadgeLabel: string;
113
+ /** Message shown in place of the table when `rows` is empty, e.g. `'No models to show yet.'`. */
114
+ emptyStateLabel: string;
115
+ }
116
+ /** Color overrides for `ModelLimitsSection`, applied as CSS custom properties. */
117
+ export interface ModelLimitsColors {
118
+ /** Section container background. Fallback: `--bg-layer-raised`. */
119
+ containerBackground?: string;
120
+ /** Heading text color. Fallback: `--text-primary`. */
121
+ headingColor?: string;
122
+ /** Heading count color. Fallback: `--text-tertiary`. */
123
+ headingCountColor?: string;
124
+ /** Column header text color. Fallback: `--text-secondary`. */
125
+ columnHeaderColor?: string;
126
+ /** Row divider color. Fallback: `--stroke-secondary`. */
127
+ rowDividerColor?: string;
128
+ /** Model name text color. Fallback: `--text-primary`. */
129
+ nameColor?: string;
130
+ /** Model entity-type text color. Fallback: `--text-accent`. */
131
+ modelTypeColor?: string;
132
+ /** Model version text color. Fallback: `--text-secondary`. */
133
+ versionColor?: string;
134
+ /** Metric prominent used-value text color. Fallback: `--text-primary`. */
135
+ valueColor?: string;
136
+ /** Secondary metric text color (the "used of X" caption). Fallback: `--text-secondary`. */
137
+ secondaryValueColor?: string;
138
+ /** Progress-bar track color. Fallback: `--bg-layer-sunken`. */
139
+ progressTrackColor?: string;
140
+ /** Progress-fill / accent color for `WithinLimits`. Fallback: `--text-control-accent-hover`. */
141
+ defaultProgressColor?: string;
142
+ /** Progress-fill / accent color for `RunningLow`. Fallback: `--text-warning-icon`. */
143
+ warningProgressColor?: string;
144
+ /** Progress-fill / accent color for `LimitReached`. Fallback: `--bg-control-error-active`. */
145
+ errorProgressColor?: string;
146
+ /** Period-header indicator color for `RunningLow`. Fallback: `--text-warning-icon`. */
147
+ warningIndicatorColor?: string;
148
+ /** Period-header indicator color for `LimitReached`. Fallback: `--text-error`. */
149
+ errorIndicatorColor?: string;
150
+ /** `WithinLimits` badge background. Fallback: `--bg-success`. */
151
+ defaultBadgeBackground?: string;
152
+ /** `WithinLimits` badge text color. Fallback: `--text-success`. */
153
+ defaultBadgeColor?: string;
154
+ /** `RunningLow` badge background. Fallback: `--bg-warning`. */
155
+ warningBadgeBackground?: string;
156
+ /** `RunningLow` badge text color. Fallback: `--text-warning`. */
157
+ warningBadgeColor?: string;
158
+ /** `LimitReached` badge background. Fallback: `--bg-error`. */
159
+ errorBadgeBackground?: string;
160
+ /** `LimitReached` badge text color. Fallback: `--text-error`. */
161
+ errorBadgeColor?: string;
162
+ /** `NoLimit`/`Unavailable` status text color. Fallback: `--text-secondary`. */
163
+ neutralBadgeColor?: string;
164
+ }
165
+ /** Typography class overrides for `ModelLimitsSection`. */
166
+ export interface ModelLimitsTypography {
167
+ /** CSS class for the section heading. Defaults to `'dial-body-semi-text'`. */
168
+ headingClassName?: string;
169
+ /** CSS class for the count next to the section heading. Defaults to `'dial-tiny-semi-text'`. */
170
+ headingCountClassName?: string;
171
+ /** CSS class for column headers. Defaults to `'dial-caption-lead-semi-text'`. */
172
+ columnHeaderClassName?: string;
173
+ /** CSS class for the model name. Defaults to `'dial-small-semi-text'`. */
174
+ nameClassName?: string;
175
+ /** CSS class for the model entity type. Defaults to `'dial-caption-lead-semi-text'`. */
176
+ modelTypeClassName?: string;
177
+ /** CSS class for the model version. Defaults to `'dial-small-text'`. */
178
+ versionClassName?: string;
179
+ /** CSS class for a metric's prominent used value. Defaults to `'dial-small-text'`. */
180
+ valueClassName?: string;
181
+ /** CSS class for a metric's secondary caption (total / "No limit" / "Not available"). Defaults to `'dial-tiny-text'`. */
182
+ secondaryValueClassName?: string;
183
+ /** CSS class for status badge text. Defaults to `'dial-caption-lead-semi-text'`. */
184
+ badgeClassName?: string;
185
+ }
186
+ /** Style overrides accepted by `ModelLimitsSection`. */
187
+ export interface ModelLimitsStyles {
188
+ /** Color overrides applied as CSS custom properties. */
189
+ colors?: ModelLimitsColors;
190
+ /** Typography class overrides. */
191
+ typography?: ModelLimitsTypography;
192
+ }
193
+ /** Props for `ModelLimitsSection`. */
194
+ export interface ModelLimitsSectionProps {
195
+ /** Rows to render, in display order. Each renders as one table row. */
196
+ rows: ModelLimitRow[];
197
+ /** Localized strings shared by the section shell and every row. */
198
+ labels: ModelLimitsLabels;
199
+ /** Host-derived overall Cost statuses/tooltips for the three fixed period headers. */
200
+ periodStatuses: ModelLimitPeriodStatuses;
201
+ /** Style overrides applied as CSS custom properties and typography class overrides. */
202
+ styles?: ModelLimitsStyles;
203
+ /** Size (px) of the empty-state icon, shown when `rows` is empty. Defaults to `48`. */
204
+ emptyStateIconSize?: number;
205
+ }
206
+ //# sourceMappingURL=model-limits-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-limits-props.d.ts","sourceRoot":"","sources":["../../src/models/model-limits-props.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,oBAAY,gBAAgB;IAC1B,4GAA4G;IAC5G,YAAY,kBAAkB;IAC9B,qHAAqH;IACrH,UAAU,gBAAgB;IAC1B,6EAA6E;IAC7E,YAAY,kBAAkB;IAC9B,kGAAkG;IAClG,OAAO,aAAa;IACpB,+GAA+G;IAC/G,WAAW,gBAAgB;CAC5B;AAED,6EAA6E;AAC7E,oBAAY,oBAAoB;IAC9B,0EAA0E;IAC1E,MAAM,WAAW;IACjB,qHAAqH;IACrH,SAAS,cAAc;IACvB,mGAAmG;IACnG,WAAW,gBAAgB;CAC5B;AAED,iFAAiF;AACjF,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,IAAI,EAAE,oBAAoB,CAAC;IAC3B,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gLAAgL;IAChL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kGAAkG;IAClG,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,2GAA2G;IAC3G,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mJAAmJ;IACnJ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,8DAA8D;IAC9D,MAAM,EAAE,gBAAgB,CAAC;IACzB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,6EAA6E;AAC7E,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,sBAAsB,CAAC;IACpC,SAAS,EAAE,sBAAsB,CAAC;IAClC,UAAU,EAAE,sBAAsB,CAAC;CACpC;AAED,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,6CAA6C;IAC7C,MAAM,EAAE,oBAAo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D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,2DAA2D;AAC3D,MAAM,WAAW,qBAAqB;IACpC,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gGAAgG;IAChG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iFAAiF;IACjF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yHAAyH;IACzH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wDAAwD;AACxD,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,qBAAqB,CAAC;CACpC;AAED,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC,uEAAuE;IACvE,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,mEAAmE;IACnE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,sFAAsF;IACtF,cAAc,EAAE,wBAAwB,CAAC;IACzC,uFAAuF;IACvF,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,131 @@
1
+ /** Visual/semantic status of one aggregate cost-limit card, derived by the host from its usage ratio. Every status renders a badge. */
2
+ export declare enum UsageLimitStatus {
3
+ /** Below the running-low threshold. Rendered with the default (blue) accent and a "within limits" badge. */
4
+ Default = "default",
5
+ /** At or above the running-low threshold but below 100% used. Rendered with the warning (amber) accent and badge. */
6
+ RunningLow = "runningLow",
7
+ /** At or above 100% used. Rendered with the error (red) accent and badge. */
8
+ LimitReached = "limitReached"
9
+ }
10
+ /** One aggregate cost-budget card's fully normalized, preformatted data. The host owns all DTO interpretation, currency formatting, and threshold derivation. */
11
+ export interface UsageLimitCardData {
12
+ /** Card title, e.g. `'Today'` / `'This week'` / `'This month'`. */
13
+ title: string;
14
+ /** Accessible description of the rolling window, e.g. `'Last 24 hours'`, appended to the card's accessible group name. */
15
+ periodDescription: string;
16
+ /** Raw used amount, already clamped to `>= 0` by the host. Used only to drive `progressAriaLabel`/text — the library never recomputes it. */
17
+ used: number;
18
+ /** Raw total amount. Ignored when `isUnlimited` is `true`. */
19
+ total: number;
20
+ /** Preformatted used amount, e.g. `'$3.60'`. Always the card's prominent figure. */
21
+ usedLabel: string;
22
+ /** Preformatted total amount, e.g. `'$4.00'`, passed to `labels.usedOfTotalLabel`. Omitted when `isUnlimited` is `true`. */
23
+ totalLabel?: string;
24
+ /** Preformatted remaining amount, e.g. `'$0.40'`, passed to `labels.remainingCaptionLabel`. Omitted when `isUnlimited` is `true`. */
25
+ remainingLabel?: string;
26
+ /** Whether the host detected the unlimited sentinel or an otherwise-unusable total. When `true`, only `usedLabel` is shown — no progress bar, ratio, or badge. */
27
+ isUnlimited?: boolean;
28
+ /** Used percentage, not pre-clamped — may exceed 100. The card clamps both the progress-bar fill and the visible percent label at 100%; only `progressAriaLabel` conveys the real, uncapped value. Ignored when `isUnlimited` is `true`. */
29
+ usedPercent?: number;
30
+ /** Status the host derived from `usedPercent` against its own thresholds. */
31
+ status: UsageLimitStatus;
32
+ /** Accessible value text for the progress bar (`aria-valuetext`), e.g. `'$3.60 of $4.00, 90% used'`. */
33
+ progressAriaLabel: string;
34
+ }
35
+ /** Localized strings shared by every card in a `UsageLimitCardGroup`/`UsageLimitCard`, independent of any single card's data. */
36
+ export interface UsageLimitCardGroupLabels {
37
+ /** Status badge text for `UsageLimitStatus.Default`, e.g. `'Within limits'`. */
38
+ defaultBadgeLabel: string;
39
+ /** Status badge text for `UsageLimitStatus.RunningLow`, e.g. `'Running low'`. */
40
+ runningLowBadgeLabel: string;
41
+ /** Status badge text for `UsageLimitStatus.LimitReached`, e.g. `'Limit reached'`. */
42
+ limitReachedBadgeLabel: string;
43
+ /** Builds the caption next to the prominent used amount, e.g. `({ total }) => \`used of ${total}\`` . Not shown when `isUnlimited` is `true`. */
44
+ usedOfTotalLabel: (params: {
45
+ total: string;
46
+ }) => string;
47
+ /** Builds the remaining-amount caption below the progress bar, e.g. `({ remaining }) => \`${remaining} left\`` . Not shown when `isUnlimited` is `true`. */
48
+ remainingCaptionLabel: (params: {
49
+ remaining: string;
50
+ }) => string;
51
+ /** Builds the trailing used-percent label, e.g. `({ percent }) => \`${percent}%\`` . */
52
+ usedPercentLabel: (params: {
53
+ percent: number;
54
+ }) => string;
55
+ }
56
+ /** Color overrides for `UsageLimitCardGroup`/`UsageLimitCard`, applied as CSS custom properties. */
57
+ export interface UsageLimitCardGroupColors {
58
+ /** Individual card background. Fallback: `--bg-layer-raised`. */
59
+ cardBackground?: string;
60
+ /** Title text color. Fallback: `--text-primary`. */
61
+ titleColor?: string;
62
+ /** Prominent amount text color in the default status. Fallback: `--text-info` (`#1D4ED8`). */
63
+ defaultAccentColor?: string;
64
+ /** Progress-fill color in the default status. Fallback: `--text-control-accent-hover` (`#5976E9`). */
65
+ defaultProgressColor?: string;
66
+ /** Prominent amount text color in the running-low status. Fallback: `--text-warning` (`#7F6300`). */
67
+ warningAccentColor?: string;
68
+ /** Progress-fill color in the running-low status. Fallback: `--text-warning-icon` (`#EEC840`). */
69
+ warningProgressColor?: string;
70
+ /** Prominent amount text color in the limit-reached status. Fallback: `--text-error` (`#AE2F2F`). */
71
+ errorAccentColor?: string;
72
+ /** Progress-fill color in the limit-reached status. Fallback: `--bg-control-error-active` (`#CC4545`). */
73
+ errorProgressColor?: string;
74
+ /** Secondary amount/caption text color (the "used of $X.XX" and "$X.XX left" portions). Fallback: `--text-secondary`. */
75
+ secondaryAmountColor?: string;
76
+ /** Progress-bar track color. Fallback: `--bg-layer-sunken`. */
77
+ progressTrackColor?: string;
78
+ /** Default-status badge background. Fallback: `--bg-success` (`#DBF1EB`). */
79
+ defaultBadgeBackground?: string;
80
+ /** Default-status badge text color. Fallback: `--text-success` (`#007274`). */
81
+ defaultBadgeColor?: string;
82
+ /** Running-low badge background. Fallback: `--bg-warning` (`#FAF0CF`). */
83
+ warningBadgeBackground?: string;
84
+ /** Running-low badge text color. Fallback: `--text-warning` (`#7F6300`). */
85
+ warningBadgeColor?: string;
86
+ /** Limit-reached badge background. Fallback: `--bg-error` (`#F3D6D8`). */
87
+ errorBadgeBackground?: string;
88
+ /** Limit-reached badge text color. Fallback: `--text-error` (`#AE2F2F`). */
89
+ errorBadgeColor?: string;
90
+ /** Used-percent trailing label color. Fallback: `--text-secondary`. */
91
+ usedPercentLabelColor?: string;
92
+ }
93
+ /** Typography class overrides for `UsageLimitCardGroup`/`UsageLimitCard`. */
94
+ export interface UsageLimitCardGroupTypography {
95
+ /** CSS class for the card title. Defaults to `'dial-body-semi-text'`. */
96
+ titleClassName?: string;
97
+ /** CSS class for the prominent used-amount figure. Defaults to `'dial-display1-text'`. */
98
+ amountClassName?: string;
99
+ /** CSS class for the secondary ("used of $X.XX" / "$X.XX left") caption text. Defaults to `'dial-small-text'`. */
100
+ secondaryAmountClassName?: string;
101
+ /** CSS class for the status badge text. Defaults to `'dial-caption-lead-semi-text'`. */
102
+ badgeClassName?: string;
103
+ /** CSS class for the trailing used-percent label. Defaults to `'dial-small-text'`. */
104
+ usedPercentLabelClassName?: string;
105
+ }
106
+ /** Style overrides accepted by `UsageLimitCardGroup` and `UsageLimitCard`. */
107
+ export interface UsageLimitCardGroupStyles {
108
+ /** Color overrides applied as CSS custom properties. */
109
+ colors?: UsageLimitCardGroupColors;
110
+ /** Typography class overrides. */
111
+ typography?: UsageLimitCardGroupTypography;
112
+ }
113
+ /** Props for `UsageLimitCardGroup`. */
114
+ export interface UsageLimitCardGroupProps {
115
+ /** Cards to render, in display order (e.g. Today, This week, This month). Each renders as its own independent, equally-sized box. Empty array renders nothing. */
116
+ cards: UsageLimitCardData[];
117
+ /** Localized strings shared by every card. */
118
+ labels: UsageLimitCardGroupLabels;
119
+ /** Style overrides applied as CSS custom properties and typography class overrides. */
120
+ styles?: UsageLimitCardGroupStyles;
121
+ }
122
+ /** Props for `UsageLimitCard`. */
123
+ export interface UsageLimitCardProps {
124
+ /** The card's normalized data. */
125
+ data: UsageLimitCardData;
126
+ /** Localized strings shared by every card. */
127
+ labels: UsageLimitCardGroupLabels;
128
+ /** Style overrides applied as CSS custom properties and typography class overrides. */
129
+ styles?: UsageLimitCardGroupStyles;
130
+ }
131
+ //# sourceMappingURL=usage-limit-card-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-limit-card-props.d.ts","sourceRoot":"","sources":["../../src/models/usage-limit-card-props.ts"],"names":[],"mappings":"AAAA,uIAAuI;AACvI,oBAAY,gBAAgB;IAC1B,4GAA4G;IAC5G,OAAO,YAAY;IACnB,qHAAqH;IACrH,UAAU,eAAe;IACzB,6EAA6E;IAC7E,YAAY,iBAAiB;CAC9B;AAED,iKAAiK;AACjK,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,0HAA0H;IAC1H,iBAAiB,EAAE,MAAM,CAAC;IAC1B,6IAA6I;IAC7I,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,4HAA4H;IAC5H,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qIAAqI;IACrI,cAAc,CAAC,EAAE,MAAM,CAAC;IAC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yBAAyB,CAAC;IAClC,uFAAuF;IACvF,MAAM,CAAC,EAAE,yBAAyB,CAAC;CACpC"}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@epam/ai-dial-usage-dashboard",
3
+ "description": "Presentational aggregate cost-limit cards for the Usage settings dashboard",
4
+ "version": "1.0.0-rc.7",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./index.js",
8
+ "module": "./index.js",
9
+ "types": "./index.d.ts",
10
+ "exports": {
11
+ "./package.json": "./package.json",
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js",
15
+ "default": "./index.js"
16
+ }
17
+ },
18
+ "peerDependencies": {
19
+ "@epam/ai-dial-chat-shared": "1.0.0-rc.7",
20
+ "@epam/ai-dial-ui-kit": "^0.14.0-dev.6",
21
+ "@tabler/icons-react": "^3.44.0",
22
+ "react": "^19.2.7"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/epam/ai-dial-chat.git",
27
+ "directory": "libs/usage-dashboard"
28
+ }
29
+ }