@niracler/encore 0.3.0 → 0.4.1
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 +42 -108
- package/README.zh-CN.md +42 -108
- package/bin/encore.mjs +9 -100
- package/package.json +3 -2
- package/player/encore-player.css +44 -48
- package/player/encore-player.js +293 -313
- package/schema/session.schema.json +10 -2
- package/skills/encore/SKILL.md +2 -2
- package/src/antigravity-context.mjs +122 -0
- package/src/antigravity-context.proto +43 -0
- package/src/antigravity.mjs +160 -0
- package/src/common.mjs +7 -4
- package/src/detect.mjs +96 -51
- package/src/external-files.mjs +22 -5
- package/src/i18n.mjs +9 -9
- package/src/index.d.ts +8 -2
- package/src/index.mjs +17 -6
- package/src/player-runtime.mjs +109 -128
- package/src/render.mjs +54 -87
- package/src/session-picker.mjs +163 -0
- package/src/timeline.mjs +117 -85
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;
|
|
@@ -487,9 +477,11 @@ html.js-session .session-log:not(.is-staged) > * {
|
|
|
487
477
|
.lc-overview-pct b { font-size: 16px; font-weight: 600; color: #111827; margin-right: 3px; letter-spacing: -.01em; }
|
|
488
478
|
|
|
489
479
|
.lc-stacked { display: flex; width: 100%; height: 12px; border-radius: 4px; overflow: hidden; background: #e5e7eb; position: relative; }
|
|
480
|
+
.lc-stacked[hidden] { display: none; }
|
|
490
481
|
.lc-stacked > div { height: 100%; }
|
|
491
482
|
.lc-stacked-seg { cursor: pointer; }
|
|
492
483
|
.session-app.is-ready .lc-stacked-seg { transition: width .42s cubic-bezier(.22, 1, .36, 1), filter .2s ease, opacity .2s ease; }
|
|
484
|
+
.lc-stacked-seg.is-used { background: var(--dsw-alias-label-secondary); cursor: default; }
|
|
493
485
|
.lc-stacked-seg.is-sys, .session-cat-dot.is-sys { background: var(--color-indigo-500); }
|
|
494
486
|
.lc-stacked-seg.is-schema, .session-cat-dot.is-schema { background: var(--color-amber-500); }
|
|
495
487
|
.lc-stacked-seg.is-user, .session-cat-dot.is-user { background: var(--color-green-500); }
|
|
@@ -501,11 +493,6 @@ html.js-session .session-log:not(.is-staged) > * {
|
|
|
501
493
|
.lc-stacked-seg-on { filter: brightness(1.16); }
|
|
502
494
|
.lc-stacked-dim .lc-stacked-seg { opacity: 0.32; }
|
|
503
495
|
.lc-stacked-dim .lc-stacked-seg-on { opacity: 1; }
|
|
504
|
-
.lc-reserve { position: absolute; top: 0; bottom: 0; z-index: 1; pointer-events: auto; cursor: help; }
|
|
505
|
-
.lc-reserve-headroom { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--dsw-alias-state-warn-primary) 28%, transparent) 0 5px, transparent 5px 10px); }
|
|
506
|
-
.lc-reserve-output { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--dsw-alias-state-business-primary) 28%, transparent) 0 5px, transparent 5px 10px); }
|
|
507
|
-
.lc-trigger { position: absolute; top: 0; bottom: 0; width: 9px; transform: translateX(-50%); z-index: 2; pointer-events: auto; cursor: help; }
|
|
508
|
-
.lc-trigger::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--dsw-alias-state-warn-primary); }
|
|
509
496
|
|
|
510
497
|
.lc-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin-top: 12px; }
|
|
511
498
|
.lc-chip { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--dsw-alias-label-primary); padding: 2px 4px; margin: 0 -4px; border-radius: 5px; font-size: 11.5px; cursor: pointer; transition: background-color .15s ease; }
|
|
@@ -577,9 +564,6 @@ html.js-session .session-log:not(.is-staged) > * {
|
|
|
577
564
|
.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
565
|
.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
566
|
.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
567
|
.session-frame-deck { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; width: 100%; }
|
|
584
568
|
.session-frame-deck[hidden] { display: none !important; }
|
|
585
569
|
.session-artifact-cards { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
|
|
@@ -730,38 +714,50 @@ html.js-session .session-log:not(.is-staged) > * {
|
|
|
730
714
|
|
|
731
715
|
/* Bottom Segmented Chapter Timeline & Lightbox */
|
|
732
716
|
.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
|
-
|
|
717
|
+
.session-tl-track-wrap { flex: 1; min-width: 0; position: relative; padding: 0; }
|
|
718
|
+
.session-tl-pins { position: relative; height: 20px; }
|
|
719
|
+
.session-tl-pin {
|
|
720
|
+
visibility: hidden; position: absolute; display: flex; align-items: center; gap: 3px;
|
|
721
|
+
transform: none; max-width: min(18ch, 100%); padding: 1px 4px; border: 1px solid;
|
|
722
|
+
border-radius: 4px; cursor: pointer; white-space: nowrap; font: 500 10.5px/1.4 system-ui, sans-serif;
|
|
723
|
+
}
|
|
724
|
+
.session-tl-caption { overflow: hidden; text-overflow: ellipsis; }
|
|
725
|
+
.session-tl-pin[data-kind="frame"] { color: #6d28d9; border-color: #ddd6fe; background: #faf5ff; }
|
|
726
|
+
.session-tl-pin[data-kind="doc"] { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
|
|
727
|
+
.session-tl-pin[data-kind="compress"] { color: #92400e; border-color: #fcd34d; background: #fffbeb; }
|
|
728
|
+
.session-tl-pin.is-visible { visibility: visible; }
|
|
729
|
+
.session-tl-pin.is-compact { padding-inline: 2px; }
|
|
730
|
+
.session-tl-pin.is-compact .session-tl-caption { display: none; }
|
|
731
|
+
.session-tl-pin[data-kind="turn"] { top: 6px; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #94a3b8; }
|
|
732
|
+
.session-tl-pin.is-on { outline: 1px solid #2563eb; }
|
|
733
|
+
.session-tl-rail { position: relative; height: 24px; }
|
|
734
|
+
.session-tl-cells { height: 100%; display: grid; grid-template-columns: repeat(var(--tl-count), minmax(0, 1fr)); align-items: center; }
|
|
735
|
+
.session-tl-cell { margin-inline: min(0.8px, 10%); height: 6px; border-radius: 3px; background: #e2e8f0; }
|
|
736
|
+
.session-tl-cell.frame { background: #ddd6fe; }
|
|
737
|
+
.session-tl-cell.doc { background: #bae6fd; }
|
|
738
|
+
.session-tl-cell.compress { background: #fbbf24; height: 8px; }
|
|
739
|
+
.session-tl-cell.is-past { background: #c3d6f7; }
|
|
740
|
+
.session-tl-cell.is-active { background: #2563eb; height: 12px; min-width: 2px; }
|
|
741
|
+
.session-tl-range {
|
|
742
|
+
position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
|
|
743
|
+
appearance: none; cursor: pointer; background: transparent; border: 0;
|
|
744
|
+
}
|
|
745
|
+
.session-tl-range::-webkit-slider-runnable-track { background: transparent; }
|
|
746
|
+
.session-tl-range::-webkit-slider-thumb { appearance: none; width: calc(100% / var(--tl-count)); height: 24px; background: transparent; }
|
|
747
|
+
.session-tl-range::-moz-range-track, .session-tl-range::-moz-range-progress { background: transparent; }
|
|
748
|
+
.session-tl-range::-moz-range-thumb { width: calc(100% / var(--tl-count)); height: 24px; background: transparent; border: 0; }
|
|
749
|
+
.session-tl-range:focus-visible, .session-tl-pin:focus-visible { outline: 2px solid #1e40af; outline-offset: 2px; }
|
|
750
|
+
@media (forced-colors: active) {
|
|
751
|
+
.session-tl-cell { background: GrayText; }
|
|
752
|
+
.session-tl-cell.is-active { forced-color-adjust: none; background: Highlight; }
|
|
753
|
+
}
|
|
754
|
+
.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
755
|
.session-tl-pop[hidden] { display: none !important; }
|
|
760
756
|
.session-tl-pop-thumb { flex: none; width: 40px; height: 54px; border-radius: 5px; overflow: hidden; border: 1px solid #e5e7eb; background: #f8fafc; }
|
|
761
757
|
.session-tl-pop-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
762
758
|
.session-tl-pop-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
763
759
|
.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
|
|
760
|
+
.session-tl-pop-meta b { color: #111827; font-size: 12px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; max-width: 190px; }
|
|
765
761
|
.session-tl-pop-meta span { color: #2563eb; font: 500 10.5px/1.25 ui-monospace, "SF Mono", Menlo, monospace; }
|
|
766
762
|
|
|
767
763
|
.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; }
|