@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.
Files changed (261) hide show
  1. package/AGENTS.md +25 -0
  2. package/bunfig.toml +2 -0
  3. package/component-tests/basic-tool.fixture.tsx +46 -0
  4. package/component-tests/basic-tool.spec.ts +63 -0
  5. package/component-tests/file-media.fixture.tsx +39 -0
  6. package/component-tests/file-media.spec.ts +13 -0
  7. package/component-tests/file-tool.spec.ts +62 -0
  8. package/component-tests/file-viewer.fixture.tsx +109 -0
  9. package/component-tests/file-viewer.spec.ts +134 -0
  10. package/component-tests/file.spec.ts +33 -0
  11. package/component-tests/line-comment-v2.spec.ts +15 -0
  12. package/component-tests/markdown-code-wrap.spec.ts +94 -0
  13. package/component-tests/markdown-readiness.spec.ts +95 -0
  14. package/component-tests/markdown.fixture.tsx +104 -0
  15. package/component-tests/markdown.spec.ts +1564 -0
  16. package/component-tests/mermaid-preview.spec.ts +43 -0
  17. package/component-tests/patch-group.spec.ts +79 -0
  18. package/component-tests/read-group.spec.ts +72 -0
  19. package/component-tests/read-image.fixture.tsx +66 -0
  20. package/component-tests/read-image.spec.ts +154 -0
  21. package/component-tests/session-compaction.spec.ts +254 -0
  22. package/component-tests/session-lifecycle.spec.ts +190 -0
  23. package/component-tests/session-message-projection.spec.ts +639 -0
  24. package/component-tests/session-notice-projection.spec.ts +20 -0
  25. package/component-tests/session-review-comments.spec.ts +179 -0
  26. package/component-tests/session-shell.spec.ts +93 -0
  27. package/component-tests/session-timeline-mobile.spec.ts +201 -0
  28. package/component-tests/session-timeline-notices.spec.ts +38 -0
  29. package/component-tests/session-timeline-reasoning.spec.ts +107 -0
  30. package/component-tests/session-timeline.spec.ts +157 -0
  31. package/component-tests/session-tool-projection.spec.ts +323 -0
  32. package/component-tests/text-lifecycle.fixture.tsx +26 -0
  33. package/component-tests/text-lifecycle.spec.ts +42 -0
  34. package/component-tests/timeline-subagent-rows.spec.ts +33 -0
  35. package/component-tests/tool-disclosure.spec.ts +48 -0
  36. package/component-tests/tool-group-sticky.spec.ts +37 -0
  37. package/component-tests/tool-group.spec.ts +290 -0
  38. package/component-tests/tool-status-title.fixture.tsx +22 -0
  39. package/component-tests/tool-status-title.spec.ts +30 -0
  40. package/component-tests/user-message-quotes.spec.ts +111 -0
  41. package/package.json +91 -4
  42. package/playwright.components.config.ts +4 -0
  43. package/playwright.local.config.ts +2 -0
  44. package/src/actions.ts +54 -0
  45. package/src/components/apply-patch-file.ts +122 -0
  46. package/src/components/basic-tool.css +487 -0
  47. package/src/components/basic-tool.tsx +258 -0
  48. package/src/components/copy-machine.ts +78 -0
  49. package/src/components/copy.ts +85 -0
  50. package/src/components/diagram-preview.tsx +28 -0
  51. package/src/components/disclosure-machine.ts +188 -0
  52. package/src/components/disclosure.ts +129 -0
  53. package/src/components/dock-prompt.stories.tsx +73 -0
  54. package/src/components/dock-prompt.tsx +29 -0
  55. package/src/components/file-comment-selection.tsx +146 -0
  56. package/src/components/file-media-machine.ts +165 -0
  57. package/src/components/file-media.stories.tsx +112 -0
  58. package/src/components/file-media.tsx +323 -0
  59. package/src/components/file-search.tsx +73 -0
  60. package/src/components/file.css +59 -0
  61. package/src/components/file.tsx +1300 -0
  62. package/src/components/image-preview.tsx +35 -0
  63. package/src/components/line-comment-annotations.tsx +580 -0
  64. package/src/components/line-comment-machine.ts +262 -0
  65. package/src/components/line-comment-styles.ts +293 -0
  66. package/src/components/line-comment.stories.tsx +152 -0
  67. package/src/components/line-comment.tsx +448 -0
  68. package/src/components/link-segments.ts +20 -0
  69. package/src/components/linked-text.tsx +21 -0
  70. package/src/components/markdown-cache-machine.ts +257 -0
  71. package/src/components/markdown-cache.tsx +556 -0
  72. package/src/components/markdown-clipboard.ts +101 -0
  73. package/src/components/markdown-code-machine.ts +200 -0
  74. package/src/components/markdown-code-state.ts +22 -0
  75. package/src/components/markdown-fragment-links.ts +74 -0
  76. package/src/components/markdown-github.svg +3 -0
  77. package/src/components/markdown-globe.svg +5 -0
  78. package/src/components/markdown-image-machine.ts +170 -0
  79. package/src/components/markdown-image.ts +156 -0
  80. package/src/components/markdown-inline-code-kind.ts +39 -0
  81. package/src/components/markdown-mermaid.ts +18 -0
  82. package/src/components/markdown-phase-machine.ts +102 -0
  83. package/src/components/markdown-projection.ts +13 -0
  84. package/src/components/markdown-session-links.ts +183 -0
  85. package/src/components/markdown-solid.test.tsx +92 -0
  86. package/src/components/markdown-solid.tsx +113 -0
  87. package/src/components/markdown-stream.ts +95 -0
  88. package/src/components/markdown-worker-machine.ts +516 -0
  89. package/src/components/markdown-worker-protocol.ts +73 -0
  90. package/src/components/markdown-worker.ts +250 -0
  91. package/src/components/markdown.css +672 -0
  92. package/src/components/markdown.stories.tsx +199 -0
  93. package/src/components/markdown.tsx +1612 -0
  94. package/src/components/markdown.worker.ts +188 -0
  95. package/src/components/message-file.ts +102 -0
  96. package/src/components/message-nav.css +134 -0
  97. package/src/components/message-nav.tsx +159 -0
  98. package/src/components/message-part.css +2109 -0
  99. package/src/components/message-part.tsx +3 -0
  100. package/src/components/question-prompt-experimental.css +576 -0
  101. package/src/components/question-prompt.css +527 -0
  102. package/src/components/quote-highlight.css +59 -0
  103. package/src/components/review-focus-driver.ts +142 -0
  104. package/src/components/review-focus-machine.ts +95 -0
  105. package/src/components/session-compaction.css +270 -0
  106. package/src/components/session-diff.ts +358 -0
  107. package/src/components/session-error.tsx +41 -0
  108. package/src/components/session-retry.tsx +92 -0
  109. package/src/components/session-review-machine.ts +241 -0
  110. package/src/components/session-review.css +264 -0
  111. package/src/components/session-review.stories.tsx +232 -0
  112. package/src/components/session-review.tsx +733 -0
  113. package/src/components/session-turn.css +282 -0
  114. package/src/components/shell-submessage.css +24 -0
  115. package/src/components/timeline-separator.tsx +69 -0
  116. package/src/components/tool-count-label.css +57 -0
  117. package/src/components/tool-count-label.tsx +76 -0
  118. package/src/components/tool-count-summary.css +102 -0
  119. package/src/components/tool-count-summary.stories.tsx +99 -0
  120. package/src/components/tool-count-summary.tsx +44 -0
  121. package/src/components/tool-error-card.css +178 -0
  122. package/src/components/tool-error-card.stories.tsx +113 -0
  123. package/src/components/tool-error-card.tsx +202 -0
  124. package/src/components/tool-status-title-machine.ts +128 -0
  125. package/src/components/tool-status-title.css +89 -0
  126. package/src/components/tool-status-title.tsx +163 -0
  127. package/src/context/data.tsx +107 -0
  128. package/src/context/index.ts +1 -0
  129. package/src/context/markdown.tsx +129 -0
  130. package/src/context/sources.tsx +34 -0
  131. package/src/document.ts +8 -0
  132. package/src/file-presentation.ts +34 -0
  133. package/src/message/action-machine.ts +72 -0
  134. package/src/message/agent-label.ts +3 -0
  135. package/src/message/attachment-card.css +119 -0
  136. package/src/message/attachment-card.tsx +40 -0
  137. package/src/message/attachment-media-machine.ts +213 -0
  138. package/src/message/comment-card.tsx +155 -0
  139. package/src/message/compaction-entrance-machine.ts +93 -0
  140. package/src/message/current-message.tsx +157 -0
  141. package/src/message/current-tool-state.ts +161 -0
  142. package/src/message/message-content.tsx +1391 -0
  143. package/src/message/paced-text-machine.ts +73 -0
  144. package/src/message/prompt-message.stories.tsx +149 -0
  145. package/src/message/relative-time.ts +45 -0
  146. package/src/message/user-message-quote-parts.ts +16 -0
  147. package/src/message/user-message-quotes.stories.tsx +797 -0
  148. package/src/message/user-message-quotes.tsx +135 -0
  149. package/src/pierre/comment-hover-machine.ts +53 -0
  150. package/src/pierre/comment-hover.ts +131 -0
  151. package/src/pierre/comment-selection-machine.ts +257 -0
  152. package/src/pierre/commented-lines.ts +106 -0
  153. package/src/pierre/diff-selection.ts +91 -0
  154. package/src/pierre/file-find-machine.ts +323 -0
  155. package/src/pierre/file-find.ts +537 -0
  156. package/src/pierre/file-runtime.ts +42 -0
  157. package/src/pierre/file-selection.ts +140 -0
  158. package/src/pierre/index.ts +344 -0
  159. package/src/pierre/media.ts +140 -0
  160. package/src/pierre/render-machine.ts +381 -0
  161. package/src/pierre/selection-bridge.ts +82 -0
  162. package/src/pierre/selection-machine.ts +198 -0
  163. package/src/pierre/virtualizer.ts +114 -0
  164. package/src/pierre/worker.ts +46 -0
  165. package/src/sources/experiment.ts +59 -0
  166. package/src/sources/site-icon.tsx +53 -0
  167. package/src/sources/sources-chip.tsx +57 -0
  168. package/src/sources/sources-expand-machine.ts +101 -0
  169. package/src/sources/sources-panel.tsx +249 -0
  170. package/src/sources/sources-title.tsx +21 -0
  171. package/src/sources/sources.css +266 -0
  172. package/src/sources/sources.ts +141 -0
  173. package/src/storybook/current-session-fixtures.ts +1492 -0
  174. package/src/storybook/current-session-scenarios.ts +76 -0
  175. package/src/storybook/current-session-story.tsx +154 -0
  176. package/src/storybook/index.ts +43 -0
  177. package/src/styles/index.css +19 -0
  178. package/src/timeline/__snapshots__/group-labels.test.ts.snap +110 -0
  179. package/src/timeline/__snapshots__/placement.test.ts.snap +1041 -0
  180. package/src/timeline/code-blocks.stories.tsx +105 -0
  181. package/src/timeline/commentary.stories.tsx +70 -0
  182. package/src/timeline/commentary.ts +38 -0
  183. package/src/timeline/detail.ts +111 -0
  184. package/src/timeline/error-card.stories.tsx +134 -0
  185. package/src/timeline/error-spacing.stories.tsx +71 -0
  186. package/src/timeline/facts.ts +493 -0
  187. package/src/timeline/file-changes.stories.tsx +436 -0
  188. package/src/timeline/group-label-fixtures.ts +97 -0
  189. package/src/timeline/mermaid.stories.tsx +131 -0
  190. package/src/timeline/place.ts +280 -0
  191. package/src/timeline/placement-fixtures.ts +365 -0
  192. package/src/timeline/placement-reactivity.ts +133 -0
  193. package/src/timeline/projection.ts +1261 -0
  194. package/src/timeline/research-and-agents.stories.tsx +461 -0
  195. package/src/timeline/session-timeline-row.tsx +1675 -0
  196. package/src/timeline/session-timeline.tsx +68 -0
  197. package/src/timeline/steer-arrival-machine.ts +134 -0
  198. package/src/timeline/terminal-work.stories.tsx +464 -0
  199. package/src/timeline/timeline-row.stories.tsx +1069 -0
  200. package/src/timeline/timeline-row.ts +238 -0
  201. package/src/timeline/turn-phase-machine.ts +112 -0
  202. package/src/timeline/user-message-fold.stories.tsx +194 -0
  203. package/src/timeline/user-runs.ts +87 -0
  204. package/src/timeline-next/__snapshots__/placement.test.ts.snap +990 -0
  205. package/src/timeline-next/compaction.tsx +236 -0
  206. package/src/timeline-next/errors.ts +101 -0
  207. package/src/timeline-next/event-row.tsx +168 -0
  208. package/src/timeline-next/events.ts +103 -0
  209. package/src/timeline-next/index.ts +10 -0
  210. package/src/timeline-next/nested-rail.ts +125 -0
  211. package/src/timeline-next/projection.ts +1028 -0
  212. package/src/timeline-next/row.tsx +1728 -0
  213. package/src/timeline-next/rules.ts +89 -0
  214. package/src/timeline-next/separator.tsx +73 -0
  215. package/src/timeline-next/spacing.ts +127 -0
  216. package/src/timeline-next/status-line.tsx +41 -0
  217. package/src/timeline-next/status.ts +33 -0
  218. package/src/timeline-next/stories/compare-renderer.stories.tsx +190 -0
  219. package/src/timeline-next/stories/compare-sessions/.gitignore +3 -0
  220. package/src/timeline-next/stories/compare.stories.tsx +486 -0
  221. package/src/timeline-next/stories/playground.stories.tsx +297 -0
  222. package/src/timeline-next/stories/session-replay.ts +1156 -0
  223. package/src/timeline-next/stories/session-timeline.tsx +50 -0
  224. package/src/timeline-next/stories/subagent-status.stories.tsx +132 -0
  225. package/src/timeline-next/timeline-next.css +649 -0
  226. package/src/timeline-next/tools/__snapshots__/activity-label.test.ts.snap +39 -0
  227. package/src/timeline-next/tools/activity-label.ts +166 -0
  228. package/src/timeline-next/tools/assistant-content.tsx +84 -0
  229. package/src/timeline-next/tools/context-group.tsx +619 -0
  230. package/src/timeline-next/tools/error-card.tsx +147 -0
  231. package/src/timeline-next/tools/explore.tsx +119 -0
  232. package/src/timeline-next/tools/file-group.tsx +128 -0
  233. package/src/timeline-next/tools/patch.tsx +174 -0
  234. package/src/timeline-next/tools/shell.tsx +186 -0
  235. package/src/timeline-next/tools/thought.tsx +87 -0
  236. package/src/timeline-next/tools/tool-display.tsx +119 -0
  237. package/src/tools/ansi.ts +8 -0
  238. package/src/tools/context-group-label.ts +123 -0
  239. package/src/tools/file-runs.ts +35 -0
  240. package/src/tools/project-path.ts +18 -0
  241. package/src/tools/read-group.stories.tsx +159 -0
  242. package/src/tools/run-machine.ts +185 -0
  243. package/src/tools/shell-output-machine.ts +233 -0
  244. package/src/tools/shell-output.ts +91 -0
  245. package/src/tools/subagent-row-variants.stories.tsx +129 -0
  246. package/src/tools/tool-group.stories.tsx +345 -0
  247. package/src/tools/tool-renderer.tsx +2876 -0
  248. package/src/v2/components/line-comment-annotations-v2.tsx +215 -0
  249. package/src/v2/components/session-file-panel-v2.tsx +149 -0
  250. package/src/v2/components/session-progress-indicator-v2.css +5 -0
  251. package/src/v2/components/session-progress-indicator-v2.stories.tsx +86 -0
  252. package/src/v2/components/session-progress-indicator-v2.tsx +16 -0
  253. package/src/v2/components/session-review-empty-changes-v2.tsx +17 -0
  254. package/src/v2/components/session-review-empty-no-git-v2.tsx +28 -0
  255. package/src/v2/components/session-review-file-preview-v2-virtualize.ts +5 -0
  256. package/src/v2/components/session-review-file-preview-v2.tsx +266 -0
  257. package/src/v2/components/session-review-v2.css +653 -0
  258. package/src/v2/components/session-review-v2.tsx +422 -0
  259. package/src/v2/components/sidebar-presence-machine.ts +69 -0
  260. package/tsconfig.json +20 -0
  261. package/README.md +0 -3
