@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
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# @go-go-golems/rag-evaluation-site
|
|
2
|
+
|
|
3
|
+
React Widget IR renderer and default RAG evaluation site shell.
|
|
4
|
+
|
|
5
|
+
## Component ownership
|
|
6
|
+
|
|
7
|
+
This package is the canonical reusable UI layer. Read [`GUIDELINES.md`](./GUIDELINES.md) before changing package UI. Keep package components API-free and Storybook-first:
|
|
8
|
+
|
|
9
|
+
- `components/foundation`: text, captions, status, code, dividers, accessibility helpers.
|
|
10
|
+
- `components/atoms`: basic controls and semantic markers.
|
|
11
|
+
- `components/layout`: generic structure primitives such as shells, panes, stacks, panels, and grids.
|
|
12
|
+
- `components/molecules`: reusable data-display/content patterns with no backend hooks.
|
|
13
|
+
- `components/organisms`: feature panels with DTO-shaped props and callbacks.
|
|
14
|
+
- `widgets`: JSON-compatible Widget IR types and the React `WidgetRenderer`.
|
|
15
|
+
|
|
16
|
+
Storybook ownership follows the same boundary. Use `Design System/Layout/<Name>` for layout primitives, `Design System/Foundation/<Name>` for foundation, and `Component Library/Molecules/<Name>` / `Component Library/Organisms/<Name>` for reusable product components. Add or update stories before exposing a new public component.
|
|
17
|
+
|
|
18
|
+
When adding a component that should later be available from the Widget IR/Goja DSL, stabilize the React API first, keep props JSON-shaped where practical, add `data-rag-*` identity attributes, and only then extend `src/widgets/ir.ts` and `WidgetRenderer.tsx` with semantic component types.
|
|
19
|
+
|
|
20
|
+
## Widget IR coverage
|
|
21
|
+
|
|
22
|
+
`WidgetRenderer` supports both the original dashboard vocabulary and the newer semantic context-viewer vocabulary:
|
|
23
|
+
|
|
24
|
+
- foundation/atoms/layout nodes such as `Text`, `CodeText`, `ContextKindSwatch`, `SectionBlock`, `SplitPane`, `SlideShell`, and `SidebarShell`;
|
|
25
|
+
- context diagram nodes such as `ContextBudgetBar`, `ContextStripDiagram`, `ContextTreemap`, and `ContextDiagramPanel`;
|
|
26
|
+
- transcript/comment nodes such as `TranscriptWorkspacePanel`, `AnnotationRailPanel`, and `AnchoredCommentRail`;
|
|
27
|
+
- course/handout nodes such as `CourseStudioShell`, `CourseSlidePanel`, `MarkdownArticle`, and `HandoutDocumentShell`.
|
|
28
|
+
|
|
29
|
+
Review package Storybook under `Widget IR/Renderer/...` for IR-authored examples grouped by Foundation and Atoms, Layout Recipes, Context Diagrams, Transcript and Notes, and Course Studio.
|
|
30
|
+
|
|
31
|
+
Goja authors can use direct helpers from `require("widget.dsl")` / `require("rag.dsl")`, plus semantic recipes under `rag.recipes` such as `contextDiagram`, `annotatedTranscript`, `courseStudio`, `courseSlide`, and `handout`.
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm add @go-go-golems/rag-evaluation-site react react-dom
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Publishing
|
|
40
|
+
|
|
41
|
+
The package is published from the generated `dist/` artifact, not directly from source. Build and smoke-test the artifact before publishing:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pnpm --dir packages/rag-evaluation-site build
|
|
45
|
+
pnpm --dir packages/rag-evaluation-site consumer:smoke
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
GitHub Actions workflow `.github/workflows/publish-npm.yml` publishes with npm Trusted Publishing. The workflow uses GitHub OIDC (`id-token: write`) and does not require `NODE_AUTH_TOKEN` after the npm package has been bootstrapped and trusted.
|
|
49
|
+
|
|
50
|
+
For the first publish of a brand-new package, create `@go-go-golems/rag-evaluation-site` manually with an npm account that has access to the `@go-go-golems` scope, then configure trusted publishing for repository `go-go-golems/rag-evaluation-system`, workflow `publish-npm.yml`, environment `npm-production`.
|
|
51
|
+
|
|
52
|
+
## Renderer usage
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { WidgetRenderer, useWidgetPage } from '@go-go-golems/rag-evaluation-site';
|
|
56
|
+
import '@go-go-golems/rag-evaluation-site/styles.css';
|
|
57
|
+
|
|
58
|
+
export function Page() {
|
|
59
|
+
const { page, loading, error } = useWidgetPage('/api/widget/pages/demo');
|
|
60
|
+
if (loading) return <div>Loading…</div>;
|
|
61
|
+
if (error || !page) return <div>Failed to load page</div>;
|
|
62
|
+
return <WidgetRenderer node={page.root} />;
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Default app usage
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import { RagEvaluationSiteApp } from '@go-go-golems/rag-evaluation-site/app';
|
|
70
|
+
import '@go-go-golems/rag-evaluation-site/styles.css';
|
|
71
|
+
|
|
72
|
+
export function App() {
|
|
73
|
+
return <RagEvaluationSiteApp apiBase="/api/widget" defaultPageId="index" />;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Build outputs
|
|
78
|
+
|
|
79
|
+
- `dist/`: npm package artifact.
|
|
80
|
+
- `app-dist/`: default Vite app build for Go embedding.
|
package/app/App.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import './app.css';
|
|
3
|
+
export interface RagEvaluationSiteAppProps {
|
|
4
|
+
apiBase?: string;
|
|
5
|
+
defaultPageId?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function RagEvaluationSiteApp({ apiBase, defaultPageId }: RagEvaluationSiteAppProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
8
|
+
//# sourceMappingURL=App.d.ts.map
|
package/app/index.d.ts
ADDED
package/app/index.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Ct as e, Et as t, H as n, K as r, M as i, mt as a, n as o, t as s, yt as c } from "../useWidgetPage-B8iwybER.js";
|
|
2
|
+
//#region src/app/App.tsx
|
|
3
|
+
var l = e(), u = [
|
|
4
|
+
{
|
|
5
|
+
id: "index",
|
|
6
|
+
label: "Overview"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
id: "demo",
|
|
10
|
+
label: "Demo"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "actions",
|
|
14
|
+
label: "Actions"
|
|
15
|
+
}
|
|
16
|
+
];
|
|
17
|
+
function d({ apiBase: e = "/api/widget", defaultPageId: n = "index" }) {
|
|
18
|
+
let i = S(n), o = e.replace(/\/$/, ""), { page: u, loading: d, error: p, refresh: m } = s(`${o}/pages/${encodeURIComponent(i)}`);
|
|
19
|
+
async function h(e, n) {
|
|
20
|
+
if (e.kind !== "server") {
|
|
21
|
+
t(e, n);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
let r = await fetch(`${o}/actions/${encodeURIComponent(e.name)}`, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers: { "Content-Type": "application/json" },
|
|
27
|
+
body: JSON.stringify({
|
|
28
|
+
payload: e.payload ?? {},
|
|
29
|
+
context: n
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
if (!r.ok) throw Error(`Widget action failed: ${r.status} ${r.statusText}`);
|
|
33
|
+
let i = await r.json();
|
|
34
|
+
i.toast && typeof window < "u" && window.dispatchEvent(new CustomEvent("widget:toast", { detail: i })), i.refresh && m();
|
|
35
|
+
}
|
|
36
|
+
return d ? /* @__PURE__ */ (0, l.jsx)(r, {
|
|
37
|
+
className: "rag-evaluation-site-state",
|
|
38
|
+
title: "RAG Evaluation Site",
|
|
39
|
+
density: "condensed",
|
|
40
|
+
children: /* @__PURE__ */ (0, l.jsx)(c, { children: "Loading Widget IR…" })
|
|
41
|
+
}) : p ? /* @__PURE__ */ (0, l.jsxs)(a, {
|
|
42
|
+
className: "rag-evaluation-site-state",
|
|
43
|
+
children: ["Failed to load Widget IR page: ", p.message]
|
|
44
|
+
}) : u ? f(u, i, (e, t) => {
|
|
45
|
+
h(e, t);
|
|
46
|
+
}) : /* @__PURE__ */ (0, l.jsx)(r, {
|
|
47
|
+
className: "rag-evaluation-site-state",
|
|
48
|
+
title: "RAG Evaluation Site",
|
|
49
|
+
density: "condensed",
|
|
50
|
+
children: /* @__PURE__ */ (0, l.jsx)(c, { children: "No Widget IR returned." })
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function f(e, t, r) {
|
|
54
|
+
let a = h(e.meta), s = /* @__PURE__ */ (0, l.jsx)(o, {
|
|
55
|
+
node: e.root,
|
|
56
|
+
onAction: r
|
|
57
|
+
}), c = ["rag-evaluation-site-root", p(e, a) ? "rag-evaluation-site-root--shell" : "rag-evaluation-site-root--raw"].filter(Boolean).join(" ");
|
|
58
|
+
if (!p(e, a)) return /* @__PURE__ */ (0, l.jsx)("div", {
|
|
59
|
+
className: c,
|
|
60
|
+
"data-rag-page": "RagEvaluationSiteApp",
|
|
61
|
+
"data-page-id": e.id,
|
|
62
|
+
"data-rag-shell": "none",
|
|
63
|
+
children: s
|
|
64
|
+
});
|
|
65
|
+
let d = a.navItems?.length ? a.navItems : u, f = a.activeNavItemId ?? t;
|
|
66
|
+
return /* @__PURE__ */ (0, l.jsx)("div", {
|
|
67
|
+
className: c,
|
|
68
|
+
"data-rag-page": "RagEvaluationSiteApp",
|
|
69
|
+
"data-page-id": e.id,
|
|
70
|
+
"data-rag-shell": "default",
|
|
71
|
+
children: /* @__PURE__ */ (0, l.jsx)(n, {
|
|
72
|
+
className: "rag-evaluation-site-shell",
|
|
73
|
+
header: /* @__PURE__ */ (0, l.jsx)(i, {
|
|
74
|
+
brand: /* @__PURE__ */ (0, l.jsx)("span", {
|
|
75
|
+
className: "rag-evaluation-site-brand",
|
|
76
|
+
children: e.title || "RAG Evaluation Site"
|
|
77
|
+
}),
|
|
78
|
+
items: d.map((e) => ({
|
|
79
|
+
id: e.id,
|
|
80
|
+
label: y(e.label)
|
|
81
|
+
})),
|
|
82
|
+
activeItemId: f,
|
|
83
|
+
onItemSelect: (e) => {
|
|
84
|
+
let t = d.find((t) => t.id === e);
|
|
85
|
+
if (t?.action) {
|
|
86
|
+
r(t.action, {
|
|
87
|
+
value: e,
|
|
88
|
+
componentType: "AppNav"
|
|
89
|
+
});
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
x(e);
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
children: /* @__PURE__ */ (0, l.jsx)("div", {
|
|
96
|
+
className: b(a.maxWidth),
|
|
97
|
+
"data-rag-layout": "PageContent",
|
|
98
|
+
children: s
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function p(e, t) {
|
|
104
|
+
return !(t.shell === "none" || m(e.root));
|
|
105
|
+
}
|
|
106
|
+
function m(e) {
|
|
107
|
+
return e.kind === "component" && e.type === "AppShell";
|
|
108
|
+
}
|
|
109
|
+
function h(e) {
|
|
110
|
+
return e ? {
|
|
111
|
+
shell: g(e.shell) ? e.shell : void 0,
|
|
112
|
+
activeNavItemId: typeof e.activeNavItemId == "string" ? e.activeNavItemId : void 0,
|
|
113
|
+
navItems: Array.isArray(e.navItems) ? e.navItems.filter(v) : void 0,
|
|
114
|
+
maxWidth: _(e.maxWidth) ? e.maxWidth : void 0
|
|
115
|
+
} : {};
|
|
116
|
+
}
|
|
117
|
+
function g(e) {
|
|
118
|
+
return e === "auto" || e === "none" || e === "app";
|
|
119
|
+
}
|
|
120
|
+
function _(e) {
|
|
121
|
+
return e === "none" || e === "content" || e === "wide";
|
|
122
|
+
}
|
|
123
|
+
function v(e) {
|
|
124
|
+
if (!e || typeof e != "object") return !1;
|
|
125
|
+
let t = e;
|
|
126
|
+
return typeof t.id == "string" && t.label !== void 0;
|
|
127
|
+
}
|
|
128
|
+
function y(e) {
|
|
129
|
+
return e && typeof e == "object" && "kind" in e ? /* @__PURE__ */ (0, l.jsx)(o, { node: e }) : String(e ?? "");
|
|
130
|
+
}
|
|
131
|
+
function b(e) {
|
|
132
|
+
return ["rag-evaluation-site-content", `rag-evaluation-site-content--${e ?? "wide"}`].join(" ");
|
|
133
|
+
}
|
|
134
|
+
function x(e) {
|
|
135
|
+
if (typeof window > "u") return;
|
|
136
|
+
let t = new URL(window.location.href);
|
|
137
|
+
t.pathname = `/pages/${encodeURIComponent(e)}`, t.searchParams.delete("page"), window.location.assign(t.toString());
|
|
138
|
+
}
|
|
139
|
+
function S(e) {
|
|
140
|
+
if (typeof window > "u") return e;
|
|
141
|
+
let t = new URL(window.location.href), n = t.searchParams.get("page");
|
|
142
|
+
if (n) return n;
|
|
143
|
+
let r = t.pathname.split("/").filter(Boolean);
|
|
144
|
+
return r[0] === "pages" && r[1] ? r[1] : e;
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
export { d as RagEvaluationSiteApp };
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { ContextPartKind } from '../../../context';
|
|
3
|
+
export interface AnnotationBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
kind: ContextPartKind;
|
|
5
|
+
label: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function AnnotationBadge({ kind, label, selected, className, ...rest }: AnnotationBadgeProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=AnnotationBadge.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ButtonVariant = 'default' | 'primary';
|
|
3
|
+
export type ButtonSize = 'normal' | 'compact';
|
|
4
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function Button({ variant, size, selected, className, children, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, LabelHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface CheckboxRowProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'onChange'> {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
onChange: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function CheckboxRow({ checked, onChange, className, children, ...rest }: CheckboxRowProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=CheckboxRow.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import { type ContextDiagramStyle, type ContextPartKind } from '../../../context';
|
|
3
|
+
export type ContextKindSwatchSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface ContextKindSwatchProps extends HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
kind: ContextPartKind;
|
|
6
|
+
mode?: ContextDiagramStyle;
|
|
7
|
+
size?: ContextKindSwatchSize;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function ContextKindSwatch({ kind, mode, size, selected, className, style, ...rest }: ContextKindSwatchProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ContextKindSwatch.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SVGAttributes } from 'react';
|
|
2
|
+
export type ContextStudioNavIconId = 'course' | 'slides' | 'visualize' | 'upload' | 'transcript' | 'comments' | 'handout';
|
|
3
|
+
export interface ContextStudioNavIconProps extends Omit<SVGAttributes<SVGSVGElement>, 'id'> {
|
|
4
|
+
id: ContextStudioNavIconId;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ContextStudioNavIcon({ id, title, className, ...rest }: ContextStudioNavIconProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=ContextStudioNavIcon.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface ErrorCalloutProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function ErrorCallout({ className, children, ...rest }: ErrorCalloutProps): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ErrorCallout.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type IconButtonSize = 'compact' | 'normal';
|
|
3
|
+
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
size?: IconButtonSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function IconButton({ size, label, className, children, ...rest }: IconButtonProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SelectHTMLAttributes } from 'react';
|
|
2
|
+
export interface SelectInputProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
3
|
+
}
|
|
4
|
+
export declare function SelectInput({ className, children, ...rest }: SelectInputProps): import("react").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=SelectInput.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
}
|
|
4
|
+
export declare function TextInput({ className, ...rest }: TextInputProps): import("react").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { TranscriptRole } from '../../../context';
|
|
3
|
+
export interface TranscriptRoleBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
role: TranscriptRole;
|
|
5
|
+
name?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function TranscriptRoleBadge({ role, name, className, ...rest }: TranscriptRoleBadgeProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TranscriptRoleBadge.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SVGAttributes } from 'react';
|
|
2
|
+
export interface UploadGlyphProps extends SVGAttributes<SVGSVGElement> {
|
|
3
|
+
title?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function UploadGlyph({ title, className, ...rest }: UploadGlyphProps): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=UploadGlyph.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './Button';
|
|
2
|
+
export * from './CheckboxRow';
|
|
3
|
+
export * from './ErrorCallout';
|
|
4
|
+
export * from './IconButton';
|
|
5
|
+
export * from './SelectInput';
|
|
6
|
+
export * from './TextInput';
|
|
7
|
+
export * from './ContextKindSwatch';
|
|
8
|
+
export * from './TranscriptRoleBadge';
|
|
9
|
+
export * from './AnnotationBadge';
|
|
10
|
+
export * from './UploadGlyph';
|
|
11
|
+
export * from './ContextStudioNavIcon';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type CaptionTone = 'muted' | 'accent' | 'success' | 'warning' | 'danger' | 'inherit';
|
|
3
|
+
export type CaptionTransform = 'none' | 'uppercase';
|
|
4
|
+
export interface CaptionProps extends HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
tone?: CaptionTone;
|
|
6
|
+
transform?: CaptionTransform;
|
|
7
|
+
truncate?: boolean;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function Caption({ tone, transform, truncate, className, children, ...rest }: CaptionProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Caption.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface CodeTextProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
as?: 'code' | 'span' | 'div';
|
|
4
|
+
tone?: 'primary' | 'muted' | 'accent';
|
|
5
|
+
display?: 'inline' | 'block';
|
|
6
|
+
copyable?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function CodeText({ as: Component, tone, display, copyable, className, children, onClick, ...rest }: CodeTextProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=CodeText.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface DividerProps extends HTMLAttributes<HTMLHRElement> {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
}
|
|
5
|
+
export declare function Divider({ orientation, className, ...rest }: DividerProps): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type RagStatus = 'pending' | 'ready' | 'running' | 'succeeded' | 'done' | 'partial' | 'warning' | 'failed' | 'error' | 'canceled';
|
|
3
|
+
export interface StatusTextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
status: RagStatus | string;
|
|
5
|
+
icon?: boolean;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function StatusText({ status, icon, className, children, ...rest }: StatusTextProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=StatusText.d.ts.map
|