@niracler/encore 0.3.0 → 0.4.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/README.md +41 -109
- package/README.zh-CN.md +41 -109
- package/bin/encore.mjs +9 -100
- package/package.json +2 -2
- package/player/encore-player.css +42 -43
- package/player/encore-player.js +145 -201
- package/schema/session.schema.json +1 -1
- package/skills/encore/SKILL.md +2 -2
- package/src/antigravity.mjs +162 -0
- package/src/common.mjs +5 -2
- package/src/detect.mjs +96 -51
- package/src/external-files.mjs +22 -5
- package/src/i18n.mjs +1 -3
- package/src/index.d.ts +5 -2
- package/src/index.mjs +17 -6
- package/src/player-runtime.mjs +95 -121
- package/src/render.mjs +35 -70
- package/src/session-picker.mjs +162 -0
- package/src/timeline.mjs +12 -5
package/player/encore-player.css
CHANGED
|
@@ -95,6 +95,8 @@
|
|
|
95
95
|
border-bottom: 1px solid #e5e7eb;
|
|
96
96
|
background: #ffffff;
|
|
97
97
|
}
|
|
98
|
+
.session-back { flex: none; color: #475569; font-size: 13px; text-decoration: none; }
|
|
99
|
+
.session-back:hover, .session-back:focus-visible { color: #1e40af; text-decoration: underline; }
|
|
98
100
|
.session-topbar-left {
|
|
99
101
|
display: flex;
|
|
100
102
|
align-items: center;
|
|
@@ -329,19 +331,7 @@ html.js-session .session-log:not(.is-staged) > * {
|
|
|
329
331
|
border-color: rgb(122, 170, 255);
|
|
330
332
|
box-shadow: 0 4px 22px rgba(65, 118, 230, .1);
|
|
331
333
|
}
|
|
332
|
-
|
|
333
|
-
position: absolute;
|
|
334
|
-
left: 0;
|
|
335
|
-
right: 0;
|
|
336
|
-
bottom: -1px;
|
|
337
|
-
height: 2px;
|
|
338
|
-
background: rgb(65, 118, 230);
|
|
339
|
-
opacity: 0;
|
|
340
|
-
transform: scaleX(0);
|
|
341
|
-
transform-origin: left center;
|
|
342
|
-
transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
|
|
343
|
-
pointer-events: none;
|
|
344
|
-
}
|
|
334
|
+
|
|
345
335
|
.session-composer-editor {
|
|
346
336
|
min-height: 24px;
|
|
347
337
|
max-height: 132px;
|
|
@@ -577,9 +567,6 @@ html.js-session .session-log:not(.is-staged) > * {
|
|
|
577
567
|
.session-ai .session-bubble { width: 100%; max-width: none; padding: 2px 0; border-radius: 0; background: transparent; font-size: 14.5px; line-height: 1.72; color: #111827; }
|
|
578
568
|
.session-entry[data-step] { position: relative; cursor: pointer; border: 1px solid transparent; border-radius: 10px; padding: 6px 10px; margin: 0 -10px; transition: background-color .16s ease, border-color .16s ease; }
|
|
579
569
|
.session-entry[data-step]:hover { background: #fafafa; }
|
|
580
|
-
.session-entry.is-selected, .session-entry[data-step].is-selected:hover { background: #f8fafc; border-color: #cbd5e1; }
|
|
581
|
-
.session-you.is-selected .session-bubble { background: rgb(228, 237, 253); box-shadow: none; }
|
|
582
|
-
.session-inspect-tag { position: absolute; top: -9px; right: 10px; z-index: 2; padding: 1px 8px; border-radius: 999px; background: #ffffff; border: 1px solid #cbd5e1; color: #2563eb; font: 500 10.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); pointer-events: none; }
|
|
583
570
|
.session-frame-deck { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; width: 100%; }
|
|
584
571
|
.session-frame-deck[hidden] { display: none !important; }
|
|
585
572
|
.session-artifact-cards { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
|
|
@@ -730,38 +717,50 @@ html.js-session .session-log:not(.is-staged) > * {
|
|
|
730
717
|
|
|
731
718
|
/* Bottom Segmented Chapter Timeline & Lightbox */
|
|
732
719
|
.session-timeline-bar { position: relative; flex: none; z-index: 5; display: flex; align-items: center; gap: 18px; min-height: 52px; padding: 8px 20px 10px; border-top: 1px solid #e5e7eb; background: #fcfcfd; }
|
|
733
|
-
.session-
|
|
734
|
-
.session-tl-
|
|
735
|
-
.session-tl-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
.session-tl-
|
|
741
|
-
.session-tl-pin
|
|
742
|
-
.session-tl-pin
|
|
743
|
-
.session-tl-pin
|
|
744
|
-
.session-tl-pin.is-
|
|
745
|
-
.session-tl-pin.is-
|
|
746
|
-
.session-tl-pin.is-
|
|
747
|
-
.session-tl-pin
|
|
748
|
-
.session-tl-pin.is-
|
|
749
|
-
.session-tl-
|
|
750
|
-
.session-tl-
|
|
751
|
-
.session-tl-
|
|
752
|
-
.session-tl-
|
|
753
|
-
.session-tl-
|
|
754
|
-
.session-tl-
|
|
755
|
-
.session-tl-
|
|
756
|
-
.session-tl-
|
|
757
|
-
.session-tl-
|
|
758
|
-
|
|
720
|
+
.session-tl-track-wrap { flex: 1; min-width: 0; position: relative; padding: 0; }
|
|
721
|
+
.session-tl-pins { position: relative; height: 20px; }
|
|
722
|
+
.session-tl-pin {
|
|
723
|
+
visibility: hidden; position: absolute; display: flex; align-items: center; gap: 3px;
|
|
724
|
+
transform: none; max-width: min(18ch, 100%); padding: 1px 4px; border: 1px solid;
|
|
725
|
+
border-radius: 4px; cursor: pointer; white-space: nowrap; font: 500 10.5px/1.4 system-ui, sans-serif;
|
|
726
|
+
}
|
|
727
|
+
.session-tl-caption { overflow: hidden; text-overflow: ellipsis; }
|
|
728
|
+
.session-tl-pin[data-kind="frame"] { color: #6d28d9; border-color: #ddd6fe; background: #faf5ff; }
|
|
729
|
+
.session-tl-pin[data-kind="doc"] { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
|
|
730
|
+
.session-tl-pin[data-kind="compress"] { color: #92400e; border-color: #fcd34d; background: #fffbeb; }
|
|
731
|
+
.session-tl-pin.is-visible { visibility: visible; }
|
|
732
|
+
.session-tl-pin.is-compact { padding-inline: 2px; }
|
|
733
|
+
.session-tl-pin.is-compact .session-tl-caption { display: none; }
|
|
734
|
+
.session-tl-pin[data-kind="turn"] { top: 6px; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #94a3b8; }
|
|
735
|
+
.session-tl-pin.is-on { outline: 1px solid #2563eb; }
|
|
736
|
+
.session-tl-rail { position: relative; height: 24px; }
|
|
737
|
+
.session-tl-cells { height: 100%; display: grid; grid-template-columns: repeat(var(--tl-count), minmax(0, 1fr)); align-items: center; }
|
|
738
|
+
.session-tl-cell { margin-inline: min(0.8px, 10%); height: 6px; border-radius: 3px; background: #e2e8f0; }
|
|
739
|
+
.session-tl-cell.frame { background: #ddd6fe; }
|
|
740
|
+
.session-tl-cell.doc { background: #bae6fd; }
|
|
741
|
+
.session-tl-cell.compress { background: #fbbf24; height: 8px; }
|
|
742
|
+
.session-tl-cell.is-past { background: #c3d6f7; }
|
|
743
|
+
.session-tl-cell.is-active { background: #2563eb; height: 12px; min-width: 2px; }
|
|
744
|
+
.session-tl-range {
|
|
745
|
+
position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
|
|
746
|
+
appearance: none; cursor: pointer; background: transparent; border: 0;
|
|
747
|
+
}
|
|
748
|
+
.session-tl-range::-webkit-slider-runnable-track { background: transparent; }
|
|
749
|
+
.session-tl-range::-webkit-slider-thumb { appearance: none; width: calc(100% / var(--tl-count)); height: 24px; background: transparent; }
|
|
750
|
+
.session-tl-range::-moz-range-track, .session-tl-range::-moz-range-progress { background: transparent; }
|
|
751
|
+
.session-tl-range::-moz-range-thumb { width: calc(100% / var(--tl-count)); height: 24px; background: transparent; border: 0; }
|
|
752
|
+
.session-tl-range:focus-visible, .session-tl-pin:focus-visible { outline: 2px solid #1e40af; outline-offset: 2px; }
|
|
753
|
+
@media (forced-colors: active) {
|
|
754
|
+
.session-tl-cell { background: GrayText; }
|
|
755
|
+
.session-tl-cell.is-active { forced-color-adjust: none; background: Highlight; }
|
|
756
|
+
}
|
|
757
|
+
.session-tl-pop { position: absolute; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 12; display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(260px, 100%); padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #ffffff; box-shadow: 0 10px 26px rgba(15, 23, 42, .12); pointer-events: none; }
|
|
759
758
|
.session-tl-pop[hidden] { display: none !important; }
|
|
760
759
|
.session-tl-pop-thumb { flex: none; width: 40px; height: 54px; border-radius: 5px; overflow: hidden; border: 1px solid #e5e7eb; background: #f8fafc; }
|
|
761
760
|
.session-tl-pop-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
762
761
|
.session-tl-pop-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
763
762
|
.session-tl-pop-meta small { color: #6b7280; font: 500 10.5px/1.25 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
|
|
764
|
-
.session-tl-pop-meta b { color: #111827; font-size: 12px; font-weight: 600; line-height: 1.35; overflow
|
|
763
|
+
.session-tl-pop-meta b { color: #111827; font-size: 12px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; max-width: 190px; }
|
|
765
764
|
.session-tl-pop-meta span { color: #2563eb; font: 500 10.5px/1.25 ui-monospace, "SF Mono", Menlo, monospace; }
|
|
766
765
|
|
|
767
766
|
.session-lightbox { border: 1px solid #e5e7eb; border-radius: 14px; padding: 0; max-width: min(92vw, 960px); max-height: 90dvh; background: #ffffff; color: #111827; box-shadow: 0 24px 60px rgba(15, 23, 42, .24); overflow: hidden; }
|