@lingjingai/script-editor 0.1.15 → 0.1.17
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/INTEGRATION.md +2 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +445 -202
- package/dist/index.js.map +1 -1
- package/dist/style.css +52 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -350,9 +350,16 @@
|
|
|
350
350
|
|
|
351
351
|
/* ── Top bar ─────────────────────────────────────────────────────────── */
|
|
352
352
|
.lj-se-topbar { display: flex; height: 36px; flex-shrink: 0; align-items: center; gap: 8px; border-bottom: 1px solid var(--lj-se-border); padding: 0 16px; background: var(--lj-se-bg); }
|
|
353
|
-
.lj-se-topbar-left { min-width: 0; flex: 1; }
|
|
353
|
+
.lj-se-topbar-left { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
|
|
354
354
|
.lj-se-topbar-right { display: flex; align-items: center; gap: 8px; }
|
|
355
355
|
.lj-se-topbar-undo { display: inline-flex; gap: 2px; }
|
|
356
|
+
/* script title — the document name, the prominent thing on the left. As an
|
|
357
|
+
EditableText it carries this class on both the display span and the <input>. */
|
|
358
|
+
.lj-se-topbar-title { font-size: 14px; font-weight: 600; color: var(--lj-se-fg); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; }
|
|
359
|
+
.lj-se-topbar-title--ro { cursor: default; }
|
|
360
|
+
.lj-se-topbar-ctx { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; }
|
|
361
|
+
.lj-se-topbar-sep { color: var(--lj-se-border); font-size: 13px; }
|
|
362
|
+
.lj-se-topbar-actions { display: inline-flex; align-items: center; gap: 4px; }
|
|
356
363
|
.lj-se-ctx { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
|
|
357
364
|
.lj-se-ctx-kicker { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lj-se-muted-fg); }
|
|
358
365
|
.lj-se-ctx-name { font-size: 12px; font-weight: 500; color: var(--lj-se-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -650,6 +657,50 @@
|
|
|
650
657
|
.lj-se-refgrid-scene:hover { background: var(--lj-se-card); box-shadow: 0 0 0 1px var(--lj-se-border) inset; }
|
|
651
658
|
.lj-se-refgrid-scene.is-current { background: color-mix(in oklab, var(--lj-se-primary) 15%, transparent); color: var(--lj-se-primary); box-shadow: 0 0 0 1px color-mix(in oklab, var(--lj-se-primary) 40%, transparent) inset; }
|
|
652
659
|
|
|
660
|
+
/* ── 状态泳道时间轴(state→scene 反查,横向滚动)──────────────────────── */
|
|
661
|
+
.lj-se-sttl { margin-top: 12px; border: 1px solid var(--lj-se-border); border-radius: 8px; overflow-x: auto; overflow-y: hidden; }
|
|
662
|
+
.lj-se-sttl-axis,
|
|
663
|
+
.lj-se-sttl-lane { display: flex; width: max-content; min-width: 100%; }
|
|
664
|
+
.lj-se-sttl-axis { border-bottom: 1px solid var(--lj-se-border); }
|
|
665
|
+
.lj-se-sttl-lane { border-bottom: 1px solid var(--lj-se-border); }
|
|
666
|
+
.lj-se-sttl-lane:last-child { border-bottom: 0; }
|
|
667
|
+
/* sticky left column: state names stay pinned while the track scrolls */
|
|
668
|
+
.lj-se-sttl-axis-lab,
|
|
669
|
+
.lj-se-sttl-lane-head { position: sticky; left: 0; z-index: 2; flex: none; width: 116px; box-sizing: border-box; border-right: 1px solid var(--lj-se-border); }
|
|
670
|
+
.lj-se-sttl-axis-lab { padding: 6px 10px; font-size: 10.5px; font-weight: 600; color: var(--lj-se-muted-fg); background: color-mix(in oklab, var(--lj-se-muted) 45%, var(--lj-se-card)); }
|
|
671
|
+
.lj-se-sttl-lane-head { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; min-height: 36px; font-size: 12px; font-weight: 600; color: var(--lj-se-fg); background: var(--lj-se-card); }
|
|
672
|
+
.lj-se-sttl-lane-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
673
|
+
.lj-se-sttl-lane-count { margin-left: auto; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; color: var(--lj-se-muted-fg); }
|
|
674
|
+
.lj-se-sttl-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
|
|
675
|
+
.lj-se-sttl-axis-eps { display: flex; flex: none; background: color-mix(in oklab, var(--lj-se-muted) 45%, transparent); }
|
|
676
|
+
.lj-se-sttl-ep { flex: none; box-sizing: border-box; text-align: center; padding: 6px 2px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 600; color: var(--lj-se-fg); border-left: 1px solid var(--lj-se-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
677
|
+
.lj-se-sttl-track { position: relative; flex: none; min-height: 36px; }
|
|
678
|
+
.lj-se-sttl-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid color-mix(in oklab, var(--lj-se-border) 55%, transparent); }
|
|
679
|
+
.lj-se-sttl-flow { position: absolute; top: 50%; height: 2px; transform: translateY(-50%); background: color-mix(in oklab, var(--cue) 35%, transparent); }
|
|
680
|
+
.lj-se-sttl-node { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 21px; height: 21px; border: 0; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; font-weight: 600; color: var(--cue); background: color-mix(in oklab, var(--cue) 18%, transparent); box-shadow: 0 0 0 1px color-mix(in oklab, var(--cue) 45%, transparent) inset; }
|
|
681
|
+
.lj-se-sttl-node:hover { background: color-mix(in oklab, var(--cue) 32%, transparent); }
|
|
682
|
+
|
|
683
|
+
/* ── 场内容悬浮预览卡(hover 时随节点弹出,只读剧本格式)─────────────── */
|
|
684
|
+
.lj-se-spv { position: fixed; z-index: 1000; box-sizing: border-box; display: flex; flex-direction: column; border: 1px solid var(--lj-se-border); border-radius: 10px; background: var(--lj-se-popover); color: var(--lj-se-fg); box-shadow: 0 10px 30px -8px oklch(0 0 0 / 0.28), 0 2px 8px -2px oklch(0 0 0 / 0.18); overflow: hidden; }
|
|
685
|
+
.lj-se-spv-head { flex: none; display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--lj-se-border); background: color-mix(in oklab, var(--lj-se-muted) 40%, transparent); }
|
|
686
|
+
.lj-se-spv-num { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; font-weight: 700; color: var(--lj-se-fg); white-space: nowrap; }
|
|
687
|
+
.lj-se-spv-slug { font-size: 12px; color: var(--lj-se-muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
688
|
+
.lj-se-spv-slug-env { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; }
|
|
689
|
+
.lj-se-spv-body { overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.6; }
|
|
690
|
+
.lj-se-spv-empty { margin: 0; color: var(--lj-se-muted-fg); font-size: 12px; font-style: italic; }
|
|
691
|
+
.lj-se-spv-action { margin: 0; color: var(--lj-se-fg); display: flex; gap: 6px; }
|
|
692
|
+
.lj-se-spv-mark { color: var(--lj-se-muted-fg); flex: none; }
|
|
693
|
+
.lj-se-spv-narr { margin: 0; color: var(--lj-se-muted-fg); font-style: italic; padding-left: 14px; }
|
|
694
|
+
.lj-se-spv-cue { margin: 0; color: var(--lj-se-fg); border-radius: 5px; }
|
|
695
|
+
.lj-se-spv-cue.is-inner { color: var(--lj-se-muted-fg); }
|
|
696
|
+
/* the card's own asset speaks here — <mark>-like wash in its cue color + a left
|
|
697
|
+
accent bar, so you can locate the asset's lines at a glance. */
|
|
698
|
+
.lj-se-spv-cue.is-mine { margin: 0 -6px; padding: 3px 6px; background: color-mix(in oklab, var(--mine) 8%, transparent); }
|
|
699
|
+
.lj-se-spv-speaker { font-weight: 700; }
|
|
700
|
+
.lj-se-spv-delivery { font-weight: 400; font-size: 11px; opacity: 0.8; }
|
|
701
|
+
.lj-se-spv-tag { color: var(--lj-se-muted-fg); font-size: 12px; }
|
|
702
|
+
.lj-se-spv-colon { color: var(--lj-se-muted-fg); }
|
|
703
|
+
|
|
653
704
|
/* ── chip name as scene→asset link ───────────────────────────────────── */
|
|
654
705
|
.lj-se-chip-name--link { border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: 500; padding: 0; }
|
|
655
706
|
.lj-se-chip-name--link:hover { text-decoration: underline dotted; text-underline-offset: 2px; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingjingai/script-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Pure, business-decoupled screenplay (剧本) editor: value:ScriptProject + onEdit(patch); dual-format (standard/asian), virtualized single-stream, click-to-edit; bundled CSS, business injected via adapters.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|