-
Notifications
You must be signed in to change notification settings - Fork 267
Expand file tree
/
Copy pathmcp-app.html
More file actions
139 lines (134 loc) · 4.52 KB
/
mcp-app.html
File metadata and controls
139 lines (134 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PDF Viewer</title>
</head>
<body>
<div class="main">
<!-- Loading State -->
<div id="loading" class="loading">
<div class="spinner"></div>
<p id="loading-text">Loading PDF...</p>
</div>
<!-- Error State -->
<div id="error" class="error" style="display: none">
<div class="error-icon">⚠️</div>
<p id="error-message">An error occurred</p>
</div>
<!-- Elicitation State: app asks user for input on behalf of the server -->
<div id="elicitation" class="elicitation" style="display: none">
<p id="elicitation-message" class="elicitation-message"></p>
<input
id="elicitation-url"
type="url"
class="elicitation-input"
placeholder="https://arxiv.org/pdf/1706.03762"
autocomplete="url"
/>
<div class="elicitation-actions">
<button id="elicitation-submit" class="elicitation-btn elicitation-btn-primary">Open PDF</button>
<button id="elicitation-cancel" class="elicitation-btn elicitation-btn-secondary">Cancel</button>
</div>
</div>
<!-- PDF Viewer -->
<div id="viewer" class="viewer" style="display: none">
<!-- Toolbar -->
<div class="toolbar">
<div class="toolbar-left">
<span id="pdf-title" class="pdf-title">Document</span>
<div id="loading-indicator" class="loading-indicator" style="display: none"
title="Loading pages...">
<svg viewBox="0 0 20 20" width="14" height="14">
<circle class="loading-indicator-bg" cx="10" cy="10" r="8"/>
<circle class="loading-indicator-arc" cx="10" cy="10" r="8"/>
</svg>
</div>
</div>
<div class="toolbar-center">
<button id="prev-btn" class="nav-btn" title="Previous page (←)">
◀
</button>
<div class="page-nav">
<input
id="page-input"
type="number"
class="page-input"
min="1"
value="1"
title="Go to page"
/>
<span id="total-pages" class="total-pages">of 1</span>
</div>
<button id="next-btn" class="nav-btn" title="Next page (→)">
▶
</button>
</div>
<div class="toolbar-right">
<button id="zoom-out-btn" class="zoom-btn" title="Zoom out (-)">
−
</button>
<span id="zoom-level" class="zoom-level">100%</span>
<button id="zoom-in-btn" class="zoom-btn" title="Zoom in (+)">
+
</button>
<button
id="search-btn"
class="search-btn"
title="Search (Ctrl+F)"
></button>
<button
id="fullscreen-btn"
class="fullscreen-btn"
title="Toggle fullscreen"
>
⛶
</button>
</div>
</div>
<!-- Search bar below toolbar, right-aligned -->
<div id="search-bar" class="search-bar" style="display: none">
<input
id="search-input"
class="search-input"
type="text"
placeholder="Search..."
autocomplete="off"
/>
<span id="search-match-count" class="search-match-count"></span>
<button
id="search-prev-btn"
class="search-nav-btn"
title="Previous (Shift+Enter)"
>
▲
</button>
<button
id="search-next-btn"
class="search-nav-btn"
title="Next (Enter)"
>
▼
</button>
<button
id="search-close-btn"
class="search-nav-btn"
title="Close (Esc)"
>
✕
</button>
</div>
<!-- Single Page Canvas Container -->
<div class="canvas-container">
<div class="page-wrapper">
<canvas id="pdf-canvas"></canvas>
<div id="highlight-layer" class="highlight-layer"></div>
<div id="text-layer" class="text-layer"></div>
</div>
</div>
</div>
</div>
<script type="module" src="./src/mcp-app.ts"></script>
</body>
</html>