@opengeni/react 7.4.0-canary.36855269964001 → 7.4.0
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/README.md +3 -48
- package/dist/artifacts-document.js +2 -3
- package/dist/artifacts-presentation.js +2 -3
- package/dist/artifacts-spreadsheet.js +2 -2
- package/dist/artifacts.d.ts +0 -1
- package/dist/artifacts.js +1402 -505
- package/dist/artifacts.js.map +1 -1
- package/dist/{browser-viewer-R6KK5VKR.js → browser-viewer-2E6R2Y4W.js} +4 -4
- package/dist/{chunk-WUISZ3WU.js → chunk-3E2AITTZ.js} +28 -32
- package/dist/{chunk-WUISZ3WU.js.map → chunk-3E2AITTZ.js.map} +1 -1
- package/dist/{chunk-PWUILT2U.js → chunk-5AZSK6MV.js} +2 -2
- package/dist/{chunk-Y2PRMYLC.js → chunk-DUEBTL3N.js} +3 -4
- package/dist/{chunk-Y2PRMYLC.js.map → chunk-DUEBTL3N.js.map} +1 -1
- package/dist/{chunk-7UAMYXJY.js → chunk-KNDIXZN6.js} +18 -25
- package/dist/{chunk-7UAMYXJY.js.map → chunk-KNDIXZN6.js.map} +1 -1
- package/dist/{chunk-P4G6K2E2.js → chunk-L4OSXQ6H.js} +884 -1119
- package/dist/chunk-L4OSXQ6H.js.map +1 -0
- package/dist/{chunk-LLIH7Q4B.js → chunk-S5JQ4R22.js} +19 -47
- package/dist/chunk-S5JQ4R22.js.map +1 -0
- package/dist/{chunk-A4UJB2MM.js → chunk-SEEVCT36.js} +2 -2
- package/dist/{chunk-UXJCQ5GH.js → chunk-UDD6DLLT.js} +1 -6
- package/dist/chunk-UDD6DLLT.js.map +1 -0
- package/dist/chunk-UGMKPUEM.js +299 -0
- package/dist/chunk-UGMKPUEM.js.map +1 -0
- package/dist/{chunk-ZCZHKJKZ.js → chunk-USXVQACU.js} +3 -3
- package/dist/{chunk-VABBF52G.js → chunk-V2ABIVYJ.js} +6 -70
- package/dist/chunk-V2ABIVYJ.js.map +1 -0
- package/dist/{chunk-TVO6GXR6.js → chunk-X4HIN6TV.js} +162 -71
- package/dist/chunk-X4HIN6TV.js.map +1 -0
- package/dist/{chunk-IIDEIBMC.js → chunk-XEJEOAOV.js} +38 -49
- package/dist/chunk-XEJEOAOV.js.map +1 -0
- package/dist/{chunk-ZKLCPBWN.js → chunk-Y3QTZN2F.js} +5 -5
- package/dist/{chunk-73BUNGLF.js → chunk-YZ3YYMOM.js} +1 -1
- package/dist/components/artifacts/editable-artifact-ui.d.ts +1 -2
- package/dist/components/artifacts/index.d.ts +0 -7
- package/dist/components/browser-select-control.d.ts +1 -3
- package/dist/components/message-timeline.d.ts +1 -18
- package/dist/components/open-geni-links.d.ts +0 -16
- package/dist/components/session-conversation.d.ts +1 -20
- package/dist/composer.js +3 -3
- package/dist/{computer-viewer-DJHPSP2J.js → computer-viewer-WMJE6OA3.js} +3 -3
- package/dist/connect.js +6 -7
- package/dist/connect.js.map +1 -1
- package/dist/hooks/latest-question.d.ts +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.js +28 -39
- package/dist/index.js.map +1 -1
- package/dist/interaction.js +4 -4
- package/dist/{latest-question-KGCDK3XX.js → latest-question-QB4EUCW5.js} +3 -3
- package/dist/lib/format.d.ts +0 -3
- package/dist/machines.js +2 -2
- package/dist/{markdown-table-layout-QXSLK4BY.js → markdown-table-layout-PFUEZ2U4.js} +5 -37
- package/dist/markdown-table-layout-PFUEZ2U4.js.map +1 -0
- package/dist/{sandbox-files-4PMXDSDV.js → sandbox-files-PXPIZAFG.js} +2 -2
- package/dist/session-ui.d.ts +2 -5
- package/dist/session-ui.js +13 -23
- package/dist/session-ui.js.map +1 -1
- package/dist/session.js +3 -3
- package/dist/sites.js +289 -4
- package/dist/sites.js.map +1 -1
- package/dist/timeline/types.d.ts +1 -7
- package/dist/{timeline-annotation-selection-DMLMM2TX.js → timeline-annotation-selection-ODLVF4OI.js} +1 -6
- package/dist/timeline-annotation-selection-ODLVF4OI.js.map +1 -0
- package/package.json +3 -7
- package/src/artifacts.ts +0 -37
- package/src/components/artifacts/editable-artifact-ui.tsx +1 -3
- package/src/components/artifacts/editable-artifact-workbench.tsx +2 -5
- package/src/components/artifacts/editable-document.tsx +36 -34
- package/src/components/artifacts/editable-presentation.tsx +16 -21
- package/src/components/artifacts/index.ts +0 -41
- package/src/components/browser-select-control.tsx +1 -4
- package/src/components/browser-viewer.tsx +22 -81
- package/src/components/computer-viewer.tsx +23 -51
- package/src/components/markdown-table-layout.ts +5 -49
- package/src/components/markdown.tsx +2 -5
- package/src/components/message-timeline.tsx +434 -515
- package/src/components/open-geni-links.tsx +0 -24
- package/src/components/session-conversation.tsx +20 -131
- package/src/components/timeline-annotation-selection.tsx +0 -7
- package/src/hooks/use-available-models.ts +1 -1
- package/src/index.ts +0 -9
- package/src/lib/format.ts +0 -13
- package/src/session-ui.ts +0 -9
- package/src/timeline/projection.ts +4 -78
- package/src/timeline/types.ts +0 -7
- package/styles/compiled.css +0 -325
- package/dist/chat-interactive-block-VAGABN7J.js +0 -11
- package/dist/chunk-5CVXZA3Y.js +0 -292
- package/dist/chunk-5CVXZA3Y.js.map +0 -1
- package/dist/chunk-B3V6TG77.js +0 -41
- package/dist/chunk-B3V6TG77.js.map +0 -1
- package/dist/chunk-IIDEIBMC.js.map +0 -1
- package/dist/chunk-LLIH7Q4B.js.map +0 -1
- package/dist/chunk-P4G6K2E2.js.map +0 -1
- package/dist/chunk-RAIQYITC.js +0 -1772
- package/dist/chunk-RAIQYITC.js.map +0 -1
- package/dist/chunk-SCOTPE2I.js +0 -589
- package/dist/chunk-SCOTPE2I.js.map +0 -1
- package/dist/chunk-TVO6GXR6.js.map +0 -1
- package/dist/chunk-UXJCQ5GH.js.map +0 -1
- package/dist/chunk-VABBF52G.js.map +0 -1
- package/dist/chunk-WEHMPOXK.js +0 -39
- package/dist/chunk-WEHMPOXK.js.map +0 -1
- package/dist/chunk-XCHWDJ22.js +0 -107
- package/dist/chunk-XCHWDJ22.js.map +0 -1
- package/dist/components/artifacts/artifact-chrome.d.ts +0 -120
- package/dist/components/artifacts/artifact-sandbox.d.ts +0 -27
- package/dist/components/artifacts/chat-interactive-block.d.ts +0 -29
- package/dist/components/artifacts/deferred-chat-media.d.ts +0 -15
- package/dist/components/artifacts/editable-artifact-view.d.ts +0 -46
- package/dist/components/artifacts/latest-task-runner.d.ts +0 -15
- package/dist/components/artifacts/session-artifact-viewer.d.ts +0 -39
- package/dist/components/artifacts/site-view.d.ts +0 -23
- package/dist/components/timeline-pill-geometry.d.ts +0 -6
- package/dist/components/timeline-pill-placement.d.ts +0 -18
- package/dist/components/usage-limit-notice.d.ts +0 -49
- package/dist/components/usage-member-list.d.ts +0 -91
- package/dist/components/usage-meter.d.ts +0 -73
- package/dist/hooks/use-usage.d.ts +0 -40
- package/dist/markdown-table-layout-QXSLK4BY.js.map +0 -1
- package/dist/sandbox-files-4PMXDSDV.js.map +0 -1
- package/dist/timeline/allowance-exhausted-row.d.ts +0 -24
- package/dist/timeline-annotation-selection-DMLMM2TX.js.map +0 -1
- package/dist/timeline-pill-geometry-2G6EK47V.js +0 -73
- package/dist/timeline-pill-geometry-2G6EK47V.js.map +0 -1
- package/dist/usage/allowance-copy.d.ts +0 -25
- package/dist/usage/summary.d.ts +0 -35
- package/dist/usage.d.ts +0 -13
- package/dist/usage.js +0 -1073
- package/dist/usage.js.map +0 -1
- package/src/components/artifacts/artifact-chrome.tsx +0 -413
- package/src/components/artifacts/artifact-sandbox.tsx +0 -185
- package/src/components/artifacts/chat-interactive-block.tsx +0 -260
- package/src/components/artifacts/deferred-chat-media.tsx +0 -67
- package/src/components/artifacts/editable-artifact-view.tsx +0 -187
- package/src/components/artifacts/latest-task-runner.ts +0 -49
- package/src/components/artifacts/session-artifact-viewer.tsx +0 -376
- package/src/components/artifacts/site-view.tsx +0 -116
- package/src/components/timeline-pill-geometry.ts +0 -112
- package/src/components/timeline-pill-placement.ts +0 -81
- package/src/components/usage-limit-notice.tsx +0 -179
- package/src/components/usage-member-list.tsx +0 -792
- package/src/components/usage-meter.tsx +0 -382
- package/src/hooks/use-usage.ts +0 -100
- package/src/timeline/allowance-exhausted-row.tsx +0 -86
- package/src/usage/allowance-copy.ts +0 -64
- package/src/usage/summary.ts +0 -93
- package/src/usage.ts +0 -50
- /package/dist/{browser-viewer-R6KK5VKR.js.map → browser-viewer-2E6R2Y4W.js.map} +0 -0
- /package/dist/{chunk-PWUILT2U.js.map → chunk-5AZSK6MV.js.map} +0 -0
- /package/dist/{chunk-A4UJB2MM.js.map → chunk-SEEVCT36.js.map} +0 -0
- /package/dist/{chunk-ZCZHKJKZ.js.map → chunk-USXVQACU.js.map} +0 -0
- /package/dist/{chunk-ZKLCPBWN.js.map → chunk-Y3QTZN2F.js.map} +0 -0
- /package/dist/{chunk-73BUNGLF.js.map → chunk-YZ3YYMOM.js.map} +0 -0
- /package/dist/{chat-interactive-block-VAGABN7J.js.map → computer-viewer-WMJE6OA3.js.map} +0 -0
- /package/dist/{latest-question-KGCDK3XX.js.map → latest-question-QB4EUCW5.js.map} +0 -0
- /package/dist/{computer-viewer-DJHPSP2J.js.map → sandbox-files-PXPIZAFG.js.map} +0 -0
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type RefObject, useEffect, useState } from "react";
|
|
2
|
-
|
|
3
|
-
/** Where a floating timeline pill sits along its edge of the conversation. */
|
|
4
|
-
export type TimelinePillPlacement = "start" | "center" | "end";
|
|
5
|
-
|
|
6
|
-
const RECHECK_MS = 1000;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Floating pills (Jump to latest, Latest question) sit over the scrolling
|
|
10
|
-
* conversation. Slide one sideways, never up or down, when its spot would cover
|
|
11
|
-
* a control: a link, a button, or the label and chevron of a full-width row
|
|
12
|
-
* such as the active turn's "Working" header. Plain prose may sit under a pill;
|
|
13
|
-
* controls may not. Only the pill moves — the scroller's size, padding, and
|
|
14
|
-
* scroll position never change — so timeline anchoring stays untouched.
|
|
15
|
-
*/
|
|
16
|
-
export function useTimelinePillPlacement({
|
|
17
|
-
pillRef,
|
|
18
|
-
scrollerRef,
|
|
19
|
-
active,
|
|
20
|
-
preference,
|
|
21
|
-
}: {
|
|
22
|
-
pillRef: RefObject<HTMLElement | null>;
|
|
23
|
-
scrollerRef: RefObject<HTMLElement | null>;
|
|
24
|
-
active: boolean;
|
|
25
|
-
/** Placements in order of preference; the first is the resting position. */
|
|
26
|
-
preference: readonly TimelinePillPlacement[];
|
|
27
|
-
}): TimelinePillPlacement {
|
|
28
|
-
const [placement, setPlacement] = useState<TimelinePillPlacement>(preference[0]!);
|
|
29
|
-
const key = preference.join(",");
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (!active) {
|
|
33
|
-
setPlacement(preference[0]!);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const scroller = scrollerRef.current;
|
|
37
|
-
if (!scroller) return;
|
|
38
|
-
let frame = 0;
|
|
39
|
-
let current: TimelinePillPlacement = preference[0]!;
|
|
40
|
-
let choose: typeof import("./timeline-pill-geometry").choosePlacement | null = null;
|
|
41
|
-
let disposed = false;
|
|
42
|
-
void import("./timeline-pill-geometry").then((geometry) => {
|
|
43
|
-
if (disposed) return;
|
|
44
|
-
choose = geometry.choosePlacement;
|
|
45
|
-
schedule();
|
|
46
|
-
});
|
|
47
|
-
const evaluate = () => {
|
|
48
|
-
frame = 0;
|
|
49
|
-
const pill = pillRef.current;
|
|
50
|
-
const frameElement = pill?.offsetParent;
|
|
51
|
-
if (!choose || !pill || !(frameElement instanceof HTMLElement)) return;
|
|
52
|
-
const next = choose(pill, frameElement, scroller, preference, current);
|
|
53
|
-
if (next !== current) {
|
|
54
|
-
current = next;
|
|
55
|
-
setPlacement(next);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const schedule = () => {
|
|
59
|
-
if (frame === 0) frame = requestAnimationFrame(evaluate);
|
|
60
|
-
};
|
|
61
|
-
schedule();
|
|
62
|
-
const view = scroller.ownerDocument.defaultView;
|
|
63
|
-
scroller.addEventListener("scroll", schedule, { passive: true });
|
|
64
|
-
view?.addEventListener("resize", schedule);
|
|
65
|
-
// Content and panel width can change under a stationary reader (a streaming
|
|
66
|
-
// row, a ticking elapsed time, a resized host panel), so look again now and
|
|
67
|
-
// then while the pill is shown.
|
|
68
|
-
const timer = setInterval(schedule, RECHECK_MS);
|
|
69
|
-
return () => {
|
|
70
|
-
disposed = true;
|
|
71
|
-
if (frame !== 0) cancelAnimationFrame(frame);
|
|
72
|
-
scroller.removeEventListener("scroll", schedule);
|
|
73
|
-
view?.removeEventListener("resize", schedule);
|
|
74
|
-
clearInterval(timer);
|
|
75
|
-
};
|
|
76
|
-
// `key` stands in for the preference array's contents.
|
|
77
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
|
-
}, [active, key, pillRef, scrollerRef]);
|
|
79
|
-
|
|
80
|
-
return active ? placement : preference[0]!;
|
|
81
|
-
}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import type { UsageAllowancePeriod, WorkspaceUsageResponse } from "@opengeni/sdk/usage-allowances";
|
|
2
|
-
import { GaugeIcon, XIcon } from "lucide-react";
|
|
3
|
-
import { useEffect, useState, type ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
import { useUsage, type UsageClientLike } from "../hooks/use-usage";
|
|
6
|
-
import { cn } from "../lib/cn";
|
|
7
|
-
import {
|
|
8
|
-
allowanceLabels,
|
|
9
|
-
allowanceResetSentence,
|
|
10
|
-
formatAllowanceInstant,
|
|
11
|
-
type AllowanceLabels,
|
|
12
|
-
} from "../usage/allowance-copy";
|
|
13
|
-
import { summarizeUsage, usagePercentLabel, type UsageSummary } from "../usage/summary";
|
|
14
|
-
|
|
15
|
-
export type UsageLimitNoticeLabels = AllowanceLabels & {
|
|
16
|
-
/** "You've used 85% of your usage limit." */
|
|
17
|
-
memberWarning: (percent: string) => string;
|
|
18
|
-
/** "This workspace has used 85% of its usage budget." */
|
|
19
|
-
workspaceWarning: (percent: string) => string;
|
|
20
|
-
memberExhausted: string;
|
|
21
|
-
workspaceExhausted: string;
|
|
22
|
-
dismiss: string;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const DEFAULT_USAGE_LIMIT_NOTICE_LABELS: UsageLimitNoticeLabels = {
|
|
26
|
-
...allowanceLabels(),
|
|
27
|
-
memberWarning: (percent) => `You've used ${percent}% of your usage limit.`,
|
|
28
|
-
workspaceWarning: (percent) => `This workspace has used ${percent}% of its usage budget.`,
|
|
29
|
-
memberExhausted: "You've reached your usage limit.",
|
|
30
|
-
workspaceExhausted: "This workspace has reached its usage limit.",
|
|
31
|
-
dismiss: "Dismiss",
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
type NoticeBaseProps = {
|
|
35
|
-
labels?: Partial<UsageLimitNoticeLabels> | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Your own next step beside the message, for example an "Upgrade" or
|
|
38
|
-
* "Request more" button. Receives the summary so it can differ by scope.
|
|
39
|
-
*/
|
|
40
|
-
action?: ((summary: UsageSummary) => ReactNode) | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Remember a dismissed warning for this browser tab. The key should name the
|
|
43
|
-
* workspace; the period and scope are added for you, so a new warning (or a
|
|
44
|
-
* new period) shows again. Reaching the limit is never dismissible.
|
|
45
|
-
*/
|
|
46
|
-
dismissStorageKey?: string | undefined;
|
|
47
|
-
className?: string | undefined;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export type UsageLimitNoticeProps = NoticeBaseProps & {
|
|
51
|
-
/** A usage response you already loaded; omit it to read `/usage/me`. */
|
|
52
|
-
usage?: WorkspaceUsageResponse | null | undefined;
|
|
53
|
-
client?: UsageClientLike | undefined;
|
|
54
|
-
workspaceId?: string | undefined;
|
|
55
|
-
period?: UsageAllowancePeriod | undefined;
|
|
56
|
-
refreshKey?: unknown;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* A calm line for the composer when a member is close to, or at, a usage
|
|
61
|
-
* limit: what happened, who can raise it, and when it resets. Renders nothing
|
|
62
|
-
* while usage is comfortable, unlimited, loading, or unreadable.
|
|
63
|
-
*/
|
|
64
|
-
export function UsageLimitNotice({
|
|
65
|
-
usage,
|
|
66
|
-
client,
|
|
67
|
-
workspaceId,
|
|
68
|
-
period,
|
|
69
|
-
refreshKey,
|
|
70
|
-
...view
|
|
71
|
-
}: UsageLimitNoticeProps) {
|
|
72
|
-
if (usage !== undefined) {
|
|
73
|
-
return <UsageLimitNoticeView {...view} summary={usage ? summarizeUsage(usage) : null} />;
|
|
74
|
-
}
|
|
75
|
-
return (
|
|
76
|
-
<LoadingNotice
|
|
77
|
-
{...view}
|
|
78
|
-
client={client}
|
|
79
|
-
workspaceId={workspaceId}
|
|
80
|
-
period={period}
|
|
81
|
-
refreshKey={refreshKey}
|
|
82
|
-
/>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function LoadingNotice({
|
|
87
|
-
client,
|
|
88
|
-
workspaceId,
|
|
89
|
-
period,
|
|
90
|
-
refreshKey,
|
|
91
|
-
...view
|
|
92
|
-
}: NoticeBaseProps &
|
|
93
|
-
Pick<UsageLimitNoticeProps, "client" | "workspaceId" | "period" | "refreshKey">) {
|
|
94
|
-
const { summary } = useUsage({ client, workspaceId, period, refreshKey });
|
|
95
|
-
return <UsageLimitNoticeView {...view} summary={summary} />;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function readDismissed(key: string | null): boolean {
|
|
99
|
-
if (!key || typeof sessionStorage === "undefined") return false;
|
|
100
|
-
try {
|
|
101
|
-
return sessionStorage.getItem(key) === "1";
|
|
102
|
-
} catch {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** Presentational notice for a summary you computed (`summarizeUsage`). */
|
|
108
|
-
export function UsageLimitNoticeView({
|
|
109
|
-
summary,
|
|
110
|
-
labels: overrides,
|
|
111
|
-
action,
|
|
112
|
-
dismissStorageKey,
|
|
113
|
-
className,
|
|
114
|
-
}: NoticeBaseProps & { summary: UsageSummary | null }) {
|
|
115
|
-
const labels = { ...DEFAULT_USAGE_LIMIT_NOTICE_LABELS, ...overrides };
|
|
116
|
-
const binding = summary?.binding ?? null;
|
|
117
|
-
const state = summary?.state;
|
|
118
|
-
const key =
|
|
119
|
-
dismissStorageKey && binding && state === "warning"
|
|
120
|
-
? `${dismissStorageKey}:warning:${binding.scope}:${binding.resetsAt ?? "none"}`
|
|
121
|
-
: null;
|
|
122
|
-
const [dismissed, setDismissed] = useState(() => readDismissed(key));
|
|
123
|
-
useEffect(() => setDismissed(readDismissed(key)), [key]);
|
|
124
|
-
if (!summary || !binding || (state !== "warning" && state !== "exhausted")) return null;
|
|
125
|
-
if (state === "warning" && dismissed) return null;
|
|
126
|
-
const workspace = binding.scope === "workspace";
|
|
127
|
-
const exhausted = state === "exhausted";
|
|
128
|
-
const headline = exhausted
|
|
129
|
-
? workspace
|
|
130
|
-
? labels.workspaceExhausted
|
|
131
|
-
: labels.memberExhausted
|
|
132
|
-
: workspace
|
|
133
|
-
? labels.workspaceWarning(usagePercentLabel(binding.fraction))
|
|
134
|
-
: labels.memberWarning(usagePercentLabel(binding.fraction));
|
|
135
|
-
const reset = allowanceResetSentence(labels, binding.resetsAt);
|
|
136
|
-
const dismiss = () => {
|
|
137
|
-
setDismissed(true);
|
|
138
|
-
if (!key) return;
|
|
139
|
-
try {
|
|
140
|
-
sessionStorage.setItem(key, "1");
|
|
141
|
-
} catch {
|
|
142
|
-
// Storage can be unavailable (privacy mode); the in-memory dismissal holds.
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
return (
|
|
146
|
-
<div
|
|
147
|
-
role="status"
|
|
148
|
-
data-og-usage-notice={exhausted ? "exhausted" : "warning"}
|
|
149
|
-
data-og-usage-scope={binding.scope}
|
|
150
|
-
className={cn(
|
|
151
|
-
"og-root flex min-w-0 items-start gap-2 px-3.5 pt-2.5 text-og-sm md:px-4",
|
|
152
|
-
className,
|
|
153
|
-
)}
|
|
154
|
-
>
|
|
155
|
-
<GaugeIcon aria-hidden className="mt-0.5 size-3.5 shrink-0 text-og-status-waiting" />
|
|
156
|
-
<p className="min-w-0 flex-1 text-og-fg-muted">
|
|
157
|
-
<span className={cn(exhausted && "font-medium text-og-fg")}>{headline}</span>{" "}
|
|
158
|
-
{exhausted ? <>{workspace ? labels.workspaceRemedy : labels.memberRemedy} </> : null}
|
|
159
|
-
<span
|
|
160
|
-
className="whitespace-nowrap"
|
|
161
|
-
title={binding.resetsAt ? formatAllowanceInstant(binding.resetsAt) : undefined}
|
|
162
|
-
>
|
|
163
|
-
{reset}
|
|
164
|
-
</span>
|
|
165
|
-
</p>
|
|
166
|
-
{action ? <div className="shrink-0">{action(summary)}</div> : null}
|
|
167
|
-
{!exhausted ? (
|
|
168
|
-
<button
|
|
169
|
-
type="button"
|
|
170
|
-
aria-label={labels.dismiss}
|
|
171
|
-
onClick={dismiss}
|
|
172
|
-
className="-mt-0.5 -mr-1 grid size-6 shrink-0 place-items-center rounded-og-sm text-og-fg-subtle transition hover:bg-og-surface-2 hover:text-og-fg focus-visible:outline-2 focus-visible:outline-og-accent pointer-coarse:size-9"
|
|
173
|
-
>
|
|
174
|
-
<XIcon aria-hidden className="size-3.5" />
|
|
175
|
-
</button>
|
|
176
|
-
) : null}
|
|
177
|
-
</div>
|
|
178
|
-
);
|
|
179
|
-
}
|