@flash-debug/silkworm 0.0.0 → 0.5.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/.output/nitro.json +18 -0
- package/.output/public/assets/index-Bw-GBuTw.css +1 -0
- package/.output/public/assets/index-CHthEL3v.js +6 -0
- package/.output/public/icons/silkworm/favicon-16.png +0 -0
- package/.output/public/icons/silkworm/favicon-32.png +0 -0
- package/.output/public/icons/silkworm/icon-128.png +0 -0
- package/.output/public/icons/silkworm/icon-512.png +0 -0
- package/.output/public/index.html +14 -0
- package/.output/server/_chunks/renderer-template.mjs +8 -0
- package/.output/server/_chunks/state.mjs +568 -0
- package/.output/server/_libs/h3+rou3+srvx.mjs +1597 -0
- package/.output/server/_libs/h3.mjs +139 -0
- package/.output/server/_libs/h32.mjs +48 -0
- package/.output/server/_routes/api/silkworm/auto/pause.mjs +8 -0
- package/.output/server/_routes/api/silkworm/auto/start.mjs +17 -0
- package/.output/server/_routes/api/silkworm/auto/stop.mjs +8 -0
- package/.output/server/_routes/api/silkworm/connect.mjs +21 -0
- package/.output/server/_routes/api/silkworm/history/clear.mjs +8 -0
- package/.output/server/_routes/api/silkworm/manual/send.mjs +23 -0
- package/.output/server/_routes/api/silkworm/state.mjs +5 -0
- package/.output/server/_routes/api/silkworm/stream.mjs +41 -0
- package/.output/server/_routes/api/silkworm/test.mjs +18 -0
- package/.output/server/index.mjs +542 -0
- package/dist/assets/index-Bw-GBuTw.css +1 -0
- package/dist/assets/index-CHthEL3v.js +6 -0
- package/dist/icons/silkworm/favicon-16.png +0 -0
- package/dist/icons/silkworm/favicon-32.png +0 -0
- package/dist/icons/silkworm/icon-128.png +0 -0
- package/dist/icons/silkworm/icon-512.png +0 -0
- package/dist/index.html +14 -0
- package/index.html +13 -0
- package/nitro.config.ts +12 -0
- package/package.json +42 -8
- package/public/icons/silkworm/favicon-16.png +0 -0
- package/public/icons/silkworm/favicon-32.png +0 -0
- package/public/icons/silkworm/icon-128.png +0 -0
- package/public/icons/silkworm/icon-512.png +0 -0
- package/scripts/dev.ts +56 -0
- package/server/routes/api/silkworm/auto/pause.post.ts +7 -0
- package/server/routes/api/silkworm/auto/start.post.ts +18 -0
- package/server/routes/api/silkworm/auto/stop.post.ts +7 -0
- package/server/routes/api/silkworm/connect.post.ts +28 -0
- package/server/routes/api/silkworm/history/clear.post.ts +7 -0
- package/server/routes/api/silkworm/manual/send.post.ts +38 -0
- package/server/routes/api/silkworm/state.get.ts +4 -0
- package/server/routes/api/silkworm/stream.get.ts +59 -0
- package/server/routes/api/silkworm/test.post.ts +18 -0
- package/server/state.ts +3 -0
- package/src/App.vue +418 -0
- package/src/IconGlyph.vue +33 -0
- package/src/main.ts +5 -0
- package/src/runner/random.ts +29 -0
- package/src/runner/runtime.ts +396 -0
- package/src/runner/transport.ts +109 -0
- package/src/runner/types.ts +118 -0
- package/src/scenarios/index.ts +187 -0
- package/src/styles.css +172 -0
- package/tsconfig.json +9 -0
- package/vite.config.ts +17 -0
- package/index.js +0 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { DebugContentFormat, DebugLogLevel, DebugLogRecord, DebugLogSource, DebugLogType } from '@flash-debug/types'
|
|
2
|
+
import type { SeededRandom } from '../runner/random'
|
|
3
|
+
import type { GeneratedLog, SilkwormScenario } from '../runner/types'
|
|
4
|
+
|
|
5
|
+
export interface ScenarioContext {
|
|
6
|
+
id: string
|
|
7
|
+
timestamp: string
|
|
8
|
+
sequence: number
|
|
9
|
+
clientId: string
|
|
10
|
+
deviceId: string
|
|
11
|
+
scenario: SilkwormScenario
|
|
12
|
+
random: SeededRandom
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const levels: readonly DebugLogLevel[] = ['debug', 'info', 'warning', 'error']
|
|
16
|
+
const types: readonly DebugLogType[] = [
|
|
17
|
+
'log',
|
|
18
|
+
'network',
|
|
19
|
+
'exception',
|
|
20
|
+
'performance',
|
|
21
|
+
'event',
|
|
22
|
+
]
|
|
23
|
+
const sources: readonly DebugLogSource[] = ['flutter', 'adb', 'server']
|
|
24
|
+
const formats: readonly DebugContentFormat[] = [
|
|
25
|
+
'json',
|
|
26
|
+
'jsonl',
|
|
27
|
+
'yaml',
|
|
28
|
+
'ansi',
|
|
29
|
+
'text',
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
function baseRecord(context: ScenarioContext, overrides: Partial<DebugLogRecord> = {}): DebugLogRecord {
|
|
33
|
+
return {
|
|
34
|
+
id: context.id,
|
|
35
|
+
timestamp: context.timestamp,
|
|
36
|
+
level: 'info',
|
|
37
|
+
type: 'log',
|
|
38
|
+
source: 'flutter',
|
|
39
|
+
deviceId: context.deviceId,
|
|
40
|
+
message: `silkworm event ${context.sequence}`,
|
|
41
|
+
content: `Generated by ${context.scenario}`,
|
|
42
|
+
contentFormat: 'text',
|
|
43
|
+
...overrides,
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function contentFor(format: DebugContentFormat, context: ScenarioContext): string {
|
|
48
|
+
if (format === 'json') {
|
|
49
|
+
return JSON.stringify({
|
|
50
|
+
requestId: `req-${context.sequence}`,
|
|
51
|
+
ok: context.random.bool(0.8),
|
|
52
|
+
durationMs: context.random.int(2, 680),
|
|
53
|
+
}, null, 2)
|
|
54
|
+
}
|
|
55
|
+
if (format === 'jsonl') {
|
|
56
|
+
return JSON.stringify({ event: 'response', sequence: context.sequence, ok: true })
|
|
57
|
+
}
|
|
58
|
+
if (format === 'yaml') {
|
|
59
|
+
return `requestId: req-${context.sequence}\nok: true\ndurationMs: ${context.random.int(2, 680)}`
|
|
60
|
+
}
|
|
61
|
+
if (format === 'ansi') {
|
|
62
|
+
return '\u001B[32m[200]\u001B[0m GET /api/health 18ms'
|
|
63
|
+
}
|
|
64
|
+
return `A plain text payload produced by Silkworm at sequence ${context.sequence}.`
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function buildRecord(context: ScenarioContext, overrides: Partial<DebugLogRecord> = {}): DebugLogRecord {
|
|
68
|
+
const level = overrides.level ?? context.random.pick(levels)
|
|
69
|
+
const type = overrides.type ?? context.random.pick(types)
|
|
70
|
+
const format = overrides.contentFormat ?? context.random.pick(formats)
|
|
71
|
+
return baseRecord(context, {
|
|
72
|
+
level,
|
|
73
|
+
type,
|
|
74
|
+
contentFormat: format,
|
|
75
|
+
content: contentFor(format, context),
|
|
76
|
+
message: `${type} event from ${overrides.source ?? 'flutter'}`,
|
|
77
|
+
...overrides,
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function createScenarioRecord(context: ScenarioContext): GeneratedLog {
|
|
82
|
+
switch (context.scenario) {
|
|
83
|
+
case 'normal':
|
|
84
|
+
return buildRecord(context, {
|
|
85
|
+
level: context.random.pick([
|
|
86
|
+
'debug',
|
|
87
|
+
'info',
|
|
88
|
+
'info',
|
|
89
|
+
'warning',
|
|
90
|
+
'error',
|
|
91
|
+
]),
|
|
92
|
+
type: 'log',
|
|
93
|
+
source: 'flutter',
|
|
94
|
+
contentFormat: 'text',
|
|
95
|
+
message: context.random.pick([
|
|
96
|
+
'screen mounted',
|
|
97
|
+
'button pressed',
|
|
98
|
+
'cache refreshed',
|
|
99
|
+
'request completed',
|
|
100
|
+
]),
|
|
101
|
+
content: `Flutter debug message ${context.sequence}`,
|
|
102
|
+
})
|
|
103
|
+
case 'mixed-sources':
|
|
104
|
+
return buildRecord(context, {
|
|
105
|
+
source: context.random.pick(sources),
|
|
106
|
+
tag: context.random.pick(['App', 'Network', 'ADB', 'Router']),
|
|
107
|
+
})
|
|
108
|
+
case 'content-formats': {
|
|
109
|
+
const contentFormat = context.random.pick(formats)
|
|
110
|
+
return buildRecord(context, {
|
|
111
|
+
contentFormat,
|
|
112
|
+
content: contentFor(contentFormat, context),
|
|
113
|
+
})
|
|
114
|
+
}
|
|
115
|
+
case 'network':
|
|
116
|
+
return buildRecord(context, {
|
|
117
|
+
type: 'network',
|
|
118
|
+
level: context.random.bool(0.82)
|
|
119
|
+
? 'info'
|
|
120
|
+
: 'error',
|
|
121
|
+
contentFormat: 'json',
|
|
122
|
+
message: context.random.pick(['GET /api/health', 'POST /api/v1/logs/batch', 'GET /users/me']),
|
|
123
|
+
attributes: {
|
|
124
|
+
method: context.random.pick(['GET', 'POST', 'PUT']),
|
|
125
|
+
statusCode: context.random.bool(0.85)
|
|
126
|
+
? 200
|
|
127
|
+
: context.random.pick([400, 429, 500]),
|
|
128
|
+
durationMs: context.random.int(2, 680),
|
|
129
|
+
},
|
|
130
|
+
})
|
|
131
|
+
case 'exceptions':
|
|
132
|
+
return buildRecord(context, {
|
|
133
|
+
type: 'exception',
|
|
134
|
+
level: 'error',
|
|
135
|
+
contentFormat: 'text',
|
|
136
|
+
message: context.random.pick(['Unhandled exception', 'TimeoutException', 'StateError']),
|
|
137
|
+
error: context.random.pick(['TimeoutException: request timed out', 'StateError: invalid state', 'Error: failed to decode response']),
|
|
138
|
+
stackTrace: 'at SilkwormScenario.generate (scenario.ts:42:11)\nat Logger.send (logger.ts:18:5)',
|
|
139
|
+
})
|
|
140
|
+
case 'burst':
|
|
141
|
+
return buildRecord(context, {
|
|
142
|
+
type: 'event',
|
|
143
|
+
level: 'info',
|
|
144
|
+
contentFormat: 'jsonl',
|
|
145
|
+
message: `burst event ${context.sequence}`,
|
|
146
|
+
})
|
|
147
|
+
case 'duplicates':
|
|
148
|
+
return buildRecord(context, {
|
|
149
|
+
id: `${context.clientId}-duplicate-${context.sequence % 3}`,
|
|
150
|
+
type: 'event',
|
|
151
|
+
level: 'info',
|
|
152
|
+
contentFormat: 'json',
|
|
153
|
+
})
|
|
154
|
+
case 'invalid':
|
|
155
|
+
if (context.sequence % 3 === 0) {
|
|
156
|
+
return { timestamp: context.timestamp, message: 'missing id and required fields' }
|
|
157
|
+
}
|
|
158
|
+
if (context.sequence % 3 === 1) {
|
|
159
|
+
return {
|
|
160
|
+
id: context.id,
|
|
161
|
+
timestamp: context.timestamp,
|
|
162
|
+
level: 'unknown',
|
|
163
|
+
type: 'unknown',
|
|
164
|
+
message: '',
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
id: context.id,
|
|
169
|
+
timestamp: context.timestamp,
|
|
170
|
+
message: 'oversized payload',
|
|
171
|
+
content: 'x'.repeat(4096),
|
|
172
|
+
}
|
|
173
|
+
case 'multi-device':
|
|
174
|
+
return buildRecord(context, {
|
|
175
|
+
deviceId: `pixel-${context.random.int(5, 9)}`,
|
|
176
|
+
source: context.random.pick(['flutter', 'adb']),
|
|
177
|
+
})
|
|
178
|
+
case 'long-run':
|
|
179
|
+
return buildRecord(context, {
|
|
180
|
+
level: context.random.pick(['debug', 'info', 'info']),
|
|
181
|
+
type: 'performance',
|
|
182
|
+
contentFormat: 'text',
|
|
183
|
+
message: 'heartbeat',
|
|
184
|
+
content: `Long run heartbeat ${context.sequence}`,
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: dark;
|
|
3
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
4
|
+
color: #ececf2;
|
|
5
|
+
background: #111319;
|
|
6
|
+
--bg: #111319;
|
|
7
|
+
--panel: rgb(26 27 37 / 92%);
|
|
8
|
+
--panel-strong: #202130;
|
|
9
|
+
--border: rgb(255 255 255 / 10%);
|
|
10
|
+
--muted: #a2a4ae;
|
|
11
|
+
--faint: #6d7080;
|
|
12
|
+
--primary: #c4b5fd;
|
|
13
|
+
--primary-soft: rgb(196 181 253 / 14%);
|
|
14
|
+
--green: #79d6a0;
|
|
15
|
+
--red: #f47d91;
|
|
16
|
+
--amber: #e4b95e;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
* { box-sizing: border-box; }
|
|
20
|
+
html, body, #app { width: 100%; height: 100%; margin: 0; }
|
|
21
|
+
body { min-width: 1040px; overflow: hidden; background: var(--bg); }
|
|
22
|
+
button, input, select, textarea { font: inherit; }
|
|
23
|
+
button { color: inherit; }
|
|
24
|
+
.icon-glyph { display: block; }
|
|
25
|
+
|
|
26
|
+
.app-shell { display: flex; height: 100%; flex-direction: column; gap: 14px; overflow: auto; padding: 16px; background-color: var(--bg); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 18px 18px; }
|
|
27
|
+
.panel { border: 1px solid var(--border); border-radius: 16px; background: var(--panel); box-shadow: 0 18px 55px rgb(0 0 0 / 24%); backdrop-filter: blur(12px); }
|
|
28
|
+
.topbar { min-height: 64px; display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 10px 14px; }
|
|
29
|
+
.brand, .brand > div, .section-title, .top-actions, .button-row, .manual-options, .history-actions, .target-status { display: flex; align-items: center; }
|
|
30
|
+
.brand { gap: 10px; }
|
|
31
|
+
.brand-mark { width: 34px; height: 34px; flex: none; object-fit: contain; }
|
|
32
|
+
.brand > div { align-items: baseline; gap: 7px; }
|
|
33
|
+
.brand strong { font-size: 15px; letter-spacing: -.02em; }
|
|
34
|
+
.brand span, .section-title span, .target-status small, .hint { color: var(--muted); font-size: 11px; }
|
|
35
|
+
.target-status { min-width: 0; gap: 8px; color: var(--muted); font-size: 12px; }
|
|
36
|
+
.target-status small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
37
|
+
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px rgb(109 112 128 / 12%); }
|
|
38
|
+
.target-status.online { color: var(--green); }
|
|
39
|
+
.target-status.online .status-dot { background: var(--green); box-shadow: 0 0 0 3px rgb(121 214 160 / 12%); }
|
|
40
|
+
.top-actions { gap: 8px; }
|
|
41
|
+
.notice { position: fixed; z-index: 80; top: 24px; left: 50%; max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: var(--panel-strong); font-size: 12px; pointer-events: none; transform: translateX(-50%); }
|
|
42
|
+
.notice-success { border-color: rgb(121 214 160 / 35%); color: var(--green); }
|
|
43
|
+
.notice-error { border-color: rgb(244 125 145 / 35%); color: var(--red); }
|
|
44
|
+
.silkworm-notice-enter-active, .silkworm-notice-leave-active { transition: opacity .2s ease, transform .22s cubic-bezier(.22, 1, .36, 1); }
|
|
45
|
+
.silkworm-notice-enter-from, .silkworm-notice-leave-to { opacity: 0; transform: translate(-50%, -14px); }
|
|
46
|
+
.connection { flex: none; padding: 16px; }
|
|
47
|
+
.connection-inline { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 14px; align-items: center; }
|
|
48
|
+
.connection-inline .field { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px; }
|
|
49
|
+
.connection-inline .field span { white-space: nowrap; }
|
|
50
|
+
.section-title { justify-content: space-between; gap: 12px; margin-bottom: 14px; }
|
|
51
|
+
.section-title > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
|
52
|
+
.section-title strong { font-size: 14px; }
|
|
53
|
+
.section-title span { font-size: 11px; }
|
|
54
|
+
.hint { white-space: nowrap; }
|
|
55
|
+
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
|
|
56
|
+
.connection-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
|
|
57
|
+
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
|
|
58
|
+
.field.wide { grid-column: span 2; }
|
|
59
|
+
.field span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
|
|
60
|
+
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 9px; outline: none; color: inherit; background: rgb(127 127 127 / 7%); padding: 8px 9px; font-size: 12px; }
|
|
61
|
+
.field select { color-scheme: dark; }
|
|
62
|
+
.field select option { color: #ececf2; background: var(--panel-strong); }
|
|
63
|
+
.field select option:checked { color: #17131e; background: var(--primary); }
|
|
64
|
+
.field textarea { resize: vertical; line-height: 1.5; font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace; }
|
|
65
|
+
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
|
|
66
|
+
.connection-feedback { margin-top: 12px; color: var(--green); font-size: 11px; }
|
|
67
|
+
.connection-feedback.failed { color: var(--red); }
|
|
68
|
+
.control-grid { display: flex; flex: 1 1 auto; align-items: stretch; gap: 14px; min-height: 360px; }
|
|
69
|
+
.mode-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 16px; }
|
|
70
|
+
.control-grid > .mode-panel { flex: 1 1 0; }
|
|
71
|
+
.quick-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
|
|
72
|
+
.manual-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
73
|
+
.manual-quick-grid .field.wide { grid-column: 1 / -1; }
|
|
74
|
+
.mode-state, .status-pill { padding: 4px 7px; border-radius: 6px; color: var(--muted) !important; background: rgb(127 127 127 / 10%); font-size: 10px !important; font-weight: 700; text-transform: uppercase; }
|
|
75
|
+
.status-running, .status-accepted { color: var(--green) !important; background: rgb(121 214 160 / 12%); }
|
|
76
|
+
.status-paused, .status-queued, .status-sent { color: var(--amber) !important; background: rgb(228 185 94 / 12%); }
|
|
77
|
+
.status-failed { color: var(--red) !important; background: rgb(244 125 145 / 12%); }
|
|
78
|
+
.status-duplicate { color: var(--primary) !important; background: var(--primary-soft); }
|
|
79
|
+
.check-row { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 11px; }
|
|
80
|
+
.button-row { gap: 8px; margin-top: 14px; }
|
|
81
|
+
.control-hint { color: var(--faint); font-size: 11px; }
|
|
82
|
+
.button, .link-button { border: 0; border-radius: 9px; cursor: pointer; }
|
|
83
|
+
.button { padding: 8px 11px; font-size: 12px; font-weight: 700; }
|
|
84
|
+
.button:disabled { cursor: not-allowed; opacity: .4; }
|
|
85
|
+
.button.primary { color: #17131e; background: var(--primary); }
|
|
86
|
+
.button.secondary { border: 1px solid var(--border); color: var(--muted); background: rgb(127 127 127 / 7%); }
|
|
87
|
+
.button.danger { color: var(--red); background: rgb(244 125 145 / 10%); }
|
|
88
|
+
.link-button { padding: 3px 0; color: var(--primary); background: transparent; font-size: 11px; }
|
|
89
|
+
.manual-options { gap: 16px; margin-top: 12px; }
|
|
90
|
+
.field.compact { width: 120px; }
|
|
91
|
+
.stats-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
|
|
92
|
+
.stat { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; }
|
|
93
|
+
.stat span { color: var(--muted); font-size: 11px; }
|
|
94
|
+
.stat strong { font-size: 20px; }
|
|
95
|
+
.success-text { color: var(--green); }
|
|
96
|
+
.error-text { color: var(--red); }
|
|
97
|
+
.history-panel { min-height: 210px; margin-top: 14px; padding: 16px; }
|
|
98
|
+
.history-actions { display: flex; flex-direction: row; align-items: center; gap: 6px; margin-left: auto; }
|
|
99
|
+
.section-title > .history-actions { flex-direction: row; }
|
|
100
|
+
.icon-button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
|
|
101
|
+
.icon-button:hover { color: var(--primary); border-color: var(--border); background: rgb(196 181 253 / 7%); }
|
|
102
|
+
.message { color: var(--green) !important; }
|
|
103
|
+
.error-message { max-width: 420px; overflow: hidden; color: var(--red) !important; text-overflow: ellipsis; white-space: nowrap; }
|
|
104
|
+
.empty-state { display: flex; min-height: 120px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--muted); }
|
|
105
|
+
.empty-state strong { color: #ececf2; font-size: 13px; }
|
|
106
|
+
.empty-state span { font-size: 11px; }
|
|
107
|
+
.history-list { overflow: auto; max-height: 310px; }
|
|
108
|
+
.history-row { display: grid; grid-template-columns: 82px 58px minmax(120px, 1fr) 70px 78px minmax(100px, 1fr); align-items: center; gap: 10px; min-height: 34px; padding: 4px 8px; border-radius: 8px; font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace; font-size: 10px; }
|
|
109
|
+
.history-row:hover { background: rgb(196 181 253 / 6%); }
|
|
110
|
+
.history-row time, .history-summary, .attempt-count, .history-error { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
|
|
111
|
+
.mode-pill { width: fit-content; padding: 3px 5px; border-radius: 5px; color: var(--primary); background: var(--primary-soft); font-size: 9px; text-transform: uppercase; }
|
|
112
|
+
.attempt-count { text-align: right; }
|
|
113
|
+
.history-error { color: var(--red); }
|
|
114
|
+
.stats-strip { display: flex; width: 100%; flex: none; align-items: center; gap: 20px; min-height: 48px; padding: 8px 14px; color: var(--muted); text-align: left; cursor: pointer; }
|
|
115
|
+
.stats-strip > span { display: inline-flex; align-items: baseline; gap: 7px; }
|
|
116
|
+
.stats-strip small { color: var(--faint); font-size: 10px; text-transform: uppercase; }
|
|
117
|
+
.stats-strip strong { color: #ececf2; font-size: 15px; }
|
|
118
|
+
.stats-strip .success-text { color: var(--green); }
|
|
119
|
+
.stats-strip .error-text { color: var(--red); }
|
|
120
|
+
.stats-strip-hint { margin-left: auto; color: var(--primary); font-size: 11px; }
|
|
121
|
+
.history-drawer-backdrop { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-end; padding: 16px; padding-bottom: calc(16px + 48px + 28px); background: rgb(0 0 0 / 68%); }
|
|
122
|
+
.history-drawer { width: 100%; max-height: min(70vh, 680px); overflow: hidden; padding: 16px; }
|
|
123
|
+
.history-drawer .section-title { flex-wrap: nowrap; }
|
|
124
|
+
.drawer-stats { margin-top: 0; margin-bottom: 14px; }
|
|
125
|
+
.history-drawer .history-list { max-height: 300px; }
|
|
126
|
+
.silkworm-drawer-enter-active, .silkworm-drawer-leave-active { transition: opacity .22s ease; }
|
|
127
|
+
.silkworm-drawer-enter-active .history-drawer, .silkworm-drawer-leave-active .history-drawer { transition: transform .24s cubic-bezier(.22, 1, .36, 1), opacity .22s ease; }
|
|
128
|
+
.silkworm-drawer-enter-from, .silkworm-drawer-leave-to { opacity: 0; }
|
|
129
|
+
.silkworm-drawer-enter-from .history-drawer, .silkworm-drawer-leave-to .history-drawer { opacity: 0; transform: translateY(24px); }
|
|
130
|
+
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / 68%); }
|
|
131
|
+
.silkworm-modal-enter-active, .silkworm-modal-leave-active { transition: opacity .18s ease; }
|
|
132
|
+
.silkworm-modal-enter-active > *, .silkworm-modal-leave-active > * { transition: transform .2s cubic-bezier(.22, 1, .36, 1), opacity .18s ease; }
|
|
133
|
+
.silkworm-modal-enter-from, .silkworm-modal-leave-to { opacity: 0; }
|
|
134
|
+
.silkworm-modal-enter-from > *, .silkworm-modal-leave-to > * { opacity: 0; transform: scale(.96); }
|
|
135
|
+
.modal-card { width: min(680px, 100%); max-height: 82vh; overflow: auto; padding: 16px; }
|
|
136
|
+
.modal-card.modal-wide { width: min(860px, 100%); }
|
|
137
|
+
.modal-card .section-title { margin-bottom: 16px; }
|
|
138
|
+
.preview-modal { width: min(760px, 100%); max-height: 80vh; padding: 16px; }
|
|
139
|
+
.preview-modal pre { max-height: 62vh; overflow: auto; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; color: #d9d1ff; background: #11131b; font: 12px/1.6 "Geist Mono", "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; }
|
|
140
|
+
|
|
141
|
+
@media (max-width: 1180px) {
|
|
142
|
+
body { min-width: 0; }
|
|
143
|
+
.topbar { grid-template-columns: 190px minmax(0, 1fr); }
|
|
144
|
+
.top-actions { grid-column: 2; justify-content: flex-end; }
|
|
145
|
+
.control-grid { flex-direction: column; }
|
|
146
|
+
.manual-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@media (max-width: 720px) {
|
|
150
|
+
.connection-inline, .manual-quick-grid { grid-template-columns: 1fr; }
|
|
151
|
+
.connection-inline .field { grid-template-columns: 1fr; }
|
|
152
|
+
.stats-strip { gap: 10px; }
|
|
153
|
+
.stats-strip > span { gap: 4px; }
|
|
154
|
+
.stats-strip small { display: none; }
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (prefers-reduced-motion: reduce) {
|
|
158
|
+
.silkworm-drawer-enter-active,
|
|
159
|
+
.silkworm-drawer-leave-active,
|
|
160
|
+
.silkworm-drawer-enter-active .history-drawer,
|
|
161
|
+
.silkworm-drawer-leave-active .history-drawer,
|
|
162
|
+
.silkworm-modal-enter-active,
|
|
163
|
+
.silkworm-modal-leave-active,
|
|
164
|
+
.silkworm-modal-enter-active > *,
|
|
165
|
+
.silkworm-modal-leave-active > * {
|
|
166
|
+
transition-duration: .01ms !important;
|
|
167
|
+
}
|
|
168
|
+
.silkworm-notice-enter-active,
|
|
169
|
+
.silkworm-notice-leave-active {
|
|
170
|
+
transition-duration: .01ms !important;
|
|
171
|
+
}
|
|
172
|
+
}
|
package/tsconfig.json
ADDED
package/vite.config.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import vue from '@vitejs/plugin-vue'
|
|
2
|
+
import { defineConfig } from 'vite'
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [
|
|
6
|
+
vue(),
|
|
7
|
+
],
|
|
8
|
+
server: {
|
|
9
|
+
port: 4330,
|
|
10
|
+
proxy: {
|
|
11
|
+
'/api': {
|
|
12
|
+
target: 'http://127.0.0.1:4328',
|
|
13
|
+
changeOrigin: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
})
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// Placeholder
|