codexmate 0.1.21 → 0.1.23

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.
@@ -0,0 +1,422 @@
1
+ /*
2
+ * Prompts-panel Markdown editor: syntax-highlight overlay, toolbar,
3
+ * split live preview (desktop) and edit/preview switch (mobile).
4
+ * Overlay alignment contract: the backdrop <pre> must mirror the
5
+ * textarea's font, font-size, line-height, padding and white-space
6
+ * exactly (.form-input padding 13px var(--spacing-sm), .template-editor
7
+ * mono font 13px / 1.45, white-space pre).
8
+ */
9
+
10
+ .prompts-md-toolbar {
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: space-between;
14
+ gap: 8px;
15
+ margin-bottom: 8px;
16
+ flex-wrap: wrap;
17
+ }
18
+
19
+ .prompts-md-toolbar-group {
20
+ display: flex;
21
+ gap: 6px;
22
+ align-items: center;
23
+ }
24
+
25
+ .prompts-md-toolbar-group--view {
26
+ margin-left: auto;
27
+ }
28
+
29
+
30
+ .prompts-mobile-view-switch {
31
+ display: none;
32
+ gap: 4px;
33
+ padding: 2px;
34
+ border-radius: var(--radius-sm);
35
+ border: 1px solid var(--color-border-soft);
36
+ }
37
+
38
+ .prompts-mobile-view-btn {
39
+ padding: 3px 10px;
40
+ border: none;
41
+ border-radius: calc(var(--radius-sm) - 2px);
42
+ background: transparent;
43
+ color: var(--color-text-tertiary);
44
+ font-size: var(--font-size-caption);
45
+ cursor: pointer;
46
+ }
47
+
48
+ .prompts-mobile-view-btn.active {
49
+ background: var(--color-brand-light);
50
+ color: var(--color-brand-dark);
51
+ font-weight: var(--font-weight-secondary);
52
+ }
53
+
54
+ .prompts-editor-frame {
55
+ display: flex;
56
+ flex-direction: column;
57
+ }
58
+
59
+ .prompts-editor-columns {
60
+ display: grid;
61
+ grid-template-columns: minmax(0, 1fr);
62
+ flex: 1;
63
+ min-height: 0;
64
+ }
65
+
66
+ .prompts-editor-frame--split .prompts-editor-columns {
67
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
68
+ }
69
+
70
+ .prompts-editor-frame--split.prompts-editor-frame--preview-collapsed .prompts-editor-columns {
71
+ grid-template-columns: minmax(0, 1fr);
72
+ }
73
+
74
+ .prompts-editor-frame--split.prompts-editor-frame--preview-collapsed .prompts-preview-pane {
75
+ display: none;
76
+ }
77
+
78
+ .prompts-split-collapse-btn {
79
+ position: absolute;
80
+ top: 10px;
81
+ left: calc(50% - 13px);
82
+ z-index: 5;
83
+ display: inline-flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ width: 26px;
87
+ height: 26px;
88
+ padding: 0;
89
+ border: 1px solid var(--color-border-soft);
90
+ border-radius: var(--radius-sm);
91
+ background: rgba(255, 255, 255, 0.95);
92
+ color: var(--color-text-secondary);
93
+ cursor: pointer;
94
+ }
95
+
96
+ .prompts-split-collapse-btn:hover {
97
+ color: var(--color-text-primary);
98
+ }
99
+
100
+ .prompts-split-collapse-icon {
101
+ display: block;
102
+ width: 14px;
103
+ height: 14px;
104
+ }
105
+
106
+ .prompts-split-collapse-btn--collapsed {
107
+ left: auto;
108
+ right: 8px;
109
+ }
110
+
111
+ .prompts-split-collapse-btn--collapsed .prompts-split-collapse-icon {
112
+ transform: rotate(180deg);
113
+ }
114
+
115
+ .prompts-edit-pane {
116
+ position: relative;
117
+ display: flex;
118
+ flex-direction: column;
119
+ min-height: 75vh;
120
+ min-width: 0;
121
+ }
122
+
123
+ .prompts-edit-pane .template-editor {
124
+ flex: 1;
125
+ width: 100%;
126
+ min-height: 75vh;
127
+ max-height: none;
128
+ color: transparent;
129
+ caret-color: var(--color-text-primary);
130
+ background: transparent;
131
+ position: relative;
132
+ z-index: 2;
133
+ }
134
+
135
+ .prompts-edit-pane .template-editor::selection {
136
+ color: transparent;
137
+ background: var(--color-brand-subtle);
138
+ }
139
+
140
+ .prompts-highlight-backdrop {
141
+ position: absolute;
142
+ inset: 0;
143
+ z-index: 1;
144
+ margin: 0;
145
+ padding: 13px var(--spacing-sm);
146
+ border: none;
147
+ overflow: hidden;
148
+ white-space: pre;
149
+ font-family: var(--font-family-mono);
150
+ font-size: 13px;
151
+ line-height: 1.45;
152
+ color: var(--color-text-primary);
153
+ pointer-events: none;
154
+ }
155
+
156
+ /* highlight.js markdown token colors (light theme) */
157
+ .prompts-highlight-backdrop .hljs-section {
158
+ color: var(--color-brand-dark);
159
+ font-weight: var(--font-weight-secondary);
160
+ }
161
+
162
+ .prompts-highlight-backdrop .hljs-strong {
163
+ color: var(--color-text-primary);
164
+ font-weight: 700;
165
+ }
166
+
167
+ .prompts-highlight-backdrop .hljs-emphasis {
168
+ color: var(--color-text-secondary);
169
+ font-style: italic;
170
+ }
171
+
172
+ .prompts-highlight-backdrop .hljs-bullet {
173
+ color: var(--color-brand);
174
+ }
175
+
176
+ .prompts-highlight-backdrop .hljs-code {
177
+ color: #7C5CBF;
178
+ }
179
+
180
+ .prompts-highlight-backdrop .hljs-quote {
181
+ color: var(--color-text-tertiary);
182
+ font-style: italic;
183
+ }
184
+
185
+ .prompts-highlight-backdrop .hljs-link,
186
+ .prompts-highlight-backdrop .hljs-symbol {
187
+ color: #3B7EA1;
188
+ }
189
+
190
+ .prompts-preview-pane {
191
+ position: relative;
192
+ height: 0;
193
+ min-height: 100%;
194
+ min-width: 0;
195
+ padding: 14px 16px;
196
+ overflow-y: auto;
197
+ border-left: 1.5px solid var(--color-border-soft);
198
+ background: rgba(255, 255, 255, 0.55);
199
+ }
200
+
201
+ .prompts-preview-pane .state-message {
202
+ padding: 12px 4px;
203
+ }
204
+
205
+ .prompts-preview-body {
206
+ font-size: 14px;
207
+ line-height: 1.65;
208
+ color: var(--color-text-primary);
209
+ word-break: break-word;
210
+ }
211
+
212
+ .prompts-preview-body h1,
213
+ .prompts-preview-body h2,
214
+ .prompts-preview-body h3,
215
+ .prompts-preview-body h4 {
216
+ margin: 1em 0 0.4em;
217
+ line-height: 1.3;
218
+ color: var(--color-text-primary);
219
+ }
220
+
221
+ .prompts-preview-body h1 { font-size: 1.5em; }
222
+ .prompts-preview-body h2 { font-size: 1.3em; }
223
+ .prompts-preview-body h3 { font-size: 1.15em; }
224
+ .prompts-preview-body h4 { font-size: 1em; }
225
+
226
+ .prompts-preview-body p {
227
+ margin: 0.5em 0;
228
+ }
229
+
230
+ .prompts-preview-body ul,
231
+ .prompts-preview-body ol {
232
+ margin: 0.5em 0;
233
+ padding-left: 1.6em;
234
+ }
235
+
236
+ .prompts-preview-body li {
237
+ margin: 0.2em 0;
238
+ }
239
+
240
+ .prompts-preview-body blockquote {
241
+ margin: 0.6em 0;
242
+ padding: 2px 12px;
243
+ border-left: 3px solid var(--color-brand-subtle);
244
+ color: var(--color-text-secondary);
245
+ background: var(--color-brand-light);
246
+ }
247
+
248
+ .prompts-preview-body code {
249
+ padding: 1px 5px;
250
+ border-radius: 4px;
251
+ background: rgba(137, 111, 94, 0.12);
252
+ font-family: var(--font-family-mono);
253
+ font-size: 0.92em;
254
+ }
255
+
256
+ .prompts-preview-body pre {
257
+ margin: 0.6em 0;
258
+ padding: 10px 12px;
259
+ border-radius: var(--radius-sm);
260
+ background: rgba(137, 111, 94, 0.12);
261
+ overflow-x: auto;
262
+ }
263
+
264
+ .prompts-preview-body pre code {
265
+ padding: 0;
266
+ background: transparent;
267
+ }
268
+
269
+ .prompts-preview-body table {
270
+ border-collapse: collapse;
271
+ margin: 0.6em 0;
272
+ }
273
+
274
+ .prompts-preview-body th,
275
+ .prompts-preview-body td {
276
+ border: 1px solid var(--color-border-soft);
277
+ padding: 4px 8px;
278
+ }
279
+
280
+ .prompts-preview-body hr {
281
+ border: none;
282
+ border-top: 1.5px solid var(--color-border-soft);
283
+ margin: 1em 0;
284
+ }
285
+
286
+ .prompts-preview-body a {
287
+ color: var(--color-brand-dark);
288
+ }
289
+
290
+ .prompts-preview-body img {
291
+ max-width: 100%;
292
+ }
293
+
294
+
295
+ /*
296
+ * Change axis: clickable per-hunk navigation strip rendered on the
297
+ * right edge of the edit pane (edit mode) and of the diff frame
298
+ * (diff preview mode). Ticks are positioned by percentage of the
299
+ * content line space (edit) or of the rendered rows (diff).
300
+ */
301
+ .prompts-change-axis {
302
+ position: absolute;
303
+ top: 6px;
304
+ bottom: 6px;
305
+ right: 2px;
306
+ width: 10px;
307
+ z-index: 3;
308
+ pointer-events: none;
309
+ }
310
+
311
+ .prompts-change-tick {
312
+ position: absolute;
313
+ left: 0;
314
+ right: 0;
315
+ min-height: 8px;
316
+ padding: 0;
317
+ border: none;
318
+ border-radius: 3px;
319
+ cursor: pointer;
320
+ pointer-events: auto;
321
+ }
322
+
323
+ .prompts-change-tick:focus-visible {
324
+ outline: 2px solid var(--color-brand);
325
+ outline-offset: 1px;
326
+ }
327
+
328
+ .prompts-change-tick--add {
329
+ background: rgba(57, 181, 97, 0.5);
330
+ }
331
+
332
+ .prompts-change-tick--add:hover,
333
+ .prompts-change-tick--add:focus-visible {
334
+ background: rgba(57, 181, 97, 0.85);
335
+ }
336
+
337
+ .prompts-change-tick--del {
338
+ background: rgba(220, 95, 108, 0.5);
339
+ }
340
+
341
+ .prompts-change-tick--del:hover,
342
+ .prompts-change-tick--del:focus-visible {
343
+ background: rgba(220, 95, 108, 0.85);
344
+ }
345
+
346
+ .prompts-change-tick--mixed {
347
+ background: linear-gradient(180deg,
348
+ rgba(220, 95, 108, 0.5) 0%,
349
+ rgba(220, 95, 108, 0.5) 50%,
350
+ rgba(57, 181, 97, 0.5) 50%,
351
+ rgba(57, 181, 97, 0.5) 100%);
352
+ }
353
+
354
+ .prompts-change-tick--mixed:hover,
355
+ .prompts-change-tick--mixed:focus-visible {
356
+ background: linear-gradient(180deg,
357
+ rgba(220, 95, 108, 0.85) 0%,
358
+ rgba(220, 95, 108, 0.85) 50%,
359
+ rgba(57, 181, 97, 0.85) 50%,
360
+ rgba(57, 181, 97, 0.85) 100%);
361
+ }
362
+
363
+ .prompts-diff-frame {
364
+ position: relative;
365
+ }
366
+
367
+ .prompts-change-axis--summary {
368
+ display: flex;
369
+ flex-direction: column;
370
+ align-items: flex-end;
371
+ gap: 2px;
372
+ width: auto;
373
+ font-size: 10px;
374
+ font-weight: var(--font-weight-secondary);
375
+ }
376
+
377
+ .prompts-change-summary {
378
+ padding: 0 6px;
379
+ border-radius: 999px;
380
+ white-space: nowrap;
381
+ }
382
+
383
+ .prompts-change-summary.add {
384
+ color: #2b6a3b;
385
+ background: rgba(57, 181, 97, 0.12);
386
+ }
387
+
388
+ .prompts-change-summary.del {
389
+ color: #8a2f36;
390
+ background: rgba(220, 95, 108, 0.12);
391
+ }
392
+ /* Mobile: force single column and edit/preview tab switching */
393
+ @media (max-width: 767.98px) {
394
+ .prompts-mobile-view-switch {
395
+ display: inline-flex;
396
+ }
397
+
398
+ .prompts-editor-frame--split .prompts-editor-columns {
399
+ grid-template-columns: minmax(0, 1fr);
400
+ }
401
+
402
+ .prompts-editor-frame--split.prompts-editor-frame--mobile-preview .prompts-edit-pane {
403
+ display: none;
404
+ }
405
+
406
+ .prompts-editor-frame--split:not(.prompts-editor-frame--mobile-preview) .prompts-preview-pane {
407
+ display: none;
408
+ }
409
+
410
+ .prompts-editor-frame--split.prompts-editor-frame--mobile-preview .prompts-preview-pane {
411
+ height: auto;
412
+ min-height: 75vh;
413
+ }
414
+
415
+ .prompts-split-collapse-btn {
416
+ display: none;
417
+ }
418
+
419
+ .prompts-change-tick {
420
+ min-height: 12px;
421
+ }
422
+ }
package/web-ui/styles.css CHANGED
@@ -22,3 +22,4 @@
22
22
  @import url('./styles/webhook.css');
23
23
  @import url('./styles/trash-panel.css');
24
24
  @import url('./styles/system-prompt.css');
25
+ @import url('./styles/prompts-editor.css');