feat: add live Neovim checkpoint views
This commit is contained in:
+1807
-4
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,254 @@
|
||||
.viewer-chrome {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 80;
|
||||
width: 100%;
|
||||
}
|
||||
.viewer-chrome .topbar {
|
||||
position: relative;
|
||||
top: auto;
|
||||
}
|
||||
.topbar-nvim-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
gap: 6px;
|
||||
}
|
||||
.topbar-nvim-meta {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
min-width: 0;
|
||||
max-width: min(44vw, 720px);
|
||||
gap: 6px;
|
||||
}
|
||||
.topbar-nvim-meta strong,
|
||||
.topbar-nvim-meta small {
|
||||
overflow: auto;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.topbar-nvim-meta strong {
|
||||
color: #263238;
|
||||
font: 700 12px/1.25 system-ui, sans-serif;
|
||||
}
|
||||
.topbar-nvim-meta small {
|
||||
color: #66747a;
|
||||
font: 500 10px/1.25 system-ui, sans-serif;
|
||||
}
|
||||
.viewer-nvim-toggle {
|
||||
border: 1px solid #68747a;
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
color: #263238;
|
||||
padding: 2px 8px;
|
||||
font: 650 16px/1.3 system-ui, sans-serif;
|
||||
cursor: pointer;
|
||||
}
|
||||
.viewer-nvim-toggle[aria-pressed="true"] {
|
||||
border-color: #267697;
|
||||
background: #eaf6fb;
|
||||
color: #174d64;
|
||||
}
|
||||
.nvim-panel {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #52616a;
|
||||
background: #11171a;
|
||||
color: #e7eef1;
|
||||
box-shadow: 0 5px 16px #0004;
|
||||
font: 12px/1.3 system-ui, sans-serif;
|
||||
}
|
||||
.nvim-status {
|
||||
flex: none;
|
||||
border: 1px solid #66757c;
|
||||
border-radius: 999px;
|
||||
padding: 1px 6px;
|
||||
color: #c9d3d8;
|
||||
font: 750 9px/1.35 ui-monospace, monospace;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
.nvim-status--connected,
|
||||
.nvim-status--ready {
|
||||
border-color: #31a86d;
|
||||
background: #173b2a;
|
||||
color: #8aefb7;
|
||||
}
|
||||
.nvim-status--connecting,
|
||||
.nvim-status--replaying,
|
||||
.nvim-status--verifying {
|
||||
border-color: #c38f2a;
|
||||
background: #3e321b;
|
||||
color: #ffd47d;
|
||||
}
|
||||
.nvim-status--failed,
|
||||
.nvim-status--offline,
|
||||
.nvim-status--unselected {
|
||||
border-color: #a34b4b;
|
||||
background: #3b2020;
|
||||
color: #ffaaaa;
|
||||
}
|
||||
.nvim-control-indicator {
|
||||
flex: none;
|
||||
border: 1px solid #60747e;
|
||||
border-radius: 3px;
|
||||
background: #222e34;
|
||||
color: #b9c6cc;
|
||||
padding: 3px 8px;
|
||||
font: 700 10px/1.2 ui-monospace, monospace;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
.nvim-control-indicator.is-active {
|
||||
border-color: #3cb3e2;
|
||||
background: #17465a;
|
||||
color: #d9f5ff;
|
||||
}
|
||||
.nvim-screen-scroll {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
height: var(--nvim-panel-height, 75vh);
|
||||
max-height: none;
|
||||
min-height: 240px;
|
||||
border: 2px solid transparent;
|
||||
overflow: hidden;
|
||||
background: #101315;
|
||||
outline: none;
|
||||
scrollbar-color: #58666d #171d20;
|
||||
}
|
||||
.nvim-screen-scroll[data-control="true"] {
|
||||
border-color: #35b9ef;
|
||||
}
|
||||
.nvim-screen {
|
||||
display: block;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
image-rendering: auto;
|
||||
}
|
||||
.nvim-screen:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
.nvim-screen-empty {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
gap: 5px;
|
||||
padding: 16px;
|
||||
color: #9cabb2;
|
||||
text-align: center;
|
||||
}
|
||||
.nvim-screen-empty strong {
|
||||
color: #e0e8eb;
|
||||
font: 750 11px/1.3 ui-monospace, monospace;
|
||||
}
|
||||
.nvim-resize-handle {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
border-top: 1px solid #46565e;
|
||||
background: #182126;
|
||||
cursor: ns-resize;
|
||||
touch-action: none;
|
||||
}
|
||||
.nvim-resize-handle::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 50%;
|
||||
width: min(160px, 22vw);
|
||||
height: 3px;
|
||||
border-radius: 999px;
|
||||
background: #6c7e87;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.nvim-resize-handle:hover,
|
||||
.nvim-resize-handle:focus-visible {
|
||||
background: #23323a;
|
||||
outline: none;
|
||||
}
|
||||
.nvim-resize-handle:hover::after,
|
||||
.nvim-resize-handle:focus-visible::after {
|
||||
background: #35b9ef;
|
||||
}
|
||||
.shortcut-help-backdrop {
|
||||
position: fixed;
|
||||
z-index: 200;
|
||||
inset: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 20px;
|
||||
background: #10171dcc;
|
||||
}
|
||||
.shortcut-help {
|
||||
width: min(680px, calc(100vw - 40px));
|
||||
max-height: calc(100vh - 40px);
|
||||
overflow: auto;
|
||||
border: 1px solid #71818a;
|
||||
border-radius: 6px;
|
||||
background: #f8fafb;
|
||||
color: #172127;
|
||||
box-shadow: 0 18px 60px #0008;
|
||||
font: 14px/1.4 system-ui, sans-serif;
|
||||
}
|
||||
.shortcut-help > header {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 16px 18px;
|
||||
border-bottom: 1px solid #c8d1d5;
|
||||
background: #e8eef1;
|
||||
}
|
||||
.shortcut-help header small {
|
||||
color: #52646d;
|
||||
font: 750 10px/1.2 ui-monospace, monospace;
|
||||
letter-spacing: .08em;
|
||||
}
|
||||
.shortcut-help h2 {
|
||||
margin: 4px 0 0;
|
||||
font-size: 17px;
|
||||
}
|
||||
.shortcut-help header button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: 1px solid #71818a;
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
font: 22px/1 system-ui, sans-serif;
|
||||
cursor: pointer;
|
||||
}
|
||||
.shortcut-help dl {
|
||||
margin: 0;
|
||||
padding: 10px 18px;
|
||||
}
|
||||
.shortcut-help dl > div {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(180px, .8fr) 1.5fr;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #dde3e6;
|
||||
}
|
||||
.shortcut-help dt,
|
||||
.shortcut-help dd {
|
||||
margin: 0;
|
||||
}
|
||||
.shortcut-help kbd {
|
||||
display: inline-block;
|
||||
border: 1px solid #839198;
|
||||
border-bottom-width: 2px;
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
padding: 3px 7px;
|
||||
font: 700 12px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.shortcut-help > p {
|
||||
margin: 0;
|
||||
padding: 4px 18px 16px;
|
||||
color: #526068;
|
||||
}
|
||||
|
||||
.memory-react {
|
||||
border: 1px solid #555;
|
||||
background: #fff;
|
||||
@@ -316,6 +567,550 @@
|
||||
color: #888;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.uml-snapshot-header p {
|
||||
max-width: 620px;
|
||||
margin: 2px 0 0;
|
||||
color: #555;
|
||||
font-size: 10px;
|
||||
}
|
||||
.uml-phase-actions,
|
||||
.uml-step-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px;
|
||||
}
|
||||
.uml-phase-actions {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.uml-phase-actions button,
|
||||
.uml-step-actions button,
|
||||
.uml-snapshot-cursor button {
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 2px;
|
||||
background: #fff;
|
||||
color: #444;
|
||||
cursor: pointer;
|
||||
font: 600 9px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-phase-actions button {
|
||||
padding: 3px 7px;
|
||||
}
|
||||
.uml-phase-actions button[aria-pressed="true"] {
|
||||
border-color: #287495;
|
||||
background: #edf7fb;
|
||||
color: #174d64;
|
||||
}
|
||||
.uml-step-actions {
|
||||
min-height: 25px;
|
||||
padding: 3px 8px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
background: #fcfcfc;
|
||||
}
|
||||
.uml-step-actions > span {
|
||||
margin-right: 4px;
|
||||
color: #555;
|
||||
font: 700 9px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-step-actions button {
|
||||
min-width: 25px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
.uml-step-actions button[data-completed="true"] {
|
||||
border-color: #62a47f;
|
||||
background: #edf8f1;
|
||||
color: #14613a;
|
||||
}
|
||||
.uml-step-actions button[aria-pressed="true"] {
|
||||
border-color: #287495;
|
||||
background: #287495;
|
||||
color: #fff;
|
||||
}
|
||||
.uml-snapshot-layout {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.uml-step-canvas {
|
||||
min-width: 0;
|
||||
}
|
||||
.uml-step-canvas .uml-svg-host svg {
|
||||
max-height: 720px;
|
||||
}
|
||||
.uml-step-hit {
|
||||
cursor: pointer;
|
||||
fill: transparent;
|
||||
}
|
||||
.uml-step-hit-active {
|
||||
fill: #3ea6ce !important;
|
||||
fill-opacity: 0.08 !important;
|
||||
}
|
||||
.uml-step-element {
|
||||
transition: fill 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
|
||||
}
|
||||
line.uml-step-element-completed:not(.uml-step-element-active) {
|
||||
stroke: #258154 !important;
|
||||
stroke-width: 1.8px !important;
|
||||
}
|
||||
polygon.uml-step-element-completed:not(.uml-step-element-active) {
|
||||
fill: #258154 !important;
|
||||
stroke: #258154 !important;
|
||||
}
|
||||
text.uml-step-element-completed:not(.uml-step-element-active) {
|
||||
fill: #1d7049 !important;
|
||||
}
|
||||
line.uml-step-element-active {
|
||||
stroke: #087ca8 !important;
|
||||
stroke-width: 2.6px !important;
|
||||
}
|
||||
polygon.uml-step-element-active {
|
||||
fill: #087ca8 !important;
|
||||
stroke: #087ca8 !important;
|
||||
}
|
||||
text.uml-step-element-active {
|
||||
fill: #075d7d !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
.uml-step-hit:focus {
|
||||
outline: none;
|
||||
stroke: #087ca8;
|
||||
stroke-width: 1.5px;
|
||||
stroke-dasharray: 4 3;
|
||||
}
|
||||
.uml-evidence-view {
|
||||
border-bottom: 1px solid #b8b8b8;
|
||||
background: #f4f5f6;
|
||||
}
|
||||
.uml-evidence-view > header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
min-height: 38px;
|
||||
padding: 5px 8px;
|
||||
border-bottom: 1px solid #c8c8c8;
|
||||
background: #fff;
|
||||
}
|
||||
.uml-evidence-view > header small,
|
||||
.uml-evidence-view > header strong {
|
||||
display: block;
|
||||
}
|
||||
.uml-evidence-view > header small {
|
||||
color: #56707c;
|
||||
font: 700 8px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-evidence-view > header strong {
|
||||
margin-top: 1px;
|
||||
font: 700 11px/1.25 system-ui, sans-serif;
|
||||
}
|
||||
.uml-evidence-tabs {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
padding: 2px;
|
||||
border: 1px solid #c5c9cb;
|
||||
border-radius: 4px;
|
||||
background: #eef0f1;
|
||||
}
|
||||
.uml-evidence-tabs button {
|
||||
min-width: 68px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 3px;
|
||||
background: transparent;
|
||||
color: #4b5154;
|
||||
padding: 3px 10px;
|
||||
font: 600 10px/1.2 system-ui, sans-serif;
|
||||
cursor: pointer;
|
||||
}
|
||||
.uml-evidence-tabs button[aria-selected="true"] {
|
||||
border-color: #8da6b1;
|
||||
background: #fff;
|
||||
color: #174d64;
|
||||
box-shadow: 0 1px 2px #0001;
|
||||
}
|
||||
.uml-evidence-tabs button:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: default;
|
||||
}
|
||||
.uml-code-view {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 1px;
|
||||
background: #40505a;
|
||||
}
|
||||
.uml-code-view > section {
|
||||
min-width: 0;
|
||||
background: #12191e;
|
||||
color: #e8edf0;
|
||||
}
|
||||
.uml-code-view > section > header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 5px 8px;
|
||||
border-bottom: 1px solid #34434b;
|
||||
color: #a8c9d7;
|
||||
font: 700 9px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-code-view > section > header span {
|
||||
border: 1px solid #5b7c8a;
|
||||
border-radius: 2px;
|
||||
padding: 1px 5px;
|
||||
color: #d7f4ff;
|
||||
}
|
||||
.uml-code-view > section > header code {
|
||||
overflow-wrap: anywhere;
|
||||
color: #aebac0;
|
||||
text-align: right;
|
||||
}
|
||||
.uml-code-view pre {
|
||||
min-height: 76px;
|
||||
max-height: 260px;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
white-space: pre-wrap;
|
||||
color: #eef4f6;
|
||||
font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
|
||||
tab-size: 2;
|
||||
}
|
||||
.uml-code-view > p {
|
||||
grid-column: 1/-1;
|
||||
margin: 0;
|
||||
padding: 5px 8px;
|
||||
background: #eef7fb;
|
||||
color: #315f78;
|
||||
font-size: 9px;
|
||||
}
|
||||
.uml-terminal-view {
|
||||
margin: 0;
|
||||
background: #111;
|
||||
}
|
||||
.uml-terminal-view img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-height: 760px;
|
||||
object-fit: contain;
|
||||
object-position: top center;
|
||||
}
|
||||
.uml-terminal-view figcaption {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 8px;
|
||||
padding: 5px 8px;
|
||||
border-top: 1px solid #38434a;
|
||||
background: #1a2227;
|
||||
color: #cbd4d8;
|
||||
font: 9px/1.35 system-ui, sans-serif;
|
||||
}
|
||||
.uml-terminal-view figcaption strong {
|
||||
flex: 0 0 auto;
|
||||
color: #fff;
|
||||
}
|
||||
.uml-snapshot-panel {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
padding: 8px;
|
||||
background: #fafafa;
|
||||
font-size: 10px;
|
||||
}
|
||||
.uml-snapshot-panel > header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
.uml-snapshot-panel > header > div:first-child > span,
|
||||
.uml-snapshot-panel > header > div:first-child > strong {
|
||||
display: block;
|
||||
}
|
||||
.uml-snapshot-panel > header > div:first-child > span {
|
||||
color: #5a5a5a;
|
||||
font: 700 9px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-snapshot-panel > header > div:first-child > strong {
|
||||
font-size: 12px;
|
||||
}
|
||||
.uml-snapshot-panel > header > div:first-child > strong code {
|
||||
display: inline-block;
|
||||
min-width: 24px;
|
||||
color: #075d7d;
|
||||
}
|
||||
.uml-snapshot-cursor {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.uml-snapshot-cursor button {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
padding: 0;
|
||||
}
|
||||
.uml-snapshot-cursor button:disabled {
|
||||
opacity: 0.35;
|
||||
cursor: default;
|
||||
}
|
||||
.uml-snapshot-cursor output {
|
||||
min-width: 34px;
|
||||
text-align: center;
|
||||
font: 700 9px/1 ui-monospace, monospace;
|
||||
}
|
||||
.uml-snapshot-description {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
}
|
||||
.uml-snapshot-panel section {
|
||||
min-width: 0;
|
||||
border: 1px solid #d0d0d0;
|
||||
background: #fff;
|
||||
padding: 7px;
|
||||
}
|
||||
.uml-snapshot-panel h4 {
|
||||
margin: 0 0 4px;
|
||||
color: #315f78;
|
||||
font: 700 9px/1.2 ui-monospace, monospace;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.uml-state-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 7px;
|
||||
min-width: 0;
|
||||
}
|
||||
.uml-snapshot-registers dl {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 3px;
|
||||
margin: 0;
|
||||
}
|
||||
.uml-snapshot-registers dl > div {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: 5px;
|
||||
min-width: 0;
|
||||
padding: 2px 4px;
|
||||
border-left: 2px solid #bbb;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
.uml-snapshot-registers dl > div.primary {
|
||||
grid-column: 1/-1;
|
||||
border-color: #287495;
|
||||
background: #edf7fb;
|
||||
}
|
||||
.uml-snapshot-registers dt {
|
||||
color: #555;
|
||||
font-weight: 700;
|
||||
}
|
||||
.uml-snapshot-registers dd,
|
||||
.uml-snapshot-variables dd,
|
||||
.uml-snapshot-memory dd {
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
overflow-wrap: anywhere;
|
||||
text-align: right;
|
||||
font: 600 9px/1.25 ui-monospace, monospace;
|
||||
}
|
||||
.uml-snapshot-variables dl {
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
margin: 0;
|
||||
}
|
||||
.uml-snapshot-variables dl > div {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 3px 5px;
|
||||
border-left: 2px solid #5f899b;
|
||||
background: #f5f8f9;
|
||||
}
|
||||
.uml-snapshot-variables dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
.uml-snapshot-variables dt small {
|
||||
display: block;
|
||||
color: #777;
|
||||
font: 8px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-snapshot-variables [data-state="uninitialised"],
|
||||
.uml-stack-lane article[data-state="uninitialised"] {
|
||||
color: #777;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.uml-snapshot-variables [data-state="uninitialised"] dt::after,
|
||||
.uml-stack-lane article[data-state="uninitialised"] > strong::after {
|
||||
content: " ?";
|
||||
color: #9a6a00;
|
||||
}
|
||||
.uml-arena-snapshot > div {
|
||||
position: relative;
|
||||
height: 10px;
|
||||
border: 1px solid #666;
|
||||
background: repeating-linear-gradient(90deg, #fff 0 7px, #eee 7px 8px);
|
||||
}
|
||||
.uml-arena-snapshot > div span {
|
||||
display: block;
|
||||
height: 100%;
|
||||
background: #b8ddeb;
|
||||
}
|
||||
.uml-arena-snapshot > div i {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
bottom: -3px;
|
||||
width: 2px;
|
||||
background: #075d7d;
|
||||
transform: translateX(-1px);
|
||||
}
|
||||
.uml-arena-snapshot > p {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
gap: 4px;
|
||||
margin: 3px 0;
|
||||
font-size: 8px;
|
||||
}
|
||||
.uml-arena-snapshot > p code:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
.uml-arena-bytes {
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
overflow-wrap: anywhere;
|
||||
color: #666;
|
||||
font-size: 8px;
|
||||
}
|
||||
.uml-snapshot-memory dl {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
margin: 0;
|
||||
}
|
||||
.uml-snapshot-memory dl > div {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
gap: 4px;
|
||||
padding-top: 2px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
.uml-snapshot-memory dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
.uml-snapshot-memory dt small {
|
||||
display: block;
|
||||
color: #777;
|
||||
font: 8px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-snapshot-stack > header {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
.uml-snapshot-stack > header > p {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: 4px 9px;
|
||||
margin: 0;
|
||||
color: #555;
|
||||
font-size: 8px;
|
||||
}
|
||||
.uml-stack-axis {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
margin: 3px 89px 2px;
|
||||
color: #777;
|
||||
font: 8px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-stack-lane {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
min-width: 0;
|
||||
overflow-x: auto;
|
||||
border: 1px solid #66757c;
|
||||
background: #eef1f2;
|
||||
}
|
||||
.uml-stack-boundary {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
flex: 0 1 82px;
|
||||
min-width: 64px;
|
||||
padding: 5px;
|
||||
background: #273941;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font: 700 8px/1.25 ui-monospace, monospace;
|
||||
}
|
||||
.uml-stack-boundary small {
|
||||
color: #a9d9eb;
|
||||
font-size: 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.uml-stack-gap {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
flex: 0.7 1 70px;
|
||||
min-width: 60px;
|
||||
min-height: 52px;
|
||||
border-right: 1px dashed #9da8ad;
|
||||
color: #78858b;
|
||||
text-align: center;
|
||||
font: 8px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-stack-gap strong,
|
||||
.uml-stack-gap small {
|
||||
display: block;
|
||||
}
|
||||
.uml-stack-gap strong {
|
||||
color: #52636b;
|
||||
}
|
||||
.uml-stack-gap small {
|
||||
color: #78858b;
|
||||
font-size: 8px;
|
||||
}
|
||||
.uml-stack-lane article {
|
||||
display: grid;
|
||||
align-content: center;
|
||||
flex: 1 1 92px;
|
||||
min-width: 76px;
|
||||
padding: 5px 7px;
|
||||
border-right: 1px solid #9da8ad;
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
.uml-stack-lane article[data-state="initialised"] {
|
||||
border-top: 3px solid #2c8060;
|
||||
}
|
||||
.uml-stack-lane article[data-state="saved"] {
|
||||
border-top: 3px solid #6d7196;
|
||||
background: #f7f6fb;
|
||||
}
|
||||
.uml-stack-lane article strong,
|
||||
.uml-stack-lane article code,
|
||||
.uml-stack-lane article small {
|
||||
display: block;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.uml-stack-lane article strong {
|
||||
font: 700 9px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-stack-lane article code {
|
||||
margin: 2px 0;
|
||||
color: #1f4555;
|
||||
font-size: 8px;
|
||||
}
|
||||
.uml-stack-lane article small {
|
||||
color: #777;
|
||||
font: 8px/1.2 ui-monospace, monospace;
|
||||
}
|
||||
.uml-snapshot-observation p {
|
||||
margin: 0 0 3px;
|
||||
}
|
||||
.uml-snapshot-observation small {
|
||||
display: block;
|
||||
overflow-wrap: anywhere;
|
||||
color: #666;
|
||||
font: 8px/1.3 ui-monospace, monospace;
|
||||
}
|
||||
.task-conclusion {
|
||||
margin: 8px 0 0;
|
||||
padding: 7px 9px;
|
||||
@@ -404,6 +1199,12 @@
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
@media (max-width: 800px) {
|
||||
.topbar-nvim-meta {
|
||||
display: none;
|
||||
}
|
||||
.topbar-nvim-section .nvim-control-indicator {
|
||||
display: none;
|
||||
}
|
||||
.memory-lanes {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
@@ -415,8 +1216,36 @@
|
||||
.memory-actions {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.uml-snapshot-layout {
|
||||
display: block;
|
||||
}
|
||||
.uml-step-canvas {
|
||||
border: 0;
|
||||
}
|
||||
.uml-phase-actions {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.uml-code-view,
|
||||
.uml-state-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.uml-terminal-view figcaption,
|
||||
.uml-snapshot-stack > header {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
.uml-snapshot-stack > header > p {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.uml-stack-axis {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
@media print {
|
||||
.viewer-chrome {
|
||||
display: none !important;
|
||||
}
|
||||
.memory-react {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -425,6 +1254,10 @@
|
||||
width: 100%;
|
||||
}
|
||||
.uml-actions,
|
||||
.uml-phase-actions,
|
||||
.uml-step-actions,
|
||||
.uml-evidence-view,
|
||||
.uml-snapshot-panel,
|
||||
.uml-stage,
|
||||
.uml-approval,
|
||||
.asset-source-link,
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
"generated": {
|
||||
"$ref": "#/$defs/generated"
|
||||
},
|
||||
"debug_checkpoints": {
|
||||
"$ref": "#/$defs/debugCheckpoints"
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
@@ -617,6 +620,323 @@
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSnapshotRegister": {
|
||||
"type": "object",
|
||||
"required": ["name", "value"],
|
||||
"properties": {
|
||||
"name": { "type": "string", "minLength": 1 },
|
||||
"value": { "type": "string", "minLength": 1 },
|
||||
"note": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSnapshotFrameField": {
|
||||
"type": "object",
|
||||
"required": ["name", "address", "value", "state"],
|
||||
"properties": {
|
||||
"name": { "type": "string", "minLength": 1 },
|
||||
"address": { "type": "string", "minLength": 1 },
|
||||
"value": { "type": "string", "minLength": 1 },
|
||||
"size_bytes": { "type": "integer", "minimum": 1 },
|
||||
"state": { "enum": ["initialised", "uninitialised", "saved"] },
|
||||
"note": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSnapshotFrame": {
|
||||
"type": "object",
|
||||
"required": ["name", "sp", "fp", "size_bytes", "fields"],
|
||||
"properties": {
|
||||
"name": { "type": "string", "minLength": 1 },
|
||||
"sp": { "type": "string", "minLength": 1 },
|
||||
"fp": { "type": "string", "minLength": 1 },
|
||||
"stack_top": { "type": "string", "minLength": 1 },
|
||||
"size_bytes": { "type": "integer", "minimum": 0 },
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/umlSnapshotFrameField" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSnapshotMemoryItem": {
|
||||
"type": "object",
|
||||
"required": ["name", "address", "value"],
|
||||
"properties": {
|
||||
"name": { "type": "string", "minLength": 1 },
|
||||
"address": { "type": "string", "minLength": 1 },
|
||||
"value": { "type": "string", "minLength": 1 },
|
||||
"note": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSnapshotArena": {
|
||||
"type": "object",
|
||||
"required": ["base", "size_bytes", "cursor", "offset", "bytes"],
|
||||
"properties": {
|
||||
"base": { "type": "string", "minLength": 1 },
|
||||
"size_bytes": { "type": "integer", "minimum": 1 },
|
||||
"cursor": { "type": "string", "minLength": 1 },
|
||||
"offset": {
|
||||
"oneOf": [
|
||||
{ "type": "integer", "minimum": 0 },
|
||||
{ "type": "null" }
|
||||
]
|
||||
},
|
||||
"bytes": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSnapshot": {
|
||||
"type": "object",
|
||||
"required": ["pc", "registers", "frame", "memory", "description"],
|
||||
"properties": {
|
||||
"target": { "type": "string", "minLength": 1 },
|
||||
"captured_at": { "type": "string", "minLength": 1 },
|
||||
"captured_with": { "type": "string", "minLength": 1 },
|
||||
"elf": { "type": "string", "minLength": 1 },
|
||||
"pc": { "type": "string", "minLength": 1 },
|
||||
"registers": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": { "$ref": "#/$defs/umlSnapshotRegister" }
|
||||
},
|
||||
"frame": { "$ref": "#/$defs/umlSnapshotFrame" },
|
||||
"memory": {
|
||||
"type": "object",
|
||||
"required": ["items"],
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/umlSnapshotMemoryItem" }
|
||||
},
|
||||
"arena": { "$ref": "#/$defs/umlSnapshotArena" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"code": {
|
||||
"type": "object",
|
||||
"required": ["source", "assembly"],
|
||||
"properties": {
|
||||
"source": { "type": "string", "minLength": 1 },
|
||||
"source_ref": { "type": "string" },
|
||||
"assembly": { "type": "string", "minLength": 1 },
|
||||
"note": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"description": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSnapshotContext": {
|
||||
"type": "object",
|
||||
"required": ["target", "captured_at"],
|
||||
"properties": {
|
||||
"target": { "type": "string", "minLength": 1 },
|
||||
"captured_at": { "type": "string", "minLength": 1 },
|
||||
"captured_with": { "type": "string", "minLength": 1 },
|
||||
"elf": { "type": "string", "minLength": 1 },
|
||||
"stack_top": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"nvimAnnotationAnchor": {
|
||||
"type": "object",
|
||||
"required": ["kind"],
|
||||
"properties": {
|
||||
"kind": { "enum": ["screen-text", "grid-range"] },
|
||||
"text": { "type": "string", "minLength": 1 },
|
||||
"occurrence": { "type": "integer", "minimum": 1 },
|
||||
"row": { "type": "integer", "minimum": 0 },
|
||||
"column": { "type": "integer", "minimum": 0 },
|
||||
"rows": { "type": "integer", "minimum": 1 },
|
||||
"columns": { "type": "integer", "minimum": 1 },
|
||||
"padding_cells": { "type": "integer", "minimum": 0, "maximum": 8 }
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": { "properties": { "kind": { "const": "screen-text" } } },
|
||||
"then": { "required": ["text"] }
|
||||
},
|
||||
{
|
||||
"if": { "properties": { "kind": { "const": "grid-range" } } },
|
||||
"then": { "required": ["row", "column", "rows", "columns"] }
|
||||
}
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"nvimAnnotation": {
|
||||
"type": "object",
|
||||
"required": ["id", "anchor"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "minLength": 1 },
|
||||
"anchor_ref": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Semantyczna kotwica rozwiązywana przez adapter Neovima; anchor jest fallbackiem dla nagranego gridu."
|
||||
},
|
||||
"label": { "type": "string", "minLength": 1 },
|
||||
"tone": { "enum": ["danger", "info", "success", "warning"] },
|
||||
"shape": { "enum": ["outline", "underline"] },
|
||||
"anchor": { "$ref": "#/$defs/nvimAnnotationAnchor" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"nvimStepView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connection_ref": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Logiczny profil/adapter celu, nigdy ID procesu, bufora ani kontenera."
|
||||
},
|
||||
"layout": { "type": "string", "minLength": 1 },
|
||||
"recorded_grid_ref": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Wersjonowany fallback ekranu używany, gdy kontener jest offline."
|
||||
},
|
||||
"reveal": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"anchor_ref": { "type": "string", "minLength": 1 },
|
||||
"align": { "enum": ["top", "center", "bottom"] }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/nvimAnnotation" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"debugCheckpointExpression": {
|
||||
"type": "object",
|
||||
"required": ["expr", "equals"],
|
||||
"properties": {
|
||||
"expr": { "type": "string", "minLength": 1 },
|
||||
"equals": { "type": "integer" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"debugCheckpointRecipe": {
|
||||
"type": "object",
|
||||
"required": ["stop"],
|
||||
"properties": {
|
||||
"stop": {
|
||||
"type": "object",
|
||||
"required": ["symbol", "offset"],
|
||||
"properties": {
|
||||
"symbol": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
||||
"offset": { "type": "integer", "minimum": 0 },
|
||||
"condition": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"verify": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expressions": {
|
||||
"type": "array",
|
||||
"maxItems": 16,
|
||||
"items": { "$ref": "#/$defs/debugCheckpointExpression" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"debugCheckpoints": {
|
||||
"type": "object",
|
||||
"required": ["schema", "semantics", "artifact", "targets", "items"],
|
||||
"properties": {
|
||||
"schema": { "const": "stem-debug-checkpoints.v1" },
|
||||
"semantics": { "const": "deterministic-replay" },
|
||||
"recorded_grid_pattern": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9._/-]*\\{snapshot_ref\\}[A-Za-z0-9._/-]*$"
|
||||
},
|
||||
"artifact": {
|
||||
"type": "object",
|
||||
"required": ["source", "elf"],
|
||||
"properties": {
|
||||
"source": { "type": "string", "minLength": 1 },
|
||||
"source_git_blob": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
||||
"repository_revision": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
||||
"elf": { "type": "string", "minLength": 1 },
|
||||
"hazard3_elf_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"targets": {
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"required": ["adapter", "baseline"],
|
||||
"properties": {
|
||||
"adapter": { "type": "string", "minLength": 1 },
|
||||
"baseline": { "type": "string", "minLength": 1 },
|
||||
"clean_ram": { "type": "boolean" },
|
||||
"requires_probe_lease": { "type": "boolean" },
|
||||
"persistent_flash": { "type": "boolean" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"items": {
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"propertyNames": { "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$" },
|
||||
"additionalProperties": { "$ref": "#/$defs/debugCheckpointRecipe" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSequenceStep": {
|
||||
"type": "object",
|
||||
"required": ["id", "number", "label", "description", "snapshot"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "minLength": 1 },
|
||||
"number": { "type": "integer", "minimum": 1 },
|
||||
"label": { "type": "string", "minLength": 1 },
|
||||
"description": { "type": "string", "minLength": 1 },
|
||||
"code_ref": { "type": "string" },
|
||||
"progress_id": { "type": "string", "minLength": 1 },
|
||||
"snapshot_ref": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Kanoniczny stan wykonania; wiele kroków dydaktycznych może współdzielić jeden snapshot."
|
||||
},
|
||||
"view": { "$ref": "#/$defs/nvimStepView" },
|
||||
"svg_label": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Dokładny numer lub etykieta wiadomości PlantUML wybieranej w inline SVG."
|
||||
},
|
||||
"snapshot": { "$ref": "#/$defs/umlSnapshot" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"umlSequencePhase": {
|
||||
"type": "object",
|
||||
"required": ["id", "label", "steps"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "minLength": 1 },
|
||||
"label": { "type": "string", "minLength": 1 },
|
||||
"description": { "type": "string" },
|
||||
"svg_label": { "type": "string", "minLength": 1 },
|
||||
"steps": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": { "$ref": "#/$defs/umlSequenceStep" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"interactiveAsset": {
|
||||
"type": "object",
|
||||
"required": ["kind"],
|
||||
@@ -628,6 +948,32 @@
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"block": {
|
||||
"type": "object",
|
||||
"required": ["id", "label"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "minLength": 1 },
|
||||
"label": { "type": "string", "minLength": 1 },
|
||||
"description": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"snapshot_context": { "$ref": "#/$defs/umlSnapshotContext" },
|
||||
"terminal_view": {
|
||||
"type": "object",
|
||||
"required": ["path", "alt"],
|
||||
"properties": {
|
||||
"path": { "type": "string", "minLength": 1 },
|
||||
"title": { "type": "string", "minLength": 1 },
|
||||
"alt": { "type": "string", "minLength": 1 },
|
||||
"caption": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"arena_size": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -677,6 +1023,11 @@
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"phases": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": { "$ref": "#/$defs/umlSequencePhase" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
+44
-1
@@ -2,6 +2,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import base64
|
||||
import copy
|
||||
import json
|
||||
import html as html_lib
|
||||
import os
|
||||
@@ -6918,6 +6919,17 @@ def render_section_assets_tex(section: dict, data: dict) -> list[str]:
|
||||
return lines
|
||||
|
||||
|
||||
def recorded_grid_ref(data: dict, step: dict) -> str:
|
||||
explicit = str((step.get("view", {}) or {}).get("recorded_grid_ref", ""))
|
||||
if explicit:
|
||||
return explicit
|
||||
snapshot_ref = str(step.get("snapshot_ref", ""))
|
||||
pattern = str((data.get("debug_checkpoints", {}) or {}).get("recorded_grid_pattern", ""))
|
||||
if not snapshot_ref or "{snapshot_ref}" not in pattern:
|
||||
return ""
|
||||
return pattern.replace("{snapshot_ref}", snapshot_ref)
|
||||
|
||||
|
||||
def prepare_html_figure_assets(data: dict) -> None:
|
||||
output_dir = html_output_dir(data) / "figures"
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -6934,6 +6946,7 @@ def prepare_html_figure_assets(data: dict) -> None:
|
||||
for asset in section_assets(data.get("sections", [])):
|
||||
add_graphic(str(asset.get("html_path") or asset.get("path", "")))
|
||||
add_graphic(str(asset.get("source_path", "")))
|
||||
add_graphic(str((asset.get("interactive", {}).get("terminal_view", {}) or {}).get("path", "")))
|
||||
for figure in data.get("figures", []):
|
||||
add_graphic(figure.get("path", ""))
|
||||
pdf_links: list[str] = []
|
||||
@@ -6970,6 +6983,26 @@ def prepare_html_figure_assets(data: dict) -> None:
|
||||
if source.exists():
|
||||
shutil.copy2(source, output_dir / source.name)
|
||||
|
||||
recorded_grids: set[str] = set()
|
||||
for asset in section_assets(data.get("sections", [])):
|
||||
interactive = asset.get("interactive", {}) or {}
|
||||
for phase in interactive.get("phases", []) or []:
|
||||
for step in phase.get("steps", []) or []:
|
||||
recorded_ref = recorded_grid_ref(data, step)
|
||||
if recorded_ref:
|
||||
recorded_grids.add(recorded_ref)
|
||||
json_root = (CARD_ROOT / "json").resolve()
|
||||
web_root = html_output_dir(data).resolve()
|
||||
for recorded_ref in sorted(recorded_grids):
|
||||
source = (json_root / recorded_ref).resolve()
|
||||
target = (web_root / recorded_ref).resolve()
|
||||
if json_root not in source.parents or web_root not in target.parents:
|
||||
raise ValueError(f"recorded_grid_ref wychodzi poza dozwolony katalog: {recorded_ref}")
|
||||
if not source.is_file():
|
||||
raise FileNotFoundError(f"Brak zapisanego ekranu Neovima: {source}")
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(source, target)
|
||||
|
||||
|
||||
def react_task_model(
|
||||
task_ref: str,
|
||||
@@ -7071,6 +7104,16 @@ def react_card_model(data: dict) -> dict:
|
||||
include_section_assets = not task_ref or task_ref == str(task_refs[0])
|
||||
for asset in (section.get("assets", []) or []) if include_section_assets else []:
|
||||
source_path = str(asset.get("html_path") or asset.get("path", ""))
|
||||
interactive = copy.deepcopy(asset.get("interactive"))
|
||||
if interactive:
|
||||
terminal_view = interactive.get("terminal_view") or {}
|
||||
if terminal_view.get("path"):
|
||||
terminal_view["href"] = html_figure_asset(str(terminal_view["path"]))
|
||||
for phase in interactive.get("phases", []) or []:
|
||||
for step in phase.get("steps", []) or []:
|
||||
recorded_ref = recorded_grid_ref(data, step)
|
||||
if recorded_ref:
|
||||
step.setdefault("view", {})["recorded_grid_ref"] = recorded_ref
|
||||
assets.append(
|
||||
{
|
||||
"label": str(asset.get("label", "")),
|
||||
@@ -7082,7 +7125,7 @@ def react_card_model(data: dict) -> dict:
|
||||
else "",
|
||||
"width": float(asset.get("width", 1.0)),
|
||||
"kind": str(asset.get("kind", "diagram")),
|
||||
"interactive": asset.get("interactive"),
|
||||
"interactive": interactive,
|
||||
}
|
||||
)
|
||||
title = str(section.get("title", ""))
|
||||
|
||||
Reference in New Issue
Block a user