fablecut 1.15.0 → 1.17.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/style.css CHANGED
@@ -1,9 +1,13 @@
1
1
  /* ══════════════════ FableCut — Premiere-style dark theme ══════════════════ */
2
2
  :root {
3
- --bg: #0e0e10;
4
- --panel: #1b1b1f;
5
- --panel-2: #232329;
6
- --border: #2d2d34;
3
+ /* surfaces, darkest at the back: app → panels → header bars → controls */
4
+ --bg: #050506;
5
+ --panel: #111115;
6
+ --panel-head: #23232b;
7
+ --panel-sub: #1a1a20;
8
+ --panel-2: #30303a;
9
+ --well: #0a0a0c;
10
+ --border: #2c2c35;
7
11
  --text: #d7d7dc;
8
12
  --dim: #8b8b93;
9
13
  --accent: #7b6cff;
@@ -2377,6 +2381,22 @@ input[type=range] {
2377
2381
  box-shadow: inset 0 0 0 1px #ff6b6bcc;
2378
2382
  }
2379
2383
 
2384
+ /* Silences Find marked (Inspector → Silence) — a band over the span, above the clips */
2385
+ .silence-span {
2386
+ position: absolute;
2387
+ top: 2px;
2388
+ bottom: 2px;
2389
+ z-index: 3;
2390
+ pointer-events: none;
2391
+ border-radius: 3px;
2392
+ background: repeating-linear-gradient(
2393
+ 45deg,
2394
+ #f5b94233 0 4px,
2395
+ #f5b94214 4px 8px
2396
+ );
2397
+ box-shadow: inset 0 0 0 1px #f5b942aa;
2398
+ }
2399
+
2380
2400
  /* ── Clips ── */
2381
2401
  .clip {
2382
2402
  position: absolute;
@@ -3635,6 +3655,134 @@ body.file-drag::after {
3635
3655
  opacity: 0.6;
3636
3656
  }
3637
3657
 
3658
+ /* Transcript tab: the timeline's words; click to go, select and Delete to cut */
3659
+ .tr-page {
3660
+ flex: 1;
3661
+ min-height: 0;
3662
+ display: flex;
3663
+ flex-direction: column;
3664
+ }
3665
+
3666
+ .tr-head {
3667
+ padding: 10px 10px 6px;
3668
+ border-bottom: 1px solid var(--border);
3669
+ display: flex;
3670
+ flex-direction: column;
3671
+ gap: 6px;
3672
+ }
3673
+
3674
+ .tr-row {
3675
+ display: flex;
3676
+ gap: 6px;
3677
+ align-items: center;
3678
+ flex-wrap: wrap;
3679
+ }
3680
+
3681
+ .tr-row select, .tr-row input[type="search"] {
3682
+ background: var(--panel);
3683
+ border: 1px solid var(--border);
3684
+ border-radius: 5px;
3685
+ color: var(--text);
3686
+ font: 11px "Segoe UI", sans-serif;
3687
+ padding: 3px 6px;
3688
+ min-width: 0;
3689
+ }
3690
+
3691
+ .tr-row select { flex: 1 1 0; max-width: 140px; }
3692
+ .tr-row input[type="search"] { flex: 1; min-width: 90px; padding: 4px 8px; }
3693
+ .tr-row select:focus, .tr-row input[type="search"]:focus { outline: none; border-color: var(--accent); }
3694
+
3695
+ .tr-lbl {
3696
+ font-size: 11px;
3697
+ color: var(--dim);
3698
+ white-space: nowrap;
3699
+ }
3700
+
3701
+ .tr-count {
3702
+ font-size: 11px;
3703
+ color: var(--dim);
3704
+ white-space: nowrap;
3705
+ }
3706
+
3707
+ .tr-busy {
3708
+ display: flex;
3709
+ gap: 8px;
3710
+ align-items: center;
3711
+ font-size: 11px;
3712
+ color: var(--dim);
3713
+ }
3714
+
3715
+ .tr-busy > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3716
+
3717
+ .tr-bar {
3718
+ width: 60px;
3719
+ height: 4px;
3720
+ border-radius: 2px;
3721
+ background: var(--panel-2);
3722
+ overflow: hidden;
3723
+ }
3724
+
3725
+ .tr-bar i {
3726
+ display: block;
3727
+ height: 100%;
3728
+ width: 0;
3729
+ background: var(--accent);
3730
+ transition: width 0.2s;
3731
+ }
3732
+
3733
+ .tr-body {
3734
+ flex: 1;
3735
+ min-height: 0;
3736
+ overflow-y: auto;
3737
+ padding: 8px 12px 16px;
3738
+ font-size: 13px;
3739
+ line-height: 1.7;
3740
+ outline: none;
3741
+ }
3742
+
3743
+ .tr-seg { margin: 0 0 10px; }
3744
+
3745
+ .tr-tc {
3746
+ display: inline-block;
3747
+ margin-right: 6px;
3748
+ font-size: 10px;
3749
+ font-variant-numeric: tabular-nums;
3750
+ color: var(--dim);
3751
+ cursor: pointer;
3752
+ }
3753
+
3754
+ .tr-tc:hover { color: var(--text); }
3755
+
3756
+ .tw {
3757
+ cursor: pointer;
3758
+ border-radius: 3px;
3759
+ padding: 1px 0;
3760
+ user-select: none;
3761
+ }
3762
+
3763
+ .tw:hover { background: var(--panel-2); }
3764
+ .tw.hit { background: rgba(255, 209, 102, 0.22); }
3765
+ .tw.now { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
3766
+ .tw.sel { background: rgba(123, 108, 255, 0.45); color: #fff; }
3767
+
3768
+ .tr-empty, .tr-note {
3769
+ font-size: 12px;
3770
+ color: var(--dim);
3771
+ margin: 6px 0 10px;
3772
+ }
3773
+
3774
+ .tr-foot {
3775
+ display: flex;
3776
+ gap: 8px;
3777
+ align-items: center;
3778
+ padding: 6px 10px;
3779
+ border-top: 1px solid var(--border);
3780
+ font-size: 11px;
3781
+ color: var(--dim);
3782
+ }
3783
+
3784
+ .tr-foot > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3785
+
3638
3786
  .cp-head {
3639
3787
  display: flex;
3640
3788
  gap: 6px;
@@ -4086,3 +4234,274 @@ input[type="range"].cq-hue {
4086
4234
  .xq-list .xq-empty { justify-content: center; color: var(--muted, #9a9aaa); border-style: dashed; }
4087
4235
  .dialog.export-dialog p.dlv-tokens { margin-bottom: 8px; }
4088
4236
  .xq-list .xq-actions a.btn { text-decoration: none; }
4237
+
4238
+ /* ── Projects dashboard ── */
4239
+ .topbar-center.clickable { cursor: pointer; }
4240
+ .topbar-center.clickable:hover { color: var(--text); }
4241
+ .dialog.projects-dialog {
4242
+ width: min(1180px, 95vw);
4243
+ height: min(780px, 90vh);
4244
+ padding: 0;
4245
+ display: flex;
4246
+ flex-direction: column;
4247
+ overflow: hidden;
4248
+ outline: none;
4249
+ }
4250
+ .pj-head {
4251
+ display: flex;
4252
+ align-items: center;
4253
+ gap: 8px;
4254
+ padding: 14px 16px 12px 22px;
4255
+ border-bottom: 1px solid var(--border);
4256
+ flex-wrap: wrap;
4257
+ }
4258
+ .pj-head h2 { margin: 0 10px 0 0; }
4259
+ .pj-head .pj-search { flex: 1; min-width: 160px; }
4260
+ .pj-search, .pj-sort, .pj-field input, .pj-field textarea, .pj-field select, .pj-inline input {
4261
+ background: var(--panel-2);
4262
+ border: 1px solid var(--border);
4263
+ color: var(--text);
4264
+ border-radius: 6px;
4265
+ padding: 5px 9px;
4266
+ font: inherit;
4267
+ font-size: 12px;
4268
+ user-select: text;
4269
+ }
4270
+ .pj-search:focus, .pj-sort:focus, .pj-field input:focus, .pj-field textarea:focus, .pj-field select:focus, .pj-inline input:focus {
4271
+ outline: none;
4272
+ border-color: var(--accent);
4273
+ }
4274
+ .pj-views .btn.on, #pjNewBtn.on { border-color: var(--accent); color: #fff; }
4275
+ .pj-close { padding: 4px 9px; font-size: 14px; }
4276
+ .pj-body { flex: 1; display: flex; min-height: 0; }
4277
+ .pj-grid {
4278
+ flex: 1;
4279
+ overflow-y: auto;
4280
+ padding: 16px 18px 22px 22px;
4281
+ display: grid;
4282
+ grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
4283
+ gap: 14px;
4284
+ align-content: start;
4285
+ }
4286
+ .pj-card {
4287
+ display: flex;
4288
+ flex-direction: column;
4289
+ gap: 3px;
4290
+ text-align: left;
4291
+ background: var(--panel-2);
4292
+ border: 1px solid var(--border);
4293
+ border-radius: 9px;
4294
+ padding: 8px 8px 10px;
4295
+ color: var(--text);
4296
+ font: inherit;
4297
+ cursor: pointer;
4298
+ min-width: 0;
4299
+ transition: border-color .12s, background .12s;
4300
+ }
4301
+ .pj-card:hover { border-color: #43434f; background: #26262d; }
4302
+ .pj-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
4303
+ .pj-card.sel { border-color: var(--accent); background: #262536; }
4304
+ .pj-thumb {
4305
+ height: 118px;
4306
+ margin-bottom: 6px;
4307
+ border-radius: 6px;
4308
+ background: #121215;
4309
+ display: flex;
4310
+ align-items: center;
4311
+ justify-content: center;
4312
+ overflow: hidden;
4313
+ }
4314
+ .pj-thumb.big { height: 168px; margin-bottom: 12px; }
4315
+ .pj-frame {
4316
+ max-width: 100%;
4317
+ max-height: 100%;
4318
+ height: 100%;
4319
+ background: #000;
4320
+ display: flex;
4321
+ align-items: center;
4322
+ justify-content: center;
4323
+ overflow: hidden;
4324
+ }
4325
+ .pj-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
4326
+ .pj-frame span { font-size: 11px; color: #5c5c66; font-variant-numeric: tabular-nums; padding: 0 6px; }
4327
+ .pj-card-name {
4328
+ font-size: 13px;
4329
+ color: #ececf1;
4330
+ font-weight: 600;
4331
+ overflow: hidden;
4332
+ text-overflow: ellipsis;
4333
+ white-space: nowrap;
4334
+ }
4335
+ .pj-card-meta, .pj-card-when { font-size: 11px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
4336
+ .pj-card-meta { color: #a9a9b3; }
4337
+ .pj-badge {
4338
+ display: inline-block;
4339
+ margin-left: 4px;
4340
+ padding: 0 6px;
4341
+ border-radius: 4px;
4342
+ font: 700 10px/1.6 "Segoe UI", sans-serif;
4343
+ vertical-align: 1px;
4344
+ background: #33305a;
4345
+ color: #cfc8ff;
4346
+ }
4347
+ .pj-empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; font-size: 13px; }
4348
+ .pj-side {
4349
+ width: 330px;
4350
+ flex: none;
4351
+ border-left: 1px solid var(--border);
4352
+ padding: 16px 20px 20px;
4353
+ overflow-y: auto;
4354
+ display: flex;
4355
+ flex-direction: column;
4356
+ gap: 12px;
4357
+ }
4358
+ .pj-side h3 { font-size: 14px; color: #fff; margin: 0; }
4359
+ .pj-side > p { font-size: 12px; }
4360
+ .pj-field { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--dim); }
4361
+ .pj-field > span { text-transform: uppercase; letter-spacing: .5px; font-size: 10px; }
4362
+ .pj-field input, .pj-field select { padding: 6px 9px; font-size: 13px; }
4363
+ .pj-field textarea { resize: vertical; min-height: 64px; font-size: 12px; line-height: 1.45; }
4364
+ .pj-sub { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; }
4365
+ .pj-facts {
4366
+ display: grid;
4367
+ grid-template-columns: auto 1fr;
4368
+ gap: 4px 12px;
4369
+ margin: 0;
4370
+ font-size: 12px;
4371
+ }
4372
+ .pj-facts dt { color: var(--dim); }
4373
+ .pj-facts dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
4374
+ .pj-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
4375
+ .pj-actions .btn { font-size: 12px; padding: 5px 11px; }
4376
+ .pj-actions .btn:disabled { opacity: .45; cursor: default; transform: none; }
4377
+ .pj-actions .btn.primary:disabled { filter: saturate(.4); }
4378
+ .btn.danger-ghost { background: transparent; border-color: #5a2a2d; color: #ff9b9e; }
4379
+ .btn.danger-ghost:hover { background: #3a1c1f; border-color: var(--danger); }
4380
+ .btn.danger-ghost[data-armed="1"] { background: var(--danger); border-color: var(--danger); color: #fff; }
4381
+ .pj-inline { display: flex; gap: 6px; }
4382
+ .pj-inline input { flex: 1; min-width: 0; font-size: 12px; }
4383
+ .pj-tpls { display: flex; flex-direction: column; gap: 4px; }
4384
+ .pj-tpl {
4385
+ display: grid;
4386
+ grid-template-columns: 28px 1fr auto auto;
4387
+ align-items: center;
4388
+ gap: 2px 8px;
4389
+ text-align: left;
4390
+ background: var(--panel-2);
4391
+ border: 1px solid var(--border);
4392
+ border-radius: 6px;
4393
+ padding: 6px 8px;
4394
+ color: var(--text);
4395
+ font: inherit;
4396
+ font-size: 12px;
4397
+ cursor: pointer;
4398
+ }
4399
+ .pj-tpl:hover { border-color: #43434f; }
4400
+ .pj-tpl.on { border-color: var(--accent); background: #262536; }
4401
+ .pj-tpl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
4402
+ .pj-tpl-meta { font-size: 11px; font-variant-numeric: tabular-nums; }
4403
+ .pj-shape { grid-row: span 1; justify-self: center; display: block; border: 1.5px solid #8b8b93; border-radius: 2px; }
4404
+ .pj-tpl.on .pj-shape { border-color: #cfc8ff; }
4405
+ .pj-tpl-del { font-size: 11px; color: var(--dim); padding: 0 4px; border-radius: 4px; }
4406
+ .pj-tpl-del:hover { color: #ff9b9e; }
4407
+ .pj-tpl-del[data-armed="1"] { color: #fff; background: var(--danger); }
4408
+ @media (max-width: 760px) {
4409
+ .pj-body { flex-direction: column; }
4410
+ .pj-side { width: auto; border-left: 0; border-top: 1px solid var(--border); max-height: 50%; }
4411
+ }
4412
+
4413
+ /* ── Versions (in the Projects dashboard) ── */
4414
+ .pj-grid.versions { display: block; }
4415
+ .ver-view { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
4416
+ .ver-head { display: flex; align-items: center; gap: 12px; }
4417
+ .ver-head h3 { font-size: 14px; color: #fff; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
4418
+ .ver-save { display: flex; gap: 6px; flex-wrap: wrap; }
4419
+ .ver-save input {
4420
+ background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
4421
+ border-radius: 6px; padding: 6px 9px; font: inherit; font-size: 12px; user-select: text;
4422
+ }
4423
+ .ver-save input:focus, .ver-rename:focus { outline: none; border-color: var(--accent); }
4424
+ .ver-save #verName { flex: 1 1 200px; min-width: 0; }
4425
+ .ver-save #verNote { flex: 2 1 260px; min-width: 0; }
4426
+ .ver-hint { font-size: 11px; margin: 0; }
4427
+ .ver-row {
4428
+ border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2);
4429
+ padding: 9px 11px; display: flex; flex-direction: column; gap: 6px;
4430
+ }
4431
+ .ver-row.final { border-color: #8a6d1f; }
4432
+ .ver-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
4433
+ .ver-num { font: 700 11px/1.6 "Segoe UI", sans-serif; color: #cfc8ff; font-variant-numeric: tabular-nums; }
4434
+ .ver-name { color: #ececf1; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
4435
+ .ver-rename {
4436
+ background: var(--panel); border: 1px solid var(--border); color: var(--text);
4437
+ border-radius: 5px; padding: 2px 6px; font: inherit; font-size: 12px; width: 32ch; user-select: text;
4438
+ }
4439
+ .ver-badge { font: 700 10px/1.6 "Segoe UI", sans-serif; padding: 0 6px; border-radius: 4px; background: #2a2a33; color: var(--dim); }
4440
+ .ver-badge.final { background: #4a3a10; color: #ffd98a; }
4441
+ .ver-meta { font-size: 11px; font-variant-numeric: tabular-nums; margin-left: auto; }
4442
+ .ver-note { font-size: 12px; color: #b9b9c2; white-space: pre-wrap; overflow-wrap: anywhere; }
4443
+ .ver-diff { margin: 0; padding: 6px 10px 6px 24px; background: #17171b; border-radius: 6px; font-size: 12px; color: #c9c9d1; }
4444
+ .ver-diff li { margin: 2px 0; overflow-wrap: anywhere; }
4445
+ .ver-actions { display: flex; gap: 5px; flex-wrap: wrap; }
4446
+ .ver-actions .btn.tiny { font-size: 11px; }
4447
+ .ver-actions .btn:disabled { opacity: .45; cursor: default; }
4448
+ a.btn { text-decoration: none; }
4449
+
4450
+ /* ── Sequences: the menu at the left of the timeline toolbar ── */
4451
+ .seq-btn {
4452
+ max-width: 220px;
4453
+ gap: 4px;
4454
+ margin-right: 6px;
4455
+ }
4456
+ .seq-btn .seq-name {
4457
+ overflow: hidden;
4458
+ text-overflow: ellipsis;
4459
+ white-space: nowrap;
4460
+ max-width: 150px;
4461
+ font-weight: 600;
4462
+ }
4463
+ .seq-btn .seq-count:not(:empty) {
4464
+ padding: 0 5px;
4465
+ border-radius: 8px;
4466
+ background: #ffffff1f;
4467
+ font-size: 10px;
4468
+ line-height: 15px;
4469
+ }
4470
+ .seq-menu { min-width: 260px; }
4471
+ .seq-menu .ctx-item .seq-check {
4472
+ display: inline-block;
4473
+ width: 14px;
4474
+ color: var(--accent);
4475
+ }
4476
+ .seq-menu .ctx-item .seq-row-name {
4477
+ flex: 1;
4478
+ overflow: hidden;
4479
+ text-overflow: ellipsis;
4480
+ white-space: nowrap;
4481
+ max-width: 220px;
4482
+ }
4483
+ .seq-menu .ctx-item kbd { font-variant-numeric: tabular-nums; }
4484
+ .seq-new { min-width: 300px; }
4485
+ .seq-new select.bin-pop-input { width: 100%; }
4486
+ .seq-new .seq-new-copy {
4487
+ display: flex;
4488
+ align-items: center;
4489
+ gap: 6px;
4490
+ margin: 8px 0 2px;
4491
+ font-size: 12px;
4492
+ }
4493
+
4494
+ /* ══ Surface levels: each layer of the layout its own tone, so the structure
4495
+ reads at a glance — the app background, then panel bodies, then the header
4496
+ bars and toolbars on top of each panel, then the controls; the timeline's
4497
+ lanes sit in a darker well under their track headers and ruler. ══ */
4498
+ body { background: var(--bg); }
4499
+ .topbar { background: var(--panel-sub); }
4500
+ .bin-tabs, .tr-head, .cp-head { background: var(--panel-sub); }
4501
+ .panel-head, .bin-tabs.side-tabs, .timeline-toolbar { background: var(--panel-head); border-radius: 8px 8px 0 0; } /* the side tabs are also .bin-tabs */
4502
+ .btn:hover { background-color: #3a3a46; }
4503
+ .track-headers, .track-head { background: #1c1c23; }
4504
+ .ruler { background: #2a2a33; }
4505
+ .tracks-content, .timeline-scroll { background-color: var(--well); }
4506
+ .track:nth-child(even):not(.drop-hint) { background-color: #ffffff05; } /* a drop target keeps its highlight */
4507
+ .insp-section { background: var(--panel-sub); border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; }
@@ -0,0 +1,39 @@
1
+ /* FableCut speech-to-text worker (a module worker started by the editor).
2
+
3
+ Runs Whisper with transformers.js, imported from the CDN URL the editor
4
+ passes (transcribe.js LIBRARY) only when something is transcribed; the
5
+ library and the model files are cached by the browser after the first time.
6
+ One piece of audio at a time (≤ 30 s, 16 kHz mono, planned by
7
+ transcribe.js), so the editor can report progress and stop between pieces.
8
+
9
+ in: {type:"run", id, lib, model, pcm: Float32Array, language: "en" | null}
10
+ out: {type:"progress", status, file, loaded, total} — while the model downloads
11
+ {type:"done", id, chunks:[{text, timestamp:[s, e]}]} · {type:"error", id, error} */
12
+ let asr = null, asrModel = "";
13
+
14
+ async function load(lib, model) {
15
+ if (asr && asrModel === model) return asr;
16
+ const T = await import(lib);
17
+ T.env.allowLocalModels = false;
18
+ asr = await T.pipeline("automatic-speech-recognition", model, {
19
+ dtype: "q8", device: "wasm",
20
+ progress_callback: (p) => {
21
+ if (!p || (p.status !== "progress" && p.status !== "initiate" && p.status !== "done")) return;
22
+ self.postMessage({ type: "progress", status: p.status, file: p.file || "", loaded: p.loaded || 0, total: p.total || 0 });
23
+ },
24
+ });
25
+ asrModel = model;
26
+ return asr;
27
+ }
28
+
29
+ self.onmessage = async (e) => {
30
+ const m = e.data || {};
31
+ if (m.type !== "run") return;
32
+ try {
33
+ const run = await load(m.lib, m.model);
34
+ const out = await run(m.pcm, { return_timestamps: "word", ...(m.language ? { language: m.language, task: "transcribe" } : {}) });
35
+ self.postMessage({ type: "done", id: m.id, chunks: (out && out.chunks) || [] });
36
+ } catch (err) {
37
+ self.postMessage({ type: "error", id: m.id, error: String((err && err.message) || err) });
38
+ }
39
+ };