@go-go-golems/rag-evaluation-site 0.1.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 +80 -0
- package/app/App.d.ts +8 -0
- package/app/index.d.ts +2 -0
- package/app/index.js +149 -0
- package/components/atoms/AnnotationBadge/AnnotationBadge.d.ts +9 -0
- package/components/atoms/AnnotationBadge/index.d.ts +2 -0
- package/components/atoms/Button/Button.d.ts +11 -0
- package/components/atoms/Button/index.d.ts +2 -0
- package/components/atoms/CheckboxRow/CheckboxRow.d.ts +8 -0
- package/components/atoms/CheckboxRow/index.d.ts +2 -0
- package/components/atoms/ContextKindSwatch/ContextKindSwatch.d.ts +11 -0
- package/components/atoms/ContextKindSwatch/index.d.ts +2 -0
- package/components/atoms/ContextStudioNavIcon/ContextStudioNavIcon.d.ts +8 -0
- package/components/atoms/ContextStudioNavIcon/index.d.ts +2 -0
- package/components/atoms/ErrorCallout/ErrorCallout.d.ts +6 -0
- package/components/atoms/ErrorCallout/index.d.ts +2 -0
- package/components/atoms/IconButton/IconButton.d.ts +9 -0
- package/components/atoms/IconButton/index.d.ts +2 -0
- package/components/atoms/SelectInput/SelectInput.d.ts +5 -0
- package/components/atoms/SelectInput/index.d.ts +2 -0
- package/components/atoms/TextInput/TextInput.d.ts +5 -0
- package/components/atoms/TextInput/index.d.ts +2 -0
- package/components/atoms/TranscriptRoleBadge/TranscriptRoleBadge.d.ts +8 -0
- package/components/atoms/TranscriptRoleBadge/index.d.ts +2 -0
- package/components/atoms/UploadGlyph/UploadGlyph.d.ts +6 -0
- package/components/atoms/UploadGlyph/index.d.ts +2 -0
- package/components/atoms/index.d.ts +12 -0
- package/components/foundation/Caption/Caption.d.ts +11 -0
- package/components/foundation/Caption/index.d.ts +2 -0
- package/components/foundation/CodeText/CodeText.d.ts +10 -0
- package/components/foundation/CodeText/index.d.ts +2 -0
- package/components/foundation/Divider/Divider.d.ts +6 -0
- package/components/foundation/Divider/index.d.ts +2 -0
- package/components/foundation/StatusText/StatusText.d.ts +9 -0
- package/components/foundation/StatusText/index.d.ts +2 -0
- package/components/foundation/Text/Text.d.ts +297 -0
- package/components/foundation/Text/index.d.ts +2 -0
- package/components/foundation/VisuallyHidden/VisuallyHidden.d.ts +6 -0
- package/components/foundation/VisuallyHidden/index.d.ts +2 -0
- package/components/foundation/index.d.ts +7 -0
- package/components/index.d.ts +6 -0
- package/components/layout/AppShell/AppShell.d.ts +8 -0
- package/components/layout/AppShell/index.d.ts +2 -0
- package/components/layout/DashboardGrid/DashboardGrid.d.ts +8 -0
- package/components/layout/DashboardGrid/index.d.ts +2 -0
- package/components/layout/FormRow/FormRow.d.ts +8 -0
- package/components/layout/FormRow/index.d.ts +2 -0
- package/components/layout/Inline/Inline.d.ts +11 -0
- package/components/layout/Inline/index.d.ts +2 -0
- package/components/layout/Panel/Panel.d.ts +10 -0
- package/components/layout/Panel/index.d.ts +2 -0
- package/components/layout/ScrollRegion/ScrollRegion.d.ts +7 -0
- package/components/layout/ScrollRegion/index.d.ts +2 -0
- package/components/layout/SectionBlock/SectionBlock.d.ts +11 -0
- package/components/layout/SectionBlock/index.d.ts +2 -0
- package/components/layout/SidebarShell/SidebarShell.d.ts +11 -0
- package/components/layout/SidebarShell/index.d.ts +2 -0
- package/components/layout/SlideShell/SlideShell.d.ts +16 -0
- package/components/layout/SlideShell/index.d.ts +2 -0
- package/components/layout/SplitPane/SplitPane.d.ts +10 -0
- package/components/layout/SplitPane/index.d.ts +2 -0
- package/components/layout/Stack/Stack.d.ts +10 -0
- package/components/layout/Stack/index.d.ts +2 -0
- package/components/layout/TabList/TabList.d.ts +13 -0
- package/components/layout/TabList/index.d.ts +2 -0
- package/components/layout/index.d.ts +13 -0
- package/components/molecules/AnchoredCommentCard/AnchoredCommentCard.d.ts +11 -0
- package/components/molecules/AnchoredCommentCard/index.d.ts +2 -0
- package/components/molecules/AnnotationNoteCard/AnnotationNoteCard.d.ts +9 -0
- package/components/molecules/AnnotationNoteCard/index.d.ts +2 -0
- package/components/molecules/AppNav/AppNav.d.ts +13 -0
- package/components/molecules/AppNav/index.d.ts +2 -0
- package/components/molecules/CheckList/CheckList.d.ts +11 -0
- package/components/molecules/CheckList/index.d.ts +2 -0
- package/components/molecules/ContextBudgetBar/ContextBudgetBar.d.ts +10 -0
- package/components/molecules/ContextBudgetBar/index.d.ts +2 -0
- package/components/molecules/ContextLegend/ContextLegend.d.ts +10 -0
- package/components/molecules/ContextLegend/index.d.ts +2 -0
- package/components/molecules/ContextStackDiagram/ContextStackDiagram.d.ts +8 -0
- package/components/molecules/ContextStackDiagram/index.d.ts +2 -0
- package/components/molecules/ContextStripDiagram/ContextStripDiagram.d.ts +10 -0
- package/components/molecules/ContextStripDiagram/index.d.ts +2 -0
- package/components/molecules/ContextTreemap/ContextTreemap.d.ts +8 -0
- package/components/molecules/ContextTreemap/index.d.ts +2 -0
- package/components/molecules/CourseStepNav/CourseStepNav.d.ts +9 -0
- package/components/molecules/CourseStepNav/index.d.ts +2 -0
- package/components/molecules/DataTable/DataTable.d.ts +19 -0
- package/components/molecules/DataTable/index.d.ts +2 -0
- package/components/molecules/DocumentListPanel/DocumentListPanel.d.ts +23 -0
- package/components/molecules/DocumentListPanel/index.d.ts +2 -0
- package/components/molecules/DocumentPreviewToolbar/DocumentPreviewToolbar.d.ts +11 -0
- package/components/molecules/DocumentPreviewToolbar/index.d.ts +2 -0
- package/components/molecules/FigureBlock/FigureBlock.d.ts +10 -0
- package/components/molecules/FigureBlock/index.d.ts +2 -0
- package/components/molecules/FileDropZone/FileDropZone.d.ts +14 -0
- package/components/molecules/FileDropZone/index.d.ts +2 -0
- package/components/molecules/KeyPointList/KeyPointList.d.ts +14 -0
- package/components/molecules/KeyPointList/index.d.ts +2 -0
- package/components/molecules/KeyValueStrip/KeyValueStrip.d.ts +10 -0
- package/components/molecules/KeyValueStrip/index.d.ts +2 -0
- package/components/molecules/MarkdownArticle/MarkdownArticle.d.ts +6 -0
- package/components/molecules/MarkdownArticle/index.d.ts +2 -0
- package/components/molecules/MetadataGrid/MetadataGrid.d.ts +14 -0
- package/components/molecules/MetadataGrid/index.d.ts +2 -0
- package/components/molecules/PersonSummary/PersonSummary.d.ts +9 -0
- package/components/molecules/PersonSummary/index.d.ts +2 -0
- package/components/molecules/SidebarNav/SidebarNav.d.ts +21 -0
- package/components/molecules/SidebarNav/index.d.ts +2 -0
- package/components/molecules/StepList/StepList.d.ts +15 -0
- package/components/molecules/StepList/index.d.ts +2 -0
- package/components/molecules/TranscriptMessageCard/TranscriptMessageCard.d.ts +11 -0
- package/components/molecules/TranscriptMessageCard/index.d.ts +2 -0
- package/components/molecules/TranscriptSessionHeader/TranscriptSessionHeader.d.ts +11 -0
- package/components/molecules/TranscriptSessionHeader/index.d.ts +2 -0
- package/components/molecules/index.d.ts +25 -0
- package/components/organisms/AnchoredCommentRail/AnchoredCommentRail.d.ts +10 -0
- package/components/organisms/AnchoredCommentRail/index.d.ts +2 -0
- package/components/organisms/AnnotationRailPanel/AnnotationRailPanel.d.ts +11 -0
- package/components/organisms/AnnotationRailPanel/index.d.ts +2 -0
- package/components/organisms/ContextDiagramPanel/ContextDiagramPanel.d.ts +9 -0
- package/components/organisms/ContextDiagramPanel/index.d.ts +2 -0
- package/components/organisms/ContextUploadDropArea/ContextUploadDropArea.d.ts +11 -0
- package/components/organisms/ContextUploadDropArea/index.d.ts +2 -0
- package/components/organisms/CourseLessonPanel/CourseLessonPanel.d.ts +9 -0
- package/components/organisms/CourseLessonPanel/index.d.ts +2 -0
- package/components/organisms/CourseSlidePanel/CourseSlidePanel.d.ts +13 -0
- package/components/organisms/CourseSlidePanel/index.d.ts +2 -0
- package/components/organisms/CourseStudioShell/CourseStudioShell.d.ts +13 -0
- package/components/organisms/CourseStudioShell/courseStudioNav.d.ts +3 -0
- package/components/organisms/CourseStudioShell/index.d.ts +3 -0
- package/components/organisms/HandoutDocumentShell/HandoutDocumentShell.d.ts +14 -0
- package/components/organisms/HandoutDocumentShell/index.d.ts +2 -0
- package/components/organisms/TranscriptReaderPanel/TranscriptReaderPanel.d.ts +13 -0
- package/components/organisms/TranscriptReaderPanel/index.d.ts +2 -0
- package/components/organisms/TranscriptWorkspacePanel/TranscriptWorkspacePanel.d.ts +13 -0
- package/components/organisms/TranscriptWorkspacePanel/index.d.ts +2 -0
- package/components/organisms/index.d.ts +11 -0
- package/context/fixtures.d.ts +13 -0
- package/context/index.d.ts +4 -0
- package/context/kinds.d.ts +22 -0
- package/context/types.d.ts +124 -0
- package/hooks/useWidgetPage.d.ts +19 -0
- package/index.d.ts +6 -0
- package/index.js +375 -0
- package/ir.js +32 -0
- package/package.json +58 -0
- package/styles.css +2 -0
- package/theme.css +53 -0
- package/useWidgetPage-B8iwybER.js +4419 -0
- package/widgets/WidgetRenderer.d.ts +8 -0
- package/widgets/actions.d.ts +19 -0
- package/widgets/cellRenderers.d.ts +11 -0
- package/widgets/index.d.ts +5 -0
- package/widgets/ir.d.ts +507 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export type ContextPartKind = 'system' | 'instruction' | 'context' | 'conversation' | 'summary' | 'retrieval' | 'tool' | 'result' | 'generated' | 'annotation' | 'course' | 'active' | 'evicted' | 'empty' | 'other';
|
|
2
|
+
export type TranscriptRole = 'system' | 'developer' | 'user' | 'assistant' | 'tool' | 'other';
|
|
3
|
+
export type ContextJsonPrimitive = string | number | boolean | null;
|
|
4
|
+
export type ContextJsonValue = ContextJsonPrimitive | ContextJsonValue[] | {
|
|
5
|
+
[key: string]: ContextJsonValue;
|
|
6
|
+
};
|
|
7
|
+
export type ContextJsonRecord = Record<string, ContextJsonValue>;
|
|
8
|
+
export interface ContextWindowPart {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
kind: ContextPartKind;
|
|
12
|
+
tokens: number;
|
|
13
|
+
note?: string;
|
|
14
|
+
sourceId?: string;
|
|
15
|
+
startToken?: number;
|
|
16
|
+
endToken?: number;
|
|
17
|
+
metadata?: ContextJsonRecord;
|
|
18
|
+
}
|
|
19
|
+
export interface ContextWindowSnapshot {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
limit: number;
|
|
24
|
+
parts: ContextWindowPart[];
|
|
25
|
+
selectedPartId?: string;
|
|
26
|
+
metadata?: ContextJsonRecord;
|
|
27
|
+
}
|
|
28
|
+
export type ContextDiagramView = 'strip' | 'stack' | 'budget' | 'treemap';
|
|
29
|
+
export type ContextDiagramStyle = 'pattern' | 'tone' | 'outline';
|
|
30
|
+
export interface ContextDiagramSegment {
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
kind: ContextPartKind;
|
|
34
|
+
tokens: number;
|
|
35
|
+
note?: string;
|
|
36
|
+
metadata?: ContextJsonRecord;
|
|
37
|
+
}
|
|
38
|
+
export interface TranscriptAnnotation {
|
|
39
|
+
id: string;
|
|
40
|
+
targetMessageId: string;
|
|
41
|
+
kind: ContextPartKind;
|
|
42
|
+
label: string;
|
|
43
|
+
text: string;
|
|
44
|
+
confidence?: number;
|
|
45
|
+
metadata?: ContextJsonRecord;
|
|
46
|
+
}
|
|
47
|
+
export interface TranscriptMessage {
|
|
48
|
+
id: string;
|
|
49
|
+
role: TranscriptRole;
|
|
50
|
+
text: string;
|
|
51
|
+
tokens?: number;
|
|
52
|
+
name?: string;
|
|
53
|
+
timestamp?: string;
|
|
54
|
+
annotationIds?: string[];
|
|
55
|
+
metadata?: ContextJsonRecord;
|
|
56
|
+
}
|
|
57
|
+
export interface TranscriptFixture {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
subtitle?: string;
|
|
61
|
+
messages: TranscriptMessage[];
|
|
62
|
+
annotations: TranscriptAnnotation[];
|
|
63
|
+
selectedAnnotationId?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ContextCourseInstructor {
|
|
66
|
+
name: string;
|
|
67
|
+
role?: string;
|
|
68
|
+
bio?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ContextCourseAgendaItem {
|
|
71
|
+
id: string;
|
|
72
|
+
number: string;
|
|
73
|
+
title: string;
|
|
74
|
+
description: string;
|
|
75
|
+
duration?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ContextCourse {
|
|
78
|
+
id: string;
|
|
79
|
+
kicker?: string;
|
|
80
|
+
title: string;
|
|
81
|
+
tagline: string;
|
|
82
|
+
when?: string;
|
|
83
|
+
where?: string;
|
|
84
|
+
format?: string;
|
|
85
|
+
price?: string;
|
|
86
|
+
instructor?: ContextCourseInstructor;
|
|
87
|
+
blurb?: string;
|
|
88
|
+
outcomes: string[];
|
|
89
|
+
agenda: ContextCourseAgendaItem[];
|
|
90
|
+
}
|
|
91
|
+
export interface ContextSlide {
|
|
92
|
+
id: string;
|
|
93
|
+
number: string;
|
|
94
|
+
kicker?: string;
|
|
95
|
+
title: string;
|
|
96
|
+
view: ContextDiagramView;
|
|
97
|
+
snapshotId: string;
|
|
98
|
+
notes: string[];
|
|
99
|
+
}
|
|
100
|
+
export interface ContextHandoutDocument {
|
|
101
|
+
id: string;
|
|
102
|
+
title: string;
|
|
103
|
+
file: string;
|
|
104
|
+
format: string;
|
|
105
|
+
size?: string;
|
|
106
|
+
description: string;
|
|
107
|
+
body: string;
|
|
108
|
+
}
|
|
109
|
+
export type AnchoredCommentStatus = 'open' | 'resolved';
|
|
110
|
+
export interface AnchoredComment {
|
|
111
|
+
id: string;
|
|
112
|
+
anchorX: number;
|
|
113
|
+
anchorY: number;
|
|
114
|
+
author: string;
|
|
115
|
+
text: string;
|
|
116
|
+
time?: string;
|
|
117
|
+
status?: AnchoredCommentStatus;
|
|
118
|
+
metadata?: ContextJsonRecord;
|
|
119
|
+
}
|
|
120
|
+
export interface ContextHandoutBundle {
|
|
121
|
+
intro: string;
|
|
122
|
+
docs: ContextHandoutDocument[];
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WidgetNode } from '../widgets/ir';
|
|
2
|
+
export interface WidgetPageResponse {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
root: WidgetNode;
|
|
6
|
+
meta?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface UseWidgetPageOptions {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
fetcher?: typeof fetch;
|
|
11
|
+
}
|
|
12
|
+
export interface UseWidgetPageResult {
|
|
13
|
+
page: WidgetPageResponse | null;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
refresh: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function useWidgetPage(url: string, options?: UseWidgetPageOptions): UseWidgetPageResult;
|
|
19
|
+
//# sourceMappingURL=useWidgetPage.d.ts.map
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, Ct as i, D as a, E as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, P as v, Q as y, R as b, S as x, St as S, T as C, Tt as w, U as T, V as ee, W as te, X as ne, Y as re, Z as ie, _ as ae, _t as oe, a as se, at as ce, b as le, bt as ue, c as de, ct as fe, d as pe, dt as E, et as D, f as O, ft as k, g as A, gt as j, h as M, ht as N, i as P, it as F, j as I, k as L, l as R, lt as z, m as B, mt as me, n as he, nt as ge, o as _e, ot as ve, p as ye, pt as be, q as xe, r as Se, rt as Ce, s as we, st as Te, t as Ee, tt as De, u as Oe, ut as ke, v as Ae, vt as je, w as Me, wt as V, x as Ne, xt as Pe, y as Fe, yt as H, z as Ie } from "./useWidgetPage-B8iwybER.js";
|
|
2
|
+
import { component as Le, element as Re, isWidgetNode as ze, text as Be } from "./ir.js";
|
|
3
|
+
import { createElement as Ve, useRef as He, useState as Ue } from "react";
|
|
4
|
+
var We = { root: "_root_1mahx_1" }, U = i();
|
|
5
|
+
function Ge({ className: e, children: t, ...n }) {
|
|
6
|
+
return /* @__PURE__ */ (0, U.jsx)("span", {
|
|
7
|
+
className: [We.root, e ?? ""].filter(Boolean).join(" "),
|
|
8
|
+
...n,
|
|
9
|
+
children: t
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
var Ke = { root: "_root_1yizk_1" };
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/atoms/CheckboxRow/CheckboxRow.tsx
|
|
15
|
+
function qe({ checked: e, onChange: t, className: n, children: r, ...i }) {
|
|
16
|
+
return /* @__PURE__ */ (0, U.jsxs)("label", {
|
|
17
|
+
className: [Ke.root, n ?? ""].filter(Boolean).join(" "),
|
|
18
|
+
"data-rag-atom": "CheckboxRow",
|
|
19
|
+
...i,
|
|
20
|
+
children: [/* @__PURE__ */ (0, U.jsx)("input", {
|
|
21
|
+
type: "checkbox",
|
|
22
|
+
checked: e,
|
|
23
|
+
onChange: t
|
|
24
|
+
}), r]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
var W = {
|
|
28
|
+
root: "_root_1otk8_1",
|
|
29
|
+
compact: "_compact_1otk8_26",
|
|
30
|
+
normal: "_normal_1otk8_30"
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/atoms/IconButton/IconButton.tsx
|
|
34
|
+
function Je({ size: e = "compact", label: t, className: n, children: r, ...i }) {
|
|
35
|
+
return /* @__PURE__ */ (0, U.jsx)("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
"aria-label": t,
|
|
38
|
+
title: i.title ?? t,
|
|
39
|
+
className: [
|
|
40
|
+
W.root,
|
|
41
|
+
e === "compact" ? W.compact : W.normal,
|
|
42
|
+
n ?? ""
|
|
43
|
+
].filter(Boolean).join(" "),
|
|
44
|
+
"data-rag-atom": "IconButton",
|
|
45
|
+
...i,
|
|
46
|
+
children: r
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
var G = {
|
|
50
|
+
root: "_root_72kwi_1",
|
|
51
|
+
folder: "_folder_72kwi_8",
|
|
52
|
+
arrow: "_arrow_72kwi_15"
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/atoms/UploadGlyph/UploadGlyph.tsx
|
|
56
|
+
function K({ title: e = "Upload file", className: t, ...n }) {
|
|
57
|
+
let r = e ? "rag-upload-glyph-title" : void 0;
|
|
58
|
+
return /* @__PURE__ */ (0, U.jsxs)("svg", {
|
|
59
|
+
className: [G.root, t ?? ""].filter(Boolean).join(" "),
|
|
60
|
+
viewBox: "0 0 40 34",
|
|
61
|
+
role: e ? "img" : "presentation",
|
|
62
|
+
"aria-labelledby": r,
|
|
63
|
+
"data-rag-atom": "UploadGlyph",
|
|
64
|
+
...n,
|
|
65
|
+
children: [
|
|
66
|
+
e && /* @__PURE__ */ (0, U.jsx)("title", {
|
|
67
|
+
id: r,
|
|
68
|
+
children: e
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ (0, U.jsx)("path", {
|
|
71
|
+
className: G.folder,
|
|
72
|
+
d: "M2 8 L2 32 L38 32 L38 4 L18 4 L14 8 Z"
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
75
|
+
className: G.arrow,
|
|
76
|
+
x1: "20",
|
|
77
|
+
y1: "14",
|
|
78
|
+
x2: "20",
|
|
79
|
+
y2: "26"
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ (0, U.jsx)("path", {
|
|
82
|
+
className: G.arrow,
|
|
83
|
+
d: "M15 19 L20 14 L25 19"
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
var q = {
|
|
89
|
+
root: "_root_1gd53_1",
|
|
90
|
+
filled: "_filled_1gd53_13"
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/components/atoms/ContextStudioNavIcon/ContextStudioNavIcon.tsx
|
|
94
|
+
function J({ id: e, title: t, className: n, ...r }) {
|
|
95
|
+
let i = t ? `rag-context-studio-nav-icon-${e}` : void 0;
|
|
96
|
+
return /* @__PURE__ */ (0, U.jsxs)("svg", {
|
|
97
|
+
className: [q.root, n ?? ""].filter(Boolean).join(" "),
|
|
98
|
+
viewBox: "0 0 15 15",
|
|
99
|
+
role: t ? "img" : "presentation",
|
|
100
|
+
"aria-labelledby": i,
|
|
101
|
+
"data-rag-atom": "ContextStudioNavIcon",
|
|
102
|
+
"data-icon-id": e,
|
|
103
|
+
...r,
|
|
104
|
+
children: [t && /* @__PURE__ */ (0, U.jsx)("title", {
|
|
105
|
+
id: i,
|
|
106
|
+
children: t
|
|
107
|
+
}), Y(e)]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function Y(e) {
|
|
111
|
+
switch (e) {
|
|
112
|
+
case "course": return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
113
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
114
|
+
x: "2",
|
|
115
|
+
y: "1.5",
|
|
116
|
+
width: "11",
|
|
117
|
+
height: "12"
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
120
|
+
x1: "4.5",
|
|
121
|
+
y1: "5",
|
|
122
|
+
x2: "10.5",
|
|
123
|
+
y2: "5"
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
126
|
+
x1: "4.5",
|
|
127
|
+
y1: "8",
|
|
128
|
+
x2: "10.5",
|
|
129
|
+
y2: "8"
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
132
|
+
x1: "4.5",
|
|
133
|
+
y1: "11",
|
|
134
|
+
x2: "8",
|
|
135
|
+
y2: "11"
|
|
136
|
+
})
|
|
137
|
+
] });
|
|
138
|
+
case "slides": return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
139
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
140
|
+
x: "1.5",
|
|
141
|
+
y: "2.5",
|
|
142
|
+
width: "12",
|
|
143
|
+
height: "8.5"
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
146
|
+
x1: "6",
|
|
147
|
+
y1: "13",
|
|
148
|
+
x2: "9",
|
|
149
|
+
y2: "13"
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
152
|
+
x1: "7.5",
|
|
153
|
+
y1: "11",
|
|
154
|
+
x2: "7.5",
|
|
155
|
+
y2: "13"
|
|
156
|
+
})
|
|
157
|
+
] });
|
|
158
|
+
case "visualize": return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
159
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
160
|
+
className: q.filled,
|
|
161
|
+
x: "1.5",
|
|
162
|
+
y: "4",
|
|
163
|
+
width: "3",
|
|
164
|
+
height: "7"
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
167
|
+
x: "5.5",
|
|
168
|
+
y: "2",
|
|
169
|
+
width: "3",
|
|
170
|
+
height: "9"
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
173
|
+
className: q.filled,
|
|
174
|
+
x: "9.5",
|
|
175
|
+
y: "6",
|
|
176
|
+
width: "3",
|
|
177
|
+
height: "5"
|
|
178
|
+
})
|
|
179
|
+
] });
|
|
180
|
+
case "upload": return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
181
|
+
/* @__PURE__ */ (0, U.jsx)("path", { d: "M2 9 L2 13 L13 13 L13 9" }),
|
|
182
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
183
|
+
x1: "7.5",
|
|
184
|
+
y1: "2",
|
|
185
|
+
x2: "7.5",
|
|
186
|
+
y2: "9.5"
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ (0, U.jsx)("path", { d: "M4.5 5 L7.5 2 L10.5 5" })
|
|
189
|
+
] });
|
|
190
|
+
case "transcript": return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
191
|
+
/* @__PURE__ */ (0, U.jsx)("rect", {
|
|
192
|
+
x: "1.5",
|
|
193
|
+
y: "2",
|
|
194
|
+
width: "12",
|
|
195
|
+
height: "11"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
198
|
+
x1: "4",
|
|
199
|
+
y1: "5",
|
|
200
|
+
x2: "11",
|
|
201
|
+
y2: "5"
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
204
|
+
x1: "4",
|
|
205
|
+
y1: "7.5",
|
|
206
|
+
x2: "11",
|
|
207
|
+
y2: "7.5"
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ (0, U.jsx)("line", {
|
|
210
|
+
x1: "4",
|
|
211
|
+
y1: "10",
|
|
212
|
+
x2: "8",
|
|
213
|
+
y2: "10"
|
|
214
|
+
})
|
|
215
|
+
] });
|
|
216
|
+
case "comments": return /* @__PURE__ */ (0, U.jsx)("path", { d: "M2 2 L13 2 L13 9 L7 9 L4 12 L4 9 L2 9 Z" });
|
|
217
|
+
case "handout": return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)("path", { d: "M3 1.5 L10 1.5 L12.5 4 L12.5 13.5 L3 13.5 Z" }), /* @__PURE__ */ (0, U.jsx)("path", { d: "M10 1.5 L10 4 L12.5 4" })] });
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
var X = {
|
|
221
|
+
root: "_root_zaedc_1",
|
|
222
|
+
input: "_input_zaedc_38",
|
|
223
|
+
icon: "_icon_zaedc_42",
|
|
224
|
+
title: "_title_zaedc_48",
|
|
225
|
+
description: "_description_zaedc_52"
|
|
226
|
+
};
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/components/molecules/FileDropZone/FileDropZone.tsx
|
|
229
|
+
function Z(e) {
|
|
230
|
+
return e ? Array.from(e) : [];
|
|
231
|
+
}
|
|
232
|
+
function Q({ title: e = "Drop a file here", description: t = "or choose a file", icon: n, accept: r, multiple: i = !1, disabled: a = !1, active: o = !1, inputAriaLabel: s = "Choose file to upload", onFilesSelected: c, className: l, onDragEnter: u, onDragOver: d, onDragLeave: f, onKeyDown: p, ...m }) {
|
|
233
|
+
let h = He(null), [g, _] = Ue(!1), v = o || g;
|
|
234
|
+
function y() {
|
|
235
|
+
a || h.current?.click();
|
|
236
|
+
}
|
|
237
|
+
function b(e) {
|
|
238
|
+
!a && e.length > 0 && c?.(e);
|
|
239
|
+
}
|
|
240
|
+
function x(e) {
|
|
241
|
+
u?.(e), !(e.defaultPrevented || a) && (e.preventDefault(), _(!0));
|
|
242
|
+
}
|
|
243
|
+
function S(e) {
|
|
244
|
+
d?.(e), !(e.defaultPrevented || a) && (e.preventDefault(), _(!0));
|
|
245
|
+
}
|
|
246
|
+
function C(e) {
|
|
247
|
+
f?.(e), !a && (e.currentTarget.contains(e.relatedTarget) || _(!1));
|
|
248
|
+
}
|
|
249
|
+
function w(e) {
|
|
250
|
+
e.preventDefault(), _(!1), b(Z(e.dataTransfer.files));
|
|
251
|
+
}
|
|
252
|
+
function T(e) {
|
|
253
|
+
p?.(e), !(e.defaultPrevented || a) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), y());
|
|
254
|
+
}
|
|
255
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
256
|
+
className: [X.root, l ?? ""].filter(Boolean).join(" "),
|
|
257
|
+
role: "button",
|
|
258
|
+
tabIndex: a ? void 0 : 0,
|
|
259
|
+
"aria-disabled": a || void 0,
|
|
260
|
+
"data-active": v ? "true" : void 0,
|
|
261
|
+
"data-disabled": a ? "true" : void 0,
|
|
262
|
+
"data-rag-molecule": "FileDropZone",
|
|
263
|
+
onClick: y,
|
|
264
|
+
onDragEnter: x,
|
|
265
|
+
onDragOver: S,
|
|
266
|
+
onDragLeave: C,
|
|
267
|
+
onDrop: w,
|
|
268
|
+
onKeyDown: T,
|
|
269
|
+
...m,
|
|
270
|
+
children: [
|
|
271
|
+
/* @__PURE__ */ (0, U.jsx)("input", {
|
|
272
|
+
ref: h,
|
|
273
|
+
className: X.input,
|
|
274
|
+
type: "file",
|
|
275
|
+
accept: r,
|
|
276
|
+
multiple: i,
|
|
277
|
+
disabled: a,
|
|
278
|
+
"aria-label": s,
|
|
279
|
+
onChange: (e) => {
|
|
280
|
+
b(Z(e.currentTarget.files)), e.currentTarget.value = "";
|
|
281
|
+
}
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ (0, U.jsx)("div", {
|
|
284
|
+
className: X.icon,
|
|
285
|
+
"aria-hidden": "true",
|
|
286
|
+
children: n ?? /* @__PURE__ */ (0, U.jsx)(K, { title: "" })
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ (0, U.jsx)(V, {
|
|
289
|
+
as: "div",
|
|
290
|
+
size: "body",
|
|
291
|
+
weight: "bold",
|
|
292
|
+
className: X.title,
|
|
293
|
+
children: e
|
|
294
|
+
}),
|
|
295
|
+
t && /* @__PURE__ */ (0, U.jsx)(H, {
|
|
296
|
+
className: X.description,
|
|
297
|
+
children: t
|
|
298
|
+
})
|
|
299
|
+
]
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/components/organisms/CourseStudioShell/courseStudioNav.ts
|
|
304
|
+
function $(e) {
|
|
305
|
+
return Ve(J, { id: e });
|
|
306
|
+
}
|
|
307
|
+
var Ye = [
|
|
308
|
+
{
|
|
309
|
+
id: "present",
|
|
310
|
+
label: "Present",
|
|
311
|
+
items: [{
|
|
312
|
+
id: "course",
|
|
313
|
+
label: "Course",
|
|
314
|
+
icon: $("course")
|
|
315
|
+
}, {
|
|
316
|
+
id: "slides",
|
|
317
|
+
label: "Slides",
|
|
318
|
+
icon: $("slides")
|
|
319
|
+
}]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: "analyze",
|
|
323
|
+
label: "Analyze",
|
|
324
|
+
items: [{
|
|
325
|
+
id: "visualize",
|
|
326
|
+
label: "Visualize",
|
|
327
|
+
icon: $("visualize")
|
|
328
|
+
}, {
|
|
329
|
+
id: "upload",
|
|
330
|
+
label: "Upload",
|
|
331
|
+
icon: $("upload")
|
|
332
|
+
}]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: "review",
|
|
336
|
+
label: "Review",
|
|
337
|
+
items: [{
|
|
338
|
+
id: "transcript",
|
|
339
|
+
label: "Transcript",
|
|
340
|
+
icon: $("transcript")
|
|
341
|
+
}, {
|
|
342
|
+
id: "comments",
|
|
343
|
+
label: "Comments",
|
|
344
|
+
icon: $("comments")
|
|
345
|
+
}]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
id: "take-home",
|
|
349
|
+
label: "Take-home",
|
|
350
|
+
items: [{
|
|
351
|
+
id: "handout",
|
|
352
|
+
label: "Handout",
|
|
353
|
+
icon: $("handout")
|
|
354
|
+
}]
|
|
355
|
+
}
|
|
356
|
+
];
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/components/organisms/ContextUploadDropArea/ContextUploadDropArea.tsx
|
|
359
|
+
function Xe({ title: e = "Drop a .json file here", description: t = "or paste below · max 200k tokens", accept: n = "application/json,.json", disabled: r = !1, active: i = !1, onFilesSelected: a, ...o }) {
|
|
360
|
+
return /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
361
|
+
title: e,
|
|
362
|
+
description: t,
|
|
363
|
+
accept: n,
|
|
364
|
+
disabled: r,
|
|
365
|
+
active: i,
|
|
366
|
+
onFilesSelected: a,
|
|
367
|
+
inputAriaLabel: "Choose context-window JSON file",
|
|
368
|
+
"data-rag-organism": "ContextUploadDropArea",
|
|
369
|
+
...o
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
//#endregion
|
|
373
|
+
export { r as AnchoredCommentCard, we as AnchoredCommentRail, xe as AnnotationBadge, Me as AnnotationNoteCard, R as AnnotationRailPanel, h as AppNav, u as AppShell, N as Button, ce as CONTEXT_ACCENT, ve as CONTEXT_INK, Te as CONTEXT_RED, ne as CONTEXT_WINDOW_LIMIT, H as Caption, le as CheckList, qe as CheckboxRow, S as CodeText, t as ContextBudgetBar, pe as ContextDiagramPanel, re as ContextKindSwatch, I as ContextLegend, _ as ContextStackDiagram, L as ContextStripDiagram, J as ContextStudioNavIcon, a as ContextTreemap, Xe as ContextUploadDropArea, _e as CourseLessonPanel, se as CourseSlidePanel, x as CourseStepNav, P as CourseStudioShell, T as DashboardGrid, g as DataTable, ue as Divider, ye as DocumentListPanel, O as DocumentPreviewToolbar, me as ErrorCallout, ae as FigureBlock, Q as FileDropZone, Ie as FormRow, Se as HandoutDocumentShell, Je as IconButton, te as Inline, A as KeyPointList, Ne as KeyValueStrip, B as MarkdownArticle, v as MetadataGrid, p as Panel, Ae as PersonSummary, ee as ScrollRegion, b as SectionBlock, be as SelectInput, M as SidebarNav, c as SidebarShell, d as SlideShell, m as SplitPane, l as Stack, Pe as StatusText, Fe as StepList, n as TabList, V as Text, k as TextInput, o as TranscriptMessageCard, Oe as TranscriptReaderPanel, f as TranscriptRoleBadge, C as TranscriptSessionHeader, de as TranscriptWorkspacePanel, K as UploadGlyph, Ge as VisuallyHidden, he as WidgetRenderer, ie as anchoredCommentFixtures, w as bindAction, Le as component, y as contextCourseFixture, e as contextHandoutFixture, fe as contextKindOrder, D as contextSlides, De as contextWindowFillRatio, ge as contextWindowSnapshots, Ce as contextWindowTokenTotal, Ye as courseStudioNavSections, s as dispatchWidgetAction, Re as element, z as getContextKindLabel, ke as getContextKindSpec, E as isContextPartKind, ze as isWidgetNode, j as renderCell, oe as renderRenderable, je as rowKey, Be as text, F as transcriptFixture, Ee as useWidgetPage };
|
|
374
|
+
|
|
375
|
+
//# sourceMappingURL=index.js.map
|
package/ir.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/widgets/ir.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return {
|
|
4
|
+
kind: "text",
|
|
5
|
+
text: String(e)
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function t(e, t, n = []) {
|
|
9
|
+
return {
|
|
10
|
+
kind: "element",
|
|
11
|
+
tag: e,
|
|
12
|
+
attrs: t,
|
|
13
|
+
children: n
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function n(e, t, n = []) {
|
|
17
|
+
return {
|
|
18
|
+
kind: "component",
|
|
19
|
+
type: e,
|
|
20
|
+
props: t,
|
|
21
|
+
children: n
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function r(e) {
|
|
25
|
+
if (!e || typeof e != "object") return !1;
|
|
26
|
+
let t = e.kind;
|
|
27
|
+
return t === "text" || t === "element" || t === "component";
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { n as component, t as element, r as isWidgetNode, e as text };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=ir.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@go-go-golems/rag-evaluation-site",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"description": "React Widget IR renderer and default RAG evaluation site shell.",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"rag",
|
|
10
|
+
"widget-ir",
|
|
11
|
+
"react",
|
|
12
|
+
"renderer",
|
|
13
|
+
"go-go-golems"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/go-go-golems/rag-evaluation-system#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/go-go-golems/rag-evaluation-system/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/go-go-golems/rag-evaluation-system.git",
|
|
22
|
+
"directory": "packages/rag-evaluation-site"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": [
|
|
25
|
+
"**/*.css"
|
|
26
|
+
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^18 || ^19",
|
|
32
|
+
"react-dom": "^18 || ^19"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./index.d.ts",
|
|
38
|
+
"import": "./index.js"
|
|
39
|
+
},
|
|
40
|
+
"./ir": {
|
|
41
|
+
"types": "./ir.d.ts",
|
|
42
|
+
"import": "./ir.js"
|
|
43
|
+
},
|
|
44
|
+
"./app": {
|
|
45
|
+
"types": "./app/index.d.ts",
|
|
46
|
+
"import": "./app/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./styles.css": "./styles.css",
|
|
49
|
+
"./theme.css": "./theme.css"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"**/*.js",
|
|
53
|
+
"**/*.d.ts",
|
|
54
|
+
"**/*.css",
|
|
55
|
+
"**/*.json",
|
|
56
|
+
"README.md"
|
|
57
|
+
]
|
|
58
|
+
}
|