@orkg/scidquest 1.0.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/LICENSE +21 -0
- package/README.md +163 -0
- package/dist/scidquest.css +1 -0
- package/dist/scidquest.es.js +66704 -0
- package/dist/semanticChunker-CEckDeUn.js +102 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 amirreza alasti
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# ScidQuest
|
|
2
|
+
|
|
3
|
+
_An AI-assisted React library for structured research-paper analysis workflows._
|
|
4
|
+
|
|
5
|
+
ScidQuest provides a reusable UI and workflow foundation for extracting structured information from research papers (PDF) with template-driven forms, model-assisted suggestions, and answer verification.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [About](#about)
|
|
10
|
+
2. [Key Features](#key-features)
|
|
11
|
+
3. [Installation](#installation)
|
|
12
|
+
4. [Quick Start](#quick-start)
|
|
13
|
+
5. [Configuration](#configuration)
|
|
14
|
+
6. [Peer Dependencies](#peer-dependencies)
|
|
15
|
+
7. [Development](#development)
|
|
16
|
+
8. [Project Structure](#project-structure)
|
|
17
|
+
9. [License](#license)
|
|
18
|
+
|
|
19
|
+
## About
|
|
20
|
+
|
|
21
|
+
ScidQuest is distributed as an npm package: `@sololeveling/scidquest`.
|
|
22
|
+
|
|
23
|
+
It is intended for teams building research tooling that requires:
|
|
24
|
+
|
|
25
|
+
- PDF-first review workflows
|
|
26
|
+
- structured questionnaire-based extraction
|
|
27
|
+
- AI-assisted response generation and verification
|
|
28
|
+
- portable frontend integration with modern React stacks
|
|
29
|
+
|
|
30
|
+
[(back to top)](#table-of-contents)
|
|
31
|
+
|
|
32
|
+
## Key Features
|
|
33
|
+
|
|
34
|
+
- **PDF upload and viewing** with zoom and page navigation
|
|
35
|
+
- **Split-panel analysis UI** for side-by-side document and questionnaire usage
|
|
36
|
+
- **Template-driven forms** for consistent data extraction
|
|
37
|
+
- **AI suggestions** for draft answers from document context
|
|
38
|
+
- **AI verification** to validate user answers against source content
|
|
39
|
+
- **Local persistence** for in-progress analysis sessions
|
|
40
|
+
- **Multi-provider model support** (OpenAI, Groq, Mistral)
|
|
41
|
+
|
|
42
|
+
[(back to top)](#table-of-contents)
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
Install the package with npm:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install @sololeveling/scidquest
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Import the published stylesheet in your application entrypoint:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import "@sololeveling/scidquest/dist/contribute-standalone.css";
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
[(back to top)](#table-of-contents)
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
Basic package usage:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import React from "react";
|
|
66
|
+
import { createRoot } from "react-dom/client";
|
|
67
|
+
import "@sololeveling/scidquest/dist/contribute-standalone.css";
|
|
68
|
+
import App from "./App";
|
|
69
|
+
|
|
70
|
+
createRoot(document.getElementById("root")!).render(
|
|
71
|
+
<React.StrictMode>
|
|
72
|
+
<App />
|
|
73
|
+
</React.StrictMode>,
|
|
74
|
+
);
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Typical end-user workflow inside ScidQuest:
|
|
78
|
+
|
|
79
|
+
1. Upload a PDF file (up to 30 MB).
|
|
80
|
+
2. Complete template questions.
|
|
81
|
+
3. Request AI suggestions where needed.
|
|
82
|
+
4. Verify responses against the source document.
|
|
83
|
+
5. Export/import progress.
|
|
84
|
+
|
|
85
|
+
[(back to top)](#table-of-contents)
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
Create a local environment file:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
cp .env.example .env
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Configure provider keys in `.env` (or through the UI):
|
|
96
|
+
|
|
97
|
+
- OpenAI
|
|
98
|
+
- Groq
|
|
99
|
+
- Mistral
|
|
100
|
+
|
|
101
|
+
[(back to top)](#table-of-contents)
|
|
102
|
+
|
|
103
|
+
## Peer Dependencies
|
|
104
|
+
|
|
105
|
+
ScidQuest expects the following peer dependencies in the host project:
|
|
106
|
+
|
|
107
|
+
- `react` `^18.3.1`
|
|
108
|
+
- `react-dom` `^18.3.1`
|
|
109
|
+
- `@mui/material` `^6.4.11`
|
|
110
|
+
- `@emotion/react` `^11.14.0`
|
|
111
|
+
- `@emotion/styled` `^11.14.0`
|
|
112
|
+
|
|
113
|
+
[(back to top)](#table-of-contents)
|
|
114
|
+
|
|
115
|
+
## Development
|
|
116
|
+
|
|
117
|
+
Run the package locally:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm install
|
|
121
|
+
npm run dev
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Build distributable artifacts:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm run build
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Preview the production build:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm run preview
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
[(back to top)](#table-of-contents)
|
|
137
|
+
|
|
138
|
+
## Project Structure
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
ScidQuest/
|
|
142
|
+
├── src/
|
|
143
|
+
│ ├── pages/ # Page-level views
|
|
144
|
+
│ ├── components/ # Reusable UI components
|
|
145
|
+
│ ├── services/ # AI/provider and backend integrations
|
|
146
|
+
│ ├── utils/ # Shared utility helpers
|
|
147
|
+
│ ├── templates/ # Questionnaire templates
|
|
148
|
+
│ ├── store/ # Application state management
|
|
149
|
+
│ ├── context/ # React context providers
|
|
150
|
+
│ ├── App.tsx # Root application component
|
|
151
|
+
│ ├── Router.tsx # Routing configuration
|
|
152
|
+
│ └── main.tsx # Application entrypoint
|
|
153
|
+
├── index.html
|
|
154
|
+
├── package.json
|
|
155
|
+
├── tsconfig.json
|
|
156
|
+
└── vite.config.ts
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
[(back to top)](#table-of-contents)
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
This project is released under the MIT License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--react-pdf-annotation-layer: 1;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--link-outline: none}@media screen and (forced-colors:active){:root{--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight;--link-outline: 1.5px solid LinkText}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translate(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{position:absolute;width:100%;height:100%}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;margin:0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.textLayer.selecting~.annotationLayer section{pointer-events:none}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--total-scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--total-scale-factor));width:100%;min-width:calc(180px * var(--total-scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;max-width:calc(180px * var(--total-scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--total-scale-factor)) calc(5px * var(--total-scale-factor)) #888;border-radius:calc(2px * var(--total-scale-factor));padding:calc(6px * var(--total-scale-factor));margin-left:calc(5px * var(--total-scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--total-scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--total-scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--total-scale-factor));padding-top:calc(2px * var(--total-scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--total-scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;user-select:none;pointer-events:none}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}:root{--react-pdf-text-layer: 1;--highlight-bg-color: rgba(180, 0, 170, 1);--highlight-selected-bg-color: rgba(0, 100, 0, 1)}@media screen and (forced-colors:active){:root{--highlight-bg-color: Highlight;--highlight-selected-bg-color: ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.textLayer{position:absolute;text-align:initial;top:0;right:0;bottom:0;left:0;overflow:hidden;line-height:1;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;margin:0;transform-origin:0 0}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:var(--highlight-bg-color);border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;top:100%;right:0;bottom:0;left:0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}.textLayer.selecting .endOfContent{top:0}.hiddenCanvasElement{position:absolute;top:0;left:0;width:0;height:0;display:none}
|