@@ -0,0 +1,3 @@
1
+ export { AssistantReasoningContent, AssistantTextContent, CurrentUserMessageDisplay } from "../message/message-content"
2
+
3
+ export { CurrentContextToolGroup, SessionShellMessage, ToolDisplay } from "../tools/tool-renderer"
@@ -0,0 +1,576 @@
1
+ [data-component="dock-prompt"][data-kind="question"][data-variant="experimental"] {
2
+ --v2-question-answer-bg-selected: light-dark(#f5f8ff, #7698fd26);
3
+ /* A bounce-0 spring sampled for CSS: with the dock's motion on, every pick and progress change eases on it, so two
4
+ answers trading places always cross in the same frames. */
5
+ --question-spring: linear(
6
+ 0,
7
+ 0.04,
8
+ 0.131,
9
+ 0.243,
10
+ 0.358,
11
+ 0.466,
12
+ 0.562,
13
+ 0.645,
14
+ 0.715,
15
+ 0.774,
16
+ 0.821,
17
+ 0.859,
18
+ 0.89,
19
+ 0.914,
20
+ 0.934,
21
+ 0.949,
22
+ 0.96,
23
+ 0.97,
24
+ 0.977,
25
+ 0.982,
26
+ 1
27
+ );
28
+ --question-pick: 120ms;
29
+ --question-settle: 300ms;
30
+
31
+ max-block-size: var(--question-prompt-max-height, 100dvh);
32
+ font-family: var(--v2-font-family-sans);
33
+
34
+ [data-slot="question-body"] {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 16px;
38
+ flex: 1;
39
+ min-block-size: 0;
40
+ overflow: clip;
41
+ padding: 8px;
42
+ }
43
+
44
+ [data-slot="question-header"] {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: 4px;
48
+ flex-shrink: 0;
49
+ min-block-size: 0;
50
+ min-inline-size: 0;
51
+ padding-inline: 10px;
52
+ }
53
+
54
+ [data-slot="question-header-top"] {
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: space-between;
58
+ gap: 12px;
59
+ min-block-size: 28px;
60
+ min-inline-size: 0;
61
+ }
62
+
63
+ [data-slot="question-header-title"] {
64
+ min-inline-size: 0;
65
+ font-size: 13px;
66
+ font-weight: 440;
67
+ line-height: var(--line-height-base);
68
+ color: var(--v2-text-text-muted);
69
+ overflow-wrap: anywhere;
70
+ }
71
+
72
+ [data-slot="question-header-actions"] {
73
+ display: flex;
74
+ align-items: center;
75
+ gap: 8px;
76
+ flex-shrink: 0;
77
+
78
+ [data-component="icon-button-v2"] {
79
+ flex-shrink: 0;
80
+ color: var(--v2-icon-icon-muted);
81
+ }
82
+
83
+ [data-slot="icon-svg"] {
84
+ flex-shrink: 0;
85
+ }
86
+ }
87
+
88
+ /* Holds the question text at its sprung height, and the outgoing copy of it while questions switch. It reaches into
89
+ the header's side padding, so text sliding past a side fades out in that gutter instead of over the text at rest. */
90
+ [data-slot="question-details-frame"] {
91
+ --question-gutter: 10px;
92
+ position: relative;
93
+ min-block-size: 0;
94
+ min-inline-size: 0;
95
+ max-block-size: max(48px, calc((var(--question-prompt-max-height, 100dvh) - 120px) * 0.45));
96
+ margin-inline: calc(-1 * var(--question-gutter));
97
+ padding-inline: var(--question-gutter);
98
+ overflow-x: clip;
99
+ overflow-y: auto;
100
+ scrollbar-width: none;
101
+ mask-composite: intersect;
102
+
103
+ &::-webkit-scrollbar {
104
+ display: none;
105
+ }
106
+ }
107
+
108
+ /* A question switching away shrinks toward its top, and the next one grows from there. */
109
+ [data-slot="question-details"] {
110
+ display: flex;
111
+ flex-direction: column;
112
+ gap: 4px;
113
+ min-inline-size: 0;
114
+ transform-origin: 50% 0;
115
+ }
116
+
117
+ [data-slot="question-text"] {
118
+ font-size: 13px;
119
+ font-weight: 530;
120
+ line-height: var(--line-height-base);
121
+ color: var(--v2-text-text-base);
122
+ overflow-wrap: anywhere;
123
+ -webkit-user-select: text;
124
+ user-select: text;
125
+ }
126
+
127
+ [data-slot="question-hint"] {
128
+ font-size: 11px;
129
+ font-weight: 440;
130
+ line-height: var(--line-height-tight);
131
+ color: var(--v2-text-text-faint);
132
+ overflow-wrap: anywhere;
133
+ }
134
+
135
+ /* Each segment is a 20px button holding a 14px dash, 2px apart, so dashes repeat every 22px from 3px in. */
136
+ [data-slot="question-progress"] {
137
+ position: relative;
138
+ display: flex;
139
+ align-items: center;
140
+ gap: 2px;
141
+ flex-shrink: 0;
142
+ }
143
+
144
+ /* The current question's bar slides along a strip that shows only through the dashes, never in the gaps. */
145
+ [data-slot="question-progress-track"] {
146
+ position: absolute;
147
+ z-index: 1;
148
+ inset-inline: 0;
149
+ inset-block-start: calc(50% - 1px);
150
+ block-size: 2px;
151
+ pointer-events: none;
152
+ -webkit-mask-image: repeating-linear-gradient(to right, transparent 0 3px, #000 3px 17px, transparent 17px 22px);
153
+ mask-image: repeating-linear-gradient(to right, transparent 0 3px, #000 3px 17px, transparent 17px 22px);
154
+ }
155
+
156
+ [data-slot="question-progress"]:has(:disabled) [data-slot="question-progress-track"] {
157
+ opacity: 0.5;
158
+ }
159
+
160
+ [data-slot="question-progress-current"] {
161
+ position: absolute;
162
+ inset-block: 0;
163
+ inset-inline-start: 3px;
164
+ inline-size: 14px;
165
+ background-color: var(--v2-icon-icon-base);
166
+ will-change: transform;
167
+ }
168
+
169
+ [data-slot="question-progress-segment"] {
170
+ display: inline-flex;
171
+ align-items: center;
172
+ justify-content: center;
173
+ flex-shrink: 0;
174
+ inline-size: 20px;
175
+ block-size: 20px;
176
+ padding: 0;
177
+ border: 0;
178
+ border-radius: 4px;
179
+ background: transparent;
180
+ cursor: pointer;
181
+ touch-action: manipulation;
182
+
183
+ &[data-answered="true"] [data-slot="question-progress-bar"]::before {
184
+ transform: scaleX(1);
185
+ }
186
+
187
+ &:focus-visible {
188
+ outline: 2px solid var(--v2-border-border-focus);
189
+ outline-offset: -2px;
190
+ }
191
+
192
+ &:disabled {
193
+ cursor: not-allowed;
194
+ opacity: 0.5;
195
+ }
196
+ }
197
+
198
+ [data-slot="question-progress-bar"] {
199
+ position: relative;
200
+ inline-size: 14px;
201
+ block-size: 2px;
202
+ flex-shrink: 0;
203
+ overflow: hidden;
204
+ background-color: var(--v2-background-bg-layer-04);
205
+
206
+ /* Answering fills the segment from its start. */
207
+ &::before {
208
+ content: "";
209
+ position: absolute;
210
+ inset: 0;
211
+ background-color: var(--v2-background-bg-accent);
212
+ transform: scaleX(0);
213
+ transform-origin: left;
214
+ }
215
+
216
+ &:dir(rtl)::before {
217
+ transform-origin: right;
218
+ }
219
+ }
220
+
221
+ [data-slot="question-content"] {
222
+ display: flex;
223
+ flex-direction: column;
224
+ flex: 1;
225
+ min-block-size: 0;
226
+ min-inline-size: 0;
227
+ }
228
+
229
+ /* Reaches into the body's side padding like the question text's frame, for the same gutter. */
230
+ [data-slot="question-options"] {
231
+ --question-gutter: 8px;
232
+ flex: 1 1 auto;
233
+ min-block-size: 0;
234
+ min-inline-size: 0;
235
+ margin: 0 calc(-1 * var(--question-gutter));
236
+ padding: 0;
237
+ overflow-y: auto;
238
+ scrollbar-width: none;
239
+ mask-composite: intersect;
240
+
241
+ &::-webkit-scrollbar {
242
+ display: none;
243
+ }
244
+ }
245
+
246
+ /* Holds the answers and the outgoing copy of them while questions switch. It clips them at its sides, so answers
247
+ sliding past never make the box scroll sideways. */
248
+ [data-slot="question-options-track"] {
249
+ position: relative;
250
+ padding-inline: var(--question-gutter);
251
+ overflow-x: clip;
252
+ }
253
+
254
+ [data-slot="question-options-list"] {
255
+ display: flex;
256
+ flex-direction: column;
257
+ gap: 2px;
258
+ position: relative;
259
+ isolation: isolate;
260
+ transform-origin: 50% 0;
261
+ }
262
+
263
+ /* One highlight for the whole list, painted under the keyboard-focused answer by its clip.
264
+ Only the navigation keys show it; the pick itself shows only on the key. */
265
+ [data-slot="question-highlight"] {
266
+ position: absolute;
267
+ inset: 0;
268
+ z-index: -1;
269
+ background:
270
+ linear-gradient(var(--v2-question-answer-bg-selected), var(--v2-question-answer-bg-selected)),
271
+ var(--v2-background-bg-layer-01);
272
+ clip-path: inset(0 0 100% round 6px);
273
+ pointer-events: none;
274
+
275
+ &[data-shown="false"] {
276
+ visibility: hidden;
277
+ }
278
+ }
279
+
280
+ [data-slot="question-option"] {
281
+ display: flex;
282
+ align-items: flex-start;
283
+ gap: 8px;
284
+ flex-shrink: 0;
285
+ box-sizing: border-box;
286
+ inline-size: 100%;
287
+ position: relative;
288
+ padding: 10px;
289
+ border: 0;
290
+ border-radius: 6px;
291
+ outline: none;
292
+ background: transparent;
293
+ color: var(--v2-text-text-base);
294
+ text-align: start;
295
+ cursor: pointer;
296
+ touch-action: manipulation;
297
+
298
+ &:disabled,
299
+ &[data-disabled="true"] {
300
+ cursor: not-allowed;
301
+ opacity: 0.5;
302
+ }
303
+ }
304
+
305
+ [data-slot="question-option-check"] {
306
+ -webkit-user-select: none;
307
+ user-select: none;
308
+ display: inline-flex;
309
+ align-items: center;
310
+ justify-content: center;
311
+ inline-size: 18px;
312
+ block-size: 20px;
313
+ flex: 0 0 18px;
314
+ }
315
+
316
+ /* An answer's key is its mark. One answer: a round key with a soft fill. Many: a hollow square key, like a checkbox.
317
+ Picking fills either solid, with the number in the inverse colour. */
318
+ [data-slot="question-option-key"] {
319
+ display: inline-flex;
320
+ align-items: center;
321
+ justify-content: center;
322
+ box-sizing: border-box;
323
+ inline-size: 18px;
324
+ block-size: 18px;
325
+ position: relative;
326
+ isolation: isolate;
327
+ border-radius: 50%;
328
+ background-color: var(--v2-background-bg-layer-03);
329
+ box-shadow: inset 0 0 0 0.5px var(--v2-border-border-base);
330
+ color: var(--v2-text-text-muted);
331
+ font-size: 11px;
332
+ font-weight: 530;
333
+ line-height: 1;
334
+ font-variant-numeric: tabular-nums;
335
+
336
+ &::before {
337
+ content: "";
338
+ position: absolute;
339
+ inset: 0;
340
+ z-index: -1;
341
+ border-radius: inherit;
342
+ background-color: var(--v2-background-bg-accent);
343
+ opacity: 0;
344
+ }
345
+
346
+ &[data-type="checkbox"] {
347
+ border-radius: 4px;
348
+ background-color: transparent;
349
+ box-shadow: inset 0 0 0 1px var(--v2-border-border-strong);
350
+ }
351
+
352
+ &[data-picked="true"] {
353
+ color: var(--v2-text-text-contrast);
354
+ box-shadow: inset 0 0 0 1px transparent;
355
+
356
+ &::before {
357
+ opacity: 1;
358
+ }
359
+ }
360
+ }
361
+
362
+ [data-slot="question-option-main"] {
363
+ -webkit-user-select: text;
364
+ user-select: text;
365
+ display: flex;
366
+ flex-direction: column;
367
+ gap: 4px;
368
+ min-inline-size: 0;
369
+ flex: 1;
370
+ }
371
+
372
+ [data-slot="option-label"] {
373
+ font-family: var(--v2-font-family-sans);
374
+ font-size: 13px;
375
+ font-weight: 530;
376
+ line-height: var(--line-height-base);
377
+ color: var(--v2-text-text-base);
378
+ overflow-wrap: anywhere;
379
+ }
380
+
381
+ [data-slot="option-description"] {
382
+ min-inline-size: 0;
383
+ font-family: var(--v2-font-family-sans);
384
+ font-size: 13px;
385
+ font-weight: 440;
386
+ line-height: var(--line-height-base);
387
+ color: var(--v2-text-text-muted);
388
+ overflow-wrap: anywhere;
389
+ white-space: normal;
390
+ }
391
+
392
+ [data-slot="question-option"][data-custom="true"] {
393
+ align-items: center;
394
+ block-size: 40px;
395
+ min-block-size: 40px;
396
+ max-block-size: 40px;
397
+ padding-block: 0;
398
+ padding-inline: 10px;
399
+
400
+ &:not([data-editing="true"]) [data-slot="text-input-v2-input"] {
401
+ font-weight: 530;
402
+ }
403
+
404
+ &[data-editing="true"] .question-custom-field[data-component="text-input-v2"] {
405
+ [data-slot="text-input-v2-input"] {
406
+ &::placeholder {
407
+ color: var(--v2-text-text-faint);
408
+ }
409
+ }
410
+ }
411
+ }
412
+
413
+ [data-slot="question-custom-toggle"] {
414
+ display: inline-flex;
415
+ align-items: center;
416
+ justify-content: center;
417
+ inline-size: 18px;
418
+ block-size: 20px;
419
+ flex: 0 0 18px;
420
+ margin: 0;
421
+ padding: 0;
422
+ border: 0;
423
+ border-radius: 4px;
424
+ background: transparent;
425
+ cursor: pointer;
426
+ touch-action: manipulation;
427
+
428
+ &:focus-visible {
429
+ outline: none;
430
+ }
431
+
432
+ &:disabled {
433
+ cursor: not-allowed;
434
+ }
435
+ }
436
+
437
+ [data-slot="question-option"] .question-custom-field[data-component="text-input-v2"] {
438
+ flex: 1;
439
+ inline-size: 100%;
440
+ min-inline-size: 0;
441
+ block-size: 28px;
442
+ align-self: center;
443
+ padding: 0;
444
+ gap: 0;
445
+ border: 0;
446
+ border-radius: 6px;
447
+ background: transparent;
448
+ box-shadow: none;
449
+ outline: none;
450
+ opacity: 1;
451
+ transition: none;
452
+
453
+ [data-slot="text-input-v2-value"] {
454
+ min-inline-size: 0;
455
+ min-block-size: 0;
456
+ gap: 0;
457
+ }
458
+
459
+ [data-slot="text-input-v2-input"] {
460
+ box-sizing: border-box;
461
+ inline-size: 100%;
462
+ min-inline-size: 0;
463
+ block-size: 28px;
464
+ margin: 0;
465
+ padding: 0;
466
+ border: 0;
467
+ background: transparent;
468
+ outline: none;
469
+ font-family: var(--v2-font-family-sans);
470
+ font-size: 13px;
471
+ font-weight: 440;
472
+ line-height: var(--line-height-compact);
473
+ color: var(--v2-text-text-base);
474
+ text-align: start;
475
+ cursor: text;
476
+
477
+ &::placeholder {
478
+ color: var(--v2-text-text-base);
479
+ opacity: 1;
480
+ }
481
+
482
+ &:disabled {
483
+ cursor: not-allowed;
484
+ }
485
+ }
486
+ }
487
+
488
+ [data-slot="question-footer"] {
489
+ display: flex;
490
+ box-sizing: border-box;
491
+ align-items: center;
492
+ justify-content: space-between;
493
+ flex-shrink: 0;
494
+ padding-block: 7px 8px;
495
+ padding-inline: 12px;
496
+
497
+ > [data-component="button-v2"][data-variant="ghost"] {
498
+ color: var(--v2-text-text-muted);
499
+ }
500
+ }
501
+
502
+ [data-slot="question-footer-actions"] {
503
+ display: flex;
504
+ align-items: center;
505
+ gap: 8px;
506
+ }
507
+
508
+ /* While a switch runs, the dock draws the footer buttons frame by frame; at rest these rules place them. */
509
+ [data-slot="question-footer-back"][data-shown="false"] {
510
+ visibility: hidden;
511
+ opacity: 0;
512
+ }
513
+
514
+ [data-slot="question-advance"] {
515
+ position: relative;
516
+ display: flex;
517
+ }
518
+
519
+ [data-slot="question-advance-face"] {
520
+ display: flex;
521
+ }
522
+
523
+ [data-slot="question-advance-face"][data-active="false"] {
524
+ position: absolute;
525
+ inset-block-start: 0;
526
+ inset-inline-end: 0;
527
+ visibility: hidden;
528
+ opacity: 0;
529
+ }
530
+
531
+ [data-slot="question-advance-face"][data-active="true"] {
532
+ z-index: 1;
533
+ }
534
+
535
+ [data-slot="question-advance-label"] {
536
+ display: inline-flex;
537
+ align-items: center;
538
+ gap: 6px;
539
+ }
540
+
541
+ [data-slot="question-submit-shortcut"] {
542
+ flex-shrink: 0;
543
+ opacity: 0.6;
544
+ }
545
+
546
+ @media (hover: hover) and (pointer: fine) {
547
+ [data-slot="question-progress-segment"]:hover:not(:disabled) {
548
+ background-color: var(--v2-overlay-simple-overlay-hover);
549
+ }
550
+ }
551
+
552
+ /* Without the dock's motion there is no sliding bar, so the current question's dash lights itself. */
553
+ [data-component="session-question-dock"][data-animated="false"] & {
554
+ [data-slot="question-progress-segment"][data-active="true"] [data-slot="question-progress-bar"]::before {
555
+ background-color: var(--v2-icon-icon-base);
556
+ transform: scaleX(1);
557
+ }
558
+ }
559
+
560
+ /* Picks and answered dashes ease only while the dock's motion is on; otherwise they change on the same frame. */
561
+ [data-component="session-question-dock"][data-animated="true"] & {
562
+ [data-slot="question-progress-bar"]::before {
563
+ transition: transform var(--question-settle) var(--question-spring);
564
+ }
565
+
566
+ [data-slot="question-option-key"] {
567
+ transition:
568
+ color var(--question-pick) var(--question-spring),
569
+ box-shadow var(--question-pick) var(--question-spring);
570
+
571
+ &::before {
572
+ transition: opacity var(--question-pick) var(--question-spring);
573
+ }
574
+ }
575
+ }
576
+ }