@lukstei/dsh-client-split-view 0.0.0-stage → 0.2.2-rc.5.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/LICENSE +21 -0
- package/README.md +137 -2
- package/cordis.patch.yml +3 -0
- package/dist/client.js +2418 -0
- package/dist/index.js +4 -0
- package/package.json +114 -3
- package/src/client/SplitLayout.tsx +48 -0
- package/src/client/SplitPane.tsx +1076 -0
- package/src/client/SplitPaneHeader.tsx +79 -0
- package/src/client/contract.ts +112 -0
- package/src/client/css.d.ts +5 -0
- package/src/client/dsh.d.ts +18 -0
- package/src/client/file-preview.ts +67 -0
- package/src/client/index.tsx +267 -0
- package/src/client/split-store.ts +698 -0
- package/src/client/styles.ts +780 -0
- package/src/index.ts +8 -0
|
@@ -0,0 +1,780 @@
|
|
|
1
|
+
/** Styles for DSH Split View plugin. */
|
|
2
|
+
import type { Context as ClientContext } from "@deepseek-ai/cordis";
|
|
3
|
+
|
|
4
|
+
export const SPLIT_VIEW_CSS = `
|
|
5
|
+
.dsh-split-shell,
|
|
6
|
+
.dsh-split-shell {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
background: var(--dsw-alias-bg-base);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dsh-split-col,
|
|
16
|
+
.dsh-split-col {
|
|
17
|
+
flex: 1 1 0;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
height: 100%;
|
|
20
|
+
position: relative;
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dsh-split-col:not(:last-child)::after,
|
|
27
|
+
.dsh-split-col:not(:last-child)::after {
|
|
28
|
+
content: '';
|
|
29
|
+
position: absolute;
|
|
30
|
+
inset-block: 0;
|
|
31
|
+
inset-inline-end: 0;
|
|
32
|
+
width: 0.5px;
|
|
33
|
+
background: linear-gradient(to bottom, transparent, var(--dsw-alias-border-l3) 24px);
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dsh-split-pane-wrapper,
|
|
38
|
+
.dsh-split-pane-wrapper {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
background: var(--dsw-alias-bg-base);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Subagent panes recolour the composer's send button (info-fill tokens) so it is obvious
|
|
49
|
+
* you are messaging a subagent, not the main session. */
|
|
50
|
+
.dsh-split-pane-wrapper.is-subagent {
|
|
51
|
+
--dsw-alias-button-info-fill: var(--dsw-alias-state-warn-primary);
|
|
52
|
+
--dsw-alias-button-info-hover: var(--dsw-alias-state-warn-secondary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dsh-split-pane-header,
|
|
56
|
+
.dsh-split-pane-header {
|
|
57
|
+
position: relative;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
min-height: 40px;
|
|
63
|
+
height: 40px;
|
|
64
|
+
padding: 0 12px;
|
|
65
|
+
padding-inline-start: max(12px, var(--dsh-frame-leading-clearance, 0px));
|
|
66
|
+
background: transparent;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
user-select: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-sidebar-drawer] .dsh-split-pane-header,
|
|
73
|
+
[data-sidebar-drawer] .dsh-split-pane-header {
|
|
74
|
+
height: 50px !important;
|
|
75
|
+
min-height: 50px !important;
|
|
76
|
+
padding-inline-start: max(48px, var(--dsh-frame-leading-clearance, 48px)) !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dsh-split-pane-header[draggable="true"],
|
|
80
|
+
.dsh-split-pane-header[draggable="true"] {
|
|
81
|
+
cursor: grab;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.dsh-split-pane-header[draggable="true"]:active,
|
|
85
|
+
.dsh-split-pane-header[draggable="true"]:active {
|
|
86
|
+
cursor: grabbing;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.dsh-split-pane-wrapper.is-drag-over,
|
|
90
|
+
.dsh-split-pane-wrapper.is-drag-over {
|
|
91
|
+
box-shadow: inset 0 0 0 2px var(--dsw-alias-state-business-primary);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.dsh-split-shell.is-dragging .dsh-split-pane-body,
|
|
95
|
+
.dsh-split-shell.is-dragging .dsh-split-pane-body {
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (hover: hover) {
|
|
100
|
+
.dsh-split-header-actions,
|
|
101
|
+
.dsh-split-header-actions {
|
|
102
|
+
position: absolute;
|
|
103
|
+
inset-inline-end: 0;
|
|
104
|
+
background: var(--dsw-alias-bg-base);
|
|
105
|
+
box-shadow: -8px 0 8px var(--dsw-alias-bg-base);
|
|
106
|
+
opacity: 0;
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
transition: opacity var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.dsh-split-pane-header:is(:hover, :focus-within) .dsh-split-header-actions,
|
|
112
|
+
.dsh-split-pane-header:is(:hover, :focus-within) .dsh-split-header-actions,
|
|
113
|
+
.dsh-split-header-actions:has(.is-pressed),
|
|
114
|
+
.dsh-split-header-actions:has(.is-pressed) {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
pointer-events: auto;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media (prefers-reduced-motion: reduce) {
|
|
121
|
+
.dsh-split-header-actions,
|
|
122
|
+
.dsh-split-header-actions {
|
|
123
|
+
transition: none;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dsh-split-header-left,
|
|
128
|
+
.dsh-split-header-left {
|
|
129
|
+
position: relative;
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: 10px;
|
|
133
|
+
min-height: 28px;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
flex: 1;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
font-size: var(--dsh-content-font-size, 14px);
|
|
138
|
+
line-height: 20px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dsh-split-pane-status,
|
|
142
|
+
.dsh-split-pane-status {
|
|
143
|
+
display: inline-block;
|
|
144
|
+
width: 6px;
|
|
145
|
+
flex: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* The current crumb's chip overhangs its box by the chip padding; the reserved strip
|
|
149
|
+
* keeps that bleed inside the clip rect without moving the breadcrumb. */
|
|
150
|
+
.dsh-split-crumbs,
|
|
151
|
+
.dsh-split-crumbs {
|
|
152
|
+
display: flex;
|
|
153
|
+
flex: 1;
|
|
154
|
+
align-items: baseline;
|
|
155
|
+
gap: 8px;
|
|
156
|
+
min-width: 0;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
padding-inline: 6px;
|
|
159
|
+
margin-inline: -6px;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.dsh-split-crumb-seg,
|
|
164
|
+
.dsh-split-crumb-seg {
|
|
165
|
+
display: inline-flex;
|
|
166
|
+
align-items: baseline;
|
|
167
|
+
gap: 8px;
|
|
168
|
+
min-width: 0;
|
|
169
|
+
flex: 0 1 auto;
|
|
170
|
+
max-width: max-content;
|
|
171
|
+
overflow: hidden;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dsh-split-crumb-seg:last-child,
|
|
175
|
+
.dsh-split-crumb-seg:last-child {
|
|
176
|
+
flex: 1 1 auto;
|
|
177
|
+
min-width: 0;
|
|
178
|
+
max-width: 100%;
|
|
179
|
+
overflow: visible;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.dsh-split-crumb-sep,
|
|
183
|
+
.dsh-split-crumb-sep {
|
|
184
|
+
flex: none;
|
|
185
|
+
color: var(--dsw-alias-label-caption);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dsh-split-crumb,
|
|
189
|
+
.dsh-split-crumb {
|
|
190
|
+
display: inline-block;
|
|
191
|
+
box-sizing: border-box;
|
|
192
|
+
min-width: 0;
|
|
193
|
+
max-width: 100%;
|
|
194
|
+
overflow: hidden;
|
|
195
|
+
padding: 0;
|
|
196
|
+
border-radius: var(--dsw-radius-md);
|
|
197
|
+
text-overflow: ellipsis;
|
|
198
|
+
white-space: nowrap;
|
|
199
|
+
color: var(--dsw-alias-label-tertiary);
|
|
200
|
+
transition: color var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease),
|
|
201
|
+
background-color var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.dsh-split-crumb.is-current,
|
|
205
|
+
.dsh-split-crumb.is-current {
|
|
206
|
+
font-weight: 500;
|
|
207
|
+
color: var(--dsw-alias-label-secondary);
|
|
208
|
+
/* Compensated so the chip is padded on both sides while the title keeps its place;
|
|
209
|
+
* the nav reserves the strip the overhang bleeds into. */
|
|
210
|
+
padding-inline: 6px;
|
|
211
|
+
margin-inline: -6px;
|
|
212
|
+
min-width: 0;
|
|
213
|
+
max-width: 100%;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.dsh-split-crumbs > .dsh-split-crumb.is-current,
|
|
217
|
+
.dsh-split-crumbs > .dsh-split-crumb.is-current {
|
|
218
|
+
flex: 1 1 auto;
|
|
219
|
+
min-width: 0;
|
|
220
|
+
max-width: 100%;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.dsh-split-pane-header.is-focused .dsh-split-crumb.is-current,
|
|
224
|
+
.dsh-split-pane-header.is-focused .dsh-split-crumb.is-current {
|
|
225
|
+
font-weight: 500;
|
|
226
|
+
color: var(--dsw-alias-label-primary);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Block-only compensation: the chip grows vertically on hover, leaving the reserved
|
|
230
|
+
* horizontal metrics untouched. */
|
|
231
|
+
.dsh-split-pane-wrapper.is-hovered .dsh-split-crumb.is-current {
|
|
232
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
233
|
+
color: var(--dsw-alias-label-primary);
|
|
234
|
+
padding-block: 2px;
|
|
235
|
+
margin-block: -2px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.dsh-split-subagent-pill,
|
|
239
|
+
.dsh-split-subagent-pill {
|
|
240
|
+
display: inline-flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
gap: 6px;
|
|
243
|
+
max-width: 140px;
|
|
244
|
+
padding: 0 8px;
|
|
245
|
+
color: var(--dsw-alias-label-secondary);
|
|
246
|
+
font-size: 11px;
|
|
247
|
+
white-space: nowrap;
|
|
248
|
+
flex-shrink: 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.dsh-split-subagent-pill:hover,
|
|
252
|
+
.dsh-split-subagent-pill:hover,
|
|
253
|
+
.dsh-split-subagent-pill.is-active,
|
|
254
|
+
.dsh-split-subagent-pill.is-active {
|
|
255
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
256
|
+
color: var(--dsw-alias-label-primary);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.dsh-split-subagent-text,
|
|
260
|
+
.dsh-split-subagent-text {
|
|
261
|
+
min-width: 0;
|
|
262
|
+
max-width: 85px;
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
text-overflow: ellipsis;
|
|
265
|
+
white-space: nowrap;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.dsh-split-subagent-menu-item,
|
|
269
|
+
.dsh-split-subagent-menu-item {
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: space-between;
|
|
273
|
+
gap: 12px;
|
|
274
|
+
width: 100%;
|
|
275
|
+
min-width: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.dsh-split-subagent-menu-title,
|
|
279
|
+
.dsh-split-subagent-menu-title {
|
|
280
|
+
overflow: hidden;
|
|
281
|
+
text-overflow: ellipsis;
|
|
282
|
+
white-space: nowrap;
|
|
283
|
+
flex: 1;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.dsh-split-subagent-menu-status,
|
|
287
|
+
.dsh-split-subagent-menu-status {
|
|
288
|
+
font-size: 11px;
|
|
289
|
+
color: var(--dsw-alias-label-caption);
|
|
290
|
+
flex-shrink: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.dsh-split-crumb.is-subagent,
|
|
294
|
+
.dsh-split-crumb.is-subagent {
|
|
295
|
+
font-size: 12px;
|
|
296
|
+
line-height: 18px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.dsh-split-pane-body,
|
|
300
|
+
.dsh-split-pane-body {
|
|
301
|
+
flex: 1 1 0;
|
|
302
|
+
min-height: 0;
|
|
303
|
+
width: 100%;
|
|
304
|
+
display: flex;
|
|
305
|
+
flex-direction: column;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
position: relative;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.dsh-split-pane-body[data-phase="active"]:has([data-chat-flow])::before,
|
|
311
|
+
.dsh-split-pane-body[data-phase="active"]:has([data-chat-flow])::before {
|
|
312
|
+
content: '';
|
|
313
|
+
position: absolute;
|
|
314
|
+
inset: 0 0 auto;
|
|
315
|
+
height: 12px;
|
|
316
|
+
z-index: 10;
|
|
317
|
+
background: linear-gradient(to bottom, var(--dsw-alias-bg-base), transparent);
|
|
318
|
+
pointer-events: none;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.dsh-split-header-actions {
|
|
322
|
+
display: inline-flex;
|
|
323
|
+
align-items: center;
|
|
324
|
+
gap: 2px;
|
|
325
|
+
flex-shrink: 0;
|
|
326
|
+
height: 28px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.dsh-split-icon-btn,
|
|
330
|
+
.dsh-split-header-actions button {
|
|
331
|
+
width: 28px !important;
|
|
332
|
+
height: 28px !important;
|
|
333
|
+
min-width: 28px !important;
|
|
334
|
+
max-width: 28px !important;
|
|
335
|
+
min-height: 28px !important;
|
|
336
|
+
max-height: 28px !important;
|
|
337
|
+
color: var(--dsw-alias-label-secondary);
|
|
338
|
+
padding: 0 !important;
|
|
339
|
+
border: 0 !important;
|
|
340
|
+
border-radius: var(--dsw-radius-xs) !important;
|
|
341
|
+
flex: none;
|
|
342
|
+
display: inline-flex;
|
|
343
|
+
align-items: center;
|
|
344
|
+
justify-content: center;
|
|
345
|
+
background: transparent;
|
|
346
|
+
transition: color var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease),
|
|
347
|
+
background var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.dsh-split-pane-close {
|
|
351
|
+
margin-inline-start: 4px;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.dsh-split-icon-btn svg,
|
|
355
|
+
.dsh-split-header-actions button svg {
|
|
356
|
+
width: 14px !important;
|
|
357
|
+
height: 14px !important;
|
|
358
|
+
flex: none;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
@media (hover: hover) {
|
|
362
|
+
.dsh-split-icon-btn:hover:not(:disabled),
|
|
363
|
+
.dsh-split-header-actions button:hover:not(:disabled) {
|
|
364
|
+
background: var(--dsw-alias-interactive-bg-hover) !important;
|
|
365
|
+
color: var(--dsw-alias-label-primary) !important;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.dsh-split-icon-btn:focus-visible,
|
|
370
|
+
.dsh-split-header-actions button:focus-visible {
|
|
371
|
+
outline: var(--dsw-focus-ring-width) solid
|
|
372
|
+
var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
373
|
+
outline-offset: -2px;
|
|
374
|
+
z-index: 1;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.dsh-split-icon-btn.is-pressed {
|
|
378
|
+
background: var(--dsw-alias-interactive-bg-active) !important;
|
|
379
|
+
color: var(--dsw-alias-state-business-primary) !important;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.dsh-split-popout-btn,
|
|
383
|
+
.dsh-split-popout-btn {
|
|
384
|
+
width: 24px;
|
|
385
|
+
height: 24px;
|
|
386
|
+
padding: 0;
|
|
387
|
+
display: inline-flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
justify-content: center;
|
|
390
|
+
border-radius: var(--dsw-radius-sm);
|
|
391
|
+
color: var(--dsw-alias-label-secondary);
|
|
392
|
+
opacity: 0.7;
|
|
393
|
+
transition: opacity var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease),
|
|
394
|
+
color var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease),
|
|
395
|
+
background var(--ds-transition-duration-fast, 0.1s) var(--ds-ease-in-out, ease);
|
|
396
|
+
flex-shrink: 0;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.dsh-split-popout-btn:hover,
|
|
400
|
+
.dsh-split-popout-btn:hover {
|
|
401
|
+
opacity: 1;
|
|
402
|
+
color: var(--dsw-alias-state-business-primary);
|
|
403
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.dsh-split-pane-header:not(.is-focused) .dsh-split-popout-btn,
|
|
407
|
+
.dsh-split-pane-header:not(.is-focused) .dsh-split-popout-btn {
|
|
408
|
+
opacity: 0.6;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.dsh-split-pane-header:not(.is-focused):hover .dsh-split-popout-btn,
|
|
412
|
+
.dsh-split-pane-header:not(.is-focused):hover .dsh-split-popout-btn {
|
|
413
|
+
opacity: 0.95;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.dsh-split-btn,
|
|
417
|
+
.dsh-split-btn {
|
|
418
|
+
display: inline-flex;
|
|
419
|
+
align-items: center;
|
|
420
|
+
justify-content: center;
|
|
421
|
+
gap: 4px;
|
|
422
|
+
height: 28px;
|
|
423
|
+
padding: 0 10px;
|
|
424
|
+
border: 0.5px solid var(--dsw-alias-border-l3);
|
|
425
|
+
border-radius: var(--dsw-radius-sm);
|
|
426
|
+
background: transparent;
|
|
427
|
+
color: var(--dsw-alias-label-secondary);
|
|
428
|
+
font-size: 12px;
|
|
429
|
+
font-family: inherit;
|
|
430
|
+
cursor: pointer;
|
|
431
|
+
white-space: nowrap;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.dsh-split-btn:hover,
|
|
435
|
+
.dsh-split-btn:hover {
|
|
436
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
437
|
+
color: var(--dsw-alias-label-primary);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.dsh-split-btn:disabled,
|
|
441
|
+
.dsh-split-btn:disabled {
|
|
442
|
+
cursor: default;
|
|
443
|
+
opacity: 0.6;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.dsh-split-overlay-tab,
|
|
447
|
+
.dsh-split-overlay-tab {
|
|
448
|
+
display: flex;
|
|
449
|
+
align-items: center;
|
|
450
|
+
gap: 8px;
|
|
451
|
+
min-height: 36px;
|
|
452
|
+
height: 36px;
|
|
453
|
+
padding: 0 8px 0 12px;
|
|
454
|
+
border-bottom: 0.5px solid var(--dsw-alias-border-l3);
|
|
455
|
+
background: var(--dsw-alias-bg-base);
|
|
456
|
+
flex-shrink: 0;
|
|
457
|
+
box-sizing: border-box;
|
|
458
|
+
user-select: none;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.dsh-split-overlay-tab-title,
|
|
462
|
+
.dsh-split-overlay-tab-title {
|
|
463
|
+
flex: 1;
|
|
464
|
+
min-width: 0;
|
|
465
|
+
overflow: hidden;
|
|
466
|
+
text-overflow: ellipsis;
|
|
467
|
+
white-space: nowrap;
|
|
468
|
+
font-size: 13px;
|
|
469
|
+
color: var(--dsw-alias-label-secondary);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.dsh-split-overlay-tab-path,
|
|
473
|
+
.dsh-split-overlay-tab-path {
|
|
474
|
+
user-select: text;
|
|
475
|
+
cursor: text;
|
|
476
|
+
font-size: 13px;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.dsh-split-overlay-close,
|
|
480
|
+
.dsh-split-overlay-close {
|
|
481
|
+
display: inline-flex;
|
|
482
|
+
align-items: center;
|
|
483
|
+
justify-content: center;
|
|
484
|
+
width: 24px;
|
|
485
|
+
height: 24px;
|
|
486
|
+
padding: 0;
|
|
487
|
+
border: none;
|
|
488
|
+
border-radius: var(--dsw-radius-xs);
|
|
489
|
+
background: transparent;
|
|
490
|
+
color: var(--dsw-alias-label-tertiary);
|
|
491
|
+
cursor: pointer;
|
|
492
|
+
flex-shrink: 0;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.dsh-split-overlay-close:hover,
|
|
496
|
+
.dsh-split-overlay-close:hover {
|
|
497
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
498
|
+
color: var(--dsw-alias-label-primary);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.dsh-split-overlay-close:disabled,
|
|
502
|
+
.dsh-split-overlay-close:disabled {
|
|
503
|
+
cursor: default;
|
|
504
|
+
opacity: 0.4;
|
|
505
|
+
background: transparent;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.dsh-split-overlay-close:focus-visible,
|
|
509
|
+
.dsh-split-overlay-close:focus-visible {
|
|
510
|
+
outline: var(--dsw-focus-ring-width) solid
|
|
511
|
+
var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
512
|
+
outline-offset: -2px;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.dsh-split-file,
|
|
516
|
+
.dsh-split-file {
|
|
517
|
+
position: relative;
|
|
518
|
+
flex: 1 1 0;
|
|
519
|
+
min-height: 0;
|
|
520
|
+
overflow: auto;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.dsh-split-floating-quote,
|
|
524
|
+
.dsh-split-floating-quote {
|
|
525
|
+
position: absolute;
|
|
526
|
+
z-index: 25;
|
|
527
|
+
pointer-events: auto;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.dsh-split-floating-quote-btn,
|
|
531
|
+
.dsh-split-floating-quote-btn {
|
|
532
|
+
display: inline-flex;
|
|
533
|
+
align-items: center;
|
|
534
|
+
justify-content: center;
|
|
535
|
+
height: 24px;
|
|
536
|
+
padding: 0 10px;
|
|
537
|
+
font-size: 11px;
|
|
538
|
+
font-weight: 500;
|
|
539
|
+
font-family: var(--dsw-font-family);
|
|
540
|
+
color: #ffffff;
|
|
541
|
+
background: var(--dsw-alias-interactive-bg-primary, #3b82f6);
|
|
542
|
+
border: none;
|
|
543
|
+
border-radius: 12px;
|
|
544
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
|
545
|
+
cursor: pointer;
|
|
546
|
+
user-select: none;
|
|
547
|
+
white-space: nowrap;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.dsh-split-floating-quote-btn:hover,
|
|
551
|
+
.dsh-split-floating-quote-btn:hover {
|
|
552
|
+
filter: brightness(1.1);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.dsh-split-file-text,
|
|
556
|
+
.dsh-split-file-text {
|
|
557
|
+
margin: 0;
|
|
558
|
+
padding: 12px 14px;
|
|
559
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
560
|
+
font-size: 12px;
|
|
561
|
+
line-height: 1.55;
|
|
562
|
+
white-space: pre-wrap;
|
|
563
|
+
word-break: break-word;
|
|
564
|
+
color: var(--dsw-alias-label-primary, #1e293b);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.dsh-split-file-code,
|
|
568
|
+
.dsh-split-file-code {
|
|
569
|
+
width: 100%;
|
|
570
|
+
min-width: 0;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.dsh-split-file-code .md-code-block,
|
|
574
|
+
.dsh-split-file-code .md-code-block {
|
|
575
|
+
margin: 0 !important;
|
|
576
|
+
--dsl-code-block-border-radius: 0px;
|
|
577
|
+
--dsl-code-block-background: transparent;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.dsh-split-file-markdown,
|
|
581
|
+
.dsh-split-file-markdown {
|
|
582
|
+
max-width: 860px;
|
|
583
|
+
margin: 0 auto;
|
|
584
|
+
box-sizing: border-box;
|
|
585
|
+
padding: 12px 16px;
|
|
586
|
+
font-size: 13px;
|
|
587
|
+
color: var(--dsw-alias-label-primary, #1e293b);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.dsh-split-file-markdown img,
|
|
591
|
+
.dsh-split-file-markdown img {
|
|
592
|
+
max-width: 100%;
|
|
593
|
+
height: auto;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.dsh-split-file-media,
|
|
597
|
+
.dsh-split-file-media {
|
|
598
|
+
display: flex;
|
|
599
|
+
align-items: flex-start;
|
|
600
|
+
justify-content: center;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.dsh-split-file-note,
|
|
604
|
+
.dsh-split-file-note {
|
|
605
|
+
margin: 0;
|
|
606
|
+
padding: 12px 14px;
|
|
607
|
+
font-size: 12px;
|
|
608
|
+
line-height: 1.5;
|
|
609
|
+
color: var(--dsw-alias-label-tertiary, #64748b);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.dsh-split-file-image,
|
|
613
|
+
.dsh-split-file-image {
|
|
614
|
+
display: block;
|
|
615
|
+
max-width: calc(100% - 28px);
|
|
616
|
+
max-height: calc(100% - 28px);
|
|
617
|
+
object-fit: contain;
|
|
618
|
+
margin: 14px auto;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.dsh-split-restore-btn,
|
|
622
|
+
.dsh-split-restore-btn {
|
|
623
|
+
display: inline-flex;
|
|
624
|
+
align-items: center;
|
|
625
|
+
gap: 6px;
|
|
626
|
+
background: var(--dsw-alias-state-business-primary, #3964fe) !important;
|
|
627
|
+
color: #ffffff !important;
|
|
628
|
+
border: 1px solid transparent !important;
|
|
629
|
+
font-weight: 500;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.dsh-split-restore-btn:hover,
|
|
633
|
+
.dsh-split-restore-btn:hover {
|
|
634
|
+
background: var(--dsw-alias-brand-hover, #2b54e8) !important;
|
|
635
|
+
color: #ffffff !important;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
@media (max-width: 767px) {
|
|
639
|
+
[data-sidebar-drawer] [data-global-panel]:has(.dsh-split-shell),
|
|
640
|
+
[data-sidebar-drawer] [data-global-panel]:has(.dsh-split-shell) {
|
|
641
|
+
padding-top: 0 !important;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.dsh-split-pane-header,
|
|
645
|
+
.dsh-split-pane-header {
|
|
646
|
+
height: 50px !important;
|
|
647
|
+
min-height: 50px !important;
|
|
648
|
+
padding-inline-start: max(48px, var(--dsh-frame-leading-clearance, 48px)) !important;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.dsh-split-crumb-seg:last-child,
|
|
652
|
+
.dsh-split-crumb-seg:last-child {
|
|
653
|
+
flex: 1 1 auto !important;
|
|
654
|
+
min-width: 0 !important;
|
|
655
|
+
max-width: 100% !important;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.dsh-split-crumb.is-current,
|
|
659
|
+
.dsh-split-crumb.is-current {
|
|
660
|
+
min-width: 0 !important;
|
|
661
|
+
max-width: 100% !important;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.dsh-split-col:not(.is-focused),
|
|
665
|
+
.dsh-split-col:not(.is-focused) {
|
|
666
|
+
display: none !important;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.dsh-split-col.is-focused,
|
|
670
|
+
.dsh-split-col.is-focused {
|
|
671
|
+
display: flex !important;
|
|
672
|
+
flex: 1 1 100% !important;
|
|
673
|
+
width: 100% !important;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.dsh-split-col:not(:last-child)::after,
|
|
677
|
+
.dsh-split-col:not(:last-child)::after {
|
|
678
|
+
display: none !important;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.dsh-split-maximize-btn,
|
|
682
|
+
.dsh-split-maximize-btn {
|
|
683
|
+
display: none !important;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.dsh-split-overlay-view,
|
|
688
|
+
.dsh-split-overlay-view {
|
|
689
|
+
flex: 1 1 0;
|
|
690
|
+
min-height: 0;
|
|
691
|
+
width: 100%;
|
|
692
|
+
display: flex;
|
|
693
|
+
flex-direction: column;
|
|
694
|
+
overflow: hidden;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.dsh-split-pane-body:has(.dsh-split-overlay-view) > [data-conversation-content] > [data-conversation-scroll],
|
|
698
|
+
.dsh-split-pane-body:has(.dsh-split-overlay-view) > [data-conversation-content] > [data-conversation-scroll] {
|
|
699
|
+
overflow: hidden;
|
|
700
|
+
display: flex;
|
|
701
|
+
flex-direction: column;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.dsh-split-pane-body:has(.dsh-split-file) .dsh-split-file,
|
|
705
|
+
.dsh-split-pane-body:has(.dsh-split-file) .dsh-split-file {
|
|
706
|
+
box-sizing: border-box;
|
|
707
|
+
padding-bottom: 36px;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.dsh-split-pane-body:has(.dsh-split-file) [data-composer-seat],
|
|
711
|
+
.dsh-split-pane-body:has(.dsh-split-file) [data-composer-seat] {
|
|
712
|
+
position: relative;
|
|
713
|
+
flex: none;
|
|
714
|
+
margin-top: -36px;
|
|
715
|
+
background: linear-gradient(
|
|
716
|
+
180deg,
|
|
717
|
+
color-mix(in srgb, var(--dsw-alias-bg-base) 0%, transparent) 0px,
|
|
718
|
+
var(--dsw-alias-bg-base) 28px,
|
|
719
|
+
var(--dsw-alias-bg-base) 100%
|
|
720
|
+
);
|
|
721
|
+
border-top: none;
|
|
722
|
+
padding: 16px 12px 12px;
|
|
723
|
+
pointer-events: none;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.dsh-split-pane-body:has(.dsh-split-file) [data-composer-seat] > *,
|
|
727
|
+
.dsh-split-pane-body:has(.dsh-split-file) [data-composer-seat] > * {
|
|
728
|
+
pointer-events: auto;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.dsh-split-pane-body > [data-conversation-content],
|
|
732
|
+
.dsh-split-pane-body > [data-conversation-content] {
|
|
733
|
+
flex: 1 1 0;
|
|
734
|
+
height: 100%;
|
|
735
|
+
width: 100%;
|
|
736
|
+
min-height: 0;
|
|
737
|
+
display: flex;
|
|
738
|
+
flex-direction: column;
|
|
739
|
+
overflow: hidden;
|
|
740
|
+
--dsh-chat-content-width: min(100%, 860px);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.dsh-split-pane-body > [data-conversation-content] > [data-conversation-scroll],
|
|
744
|
+
.dsh-split-pane-body > [data-conversation-content] > [data-conversation-scroll] {
|
|
745
|
+
flex: 1 1 0;
|
|
746
|
+
height: 100%;
|
|
747
|
+
width: 100%;
|
|
748
|
+
min-height: 0;
|
|
749
|
+
overflow-x: hidden;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.dsh-split-pane-body [data-conversation-scroll] :is([class*="_scroll"], :has(> [data-chat-flow])),
|
|
753
|
+
.dsh-split-pane-body [data-conversation-scroll] :is([class*="_scroll"], :has(> [data-chat-flow])) {
|
|
754
|
+
padding: 16px 12px;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.dsh-split-pane-body [data-conversation-content] :is([class*="md-table-wide"], .md-table-wide),
|
|
758
|
+
.dsh-split-pane-body [data-conversation-content] :is([class*="md-table-wide"], .md-table-wide) {
|
|
759
|
+
width: 100% !important;
|
|
760
|
+
max-width: 100% !important;
|
|
761
|
+
margin-left: 0 !important;
|
|
762
|
+
padding-left: 0 !important;
|
|
763
|
+
overflow-x: auto !important;
|
|
764
|
+
padding-bottom: 0 !important;
|
|
765
|
+
}
|
|
766
|
+
`;
|
|
767
|
+
|
|
768
|
+
export function registerSplitStyles(
|
|
769
|
+
_ctx: ClientContext,
|
|
770
|
+
pluginId: string,
|
|
771
|
+
): () => void {
|
|
772
|
+
if (typeof document === "undefined") return () => {};
|
|
773
|
+
const styleEl = document.createElement("style");
|
|
774
|
+
styleEl.setAttribute("data-plugin", pluginId);
|
|
775
|
+
styleEl.textContent = SPLIT_VIEW_CSS;
|
|
776
|
+
document.head.appendChild(styleEl);
|
|
777
|
+
return () => {
|
|
778
|
+
styleEl.remove();
|
|
779
|
+
};
|
|
780
|
+
}
|