@zyro-sec/session-ui 0.0.0-stage → 1.0.4
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/AGENTS.md +25 -0
- package/bunfig.toml +2 -0
- package/component-tests/basic-tool.fixture.tsx +46 -0
- package/component-tests/basic-tool.spec.ts +63 -0
- package/component-tests/file-media.fixture.tsx +39 -0
- package/component-tests/file-media.spec.ts +13 -0
- package/component-tests/file-tool.spec.ts +62 -0
- package/component-tests/file-viewer.fixture.tsx +109 -0
- package/component-tests/file-viewer.spec.ts +134 -0
- package/component-tests/file.spec.ts +33 -0
- package/component-tests/line-comment-v2.spec.ts +15 -0
- package/component-tests/markdown-code-wrap.spec.ts +94 -0
- package/component-tests/markdown-readiness.spec.ts +95 -0
- package/component-tests/markdown.fixture.tsx +104 -0
- package/component-tests/markdown.spec.ts +1564 -0
- package/component-tests/mermaid-preview.spec.ts +43 -0
- package/component-tests/patch-group.spec.ts +79 -0
- package/component-tests/read-group.spec.ts +72 -0
- package/component-tests/read-image.fixture.tsx +66 -0
- package/component-tests/read-image.spec.ts +154 -0
- package/component-tests/session-compaction.spec.ts +254 -0
- package/component-tests/session-lifecycle.spec.ts +190 -0
- package/component-tests/session-message-projection.spec.ts +639 -0
- package/component-tests/session-notice-projection.spec.ts +20 -0
- package/component-tests/session-review-comments.spec.ts +179 -0
- package/component-tests/session-shell.spec.ts +93 -0
- package/component-tests/session-timeline-mobile.spec.ts +201 -0
- package/component-tests/session-timeline-notices.spec.ts +38 -0
- package/component-tests/session-timeline-reasoning.spec.ts +107 -0
- package/component-tests/session-timeline.spec.ts +157 -0
- package/component-tests/session-tool-projection.spec.ts +323 -0
- package/component-tests/text-lifecycle.fixture.tsx +26 -0
- package/component-tests/text-lifecycle.spec.ts +42 -0
- package/component-tests/timeline-subagent-rows.spec.ts +33 -0
- package/component-tests/tool-disclosure.spec.ts +48 -0
- package/component-tests/tool-group-sticky.spec.ts +37 -0
- package/component-tests/tool-group.spec.ts +290 -0
- package/component-tests/tool-status-title.fixture.tsx +22 -0
- package/component-tests/tool-status-title.spec.ts +30 -0
- package/component-tests/user-message-quotes.spec.ts +111 -0
- package/package.json +91 -4
- package/playwright.components.config.ts +4 -0
- package/playwright.local.config.ts +2 -0
- package/src/actions.ts +54 -0
- package/src/components/apply-patch-file.ts +122 -0
- package/src/components/basic-tool.css +487 -0
- package/src/components/basic-tool.tsx +258 -0
- package/src/components/copy-machine.ts +78 -0
- package/src/components/copy.ts +85 -0
- package/src/components/diagram-preview.tsx +28 -0
- package/src/components/disclosure-machine.ts +188 -0
- package/src/components/disclosure.ts +129 -0
- package/src/components/dock-prompt.stories.tsx +73 -0
- package/src/components/dock-prompt.tsx +29 -0
- package/src/components/file-comment-selection.tsx +146 -0
- package/src/components/file-media-machine.ts +165 -0
- package/src/components/file-media.stories.tsx +112 -0
- package/src/components/file-media.tsx +323 -0
- package/src/components/file-search.tsx +73 -0
- package/src/components/file.css +59 -0
- package/src/components/file.tsx +1300 -0
- package/src/components/image-preview.tsx +35 -0
- package/src/components/line-comment-annotations.tsx +580 -0
- package/src/components/line-comment-machine.ts +262 -0
- package/src/components/line-comment-styles.ts +293 -0
- package/src/components/line-comment.stories.tsx +152 -0
- package/src/components/line-comment.tsx +448 -0
- package/src/components/link-segments.ts +20 -0
- package/src/components/linked-text.tsx +21 -0
- package/src/components/markdown-cache-machine.ts +257 -0
- package/src/components/markdown-cache.tsx +556 -0
- package/src/components/markdown-clipboard.ts +101 -0
- package/src/components/markdown-code-machine.ts +200 -0
- package/src/components/markdown-code-state.ts +22 -0
- package/src/components/markdown-fragment-links.ts +74 -0
- package/src/components/markdown-github.svg +3 -0
- package/src/components/markdown-globe.svg +5 -0
- package/src/components/markdown-image-machine.ts +170 -0
- package/src/components/markdown-image.ts +156 -0
- package/src/components/markdown-inline-code-kind.ts +39 -0
- package/src/components/markdown-mermaid.ts +18 -0
- package/src/components/markdown-phase-machine.ts +102 -0
- package/src/components/markdown-projection.ts +13 -0
- package/src/components/markdown-session-links.ts +183 -0
- package/src/components/markdown-solid.test.tsx +92 -0
- package/src/components/markdown-solid.tsx +113 -0
- package/src/components/markdown-stream.ts +95 -0
- package/src/components/markdown-worker-machine.ts +516 -0
- package/src/components/markdown-worker-protocol.ts +73 -0
- package/src/components/markdown-worker.ts +250 -0
- package/src/components/markdown.css +672 -0
- package/src/components/markdown.stories.tsx +199 -0
- package/src/components/markdown.tsx +1612 -0
- package/src/components/markdown.worker.ts +188 -0
- package/src/components/message-file.ts +102 -0
- package/src/components/message-nav.css +134 -0
- package/src/components/message-nav.tsx +159 -0
- package/src/components/message-part.css +2109 -0
- package/src/components/message-part.tsx +3 -0
- package/src/components/question-prompt-experimental.css +576 -0
- package/src/components/question-prompt.css +527 -0
- package/src/components/quote-highlight.css +59 -0
- package/src/components/review-focus-driver.ts +142 -0
- package/src/components/review-focus-machine.ts +95 -0
- package/src/components/session-compaction.css +270 -0
- package/src/components/session-diff.ts +358 -0
- package/src/components/session-error.tsx +41 -0
- package/src/components/session-retry.tsx +92 -0
- package/src/components/session-review-machine.ts +241 -0
- package/src/components/session-review.css +264 -0
- package/src/components/session-review.stories.tsx +232 -0
- package/src/components/session-review.tsx +733 -0
- package/src/components/session-turn.css +282 -0
- package/src/components/shell-submessage.css +24 -0
- package/src/components/timeline-separator.tsx +69 -0
- package/src/components/tool-count-label.css +57 -0
- package/src/components/tool-count-label.tsx +76 -0
- package/src/components/tool-count-summary.css +102 -0
- package/src/components/tool-count-summary.stories.tsx +99 -0
- package/src/components/tool-count-summary.tsx +44 -0
- package/src/components/tool-error-card.css +178 -0
- package/src/components/tool-error-card.stories.tsx +113 -0
- package/src/components/tool-error-card.tsx +202 -0
- package/src/components/tool-status-title-machine.ts +128 -0
- package/src/components/tool-status-title.css +89 -0
- package/src/components/tool-status-title.tsx +163 -0
- package/src/context/data.tsx +107 -0
- package/src/context/index.ts +1 -0
- package/src/context/markdown.tsx +129 -0
- package/src/context/sources.tsx +34 -0
- package/src/document.ts +8 -0
- package/src/file-presentation.ts +34 -0
- package/src/message/action-machine.ts +72 -0
- package/src/message/agent-label.ts +3 -0
- package/src/message/attachment-card.css +119 -0
- package/src/message/attachment-card.tsx +40 -0
- package/src/message/attachment-media-machine.ts +213 -0
- package/src/message/comment-card.tsx +155 -0
- package/src/message/compaction-entrance-machine.ts +93 -0
- package/src/message/current-message.tsx +157 -0
- package/src/message/current-tool-state.ts +161 -0
- package/src/message/message-content.tsx +1391 -0
- package/src/message/paced-text-machine.ts +73 -0
- package/src/message/prompt-message.stories.tsx +149 -0
- package/src/message/relative-time.ts +45 -0
- package/src/message/user-message-quote-parts.ts +16 -0
- package/src/message/user-message-quotes.stories.tsx +797 -0
- package/src/message/user-message-quotes.tsx +135 -0
- package/src/pierre/comment-hover-machine.ts +53 -0
- package/src/pierre/comment-hover.ts +131 -0
- package/src/pierre/comment-selection-machine.ts +257 -0
- package/src/pierre/commented-lines.ts +106 -0
- package/src/pierre/diff-selection.ts +91 -0
- package/src/pierre/file-find-machine.ts +323 -0
- package/src/pierre/file-find.ts +537 -0
- package/src/pierre/file-runtime.ts +42 -0
- package/src/pierre/file-selection.ts +140 -0
- package/src/pierre/index.ts +344 -0
- package/src/pierre/media.ts +140 -0
- package/src/pierre/render-machine.ts +381 -0
- package/src/pierre/selection-bridge.ts +82 -0
- package/src/pierre/selection-machine.ts +198 -0
- package/src/pierre/virtualizer.ts +114 -0
- package/src/pierre/worker.ts +46 -0
- package/src/sources/experiment.ts +59 -0
- package/src/sources/site-icon.tsx +53 -0
- package/src/sources/sources-chip.tsx +57 -0
- package/src/sources/sources-expand-machine.ts +101 -0
- package/src/sources/sources-panel.tsx +249 -0
- package/src/sources/sources-title.tsx +21 -0
- package/src/sources/sources.css +266 -0
- package/src/sources/sources.ts +141 -0
- package/src/storybook/current-session-fixtures.ts +1492 -0
- package/src/storybook/current-session-scenarios.ts +76 -0
- package/src/storybook/current-session-story.tsx +154 -0
- package/src/storybook/index.ts +43 -0
- package/src/styles/index.css +19 -0
- package/src/timeline/__snapshots__/group-labels.test.ts.snap +110 -0
- package/src/timeline/__snapshots__/placement.test.ts.snap +1041 -0
- package/src/timeline/code-blocks.stories.tsx +105 -0
- package/src/timeline/commentary.stories.tsx +70 -0
- package/src/timeline/commentary.ts +38 -0
- package/src/timeline/detail.ts +111 -0
- package/src/timeline/error-card.stories.tsx +134 -0
- package/src/timeline/error-spacing.stories.tsx +71 -0
- package/src/timeline/facts.ts +493 -0
- package/src/timeline/file-changes.stories.tsx +436 -0
- package/src/timeline/group-label-fixtures.ts +97 -0
- package/src/timeline/mermaid.stories.tsx +131 -0
- package/src/timeline/place.ts +280 -0
- package/src/timeline/placement-fixtures.ts +365 -0
- package/src/timeline/placement-reactivity.ts +133 -0
- package/src/timeline/projection.ts +1261 -0
- package/src/timeline/research-and-agents.stories.tsx +461 -0
- package/src/timeline/session-timeline-row.tsx +1675 -0
- package/src/timeline/session-timeline.tsx +68 -0
- package/src/timeline/steer-arrival-machine.ts +134 -0
- package/src/timeline/terminal-work.stories.tsx +464 -0
- package/src/timeline/timeline-row.stories.tsx +1069 -0
- package/src/timeline/timeline-row.ts +238 -0
- package/src/timeline/turn-phase-machine.ts +112 -0
- package/src/timeline/user-message-fold.stories.tsx +194 -0
- package/src/timeline/user-runs.ts +87 -0
- package/src/timeline-next/__snapshots__/placement.test.ts.snap +990 -0
- package/src/timeline-next/compaction.tsx +236 -0
- package/src/timeline-next/errors.ts +101 -0
- package/src/timeline-next/event-row.tsx +168 -0
- package/src/timeline-next/events.ts +103 -0
- package/src/timeline-next/index.ts +10 -0
- package/src/timeline-next/nested-rail.ts +125 -0
- package/src/timeline-next/projection.ts +1028 -0
- package/src/timeline-next/row.tsx +1728 -0
- package/src/timeline-next/rules.ts +89 -0
- package/src/timeline-next/separator.tsx +73 -0
- package/src/timeline-next/spacing.ts +127 -0
- package/src/timeline-next/status-line.tsx +41 -0
- package/src/timeline-next/status.ts +33 -0
- package/src/timeline-next/stories/compare-renderer.stories.tsx +190 -0
- package/src/timeline-next/stories/compare-sessions/.gitignore +3 -0
- package/src/timeline-next/stories/compare.stories.tsx +486 -0
- package/src/timeline-next/stories/playground.stories.tsx +297 -0
- package/src/timeline-next/stories/session-replay.ts +1156 -0
- package/src/timeline-next/stories/session-timeline.tsx +50 -0
- package/src/timeline-next/stories/subagent-status.stories.tsx +132 -0
- package/src/timeline-next/timeline-next.css +649 -0
- package/src/timeline-next/tools/__snapshots__/activity-label.test.ts.snap +39 -0
- package/src/timeline-next/tools/activity-label.ts +166 -0
- package/src/timeline-next/tools/assistant-content.tsx +84 -0
- package/src/timeline-next/tools/context-group.tsx +619 -0
- package/src/timeline-next/tools/error-card.tsx +147 -0
- package/src/timeline-next/tools/explore.tsx +119 -0
- package/src/timeline-next/tools/file-group.tsx +128 -0
- package/src/timeline-next/tools/patch.tsx +174 -0
- package/src/timeline-next/tools/shell.tsx +186 -0
- package/src/timeline-next/tools/thought.tsx +87 -0
- package/src/timeline-next/tools/tool-display.tsx +119 -0
- package/src/tools/ansi.ts +8 -0
- package/src/tools/context-group-label.ts +123 -0
- package/src/tools/file-runs.ts +35 -0
- package/src/tools/project-path.ts +18 -0
- package/src/tools/read-group.stories.tsx +159 -0
- package/src/tools/run-machine.ts +185 -0
- package/src/tools/shell-output-machine.ts +233 -0
- package/src/tools/shell-output.ts +91 -0
- package/src/tools/subagent-row-variants.stories.tsx +129 -0
- package/src/tools/tool-group.stories.tsx +345 -0
- package/src/tools/tool-renderer.tsx +2876 -0
- package/src/v2/components/line-comment-annotations-v2.tsx +215 -0
- package/src/v2/components/session-file-panel-v2.tsx +149 -0
- package/src/v2/components/session-progress-indicator-v2.css +5 -0
- package/src/v2/components/session-progress-indicator-v2.stories.tsx +86 -0
- package/src/v2/components/session-progress-indicator-v2.tsx +16 -0
- package/src/v2/components/session-review-empty-changes-v2.tsx +17 -0
- package/src/v2/components/session-review-empty-no-git-v2.tsx +28 -0
- package/src/v2/components/session-review-file-preview-v2-virtualize.ts +5 -0
- package/src/v2/components/session-review-file-preview-v2.tsx +266 -0
- package/src/v2/components/session-review-v2.css +653 -0
- package/src/v2/components/session-review-v2.tsx +422 -0
- package/src/v2/components/sidebar-presence-machine.ts +69 -0
- package/tsconfig.json +20 -0
- package/README.md +0 -3
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
/* Matches the composer's session mention (packages/app/src/composer/editor/editor.css). */
|
|
2
|
+
.markdown-session-link {
|
|
3
|
+
display: inline;
|
|
4
|
+
padding: 0;
|
|
5
|
+
border: 0;
|
|
6
|
+
border-radius: 2px;
|
|
7
|
+
background: none;
|
|
8
|
+
color: var(--v2-text-text-muted);
|
|
9
|
+
font: inherit;
|
|
10
|
+
font-weight: var(--font-weight-medium);
|
|
11
|
+
text-align: start;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.markdown-session-link:hover {
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
text-underline-offset: 2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.markdown-session-link:focus-visible {
|
|
21
|
+
outline: 2px solid var(--v2-border-border-focus);
|
|
22
|
+
outline-offset: 2px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.markdown-session-id {
|
|
26
|
+
font-family: var(--font-family-mono);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Pele colors a diagram from these, in a message and maximized. */
|
|
30
|
+
:is([data-component="markdown-mermaid"], [data-component="diagram-preview"]) {
|
|
31
|
+
--pele-bg: var(--v2-background-bg-layer-02);
|
|
32
|
+
--pele-fg: var(--v2-text-text-base);
|
|
33
|
+
--pele-muted: var(--v2-text-text-muted);
|
|
34
|
+
--pele-line: var(--v2-icon-icon-muted);
|
|
35
|
+
--pele-surface: var(--v2-background-bg-base);
|
|
36
|
+
--pele-surface-alt: var(--v2-background-bg-layer-03);
|
|
37
|
+
--pele-border: var(--v2-border-border-strong);
|
|
38
|
+
--pele-accent: var(--v2-text-text-accent);
|
|
39
|
+
--pele-critical: var(--v2-state-fg-danger);
|
|
40
|
+
--pele-error: var(--v2-state-fg-danger);
|
|
41
|
+
--pele-font: var(--font-family-sans);
|
|
42
|
+
--pele-font-mono: var(--font-family-mono);
|
|
43
|
+
--pele-radius: 6px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-component="markdown"] {
|
|
47
|
+
--markdown-inline-code-path-color: var(--v2-text-text-code-path);
|
|
48
|
+
--markdown-inline-code-bg-mix: 8%;
|
|
49
|
+
--markdown-shell-code-background: var(--v2-background-bg-layer-02);
|
|
50
|
+
--markdown-shell-code-border: var(--v2-border-border-muted);
|
|
51
|
+
--markdown-shell-code-color: var(--v2-text-text-base);
|
|
52
|
+
--markdown-shell-code-token-color: currentColor;
|
|
53
|
+
|
|
54
|
+
/* Reset & Base Typography */
|
|
55
|
+
min-width: 0;
|
|
56
|
+
max-width: 100%;
|
|
57
|
+
/* Bare prose keeps its collapsed margins and rasterization. Markup that could pick up layout from the app's
|
|
58
|
+
styles is paint-contained, including fixed descendants, without creating a scrollport for sticky headers. */
|
|
59
|
+
&:has([data-markdown-contain]) { contain: paint; }
|
|
60
|
+
/* Each base is an existing atomic line box. Clip its positioned ink without making the whole formula atomic
|
|
61
|
+
(which would change wrapping), changing its baseline, or introducing a scroll container. */
|
|
62
|
+
.katex .katex-base, .katex .katex-tag {
|
|
63
|
+
overflow: clip;
|
|
64
|
+
overflow-clip-margin: 0.125em;
|
|
65
|
+
}
|
|
66
|
+
overflow-wrap: break-word;
|
|
67
|
+
color: var(--v2-text-text-base);
|
|
68
|
+
font-family: var(--font-family-sans);
|
|
69
|
+
font-size: var(--font-size-base); /* 14px */
|
|
70
|
+
line-height: 160%;
|
|
71
|
+
/* Shells such as the app's turn off selection for chrome; Markdown is content, so it stays selectable. */
|
|
72
|
+
-webkit-user-select: text;
|
|
73
|
+
user-select: text;
|
|
74
|
+
|
|
75
|
+
[data-markdown-word] {
|
|
76
|
+
display: inline;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:is([data-markdown-word], code)[data-markdown-enter] {
|
|
80
|
+
animation: markdown-word-enter 180ms ease-out both;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Spacing for flow */
|
|
84
|
+
> *:first-child {
|
|
85
|
+
margin-top: 0;
|
|
86
|
+
}
|
|
87
|
+
> *:last-child {
|
|
88
|
+
margin-bottom: 0;
|
|
89
|
+
}
|
|
90
|
+
> [data-markdown-block]:first-child > *:first-child {
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
}
|
|
93
|
+
> [data-markdown-block]:last-child > *:last-child {
|
|
94
|
+
margin-bottom: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Pretty wrapping would move settled words as each token arrives, so the growing block stays greedy until it completes. */
|
|
98
|
+
&[data-streaming] > [data-markdown-block]:last-child {
|
|
99
|
+
text-wrap-style: auto;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Headings: Sized by level, distinguished by color and spacing */
|
|
103
|
+
h1 {
|
|
104
|
+
font-size: 17px;
|
|
105
|
+
color: var(--v2-text-text-base);
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
margin-top: 28px;
|
|
108
|
+
margin-bottom: 12px;
|
|
109
|
+
line-height: var(--line-height-large);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
h2 {
|
|
113
|
+
font-size: 15px;
|
|
114
|
+
color: var(--v2-text-text-base);
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
margin-top: 24px;
|
|
117
|
+
margin-bottom: 10px;
|
|
118
|
+
line-height: var(--line-height-large);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
h3 {
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
color: var(--v2-text-text-base);
|
|
124
|
+
font-weight: var(--font-weight-bold);
|
|
125
|
+
margin-top: 20px;
|
|
126
|
+
margin-bottom: 8px;
|
|
127
|
+
line-height: var(--line-height-large);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
h4,
|
|
131
|
+
h5,
|
|
132
|
+
h6 {
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
color: var(--v2-text-text-muted);
|
|
135
|
+
font-weight: var(--font-weight-medium);
|
|
136
|
+
margin-top: 20px;
|
|
137
|
+
margin-bottom: 8px;
|
|
138
|
+
line-height: var(--line-height-large);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* A heading's own bottom margin sets the gap to its section, so a block's larger top margin can't push the heading away from it. */
|
|
142
|
+
:is(h1, h2, h3, h4, h5, h6) + :is(p, ul, ol, blockquote, [data-component]),
|
|
143
|
+
:is(h1, h2, h3, h4, h5, h6) + [data-component="markdown-code"] > :is(pre, [data-slot="markdown-code-content"]) {
|
|
144
|
+
margin-top: 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Emphasis & Strong: Neutral strong color */
|
|
148
|
+
strong,
|
|
149
|
+
b {
|
|
150
|
+
color: var(--v2-text-text-base);
|
|
151
|
+
font-weight: var(--font-weight-bold);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Paragraphs */
|
|
155
|
+
p {
|
|
156
|
+
margin-bottom: 12px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Links */
|
|
160
|
+
a {
|
|
161
|
+
color: var(--v2-text-text-accent);
|
|
162
|
+
text-decoration: none;
|
|
163
|
+
font-weight: inherit;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
a:hover {
|
|
167
|
+
color: var(--v2-text-text-accent-hover);
|
|
168
|
+
text-decoration: underline;
|
|
169
|
+
text-underline-offset: 2px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* An atomic inline such as inline-block leaves a line break opportunity before the label, so the icon stays an
|
|
173
|
+
empty inline box with out-of-flow artwork, which keeps it on the line of the label's first word.
|
|
174
|
+
The artwork is a pseudo-element because an out-of-flow element is a block, and Chromium ends a triple-click
|
|
175
|
+
paragraph selection at a block. The hidden img only reports when the favicon has loaded. */
|
|
176
|
+
.markdown-link-favicon {
|
|
177
|
+
position: relative;
|
|
178
|
+
padding-inline-start: 14px;
|
|
179
|
+
margin-inline-end: 4px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.markdown-link-favicon::before {
|
|
183
|
+
content: "";
|
|
184
|
+
position: absolute;
|
|
185
|
+
inset: 0;
|
|
186
|
+
height: 14px;
|
|
187
|
+
margin: auto 0;
|
|
188
|
+
background: currentColor;
|
|
189
|
+
mask: url("./markdown-globe.svg") center / contain no-repeat;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.markdown-link-favicon[data-github]::before {
|
|
193
|
+
mask-image: url("./markdown-github.svg");
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.markdown-link-favicon[data-loaded]::before {
|
|
197
|
+
border-radius: 2px;
|
|
198
|
+
background: var(--markdown-link-favicon) center / contain no-repeat;
|
|
199
|
+
mask: none;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.markdown-link-favicon img {
|
|
203
|
+
display: none;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
a[data-local-link] {
|
|
207
|
+
cursor: pointer;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
a[data-app-link][role="link"][tabindex="0"] {
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
text-decoration: underline;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&[data-local-links] :not(pre) > code[data-inline-code-kind="path"]:not(a > code) {
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&[data-local-links] :not(pre) > code[data-inline-code-kind="path"]:not(a > code):hover {
|
|
220
|
+
text-decoration: underline;
|
|
221
|
+
text-decoration-color: color-mix(in oklch, var(--markdown-inline-code-path-color) 40%, transparent);
|
|
222
|
+
text-underline-offset: 2px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* Lists */
|
|
226
|
+
ul,
|
|
227
|
+
ol {
|
|
228
|
+
margin-top: 8px;
|
|
229
|
+
margin-bottom: 12px;
|
|
230
|
+
margin-inline-start: 0;
|
|
231
|
+
padding-inline-start: 32px;
|
|
232
|
+
list-style-position: outside;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
ul {
|
|
236
|
+
list-style-type: disc;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
ol {
|
|
240
|
+
list-style-type: decimal;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
li {
|
|
244
|
+
margin-bottom: 8px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
li > p:first-child {
|
|
248
|
+
display: inline;
|
|
249
|
+
margin: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
li:has(> input[type="checkbox"]),
|
|
253
|
+
li:has(> p > input[type="checkbox"]) {
|
|
254
|
+
position: relative;
|
|
255
|
+
list-style-type: none;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
li > input[type="checkbox"],
|
|
259
|
+
li > p > input[type="checkbox"] {
|
|
260
|
+
position: absolute;
|
|
261
|
+
top: 4px;
|
|
262
|
+
inset-inline-start: -20px;
|
|
263
|
+
margin: 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
li > p + p {
|
|
267
|
+
display: block;
|
|
268
|
+
margin-top: 0.5rem;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
li::marker {
|
|
272
|
+
color: var(--v2-text-text-muted);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* Nested lists spacing */
|
|
276
|
+
li > ul,
|
|
277
|
+
li > ol {
|
|
278
|
+
margin-top: 0.25rem;
|
|
279
|
+
margin-bottom: 0.25rem;
|
|
280
|
+
padding-inline-start: 1rem; /* Minimal indent for nesting only */
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
li > ol {
|
|
284
|
+
padding-inline-start: 1.75rem;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Blockquotes */
|
|
288
|
+
blockquote {
|
|
289
|
+
border-inline-start: 0.5px solid var(--v2-border-border-base);
|
|
290
|
+
margin: 1rem 0;
|
|
291
|
+
padding-inline-start: 0.5rem;
|
|
292
|
+
color: var(--v2-text-text-muted);
|
|
293
|
+
font-style: normal;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* Horizontal Rule - Invisible spacing only */
|
|
297
|
+
hr {
|
|
298
|
+
border: none;
|
|
299
|
+
height: 0;
|
|
300
|
+
margin: 32px 0;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.highlights {
|
|
304
|
+
background: var(--color-background-stronger);
|
|
305
|
+
color: var(--v2-text-text-muted);
|
|
306
|
+
font-size: 13px;
|
|
307
|
+
line-height: 20px;
|
|
308
|
+
padding: 12px;
|
|
309
|
+
border-radius: 6px;
|
|
310
|
+
border: 0.5px solid var(--v2-border-border-base);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
[data-component="markdown-code"] {
|
|
314
|
+
position: relative;
|
|
315
|
+
direction: ltr;
|
|
316
|
+
unicode-bidi: isolate;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[data-component="markdown-mermaid"] {
|
|
320
|
+
min-height: 96px;
|
|
321
|
+
margin: 12px 0 24px;
|
|
322
|
+
padding: 16px;
|
|
323
|
+
overflow: auto;
|
|
324
|
+
border: 0.5px solid var(--v2-border-border-base);
|
|
325
|
+
border-radius: 6px;
|
|
326
|
+
background: var(--v2-background-bg-layer-02);
|
|
327
|
+
direction: ltr;
|
|
328
|
+
unicode-bidi: isolate;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
[data-component="markdown-mermaid"] > svg {
|
|
332
|
+
display: block;
|
|
333
|
+
max-width: 100%;
|
|
334
|
+
height: auto;
|
|
335
|
+
margin: 0 auto;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
[data-slot="markdown-mermaid-maximize"] {
|
|
339
|
+
display: none;
|
|
340
|
+
position: absolute;
|
|
341
|
+
top: 4px;
|
|
342
|
+
inset-inline-end: 4px;
|
|
343
|
+
transition: opacity 0.15s ease;
|
|
344
|
+
z-index: 1;
|
|
345
|
+
|
|
346
|
+
@media (hover: hover) {
|
|
347
|
+
opacity: 0;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
[data-component="markdown-code"][data-mermaid-ready="true"] > [data-slot="markdown-mermaid-maximize"] {
|
|
352
|
+
display: block;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
[data-component="markdown-code"]:hover > [data-slot="markdown-mermaid-maximize"],
|
|
356
|
+
[data-slot="markdown-mermaid-maximize"]:focus-within {
|
|
357
|
+
opacity: 1;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
[data-component="markdown-code"][data-mermaid-pending="true"] > pre,
|
|
361
|
+
[data-component="markdown-code"][data-mermaid-pending="true"] > [data-slot="markdown-code-toolbar"],
|
|
362
|
+
[data-component="markdown-code"][data-mermaid-ready="true"] > pre,
|
|
363
|
+
[data-component="markdown-code"][data-mermaid-ready="true"] > [data-slot="markdown-code-toolbar"],
|
|
364
|
+
[data-component="markdown-code"][data-code-content] > pre {
|
|
365
|
+
display: none;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* Plugin content in place of the code keeps the code block's spacing. */
|
|
369
|
+
[data-slot="markdown-code-content"] {
|
|
370
|
+
margin-top: 12px;
|
|
371
|
+
margin-bottom: 24px;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
[data-component="markdown-code"][data-code-kind="shell"] .highlights {
|
|
375
|
+
background: var(--markdown-shell-code-background);
|
|
376
|
+
border-color: var(--markdown-shell-code-border);
|
|
377
|
+
color: var(--markdown-shell-code-color);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
[data-component="markdown-code"][data-code-kind="shell"] code {
|
|
381
|
+
color: var(--markdown-shell-code-color);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
[data-component="markdown-code"][data-code-kind="shell"] code span {
|
|
385
|
+
color: var(--markdown-shell-code-token-color) !important;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
[data-component="markdown-code"] {
|
|
389
|
+
--markdown-code-background: var(--color-background-stronger);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/* A completed block's highlighter paints its own background inline, which the shell colours don't override. Matched
|
|
393
|
+
from the toolbar after the code rather than with :has(): a style attribute in a :has() argument makes Chromium
|
|
394
|
+
recheck every :has() above each element whose inline style changes, and the session timeline sets its rows'
|
|
395
|
+
positions inline, so each change restyled the whole timeline. */
|
|
396
|
+
[data-component="markdown-code"][data-code-kind="shell"]
|
|
397
|
+
> pre:not([style*="background"])
|
|
398
|
+
~ [data-slot="markdown-code-toolbar"] {
|
|
399
|
+
--markdown-code-background: var(--markdown-shell-code-background);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* A block's actions sit in its top end corner, revealed on hover. */
|
|
403
|
+
[data-slot="markdown-code-toolbar"] {
|
|
404
|
+
position: absolute;
|
|
405
|
+
top: 4px;
|
|
406
|
+
inset-inline-end: 4px;
|
|
407
|
+
z-index: 1;
|
|
408
|
+
display: flex;
|
|
409
|
+
align-items: center;
|
|
410
|
+
gap: 2px;
|
|
411
|
+
transition: opacity 0.15s ease;
|
|
412
|
+
|
|
413
|
+
@media (hover: hover) {
|
|
414
|
+
opacity: 0;
|
|
415
|
+
pointer-events: none;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
[data-component="tooltip-v2-trigger"] {
|
|
419
|
+
display: inline-flex;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* Like the shell output's Copy, the ghost buttons get the block's background behind them, so code under them
|
|
423
|
+
doesn't show through. It fades out toward the start and the bottom, so a line it reaches softens instead of
|
|
424
|
+
being cut. It stops a pixel inside the block's 0.5px border and rounded corner: ending flush against the
|
|
425
|
+
hairline paints over it once the block sits at a fractional position. */
|
|
426
|
+
&::before {
|
|
427
|
+
content: "";
|
|
428
|
+
position: absolute;
|
|
429
|
+
z-index: -1;
|
|
430
|
+
inset: -3px -3px -8px -24px;
|
|
431
|
+
border-start-end-radius: 6px;
|
|
432
|
+
background: var(--markdown-code-background);
|
|
433
|
+
mask-image:
|
|
434
|
+
linear-gradient(to right, transparent, #000 24px), linear-gradient(#000 calc(100% - 8px), transparent);
|
|
435
|
+
mask-composite: intersect;
|
|
436
|
+
pointer-events: none;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* Plugin content in place of the code has a background of its own. */
|
|
441
|
+
[data-component="markdown-code"][data-code-content] > [data-slot="markdown-code-toolbar"]::before {
|
|
442
|
+
display: none;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* A clicked button keeps focus without a ring, so only keyboard focus keeps the actions shown. */
|
|
446
|
+
[data-component="markdown-code"]:hover > [data-slot="markdown-code-toolbar"],
|
|
447
|
+
[data-slot="markdown-code-toolbar"]:has(:focus-visible, [data-expanded]) {
|
|
448
|
+
opacity: 1;
|
|
449
|
+
pointer-events: auto;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
[data-slot="markdown-code-actions"] {
|
|
453
|
+
display: flex;
|
|
454
|
+
gap: 2px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* Wrap shows only while a line is wider than the block. */
|
|
458
|
+
[data-slot="markdown-wrap-button"] {
|
|
459
|
+
display: none;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
[data-component="markdown-code"][data-code-overflow] [data-slot="markdown-wrap-button"] {
|
|
463
|
+
display: flex;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* The setting wraps every block on the root; a block's own choice overrides it either way. */
|
|
467
|
+
&[data-code-wrap] [data-component="markdown-code"]:not([data-wrap="false"]) > pre,
|
|
468
|
+
[data-component="markdown-code"][data-wrap="true"] > pre {
|
|
469
|
+
white-space: pre-wrap;
|
|
470
|
+
overflow-wrap: anywhere;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/* Set only for one synchronous measurement of the unwrapped width. */
|
|
474
|
+
[data-component="markdown-code"][data-code-measure] > pre {
|
|
475
|
+
white-space: pre !important;
|
|
476
|
+
overflow-wrap: normal !important;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
[data-slot="markdown-copy-button"] [data-check-icon] {
|
|
480
|
+
display: none;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
[data-slot="markdown-copy-button"][data-copied="true"] [data-copy-icon] {
|
|
484
|
+
display: none;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
[data-slot="markdown-copy-button"][data-copied="true"] [data-check-icon] {
|
|
488
|
+
display: inline-flex;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
pre {
|
|
492
|
+
margin-top: 12px;
|
|
493
|
+
margin-bottom: 24px;
|
|
494
|
+
overflow: auto;
|
|
495
|
+
|
|
496
|
+
scrollbar-width: none;
|
|
497
|
+
&::-webkit-scrollbar {
|
|
498
|
+
display: none;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
:not(pre) > code {
|
|
503
|
+
direction: ltr;
|
|
504
|
+
unicode-bidi: isolate;
|
|
505
|
+
font-family: var(--font-family-mono);
|
|
506
|
+
font-feature-settings: var(--font-family-mono--font-feature-settings);
|
|
507
|
+
color: var(--v2-text-text-base);
|
|
508
|
+
font-weight: var(--font-weight-medium);
|
|
509
|
+
padding: 0 4px;
|
|
510
|
+
border-radius: 4px;
|
|
511
|
+
background: color-mix(in oklch, var(--v2-text-text-base) var(--markdown-inline-code-bg-mix), transparent);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* A path turns into a link after an async existence check, so it keeps the plain code box and only fades its colours. */
|
|
515
|
+
:not(pre) > code[data-inline-code-kind="path"] {
|
|
516
|
+
color: var(--markdown-inline-code-path-color);
|
|
517
|
+
background-color: transparent;
|
|
518
|
+
transition:
|
|
519
|
+
color 200ms ease-out,
|
|
520
|
+
background-color 200ms ease-out;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/* Code inside a link reads as part of its label, so it takes the link's colour and hover. */
|
|
524
|
+
a code {
|
|
525
|
+
color: inherit;
|
|
526
|
+
padding: 0;
|
|
527
|
+
border-radius: 0;
|
|
528
|
+
background: none;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
a.external-link > code[data-inline-code-kind="url"] {
|
|
532
|
+
text-decoration: underline;
|
|
533
|
+
text-decoration-color: color-mix(in oklch, currentColor 25%, transparent);
|
|
534
|
+
text-underline-offset: 2px;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/* Tables: the Console's data table, a raised body inside a muted frame that also holds the header */
|
|
538
|
+
[data-component="markdown-table"] {
|
|
539
|
+
margin: 16px 0;
|
|
540
|
+
overflow-x: auto;
|
|
541
|
+
padding: 2px;
|
|
542
|
+
border-radius: 6px;
|
|
543
|
+
background: var(--v2-background-bg-layer-01);
|
|
544
|
+
box-shadow: inset 0 0 0 0.5px var(--v2-border-border-muted);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
table {
|
|
548
|
+
width: 100%;
|
|
549
|
+
max-width: 100%;
|
|
550
|
+
border-collapse: separate;
|
|
551
|
+
border-spacing: 0;
|
|
552
|
+
color: var(--v2-text-text-base);
|
|
553
|
+
font-size: 13px;
|
|
554
|
+
font-variant-numeric: tabular-nums;
|
|
555
|
+
font-weight: 440;
|
|
556
|
+
line-height: var(--line-height-compact);
|
|
557
|
+
letter-spacing: -0.04px;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
tbody {
|
|
561
|
+
border-radius: 4px;
|
|
562
|
+
background: var(--v2-background-bg-base);
|
|
563
|
+
box-shadow: var(--v2-elevation-raised);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
th,
|
|
567
|
+
td {
|
|
568
|
+
text-align: start;
|
|
569
|
+
vertical-align: top;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
th {
|
|
573
|
+
padding: 8px 12px;
|
|
574
|
+
color: var(--v2-text-text-muted);
|
|
575
|
+
font-weight: 530;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
td {
|
|
579
|
+
padding: 10px 12px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
tbody tr:not(:last-child) td {
|
|
583
|
+
border-bottom: 0.5px solid var(--v2-border-border-muted);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
tbody tr:first-child td:first-child {
|
|
587
|
+
border-start-start-radius: 4px;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
tbody tr:first-child td:last-child {
|
|
591
|
+
border-start-end-radius: 4px;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
tbody tr:last-child td:first-child {
|
|
595
|
+
border-end-start-radius: 4px;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
tbody tr:last-child td:last-child {
|
|
599
|
+
border-end-end-radius: 4px;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/* Images */
|
|
603
|
+
img {
|
|
604
|
+
cursor: zoom-in;
|
|
605
|
+
max-width: 100%;
|
|
606
|
+
height: auto;
|
|
607
|
+
border-radius: 4px;
|
|
608
|
+
margin: 1.5rem 0;
|
|
609
|
+
display: block;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/* Media keeps inside its message, whatever size the author gave it. */
|
|
613
|
+
video,
|
|
614
|
+
audio {
|
|
615
|
+
max-width: 100%;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
video {
|
|
619
|
+
height: auto;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
@keyframes markdown-word-enter {
|
|
624
|
+
from {
|
|
625
|
+
opacity: 0;
|
|
626
|
+
}
|
|
627
|
+
to {
|
|
628
|
+
opacity: 1;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
:root[data-motion="reduce"] {
|
|
633
|
+
[data-component="markdown"] :is([data-markdown-word], code)[data-markdown-enter] {
|
|
634
|
+
animation: none;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
[data-component="markdown"] :not(pre) > code[data-inline-code-kind="path"] {
|
|
638
|
+
transition: none;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
[data-component="markdown"] > * {
|
|
643
|
+
unicode-bidi: plaintext;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
:root body [data-component="markdown"] {
|
|
647
|
+
[data-slot="markdown-copy-button"]::after {
|
|
648
|
+
box-sizing: border-box;
|
|
649
|
+
display: inline-flex;
|
|
650
|
+
flex-direction: row;
|
|
651
|
+
align-items: center;
|
|
652
|
+
gap: 6px;
|
|
653
|
+
padding: 5px 6px;
|
|
654
|
+
border: 0;
|
|
655
|
+
border-radius: 4px;
|
|
656
|
+
background: var(--v2-background-bg-layer-01);
|
|
657
|
+
box-shadow: var(--v2-elevation-floating);
|
|
658
|
+
color: var(--v2-text-text-base);
|
|
659
|
+
user-select: none;
|
|
660
|
+
font-size: 11px;
|
|
661
|
+
font-weight: 530;
|
|
662
|
+
line-height: 12px;
|
|
663
|
+
letter-spacing: 0.05px;
|
|
664
|
+
font-variant-numeric: tabular-nums;
|
|
665
|
+
font-variation-settings: "slnt" 0;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
[data-component="markdown"] a.external-link:hover > code {
|
|
670
|
+
text-decoration: underline;
|
|
671
|
+
text-underline-offset: 2px;
|
|
672
|
+
}
|