File size: 9,387 Bytes
11ce4a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>DataView</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="/static/style.css">
</head>
<body>

  <!-- Folder browser panel -->
  <aside id="sidebar" class="sidebar">
    <div class="sidebar-head">
      <span class="sidebar-label">Browse files</span>
      <button id="btn-close-sidebar" class="btn-icon" aria-label="Close">&times;</button>
    </div>
    <div id="breadcrumb" class="breadcrumb"></div>
    <div id="folder-list" class="folder-list"></div>
  </aside>
  <div id="sidebar-backdrop" class="backdrop"></div>

  <!-- Header -->
  <header class="header">
    <button id="btn-browse" class="header-btn" title="Browse folders">
      <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg>
      Browse
    </button>
    <div class="path-wrap">
      <input id="file-path" type="text" placeholder="Paste a file path to open" spellcheck="false">
      <button id="btn-open" class="path-open-btn">Open</button>
    </div>
    <span class="wordmark">data<span class="wordmark-accent">view</span></span>
  </header>

  <!-- Main content (hidden until file opened) -->
  <main id="main" class="main hidden">

    <!-- Toolbar -->
    <div class="toolbar">
      <div class="toolbar-left">
        <span class="pill" id="pill-file"></span>
        <span class="pill pill-accent" id="pill-rows"></span>
        <span class="pill" id="pill-cols"></span>
      </div>
      <div class="toolbar-right">
        <div class="search-box">
          <svg class="search-icon" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="11" cy="11" r="7"/><line x1="16.5" y1="16.5" x2="21" y2="21"/></svg>
          <input id="search-input" type="text" placeholder="Search prompts..." spellcheck="false">
          <span id="search-count" class="search-count"></span>
        </div>
        <div class="view-switch">
          <button class="vs-btn active" data-view="gallery" title="Gallery view">
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
          </button>
          <button class="vs-btn" data-view="table" title="Table view">
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="9" y1="3" x2="9" y2="21"/></svg>
          </button>
          <button class="vs-btn" data-view="compare" title="Compare selected">
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="8" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" rx="1"/></svg>
            <span id="compare-badge" class="vs-badge hidden">0</span>
          </button>
        </div>
      </div>
    </div>

    <!-- Gallery view -->
    <section id="view-gallery" class="view">
      <div class="gallery-toolbar">
        <label class="gt-label">Image
          <select id="sel-img-col" class="gt-select"></select>
        </label>
        <label class="gt-label">Caption
          <select id="sel-txt-col" class="gt-select">
            <option value="">None</option>
          </select>
        </label>
        <label class="gt-label">Size
          <select id="sel-thumb-size" class="gt-select">
            <option value="160">S</option>
            <option value="220" selected>M</option>
            <option value="320">L</option>
          </select>
        </label>
        <span class="gt-hint">Shift+click to select for compare</span>
        <span class="spacer"></span>
        <span id="gallery-page" class="page-label"></span>
        <button id="gallery-prev" class="page-btn" disabled>
          <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 18 9 12 15 6"/></svg>
        </button>
        <button id="gallery-next" class="page-btn" disabled>
          <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
        </button>
      </div>
      <div id="gallery-grid" class="gallery-grid"></div>
    </section>

    <!-- Table view -->
    <section id="view-table" class="view hidden">
      <div class="gallery-toolbar">
        <label class="gt-label">Rows
          <select id="sel-page-size" class="gt-select">
            <option value="25">25</option>
            <option value="50" selected>50</option>
            <option value="100">100</option>
          </select>
        </label>
        <span class="spacer"></span>
        <span id="table-page" class="page-label"></span>
        <button id="table-prev" class="page-btn" disabled>
          <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 18 9 12 15 6"/></svg>
        </button>
        <button id="table-next" class="page-btn" disabled>
          <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
        </button>
      </div>
      <div id="table-container" class="table-wrap"></div>
    </section>

    <!-- Compare view -->
    <section id="view-compare" class="view hidden">
      <div id="compare-empty" class="empty-state">
        <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="3" width="8" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" rx="1"/></svg>
        <p>Select images to compare</p>
        <p class="empty-hint">Shift+click images in the gallery, then return here</p>
      </div>
      <div id="compare-content" class="compare-grid hidden"></div>
    </section>
  </main>

  <!-- Welcome -->
  <div id="welcome" class="welcome">
    <div class="welcome-inner">
      <div class="welcome-icon">
        <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
      </div>
      <h2>Open a dataset</h2>
      <p>Browse or paste a <code>.parquet</code> file path to begin exploring.</p>
    </div>
  </div>

  <!-- Detail drawer -->
  <aside id="drawer" class="drawer">
    <div class="drawer-head">
      <span id="drawer-title" class="drawer-title"></span>
      <div class="drawer-head-actions">
        <button id="drawer-prev" class="drawer-nav-btn" title="Previous">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 18 9 12 15 6"/></svg>
        </button>
        <button id="drawer-next" class="drawer-nav-btn" title="Next">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
        </button>
        <button id="drawer-zoom" class="drawer-nav-btn" title="Fullscreen">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
        </button>
        <button id="btn-close-drawer" class="drawer-close" title="Close">&times;</button>
      </div>
    </div>
    <div class="drawer-body">
      <div class="drawer-image-wrap">
        <img id="drawer-img" class="drawer-image" alt="">
      </div>
      <div class="drawer-content">
        <div class="drawer-section">
          <span class="drawer-section-label">Prompt</span>
          <p id="drawer-prompt" class="drawer-prompt"></p>
        </div>
        <div class="drawer-section" id="drawer-meta-section">
          <span class="drawer-section-label">Metadata</span>
          <div id="drawer-meta" class="drawer-meta"></div>
        </div>
      </div>
    </div>
  </aside>
  <div id="drawer-backdrop" class="backdrop"></div>

  <!-- Loading -->
  <div id="loading" class="loading hidden">
    <div class="spinner"></div>
  </div>

  <!-- Lightbox (fullscreen image) -->
  <div id="lightbox" class="lightbox">
    <img id="lb-img" alt="">
    <button class="lb-close" aria-label="Close">&times;</button>
  </div>

  <script src="/static/app.js"></script>
</body>
</html>