miniledger 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/LICENSE +15 -0
- package/README.md +191 -0
- package/dashboard/app.js +262 -0
- package/dashboard/index.html +102 -0
- package/dashboard/style.css +286 -0
- package/dist/bin/miniledger.cjs +3268 -0
- package/dist/bin/miniledger.cjs.map +1 -0
- package/dist/index.cjs +2778 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +702 -0
- package/dist/index.d.ts +702 -0
- package/dist/index.js +2721 -0
- package/dist/index.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--bg: #0a0e17;
|
|
5
|
+
--surface: #111827;
|
|
6
|
+
--surface2: #1a2332;
|
|
7
|
+
--border: #2a3444;
|
|
8
|
+
--text: #e2e8f0;
|
|
9
|
+
--text-dim: #8892a4;
|
|
10
|
+
--accent: #3b82f6;
|
|
11
|
+
--accent-dim: #1e3a5f;
|
|
12
|
+
--green: #22c55e;
|
|
13
|
+
--red: #ef4444;
|
|
14
|
+
--yellow: #eab308;
|
|
15
|
+
--mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body {
|
|
19
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
20
|
+
background: var(--bg);
|
|
21
|
+
color: var(--text);
|
|
22
|
+
line-height: 1.5;
|
|
23
|
+
min-height: 100vh;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
header {
|
|
27
|
+
background: var(--surface);
|
|
28
|
+
border-bottom: 1px solid var(--border);
|
|
29
|
+
padding: 12px 24px;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
header h1 {
|
|
36
|
+
font-size: 18px;
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
letter-spacing: -0.5px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
header h1 span { color: var(--accent); }
|
|
42
|
+
|
|
43
|
+
.status-bar {
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: 20px;
|
|
46
|
+
font-size: 13px;
|
|
47
|
+
color: var(--text-dim);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.status-bar .dot {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
width: 8px;
|
|
53
|
+
height: 8px;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
margin-right: 6px;
|
|
56
|
+
vertical-align: middle;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dot.green { background: var(--green); }
|
|
60
|
+
.dot.red { background: var(--red); }
|
|
61
|
+
|
|
62
|
+
.grid {
|
|
63
|
+
display: grid;
|
|
64
|
+
grid-template-columns: 1fr 1fr;
|
|
65
|
+
gap: 16px;
|
|
66
|
+
padding: 16px 24px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.card {
|
|
70
|
+
background: var(--surface);
|
|
71
|
+
border: 1px solid var(--border);
|
|
72
|
+
border-radius: 8px;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.card-header {
|
|
77
|
+
padding: 12px 16px;
|
|
78
|
+
border-bottom: 1px solid var(--border);
|
|
79
|
+
font-size: 13px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
text-transform: uppercase;
|
|
82
|
+
letter-spacing: 0.5px;
|
|
83
|
+
color: var(--text-dim);
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
align-items: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.card-header .badge {
|
|
90
|
+
background: var(--accent-dim);
|
|
91
|
+
color: var(--accent);
|
|
92
|
+
padding: 2px 8px;
|
|
93
|
+
border-radius: 10px;
|
|
94
|
+
font-size: 11px;
|
|
95
|
+
font-weight: 500;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.card-body {
|
|
99
|
+
padding: 12px 16px;
|
|
100
|
+
max-height: 360px;
|
|
101
|
+
overflow-y: auto;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.full-width { grid-column: 1 / -1; }
|
|
105
|
+
|
|
106
|
+
/* Block list */
|
|
107
|
+
.block-item {
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
gap: 12px;
|
|
111
|
+
padding: 8px 0;
|
|
112
|
+
border-bottom: 1px solid var(--border);
|
|
113
|
+
font-size: 13px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.block-item:last-child { border-bottom: none; }
|
|
117
|
+
|
|
118
|
+
.block-num {
|
|
119
|
+
background: var(--accent-dim);
|
|
120
|
+
color: var(--accent);
|
|
121
|
+
padding: 2px 10px;
|
|
122
|
+
border-radius: 4px;
|
|
123
|
+
font-family: var(--mono);
|
|
124
|
+
font-size: 12px;
|
|
125
|
+
min-width: 50px;
|
|
126
|
+
text-align: center;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.block-hash {
|
|
130
|
+
font-family: var(--mono);
|
|
131
|
+
font-size: 12px;
|
|
132
|
+
color: var(--text-dim);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.block-meta {
|
|
136
|
+
margin-left: auto;
|
|
137
|
+
font-size: 12px;
|
|
138
|
+
color: var(--text-dim);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* TX list */
|
|
142
|
+
.tx-item {
|
|
143
|
+
padding: 8px 0;
|
|
144
|
+
border-bottom: 1px solid var(--border);
|
|
145
|
+
font-size: 13px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.tx-item:last-child { border-bottom: none; }
|
|
149
|
+
|
|
150
|
+
.tx-hash {
|
|
151
|
+
font-family: var(--mono);
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
color: var(--accent);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.tx-type {
|
|
157
|
+
display: inline-block;
|
|
158
|
+
padding: 1px 6px;
|
|
159
|
+
border-radius: 3px;
|
|
160
|
+
font-size: 11px;
|
|
161
|
+
font-weight: 500;
|
|
162
|
+
background: var(--surface2);
|
|
163
|
+
color: var(--text-dim);
|
|
164
|
+
margin-left: 8px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Peers */
|
|
168
|
+
.peer-item {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: 10px;
|
|
172
|
+
padding: 8px 0;
|
|
173
|
+
border-bottom: 1px solid var(--border);
|
|
174
|
+
font-size: 13px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.peer-item:last-child { border-bottom: none; }
|
|
178
|
+
|
|
179
|
+
.peer-id {
|
|
180
|
+
font-family: var(--mono);
|
|
181
|
+
font-size: 12px;
|
|
182
|
+
color: var(--accent);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* SQL Query */
|
|
186
|
+
.query-area {
|
|
187
|
+
display: flex;
|
|
188
|
+
gap: 8px;
|
|
189
|
+
margin-bottom: 12px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.query-area input {
|
|
193
|
+
flex: 1;
|
|
194
|
+
background: var(--bg);
|
|
195
|
+
border: 1px solid var(--border);
|
|
196
|
+
border-radius: 4px;
|
|
197
|
+
padding: 8px 12px;
|
|
198
|
+
color: var(--text);
|
|
199
|
+
font-family: var(--mono);
|
|
200
|
+
font-size: 13px;
|
|
201
|
+
outline: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.query-area input:focus { border-color: var(--accent); }
|
|
205
|
+
|
|
206
|
+
.query-area button {
|
|
207
|
+
background: var(--accent);
|
|
208
|
+
color: white;
|
|
209
|
+
border: none;
|
|
210
|
+
border-radius: 4px;
|
|
211
|
+
padding: 8px 16px;
|
|
212
|
+
font-size: 13px;
|
|
213
|
+
cursor: pointer;
|
|
214
|
+
font-weight: 500;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.query-area button:hover { opacity: 0.9; }
|
|
218
|
+
|
|
219
|
+
/* Result table */
|
|
220
|
+
.result-table {
|
|
221
|
+
width: 100%;
|
|
222
|
+
border-collapse: collapse;
|
|
223
|
+
font-size: 12px;
|
|
224
|
+
font-family: var(--mono);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.result-table th {
|
|
228
|
+
text-align: left;
|
|
229
|
+
padding: 6px 10px;
|
|
230
|
+
background: var(--surface2);
|
|
231
|
+
color: var(--text-dim);
|
|
232
|
+
font-weight: 500;
|
|
233
|
+
border-bottom: 1px solid var(--border);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.result-table td {
|
|
237
|
+
padding: 6px 10px;
|
|
238
|
+
border-bottom: 1px solid var(--border);
|
|
239
|
+
max-width: 300px;
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
text-overflow: ellipsis;
|
|
242
|
+
white-space: nowrap;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.empty-state {
|
|
246
|
+
text-align: center;
|
|
247
|
+
color: var(--text-dim);
|
|
248
|
+
padding: 24px;
|
|
249
|
+
font-size: 13px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Stats row */
|
|
253
|
+
.stats {
|
|
254
|
+
display: flex;
|
|
255
|
+
gap: 16px;
|
|
256
|
+
padding: 12px 24px;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.stat {
|
|
260
|
+
background: var(--surface);
|
|
261
|
+
border: 1px solid var(--border);
|
|
262
|
+
border-radius: 8px;
|
|
263
|
+
padding: 16px 20px;
|
|
264
|
+
flex: 1;
|
|
265
|
+
text-align: center;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.stat-value {
|
|
269
|
+
font-size: 28px;
|
|
270
|
+
font-weight: 700;
|
|
271
|
+
font-family: var(--mono);
|
|
272
|
+
color: var(--accent);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.stat-label {
|
|
276
|
+
font-size: 11px;
|
|
277
|
+
text-transform: uppercase;
|
|
278
|
+
letter-spacing: 0.5px;
|
|
279
|
+
color: var(--text-dim);
|
|
280
|
+
margin-top: 4px;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Scrollbar */
|
|
284
|
+
::-webkit-scrollbar { width: 6px; }
|
|
285
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
286
|
+
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|