eprec 1.1.0 → 1.3.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/app/assets/styles.css +469 -2
- package/app/client/app.tsx +2 -34
- package/app/client/edit-session-data.ts +245 -0
- package/app/client/editing-workspace.tsx +869 -0
- package/app/components/layout.tsx +3 -5
- package/app/router.tsx +7 -3
- package/app/routes/index.tsx +22 -19
- package/app-server.ts +3 -1
- package/cli.ts +278 -45
- package/package.json +7 -3
- package/process-course/cli.ts +11 -10
- package/process-course/edits/cli-prompts.test.ts +108 -0
- package/process-course/edits/cli.ts +256 -48
- package/process-course/logging.ts +28 -3
- package/server/bundling.ts +61 -65
package/app/assets/styles.css
CHANGED
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
body {
|
|
10
10
|
margin: 0;
|
|
11
|
-
font-family:
|
|
11
|
+
font-family:
|
|
12
|
+
'Inter',
|
|
13
|
+
'Segoe UI',
|
|
14
|
+
system-ui,
|
|
15
|
+
-apple-system,
|
|
16
|
+
sans-serif;
|
|
12
17
|
background: #f8fafc;
|
|
13
18
|
color: #0f172a;
|
|
14
19
|
}
|
|
@@ -108,7 +113,9 @@ p {
|
|
|
108
113
|
font-size: 14px;
|
|
109
114
|
font-weight: 600;
|
|
110
115
|
cursor: pointer;
|
|
111
|
-
transition:
|
|
116
|
+
transition:
|
|
117
|
+
transform 0.15s ease,
|
|
118
|
+
background 0.15s ease;
|
|
112
119
|
}
|
|
113
120
|
|
|
114
121
|
.counter-button:hover {
|
|
@@ -127,3 +134,463 @@ p {
|
|
|
127
134
|
.counter-value {
|
|
128
135
|
font-weight: 700;
|
|
129
136
|
}
|
|
137
|
+
|
|
138
|
+
.app-card--full {
|
|
139
|
+
width: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.summary-grid {
|
|
143
|
+
display: grid;
|
|
144
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
145
|
+
gap: 16px;
|
|
146
|
+
margin-top: 8px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.summary-item {
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
gap: 4px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.summary-label {
|
|
156
|
+
font-size: 12px;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
text-transform: uppercase;
|
|
159
|
+
letter-spacing: 0.08em;
|
|
160
|
+
color: #94a3b8;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.summary-value {
|
|
164
|
+
font-size: 16px;
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
color: #0f172a;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.summary-subtext {
|
|
170
|
+
font-size: 13px;
|
|
171
|
+
color: #64748b;
|
|
172
|
+
line-height: 1.4;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.timeline-card {
|
|
176
|
+
gap: 20px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.timeline-header {
|
|
180
|
+
display: flex;
|
|
181
|
+
align-items: flex-start;
|
|
182
|
+
justify-content: space-between;
|
|
183
|
+
gap: 16px;
|
|
184
|
+
flex-wrap: wrap;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.timeline-layout {
|
|
188
|
+
display: grid;
|
|
189
|
+
grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
|
|
190
|
+
gap: 20px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.timeline-preview {
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
gap: 12px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.timeline-video {
|
|
200
|
+
display: flex;
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
gap: 10px;
|
|
203
|
+
padding: 12px;
|
|
204
|
+
border-radius: 16px;
|
|
205
|
+
border: 1px solid #e2e8f0;
|
|
206
|
+
background: #ffffff;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.timeline-video-header {
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: flex-start;
|
|
212
|
+
justify-content: space-between;
|
|
213
|
+
gap: 12px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.timeline-video-player {
|
|
217
|
+
width: 100%;
|
|
218
|
+
border-radius: 12px;
|
|
219
|
+
background: #0f172a;
|
|
220
|
+
aspect-ratio: 16 / 9;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.timeline-video-meta {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: space-between;
|
|
227
|
+
font-size: 12px;
|
|
228
|
+
color: #64748b;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.timeline-track {
|
|
232
|
+
position: relative;
|
|
233
|
+
height: 72px;
|
|
234
|
+
border-radius: 16px;
|
|
235
|
+
border: 1px solid #e2e8f0;
|
|
236
|
+
background: linear-gradient(
|
|
237
|
+
90deg,
|
|
238
|
+
rgba(226, 232, 240, 0.7) 0%,
|
|
239
|
+
rgba(226, 232, 240, 0.7) 2%,
|
|
240
|
+
transparent 2%,
|
|
241
|
+
transparent 20%
|
|
242
|
+
);
|
|
243
|
+
background-size: 20% 100%;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.timeline-track--skeleton {
|
|
248
|
+
min-height: 72px;
|
|
249
|
+
background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 45%, #f8fafc 90%);
|
|
250
|
+
background-size: 200% 100%;
|
|
251
|
+
animation: shimmer 1.8s infinite;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.timeline-range {
|
|
255
|
+
position: absolute;
|
|
256
|
+
top: 14px;
|
|
257
|
+
height: 44px;
|
|
258
|
+
border-radius: 10px;
|
|
259
|
+
border: 1px solid #fca5a5;
|
|
260
|
+
background: #fee2e2;
|
|
261
|
+
cursor: pointer;
|
|
262
|
+
left: var(--range-left);
|
|
263
|
+
width: var(--range-width);
|
|
264
|
+
transition:
|
|
265
|
+
transform 0.15s ease,
|
|
266
|
+
box-shadow 0.15s ease;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.timeline-range--manual {
|
|
270
|
+
background: #fef3c7;
|
|
271
|
+
border-color: #fbbf24;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.timeline-range--command {
|
|
275
|
+
background: #fee2e2;
|
|
276
|
+
border-color: #fca5a5;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.timeline-range.is-selected {
|
|
280
|
+
box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.6);
|
|
281
|
+
transform: translateY(-1px);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.timeline-playhead {
|
|
285
|
+
position: absolute;
|
|
286
|
+
top: 0;
|
|
287
|
+
bottom: 0;
|
|
288
|
+
width: 2px;
|
|
289
|
+
left: var(--playhead);
|
|
290
|
+
background: #0ea5e9;
|
|
291
|
+
box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.4);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.timeline-scale {
|
|
295
|
+
display: flex;
|
|
296
|
+
justify-content: space-between;
|
|
297
|
+
font-size: 12px;
|
|
298
|
+
color: #64748b;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.timeline-controls {
|
|
302
|
+
display: grid;
|
|
303
|
+
grid-template-columns: auto 1fr auto auto;
|
|
304
|
+
gap: 12px;
|
|
305
|
+
align-items: center;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.timeline-slider {
|
|
309
|
+
width: 100%;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.control-label {
|
|
313
|
+
display: flex;
|
|
314
|
+
flex-direction: column;
|
|
315
|
+
font-size: 12px;
|
|
316
|
+
gap: 4px;
|
|
317
|
+
color: #64748b;
|
|
318
|
+
font-weight: 600;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.control-value {
|
|
322
|
+
font-size: 14px;
|
|
323
|
+
color: #0f172a;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.panel-header {
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
justify-content: space-between;
|
|
330
|
+
gap: 12px;
|
|
331
|
+
margin-bottom: 8px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.panel-grid {
|
|
335
|
+
display: grid;
|
|
336
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
337
|
+
gap: 12px;
|
|
338
|
+
margin-bottom: 12px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.input-label {
|
|
342
|
+
display: flex;
|
|
343
|
+
flex-direction: column;
|
|
344
|
+
gap: 6px;
|
|
345
|
+
font-size: 12px;
|
|
346
|
+
font-weight: 600;
|
|
347
|
+
color: #475569;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.input-label--full {
|
|
351
|
+
grid-column: 1 / -1;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.text-input {
|
|
355
|
+
border: 1px solid #cbd5f5;
|
|
356
|
+
border-radius: 10px;
|
|
357
|
+
padding: 8px 10px;
|
|
358
|
+
font-size: 14px;
|
|
359
|
+
font-family: inherit;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.text-input--compact {
|
|
363
|
+
padding: 6px 8px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.button {
|
|
367
|
+
border: 1px solid #cbd5f5;
|
|
368
|
+
background: #ffffff;
|
|
369
|
+
color: #0f172a;
|
|
370
|
+
border-radius: 10px;
|
|
371
|
+
padding: 8px 12px;
|
|
372
|
+
font-size: 13px;
|
|
373
|
+
font-weight: 600;
|
|
374
|
+
cursor: pointer;
|
|
375
|
+
transition:
|
|
376
|
+
background 0.15s ease,
|
|
377
|
+
color 0.15s ease;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.button--primary {
|
|
381
|
+
background: #0ea5e9;
|
|
382
|
+
color: #ffffff;
|
|
383
|
+
border-color: #0284c7;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.button--danger {
|
|
387
|
+
background: #fef2f2;
|
|
388
|
+
border-color: #fecaca;
|
|
389
|
+
color: #b91c1c;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.button--ghost {
|
|
393
|
+
background: #f8fafc;
|
|
394
|
+
border-color: #e2e8f0;
|
|
395
|
+
color: #475569;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.button:disabled {
|
|
399
|
+
cursor: not-allowed;
|
|
400
|
+
opacity: 0.6;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.cut-list {
|
|
404
|
+
list-style: none;
|
|
405
|
+
padding: 0;
|
|
406
|
+
margin: 0;
|
|
407
|
+
display: flex;
|
|
408
|
+
flex-direction: column;
|
|
409
|
+
gap: 10px;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.cut-row {
|
|
413
|
+
display: flex;
|
|
414
|
+
align-items: center;
|
|
415
|
+
gap: 12px;
|
|
416
|
+
justify-content: space-between;
|
|
417
|
+
border: 1px solid #e2e8f0;
|
|
418
|
+
border-radius: 12px;
|
|
419
|
+
padding: 8px 12px;
|
|
420
|
+
background: #f8fafc;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.cut-row.is-selected {
|
|
424
|
+
border-color: #38bdf8;
|
|
425
|
+
background: #e0f2fe;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.cut-select {
|
|
429
|
+
background: transparent;
|
|
430
|
+
border: none;
|
|
431
|
+
text-align: left;
|
|
432
|
+
cursor: pointer;
|
|
433
|
+
display: flex;
|
|
434
|
+
flex-direction: column;
|
|
435
|
+
gap: 4px;
|
|
436
|
+
font-size: 13px;
|
|
437
|
+
color: #0f172a;
|
|
438
|
+
flex: 1;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.cut-time {
|
|
442
|
+
font-weight: 600;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.cut-reason {
|
|
446
|
+
color: #64748b;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.app-grid--two {
|
|
450
|
+
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.chapter-list,
|
|
454
|
+
.command-list {
|
|
455
|
+
display: flex;
|
|
456
|
+
flex-direction: column;
|
|
457
|
+
gap: 12px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.chapter-row,
|
|
461
|
+
.command-row {
|
|
462
|
+
border: 1px solid #e2e8f0;
|
|
463
|
+
border-radius: 14px;
|
|
464
|
+
padding: 12px;
|
|
465
|
+
background: #f8fafc;
|
|
466
|
+
display: flex;
|
|
467
|
+
flex-direction: column;
|
|
468
|
+
gap: 10px;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.chapter-header,
|
|
472
|
+
.command-header {
|
|
473
|
+
display: flex;
|
|
474
|
+
align-items: center;
|
|
475
|
+
justify-content: space-between;
|
|
476
|
+
gap: 12px;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.chapter-time {
|
|
480
|
+
font-size: 12px;
|
|
481
|
+
color: #64748b;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.command-meta {
|
|
485
|
+
display: flex;
|
|
486
|
+
align-items: center;
|
|
487
|
+
justify-content: space-between;
|
|
488
|
+
gap: 12px;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.command-time {
|
|
492
|
+
font-size: 12px;
|
|
493
|
+
color: #64748b;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.status-pill--success {
|
|
497
|
+
background: #dcfce7;
|
|
498
|
+
color: #166534;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.status-pill--warning {
|
|
502
|
+
background: #fef3c7;
|
|
503
|
+
color: #92400e;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.status-pill--danger {
|
|
507
|
+
background: #fee2e2;
|
|
508
|
+
color: #b91c1c;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.status-pill--info {
|
|
512
|
+
background: #e0f2fe;
|
|
513
|
+
color: #0369a1;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.transcript-card {
|
|
517
|
+
gap: 16px;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.transcript-header {
|
|
521
|
+
display: flex;
|
|
522
|
+
align-items: flex-start;
|
|
523
|
+
justify-content: space-between;
|
|
524
|
+
gap: 16px;
|
|
525
|
+
flex-wrap: wrap;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.transcript-preview {
|
|
529
|
+
display: flex;
|
|
530
|
+
flex-direction: column;
|
|
531
|
+
gap: 4px;
|
|
532
|
+
max-width: 320px;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.transcript-results {
|
|
536
|
+
list-style: none;
|
|
537
|
+
margin: 0;
|
|
538
|
+
padding: 0;
|
|
539
|
+
display: grid;
|
|
540
|
+
gap: 8px;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.transcript-result {
|
|
544
|
+
width: 100%;
|
|
545
|
+
border: 1px solid #e2e8f0;
|
|
546
|
+
border-radius: 10px;
|
|
547
|
+
padding: 8px 10px;
|
|
548
|
+
background: #ffffff;
|
|
549
|
+
display: grid;
|
|
550
|
+
grid-template-columns: auto 1fr;
|
|
551
|
+
gap: 10px;
|
|
552
|
+
text-align: left;
|
|
553
|
+
cursor: pointer;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.transcript-time {
|
|
557
|
+
font-weight: 600;
|
|
558
|
+
color: #0f172a;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.transcript-snippet {
|
|
562
|
+
color: #64748b;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.transcript-empty {
|
|
566
|
+
margin-top: 4px;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.command-preview {
|
|
570
|
+
background: #0f172a;
|
|
571
|
+
color: #e2e8f0;
|
|
572
|
+
border-radius: 12px;
|
|
573
|
+
padding: 16px;
|
|
574
|
+
font-size: 13px;
|
|
575
|
+
line-height: 1.5;
|
|
576
|
+
overflow-x: auto;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
@keyframes shimmer {
|
|
580
|
+
0% {
|
|
581
|
+
background-position: 0% 50%;
|
|
582
|
+
}
|
|
583
|
+
100% {
|
|
584
|
+
background-position: 200% 50%;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
@media (max-width: 900px) {
|
|
589
|
+
.timeline-layout {
|
|
590
|
+
grid-template-columns: 1fr;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.timeline-controls {
|
|
594
|
+
grid-template-columns: 1fr;
|
|
595
|
+
}
|
|
596
|
+
}
|
package/app/client/app.tsx
CHANGED
|
@@ -1,37 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EditingWorkspace } from './editing-workspace.tsx'
|
|
2
2
|
|
|
3
3
|
export function App() {
|
|
4
|
-
return () =>
|
|
5
|
-
<main class="app-shell">
|
|
6
|
-
<header class="app-header">
|
|
7
|
-
<span class="app-kicker">Eprec Studio</span>
|
|
8
|
-
<h1 class="app-title">Editing workspace</h1>
|
|
9
|
-
<p class="app-subtitle">
|
|
10
|
-
Prepare edits with the CLI, then review them here.
|
|
11
|
-
</p>
|
|
12
|
-
</header>
|
|
13
|
-
<div class="app-grid">
|
|
14
|
-
<section class="app-card">
|
|
15
|
-
<h2>Workflow</h2>
|
|
16
|
-
<ol class="app-list">
|
|
17
|
-
<li>Run a CLI edit command.</li>
|
|
18
|
-
<li>Open the workspace UI.</li>
|
|
19
|
-
<li>Review and refine the cut list.</li>
|
|
20
|
-
</ol>
|
|
21
|
-
</section>
|
|
22
|
-
<section class="app-card">
|
|
23
|
-
<h2>UI status</h2>
|
|
24
|
-
<p class="status-pill">Running locally</p>
|
|
25
|
-
<p class="app-muted">
|
|
26
|
-
Server-rendered shell with client-side edits.
|
|
27
|
-
</p>
|
|
28
|
-
</section>
|
|
29
|
-
<section class="app-card">
|
|
30
|
-
<h2>Interaction check</h2>
|
|
31
|
-
<p class="app-muted">Click the counter to verify interactivity.</p>
|
|
32
|
-
<Counter setup={{ initial: 0 }} />
|
|
33
|
-
</section>
|
|
34
|
-
</div>
|
|
35
|
-
</main>
|
|
36
|
-
)
|
|
4
|
+
return () => <EditingWorkspace />
|
|
37
5
|
}
|