report-studio 1.0.0 → 1.1.0

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 (47) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +129 -4
  3. package/dist/designer-qy59eEux.js +3416 -0
  4. package/dist/designer.js +2 -3209
  5. package/dist/index.js +2 -2
  6. package/dist/react-designer.js +41 -0
  7. package/dist/react.js +60 -0
  8. package/dist/{viewer-D-c0lKzQ.js → viewer-xa17tyMJ.js} +682 -537
  9. package/package.json +80 -66
  10. package/src/cli/serve.js +135 -135
  11. package/src/designer/designer.js +2054 -1900
  12. package/src/designer/dialog.js +708 -708
  13. package/src/designer/fields.js +51 -2
  14. package/src/designer/icons.js +5 -0
  15. package/src/designer/index.html +28 -28
  16. package/src/designer/main.js +39 -39
  17. package/src/designer/menu.js +2 -2
  18. package/src/designer/panel.js +21 -1
  19. package/src/designer/sample-data.js +180 -9
  20. package/src/designer/structure.js +87 -6
  21. package/src/designer/styles.css +1654 -1616
  22. package/src/designer/tokens.js +9 -0
  23. package/src/engine/csv.js +350 -315
  24. package/src/engine/group.js +128 -65
  25. package/src/engine/index.js +35 -34
  26. package/src/engine/measure.js +13 -12
  27. package/src/engine/paginate.js +8 -4
  28. package/src/engine/resolve.js +37 -0
  29. package/src/engine/tables.js +87 -0
  30. package/src/engine/validate.js +97 -22
  31. package/src/index.html +79 -79
  32. package/src/index.js +51 -50
  33. package/src/preview/chrome.css +505 -505
  34. package/src/preview/chrome.js +147 -147
  35. package/src/preview/index.html +28 -28
  36. package/src/preview/viewer.js +763 -745
  37. package/src/react/designer.js +87 -0
  38. package/src/react/index.js +117 -0
  39. package/src/render/items.js +94 -1
  40. package/src/render/report.css +30 -0
  41. package/src/server/routes.js +331 -331
  42. package/src/shared/brand.css +29 -29
  43. package/src/shared/dropdown.css +136 -136
  44. package/src/shared/modal.css +125 -125
  45. package/src/shared/store.js +145 -145
  46. package/src/shared/theme.css +72 -72
  47. package/src/shared/window.js +138 -138
@@ -1,1616 +1,1654 @@
1
- /**
2
- * The designer's chrome. How the report itself looks is render/report.css,
3
- * shared with the preview - so this file styles the bar, the gutter, the zone
4
- * outlines and the error panel, and nothing that ends up on paper.
5
- *
6
- * The viewer's chrome is imported too, and is not dead weight here: "open the
7
- * report in its own tab" builds a window out of *this page's* stylesheets and
8
- * mounts a viewer into it, so a toolbar and a pager the designer never draws
9
- * itself still have to be reachable from here or that window arrives unstyled.
10
- */
11
-
12
- @import "../shared/theme.css";
13
- @import "../render/report.css";
14
- @import "../shared/modal.css";
15
- @import "../shared/dropdown.css";
16
- @import "../preview/chrome.css";
17
-
18
- :root {
19
- --dz-bar-height: 56px;
20
- /* wide enough for "reportHeader", the longest band name */
21
- --dz-gutter: 96px;
22
- --dz-panel: 268px;
23
- --dz-foot-height: 44px;
24
- /* how far the floating tools sit off the bottom edge, as the pager does */
25
- --dz-foot-offset: 20px;
26
- }
27
-
28
- .report-designer {
29
- min-height: 100vh;
30
- background-color: var(--backdrop);
31
- }
32
-
33
- /**
34
- * The designer takes the focus so its shortcuts have somewhere to arrive, but
35
- * it is not a control - a ring around the whole screen would be saying that it
36
- * is. Nothing inside it loses its own ring; they are separate stops.
37
- */
38
- .report-designer:focus {
39
- outline: none;
40
- }
41
-
42
- /* ---------------- the bar ---------------- */
43
-
44
- .dz-bar {
45
- position: fixed;
46
- inset: 0 0 auto 0;
47
- z-index: 10;
48
-
49
- display: flex;
50
- align-items: center;
51
- gap: 16px;
52
- height: var(--dz-bar-height);
53
- padding: 0 20px;
54
-
55
- background: var(--surface);
56
- border-bottom: 1px solid var(--border);
57
-
58
- font-family: "Instrument Sans", system-ui, sans-serif;
59
- font-size: 13px;
60
- color: var(--ink);
61
- }
62
-
63
- /*
64
- * The wordmark, drawn rather than typed. The text stays in the markup and is
65
- * only pushed out of sight, so the bar still has an accessible name and a
66
- * document read aloud still starts with "Report Studio".
67
- *
68
- * Height is set and the width follows from the mark's own ratio, so the bar
69
- * keeps its rhythm if the artwork is ever redrawn at another size.
70
- */
71
- .dz-brand {
72
- height: 18px;
73
- width: calc(18px * var(--brand-logo-ratio));
74
- flex: none;
75
-
76
- background-image: var(--brand-logo);
77
- background-repeat: no-repeat;
78
- background-position: left center;
79
- background-size: contain;
80
-
81
- /* the name is for screen readers now, not for eyes */
82
- text-indent: -9999px;
83
- overflow: hidden;
84
- white-space: nowrap;
85
- }
86
-
87
- /* the report's name is the subject of the screen, so it takes the middle */
88
- .dz-name {
89
- flex: 1;
90
- color: var(--ink);
91
- font-weight: 500;
92
- }
93
-
94
- .dz-size {
95
- color: var(--ink-soft);
96
- font-variant-numeric: tabular-nums;
97
- }
98
-
99
- /* ---------------- the canvas ---------------- */
100
-
101
- /* the bar is fixed, so the row below it starts where the bar ends */
102
- .dz-body {
103
- display: flex;
104
- align-items: stretch;
105
- margin-top: var(--dz-bar-height);
106
- height: calc(100vh - var(--dz-bar-height));
107
- }
108
-
109
- /**
110
- * The page and its tools; the rail is the other half of .dz-body. Positioned,
111
- * because the tool pill floats inside it - centring on the window instead would
112
- * put the pill off-centre from the page by half the width of the rail.
113
- */
114
- .dz-main {
115
- position: relative;
116
- flex: 1;
117
- min-width: 0;
118
- display: flex;
119
- flex-direction: column;
120
- }
121
-
122
- /**
123
- * The tools float over this rather than taking a strip of it, so the bottom
124
- * padding is what lets the end of the page scroll clear of the pill.
125
- */
126
- .dz-canvas {
127
- flex: 1;
128
- min-height: 0;
129
- overflow: auto;
130
- padding: 24px 24px calc(var(--dz-foot-height) + var(--dz-foot-offset) + 24px);
131
- }
132
-
133
- /**
134
- * The two boxes the zoom works through.
135
- *
136
- * The layer is what is scaled, and a transform changes nothing about layout -
137
- * so at 200% there would be nothing to scroll. The stage is given the scaled
138
- * size in px by applyZoom, and is what the canvas scrolls and centres.
139
- */
140
- .dz-stage {
141
- width: max-content;
142
- margin: 0 auto;
143
- }
144
-
145
- .dz-zoom-layer {
146
- width: max-content;
147
- transform-origin: top left;
148
- }
149
-
150
- /* the zoom group in the bar, which is the viewer's three controls again */
151
- .dz-zoom-group .dropdown-trigger {
152
- min-width: 92px;
153
- }
154
-
155
- /**
156
- * The gutter, the rulers and the page scroll together, so they stay in step.
157
- *
158
- * A grid rather than a row, because the rulers have to line up with the page on
159
- * both axes at once: the horizontal one starts where the page's left margin
160
- * ends, and the vertical one starts where its top margin does. With the rulers
161
- * off, both of their tracks collapse to nothing and the sheet is the row it
162
- * always was.
163
- */
164
- .dz-sheet {
165
- display: grid;
166
- grid-template-areas:
167
- ". corner ruler-x"
168
- "gutter ruler-y page";
169
- grid-template-columns: var(--dz-gutter) auto auto;
170
- grid-template-rows: auto auto;
171
- align-items: start;
172
- column-gap: 8px;
173
- width: max-content;
174
- }
175
-
176
- .dz-gutter { grid-area: gutter; }
177
- .dz-page { grid-area: page; }
178
- .dz-ruler-corner { grid-area: corner; }
179
- .dz-ruler-x { grid-area: ruler-x; }
180
- .dz-ruler-y { grid-area: ruler-y; }
181
-
182
- .dz-gutter {
183
- position: relative;
184
- flex: none;
185
- width: var(--dz-gutter);
186
- height: var(--page-height);
187
- }
188
-
189
- /**
190
- * Band names sit beside the page, not on it. Over the design they would cover
191
- * an item at the top-left of every band - which is exactly where a title goes.
192
- */
193
- .dz-tag {
194
- position: absolute;
195
- right: 0;
196
- transform: translateY(-1px);
197
-
198
- font-family: "Instrument Sans", system-ui, sans-serif;
199
- font-size: 10px;
200
- letter-spacing: .04em;
201
- color: var(--ink-soft);
202
- white-space: nowrap;
203
- user-select: none;
204
- }
205
-
206
- .dz-page {
207
- flex: none;
208
- }
209
-
210
- /**
211
- * Dashed, and drawn inside the zone with a negative offset, so the boundary is
212
- * visible while designing without adding a pixel to anything's position.
213
- */
214
- .dz-zone {
215
- outline: 1px dashed var(--border);
216
- outline-offset: -1px;
217
- }
218
-
219
- /* ---------------- the error panel ---------------- */
220
-
221
- .dz-problems h2 {
222
- margin-bottom: 12px;
223
- font-size: 15px;
224
- font-weight: 600;
225
- }
226
-
227
- .dz-problems ul {
228
- margin: 0;
229
- padding-left: 18px;
230
- }
231
-
232
- .dz-problems li {
233
- margin: 4px 0;
234
- color: var(--ink-soft);
235
- line-height: 1.5;
236
- }
237
-
238
- /* ---------------- selection ---------------- */
239
-
240
- /**
241
- * The outline is a sibling of the bands, laid over the page - spec 5.2 asks for
242
- * the preview's drawing plus chrome on top, and drawing selection *into* an
243
- * item is how the two paths start to differ.
244
- *
245
- * pointer-events: none, or the outline would swallow the click that lands on
246
- * the item beneath it. The handles opt back in.
247
- */
248
- .dz-select {
249
- position: absolute;
250
- z-index: 2;
251
- pointer-events: none;
252
- outline: 1px solid var(--accent-strong);
253
- outline-offset: 0;
254
- }
255
-
256
- .dz-handle {
257
- position: absolute;
258
- width: 9px;
259
- height: 9px;
260
- pointer-events: auto;
261
-
262
- background: var(--surface);
263
- border: 1px solid var(--accent-strong);
264
- border-radius: 1px;
265
- }
266
-
267
- /* the four corners, then the four edge midpoints */
268
- .dz-handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
269
- .dz-handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
270
- .dz-handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
271
- .dz-handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
272
-
273
- .dz-handle-n { top: -5px; left: 50%; margin-left: -5px; cursor: ns-resize; }
274
- .dz-handle-s { bottom: -5px; left: 50%; margin-left: -5px; cursor: ns-resize; }
275
- .dz-handle-w { left: -5px; top: 50%; margin-top: -5px; cursor: ew-resize; }
276
- .dz-handle-e { right: -5px; top: 50%; margin-top: -5px; cursor: ew-resize; }
277
-
278
- /* a toggle that is on says so, the way the preview button does */
279
- .dz-tool.is-on {
280
- color: var(--accent-ink);
281
- background: var(--accent-soft);
282
- border-color: var(--accent-tint);
283
- }
284
-
285
- /* an item is grabbable, so it says so before it is grabbed */
286
- .dz-page [data-item-id] {
287
- cursor: move;
288
- }
289
-
290
- /**
291
- * A drag that crosses a text item would otherwise select its text, and the
292
- * browser's selection highlight then sits under the outline for the rest of
293
- * the gesture.
294
- */
295
- .dz-canvas.is-dragging {
296
- user-select: none;
297
- cursor: grabbing;
298
- }
299
-
300
- /* ---------------- rulers and guides ---------------- */
301
-
302
- :root {
303
- --dz-ruler: 18px;
304
- }
305
-
306
- /**
307
- * The rulers measure the printable area, not the paper - the number under an
308
- * item is the `x` the properties rail shows for it, and a ruler that disagreed
309
- * with the rail would be worse than no ruler. They start where the margins end,
310
- * which says how wide the margins are without a number for that too.
311
- */
312
- .dz-ruler {
313
- position: relative;
314
- background: var(--surface-muted);
315
- border: 1px solid var(--border);
316
- cursor: crosshair;
317
- user-select: none;
318
- overflow: hidden;
319
- }
320
-
321
- .dz-ruler-x {
322
- height: var(--dz-ruler);
323
- /* the page's left margin, so 0 on the ruler is 0 for an item */
324
- margin: 0 0 4px var(--dz-margin-left);
325
- }
326
-
327
- .dz-ruler-y {
328
- width: var(--dz-ruler);
329
- margin: var(--dz-margin-top) 4px 0 0;
330
- }
331
-
332
- /**
333
- * A tick is drawn from the far edge inwards, so the labelled ones reach further
334
- * into the ruler than the fine ones and the scale is readable without counting.
335
- */
336
- .dz-tick {
337
- position: absolute;
338
- background: var(--border);
339
- }
340
-
341
- .dz-ruler-x .dz-tick { bottom: 0; width: 1px; height: 4px; }
342
- .dz-ruler-y .dz-tick { right: 0; height: 1px; width: 4px; }
343
-
344
- .dz-ruler-x .dz-tick.is-major { height: 8px; }
345
- .dz-ruler-y .dz-tick.is-major { width: 8px; }
346
-
347
- .dz-tick i {
348
- position: absolute;
349
- font-family: "Instrument Sans", system-ui, sans-serif;
350
- font-size: 8px;
351
- font-style: normal;
352
- line-height: 1;
353
- color: var(--ink-soft);
354
- white-space: nowrap;
355
- }
356
-
357
- .dz-ruler-x .dz-tick i { bottom: 9px; left: 2px; }
358
-
359
- /**
360
- * Turned on its side, so the vertical ruler stays 18px wide. Reading a number
361
- * sideways beats a ruler wide enough to print it flat, which would push the
362
- * page off centre by more than the ruler is worth.
363
- */
364
- .dz-ruler-y .dz-tick i {
365
- right: 9px;
366
- top: 1px;
367
- transform-origin: 100% 0;
368
- transform: rotate(-90deg) translate(-100%, 0);
369
- }
370
-
371
- /* where a guide meets its ruler, so one dragged off the page is still findable */
372
- .dz-ruler-guide {
373
- position: absolute;
374
- background: var(--accent-strong);
375
- }
376
-
377
- .dz-ruler-x .dz-ruler-guide { top: 0; bottom: 0; width: 1px; }
378
- .dz-ruler-y .dz-ruler-guide { left: 0; right: 0; height: 1px; }
379
-
380
- /* the empty square where the two meet; it squares the corner off, nothing more */
381
- .dz-ruler-corner {
382
- width: var(--dz-ruler);
383
- height: var(--dz-ruler);
384
- margin: 0 4px 4px 0;
385
- background: var(--surface-muted);
386
- border: 1px solid var(--border);
387
- }
388
-
389
- /**
390
- * The guides on the page. Under the selection outline and over the design, and
391
- * they take no pointer events: select.js finds the one nearest the pointer by
392
- * arithmetic instead, because a one-pixel line is not something anyone can hit
393
- * and a line wide enough to hit would cover the design it is aligning.
394
- */
395
- .dz-rules {
396
- position: absolute;
397
- inset: 0;
398
- z-index: 1;
399
- pointer-events: none;
400
- }
401
-
402
- .dz-rule {
403
- position: absolute;
404
- background: var(--accent-tint);
405
- }
406
-
407
- .dz-rule-v { top: 0; bottom: 0; width: 1px; }
408
- .dz-rule-h { left: 0; right: 0; height: 1px; }
409
-
410
- /* the whole page is a place a guide might be picked up from */
411
- .dz-sheet.has-rulers .dz-page { cursor: default; }
412
-
413
- /* ---------------- alignment guides ---------------- */
414
-
415
- /**
416
- * The guides sit above the design and below nothing - they are the only thing
417
- * on the canvas that is about the gesture rather than about the report, so they
418
- * are drawn last and take no pointer events at all. A guide that could be
419
- * clicked would end the drag that is drawing it.
420
- */
421
- .dz-guides {
422
- position: absolute;
423
- inset: 0;
424
- z-index: 3;
425
- pointer-events: none;
426
- }
427
-
428
- /**
429
- * A hairline, not a rule: it is saying "these two agree", and anything thicker
430
- * reads as part of the design it is drawn over. The colour is the accent's
431
- * darkest mix, which is the one shade that holds up over a white page and over
432
- * a table header both.
433
- */
434
- .dz-guide {
435
- position: absolute;
436
- background: var(--accent-strong);
437
- }
438
-
439
- .dz-guide-v { width: 1px; }
440
- .dz-guide-h { height: 1px; }
441
-
442
- /* a centre line is dashed, so "these middles agree" is not read as "these edges do" */
443
- .dz-guide-v.is-centre {
444
- width: 0;
445
- background: none;
446
- border-left: 1px dashed var(--accent-strong);
447
- }
448
-
449
- .dz-guide-h.is-centre {
450
- height: 0;
451
- background: none;
452
- border-top: 1px dashed var(--accent-strong);
453
- }
454
-
455
- /**
456
- * A measurement, drawn as the space it is measuring rather than as a line
457
- * beside it - the bar is the gap, and the number is on it.
458
- */
459
- .dz-gap {
460
- position: absolute;
461
- display: flex;
462
- align-items: center;
463
- justify-content: center;
464
- }
465
-
466
- .dz-gap-v {
467
- width: 0;
468
- border-left: 1px solid var(--accent-ink);
469
- }
470
-
471
- .dz-gap-h {
472
- height: 0;
473
- border-top: 1px solid var(--accent-ink);
474
- }
475
-
476
- /* the gap to the band's own edge is the quieter of the two: it is always there */
477
- .dz-gap.is-band {
478
- opacity: 0.55;
479
- }
480
-
481
- /* the ticks that close the measurement off, so a 0px gap is still visible */
482
- .dz-gap::before,
483
- .dz-gap::after {
484
- content: "";
485
- position: absolute;
486
- background: var(--accent-ink);
487
- }
488
-
489
- .dz-gap-v::before,
490
- .dz-gap-v::after {
491
- left: -3px;
492
- width: 7px;
493
- height: 1px;
494
- }
495
-
496
- .dz-gap-v::before { top: 0; }
497
- .dz-gap-v::after { bottom: 0; }
498
-
499
- .dz-gap-h::before,
500
- .dz-gap-h::after {
501
- top: -3px;
502
- width: 1px;
503
- height: 7px;
504
- }
505
-
506
- .dz-gap-h::before { left: 0; }
507
- .dz-gap-h::after { right: 0; }
508
-
509
- /**
510
- * The number. Absolutely placed so it never stretches the bar it sits on, and
511
- * given the page's own background so the line does not run through the digits.
512
- */
513
- .dz-gap i {
514
- position: absolute;
515
- padding: 0 3px;
516
-
517
- font-family: "Instrument Sans", system-ui, sans-serif;
518
- font-size: 10px;
519
- font-style: normal;
520
- line-height: 14px;
521
- white-space: nowrap;
522
-
523
- color: var(--surface);
524
- background: var(--accent-ink);
525
- border-radius: 2px;
526
- }
527
-
528
- /* clear of the bar, on the side there is most room on */
529
- .dz-gap-v i { left: 5px; }
530
- .dz-gap-h i { top: 5px; }
531
-
532
- /* ---------------- the properties rail ---------------- */
533
-
534
- .dz-panel {
535
- flex: none;
536
- width: var(--dz-panel);
537
- overflow-y: auto;
538
- padding: 16px;
539
-
540
- background: var(--surface);
541
- border-left: 1px solid var(--border);
542
-
543
- font-family: "Instrument Sans", system-ui, sans-serif;
544
- font-size: 12px;
545
- color: var(--ink);
546
- }
547
-
548
- .dz-panel-empty {
549
- padding: 24px 4px;
550
- text-align: center;
551
- color: var(--ink-soft);
552
- }
553
-
554
- .dz-panel-empty p {
555
- margin-bottom: 6px;
556
- }
557
-
558
- .dz-panel-head {
559
- display: flex;
560
- align-items: baseline;
561
- gap: 8px;
562
- padding-bottom: 12px;
563
- margin-bottom: 4px;
564
- border-bottom: 1px solid var(--border);
565
- }
566
-
567
- .dz-panel-type {
568
- padding: 2px 7px;
569
- border-radius: 999px;
570
- background: var(--accent-soft);
571
- color: var(--accent-ink);
572
- font-size: 10px;
573
- letter-spacing: .04em;
574
- text-transform: uppercase;
575
- }
576
-
577
- .dz-panel-id {
578
- color: var(--ink-soft);
579
- font-family: "Courier Prime", monospace;
580
- overflow: hidden;
581
- text-overflow: ellipsis;
582
- white-space: nowrap;
583
- }
584
-
585
- .dz-section {
586
- padding: 12px 0;
587
- border-bottom: 1px solid var(--border);
588
- }
589
-
590
- .dz-section:last-child {
591
- border-bottom: none;
592
- }
593
-
594
- .dz-section h3 {
595
- margin-bottom: 10px;
596
- font-size: 10px;
597
- font-weight: 600;
598
- letter-spacing: .06em;
599
- text-transform: uppercase;
600
- color: var(--ink-soft);
601
- }
602
-
603
- /**
604
- * Label left, control right, on one line. Two lines per field would make the
605
- * rail twice as tall as the page it describes.
606
- */
607
- .dz-field {
608
- display: grid;
609
- grid-template-columns: 1fr 1.2fr;
610
- align-items: center;
611
- gap: 8px;
612
- margin-bottom: 8px;
613
- }
614
-
615
- .dz-field label {
616
- color: var(--ink-soft);
617
- }
618
-
619
- /* the value box and its hint take the full width instead */
620
- .dz-field-textarea {
621
- grid-template-columns: 1fr;
622
- gap: 4px;
623
- }
624
-
625
- .dz-field input,
626
- .dz-field select,
627
- .dz-field textarea {
628
- width: 100%;
629
- padding: 5px 7px;
630
- border: 1px solid var(--border);
631
- border-radius: 4px;
632
- background: var(--surface);
633
- color: var(--ink);
634
- font: inherit;
635
- }
636
-
637
- .dz-field textarea {
638
- font-family: "Courier Prime", monospace;
639
- resize: vertical;
640
- line-height: 1.4;
641
- }
642
-
643
- .dz-field input[type="number"] {
644
- font-variant-numeric: tabular-nums;
645
- }
646
-
647
- .dz-field input[type="checkbox"] {
648
- width: 15px;
649
- height: 15px;
650
- justify-self: start;
651
- accent-color: var(--accent-strong);
652
- }
653
-
654
- .dz-field input[type="color"] {
655
- height: 26px;
656
- padding: 2px;
657
- cursor: pointer;
658
- }
659
-
660
- .dz-field input:focus-visible,
661
- .dz-field select:focus-visible,
662
- .dz-field textarea:focus-visible {
663
- outline: 2px solid var(--accent-strong);
664
- outline-offset: -1px;
665
- border-color: var(--accent-strong);
666
- }
667
-
668
- .dz-hint {
669
- grid-column: 1 / -1;
670
- color: var(--ink-soft);
671
- font-size: 11px;
672
- line-height: 1.4;
673
- }
674
-
675
- /* ---------------- the tool footer ---------------- */
676
-
677
- /**
678
- * The tools sit under the page, not in the bar: the bar is about the report as
679
- * a whole, and these act on the band being looked at.
680
- *
681
- * A floating pill rather than a docked strip, matching the preview's pager - so
682
- * the two screens read as the same product, and neither takes a permanent slice
683
- * off the height of the page being worked on.
684
- */
685
- .dz-foot {
686
- position: absolute;
687
- left: 50%;
688
- bottom: var(--dz-foot-offset);
689
- transform: translateX(-50%);
690
- z-index: 5;
691
-
692
- display: flex;
693
- align-items: center;
694
- gap: 4px;
695
- height: var(--dz-foot-height);
696
- padding: 0 8px;
697
-
698
- background: var(--surface);
699
- border: 1px solid var(--border);
700
- border-radius: 999px;
701
- box-shadow: 0 4px 16px rgba(34, 39, 44, .12);
702
- }
703
-
704
- .dz-tool {
705
- display: grid;
706
- place-items: center;
707
- width: 32px;
708
- height: 32px;
709
- padding: 0;
710
-
711
- /* transparent rather than none, so hover adds no width and nothing shifts */
712
- border: 1px solid transparent;
713
- border-radius: 999px;
714
- background: none;
715
- /* the glyph is stroked with currentColor, so this colours it too */
716
- color: var(--ink);
717
- cursor: pointer;
718
- }
719
-
720
- .dz-tool:hover {
721
- border-color: var(--accent);
722
- background: var(--accent-soft);
723
- color: var(--accent-ink);
724
- }
725
-
726
- .dz-tool:active {
727
- background: var(--accent-tint);
728
- }
729
-
730
- .dz-tool:focus-visible {
731
- outline: 2px solid var(--accent-strong);
732
- outline-offset: 1px;
733
- }
734
-
735
- .dz-name {
736
- flex: 1;
737
- overflow: hidden;
738
- text-overflow: ellipsis;
739
- white-space: nowrap;
740
- }
741
-
742
- /* ---------------- structure controls ---------------- */
743
-
744
- /**
745
- * The right-click pill.
746
- *
747
- * Absolute inside .dz-main rather than fixed to the window, so it scrolls out
748
- * of the way with the page area it belongs to and cannot be left hanging over
749
- * the rail. Above the selection outline and its handles, below the bar.
750
- */
751
- .dz-menu {
752
- position: absolute;
753
- z-index: 8;
754
-
755
- display: flex;
756
- align-items: center;
757
- gap: 2px;
758
- padding: 4px;
759
-
760
- border: 1px solid var(--border);
761
- border-radius: 999px;
762
- background: var(--surface);
763
- box-shadow: 0 8px 24px rgb(34 39 44 / .18);
764
- }
765
-
766
- .dz-menu-item {
767
- display: inline-flex;
768
- align-items: center;
769
- justify-content: center;
770
- width: 30px;
771
- height: 30px;
772
- border: 0;
773
- border-radius: 999px;
774
- background: none;
775
- color: var(--ink-soft);
776
- cursor: pointer;
777
- }
778
-
779
- .dz-menu-item:hover:not(:disabled),
780
- .dz-menu-item:focus-visible {
781
- background: var(--accent-soft);
782
- color: var(--accent-ink);
783
- outline: none;
784
- }
785
-
786
- /* the one action that cannot be taken back by moving something else */
787
- .dz-menu-item.is-danger:hover:not(:disabled),
788
- .dz-menu-item.is-danger:focus-visible {
789
- background: var(--danger-soft);
790
- color: var(--danger);
791
- }
792
-
793
- .dz-menu-item:disabled {
794
- opacity: .35;
795
- cursor: default;
796
- }
797
-
798
- .dz-menu-sep {
799
- width: 1px;
800
- height: 18px;
801
- margin: 0 3px;
802
- background: var(--border);
803
- }
804
-
805
- /* the column editor's remove button; .dz-column-head lays it out on the right */
806
- .dz-icon {
807
- display: inline-flex;
808
- align-items: center;
809
- justify-content: center;
810
- margin-left: auto;
811
- width: 20px;
812
- height: 20px;
813
- border: 1px solid transparent;
814
- border-radius: 4px;
815
- background: none;
816
- color: var(--ink-soft);
817
- font: inherit;
818
- font-size: 15px;
819
- line-height: 1;
820
- cursor: pointer;
821
- }
822
-
823
- .dz-icon:hover {
824
- border-color: var(--accent);
825
- background: var(--accent-soft);
826
- color: var(--accent-ink);
827
- }
828
-
829
- .dz-add-row {
830
- width: 100%;
831
- padding: 6px;
832
- border: 1px dashed var(--border);
833
- border-radius: 5px;
834
- background: none;
835
- color: var(--ink-soft);
836
- font: inherit;
837
- cursor: pointer;
838
- }
839
-
840
- .dz-add-row::before {
841
- content: "+";
842
- margin-right: 5px;
843
- }
844
-
845
- .dz-add-row:hover {
846
- border-color: var(--accent);
847
- border-style: solid;
848
- background: var(--accent-soft);
849
- color: var(--accent-ink);
850
- }
851
-
852
- /* a column is a card, because four controls will not sit on one rail-wide row */
853
- .dz-column {
854
- margin-bottom: 10px;
855
- padding: 8px;
856
- border: 1px solid var(--border);
857
- border-radius: 5px;
858
- background: var(--backdrop);
859
- }
860
-
861
- .dz-column-head {
862
- display: flex;
863
- align-items: center;
864
- margin-bottom: 6px;
865
- color: var(--ink-soft);
866
- font-size: 10px;
867
- letter-spacing: .06em;
868
- }
869
-
870
- .dz-column .dz-field:last-child {
871
- margin-bottom: 0;
872
- }
873
-
874
- /* ---------------- the band list ---------------- */
875
-
876
- .dz-band-row {
877
- display: grid;
878
- grid-template-columns: 1fr 72px;
879
- align-items: center;
880
- gap: 6px;
881
- padding: 5px 0;
882
- }
883
-
884
- .dz-band-name {
885
- display: flex;
886
- align-items: center;
887
- gap: 7px;
888
- cursor: pointer;
889
- color: var(--ink-soft);
890
- }
891
-
892
- /* an inactive band is legible but plainly off */
893
- .dz-band-row.is-on .dz-band-name {
894
- color: var(--ink);
895
- }
896
-
897
- .dz-band-name input {
898
- width: 14px;
899
- height: 14px;
900
- accent-color: var(--accent-strong);
901
- }
902
-
903
- .dz-band-height {
904
- width: 100%;
905
- padding: 4px 6px;
906
- border: 1px solid var(--border);
907
- border-radius: 4px;
908
- background: var(--surface);
909
- color: var(--ink);
910
- font: inherit;
911
- font-variant-numeric: tabular-nums;
912
- text-align: right;
913
- }
914
-
915
- .dz-band-height:focus-visible {
916
- outline: 2px solid var(--accent-strong);
917
- outline-offset: -1px;
918
- }
919
-
920
- .dz-band-height-none {
921
- color: var(--ink-soft);
922
- font-size: 10px;
923
- text-align: right;
924
- }
925
-
926
- .dz-band-row .dz-hint {
927
- grid-column: 1 / -1;
928
- margin-top: -2px;
929
- padding-left: 21px;
930
- font-size: 10px;
931
- }
932
-
933
- /* ---------------- the corner ---------------- */
934
-
935
- /**
936
- * Messages stack in the top right of the page area.
937
- *
938
- * Out of the flow rather than above the page: one placed there pushed the
939
- * design down the canvas every time a half-finished layout failed to validate,
940
- * which moved the very thing the author was pointing at.
941
- *
942
- * The corner of the page area, not of the window - the window's corner is the
943
- * top of the properties rail, and that is where the band switches are, so a
944
- * message pinned there would cover the fix for what it was complaining about.
945
- *
946
- * The column itself lets the pointer through, so it never takes a click meant
947
- * for the page behind it; each toast takes its own back.
948
- */
949
- .dz-toasts {
950
- position: absolute;
951
- top: 16px;
952
- right: 16px;
953
- z-index: 20;
954
-
955
- display: flex;
956
- flex-direction: column;
957
- gap: 10px;
958
- width: min(340px, calc(100vw - 32px));
959
-
960
- pointer-events: none;
961
- }
962
-
963
- .dz-toast {
964
- pointer-events: auto;
965
-
966
- display: flex;
967
- align-items: flex-start;
968
- gap: 10px;
969
- padding: 12px 12px 12px 14px;
970
-
971
- background: var(--surface);
972
- border: 1px solid var(--border);
973
- border-radius: 2px;
974
- box-shadow: 0 10px 28px rgb(34 39 44 / .16);
975
-
976
- font-family: "Instrument Sans", system-ui, sans-serif;
977
- font-size: 12px;
978
- color: var(--ink);
979
-
980
- animation: dz-toast-in .18s ease-out;
981
- }
982
-
983
- /* it arrives from the edge it lives on */
984
- @keyframes dz-toast-in {
985
- from { opacity: 0; transform: translateX(12px); }
986
- to { opacity: 1; transform: none; }
987
- }
988
-
989
- @media (prefers-reduced-motion: reduce) {
990
- .dz-toast { animation: none; }
991
- }
992
-
993
- .dz-toast-text {
994
- flex: 1;
995
- min-width: 0;
996
- }
997
-
998
- .dz-toast-title {
999
- display: block;
1000
- margin-bottom: 6px;
1001
- font-size: 12px;
1002
- font-weight: 600;
1003
- }
1004
-
1005
- /* the findings themselves, which are field names as often as sentences */
1006
- .dz-toast ul {
1007
- margin: 0;
1008
- padding-left: 16px;
1009
- color: var(--ink-soft);
1010
- line-height: 1.5;
1011
- overflow-wrap: anywhere;
1012
- }
1013
-
1014
- .dz-toast-close {
1015
- flex: none;
1016
- width: 20px;
1017
- height: 20px;
1018
- display: inline-flex;
1019
- align-items: center;
1020
- justify-content: center;
1021
-
1022
- border: 1px solid transparent;
1023
- border-radius: 4px;
1024
- background: none;
1025
- color: var(--ink-soft);
1026
- font: inherit;
1027
- font-size: 15px;
1028
- line-height: 1;
1029
- cursor: pointer;
1030
- }
1031
-
1032
- .dz-toast-close:hover {
1033
- border-color: var(--accent);
1034
- background: var(--accent-soft);
1035
- color: var(--accent-ink);
1036
- }
1037
-
1038
- /* ---------------- the dialog ---------------- */
1039
-
1040
- /* wide enough for a report name to be read in full */
1041
- .modal-card.is-roomy {
1042
- width: min(560px, calc(100vw - 32px));
1043
- }
1044
-
1045
- /**
1046
- * A dialog field stacks: the label above, the control across the full card.
1047
- *
1048
- * This used to be `auto 90px` for every field inside a modal, which was written
1049
- * for the column count and then silently squeezed everything else that arrived
1050
- * later - the report picker and the save dialog's name box were both 90px wide
1051
- * because of it. Narrow is now the exception, and it asks for itself by name.
1052
- */
1053
- .modal-card .dz-field {
1054
- grid-template-columns: 1fr;
1055
- gap: 6px;
1056
- margin-bottom: 14px;
1057
- }
1058
-
1059
- .modal-card .dz-field label {
1060
- color: var(--ink-soft);
1061
- font-size: 10px;
1062
- font-weight: 600;
1063
- letter-spacing: .06em;
1064
- text-transform: uppercase;
1065
- }
1066
-
1067
- /* a count is two digits; a box the width of the card would be absurd */
1068
- .modal-card .dz-field-count {
1069
- grid-template-columns: auto 90px;
1070
- align-items: center;
1071
- justify-content: start;
1072
- gap: 12px;
1073
- }
1074
-
1075
- .modal-card .dz-field-count label {
1076
- font-size: 12px;
1077
- font-weight: 400;
1078
- letter-spacing: 0;
1079
- text-transform: none;
1080
- color: var(--ink);
1081
- }
1082
-
1083
- /* ---------------- the bar's controls ---------------- */
1084
-
1085
- /* the report's name, with what the disk currently knows underneath it */
1086
- .dz-title {
1087
- flex: 1;
1088
- display: flex;
1089
- flex-direction: column;
1090
- gap: 1px;
1091
- min-width: 0;
1092
- }
1093
-
1094
- .dz-status {
1095
- font-size: 10px;
1096
- color: var(--ink-soft);
1097
- overflow: hidden;
1098
- text-overflow: ellipsis;
1099
- white-space: nowrap;
1100
- }
1101
-
1102
- /* unsaved is a state to notice, not to be alarmed by */
1103
- .dz-bar[data-dirty="true"] .dz-status {
1104
- color: var(--accent-ink);
1105
- }
1106
-
1107
- /* a failure the user has to read, so it takes the accent outright */
1108
- .dz-status[data-problem] {
1109
- color: var(--accent-ink);
1110
- font-weight: 600;
1111
- }
1112
-
1113
- .dz-bar-group {
1114
- display: flex;
1115
- align-items: center;
1116
- gap: 2px;
1117
- padding: 0 6px;
1118
- border-left: 1px solid var(--border);
1119
- }
1120
-
1121
- .dz-bar-group:first-of-type {
1122
- border-left: none;
1123
- }
1124
-
1125
- .dz-tool:disabled {
1126
- opacity: .35;
1127
- cursor: default;
1128
- }
1129
-
1130
- .dz-tool:disabled:hover {
1131
- border-color: transparent;
1132
- background: none;
1133
- color: var(--ink);
1134
- }
1135
-
1136
- /* ---------------- the report picker ---------------- */
1137
-
1138
- /**
1139
- * The label sits above the control, not beside it: the picker is the dialog's
1140
- * one job, and a label in the same row would take a fifth of the width off the
1141
- * thing being read - which is a report name, and report names are long.
1142
- */
1143
- .modal-card .dz-field-picker {
1144
- margin-bottom: 6px;
1145
- }
1146
-
1147
- /* the dropdown fills the card rather than sizing to its longest report name */
1148
- .modal-card .dz-field-picker .dropdown,
1149
- .modal-card .dz-field-picker .dropdown-trigger {
1150
- width: 100%;
1151
- }
1152
-
1153
- /* and the name gets whatever the caret does not */
1154
- .modal-card .dz-field-picker .dropdown-value {
1155
- flex: 1;
1156
- min-width: 0;
1157
- overflow: hidden;
1158
- text-overflow: ellipsis;
1159
- white-space: nowrap;
1160
- text-align: left;
1161
- }
1162
-
1163
- /**
1164
- * The shared component is sized for the preview's zoom control, where the value
1165
- * is "100%" in a crowded toolbar. Here it carries a report name in a dialog, so
1166
- * it takes the dialog's type size rather than the toolbar's.
1167
- */
1168
- .modal-card .dz-field-picker .dropdown-trigger,
1169
- .modal-card .dz-field-picker .dropdown-item {
1170
- font-size: 13px;
1171
- }
1172
-
1173
- .modal-card .dz-field-picker .dropdown-trigger {
1174
- height: 38px;
1175
- padding: 0 12px;
1176
- }
1177
-
1178
- /**
1179
- * Vertical padding only. The left inset is the tick's ::before placeholder,
1180
- * which the component already sizes - adding to it here would indent the
1181
- * selected and unselected items by different amounts.
1182
- *
1183
- * A report name is as long as someone typed it and the menu is a fixed width,
1184
- * so it clips rather than pushing the menu wider than the trigger under it.
1185
- */
1186
- .modal-card .dz-field-picker .dropdown-item {
1187
- padding: 9px 12px 9px 8px;
1188
- overflow: hidden;
1189
- text-overflow: ellipsis;
1190
- }
1191
-
1192
- .modal-card .dz-field-picker .dropdown-menu {
1193
- width: 100%;
1194
- max-height: 40vh;
1195
- overflow-y: auto;
1196
- }
1197
-
1198
- /**
1199
- * A dropdown shows one line, so what the name alone does not settle - which
1200
- * file it is, when it last changed - goes underneath rather than being lost.
1201
- */
1202
- .dz-report-meta {
1203
- margin-bottom: 16px;
1204
- padding-left: 1px;
1205
- color: var(--ink-soft);
1206
- font-size: 11px;
1207
- }
1208
-
1209
- /* a report that will not parse is still offered - it is the one to go and fix */
1210
- .dz-report-meta[data-unreadable] {
1211
- color: var(--accent-ink);
1212
- }
1213
-
1214
- .modal-card code {
1215
- font-family: "Courier Prime", monospace;
1216
- color: var(--ink);
1217
- }
1218
-
1219
- /* ---------------- the data dialog ---------------- */
1220
-
1221
- /* a payload needs room to be read; the other dialogs do not */
1222
- .modal-card.is-wide {
1223
- width: min(640px, calc(100vw - 32px));
1224
- }
1225
-
1226
- .dz-payload {
1227
- width: 100%;
1228
- padding: 10px 12px;
1229
- border: 1px solid var(--border);
1230
- border-radius: 6px;
1231
- background: var(--backdrop);
1232
- color: var(--ink);
1233
-
1234
- font-family: "Courier Prime", monospace;
1235
- font-size: 12px;
1236
- line-height: 1.5;
1237
- tab-size: 2;
1238
- resize: vertical;
1239
- }
1240
-
1241
- .dz-payload:focus-visible {
1242
- outline: 2px solid var(--accent-strong);
1243
- outline-offset: -1px;
1244
- border-color: var(--accent-strong);
1245
- }
1246
-
1247
- /**
1248
- * Beside the box rather than after the click that was meant to save: a payload
1249
- * someone has pasted and broken should say so while they can still see where.
1250
- */
1251
- .dz-parse-error {
1252
- min-height: 16px;
1253
- margin: 6px 0 12px;
1254
- color: var(--accent-ink);
1255
- font-size: 11px;
1256
- line-height: 1.4;
1257
- }
1258
-
1259
- .modal-actions button:disabled {
1260
- opacity: .5;
1261
- cursor: default;
1262
- }
1263
-
1264
- /* ---------------- running the report ---------------- */
1265
-
1266
- /**
1267
- * The rail and the tools go while the report is running. There is nothing on
1268
- * the rail that applies to a rendered page, and the insert tools would be
1269
- * offering to add a text box to something that is no longer a design.
1270
- */
1271
- .report-designer[data-mode="preview"] .dz-panel,
1272
- .report-designer[data-mode="preview"] .dz-foot {
1273
- display: none;
1274
- }
1275
-
1276
- /* the pages stack down the canvas, as sheets coming off a printer do */
1277
- .report-designer[data-mode="preview"] #main-page {
1278
- display: flex;
1279
- flex-direction: column;
1280
- align-items: center;
1281
- gap: 24px;
1282
- width: max-content;
1283
- margin: 0 auto;
1284
- }
1285
-
1286
- /* nothing here is grabbable; saying so with the cursor stops the invitation */
1287
- .report-designer[data-mode="preview"] .dz-canvas [data-item-id] {
1288
- cursor: default;
1289
- }
1290
-
1291
- /* the toggle stays lit while it is the thing being looked at */
1292
- .dz-tool[aria-pressed="true"] {
1293
- border-color: var(--accent);
1294
- background: var(--accent-soft);
1295
- color: var(--accent-ink);
1296
- }
1297
-
1298
- .dz-pages {
1299
- color: var(--ink-soft);
1300
- font-variant-numeric: tabular-nums;
1301
- white-space: nowrap;
1302
- }
1303
-
1304
- .dz-truncated {
1305
- max-width: 640px;
1306
- margin: 4px auto 0;
1307
- padding: 10px 14px;
1308
-
1309
- background: var(--surface);
1310
- border: 1px dashed var(--border);
1311
- border-radius: 6px;
1312
-
1313
- font-family: "Instrument Sans", system-ui, sans-serif;
1314
- font-size: 12px;
1315
- color: var(--ink-soft);
1316
- text-align: center;
1317
- }
1318
-
1319
- /* ---------------- the field list ---------------- */
1320
-
1321
- .dz-tokens {
1322
- display: grid;
1323
- grid-template-columns: 1fr 1fr;
1324
- gap: 6px;
1325
- max-height: 42vh;
1326
- overflow-y: auto;
1327
- margin-bottom: 16px;
1328
- }
1329
-
1330
- .dz-token {
1331
- display: flex;
1332
- align-items: flex-start;
1333
- gap: 9px;
1334
- padding: 9px 11px;
1335
- border: 1px solid var(--border);
1336
- border-radius: 8px;
1337
- cursor: pointer;
1338
- }
1339
-
1340
- .dz-token:hover {
1341
- border-color: var(--accent);
1342
- background: var(--accent-soft);
1343
- }
1344
-
1345
- /* the darker mix on the border, so the chosen one is legible not just tinted */
1346
- .dz-token:has(input:checked) {
1347
- border-color: var(--accent-strong);
1348
- background: var(--accent-soft);
1349
- }
1350
-
1351
- .dz-token:has(input:focus-visible) {
1352
- outline: 2px solid var(--accent-strong);
1353
- outline-offset: 1px;
1354
- }
1355
-
1356
- .dz-token input {
1357
- margin-top: 2px;
1358
- width: 14px;
1359
- height: 14px;
1360
- flex: none;
1361
- accent-color: var(--accent-strong);
1362
- }
1363
-
1364
- .dz-token-body {
1365
- display: flex;
1366
- flex-direction: column;
1367
- gap: 2px;
1368
- min-width: 0;
1369
- }
1370
-
1371
- .dz-token-name {
1372
- font-weight: 500;
1373
- }
1374
-
1375
- /**
1376
- * The syntax is shown rather than hidden behind the label: the point is that
1377
- * someone stops needing this dialog, and they only stop by seeing what it
1378
- * writes.
1379
- */
1380
- .dz-token-syntax {
1381
- font-family: "Courier Prime", monospace;
1382
- font-size: 11px;
1383
- color: var(--accent-ink);
1384
- overflow: hidden;
1385
- text-overflow: ellipsis;
1386
- white-space: nowrap;
1387
- }
1388
-
1389
- .dz-token-note {
1390
- color: var(--ink-soft);
1391
- font-size: 11px;
1392
- line-height: 1.35;
1393
- }
1394
-
1395
- /* a warning, not a refusal - it is the author's report */
1396
- .dz-token-warning {
1397
- margin-bottom: 14px;
1398
- padding: 9px 12px;
1399
- border: 1px solid var(--accent-strong);
1400
- border-radius: 6px;
1401
- color: var(--accent-ink);
1402
- font-size: 11px;
1403
- line-height: 1.45;
1404
- }
1405
-
1406
- /**
1407
- * The same box saying which rows an aggregate will cover, which is information
1408
- * rather than a caution - so it drops back to the quiet border every other
1409
- * field in the dialog has, and keeps only the indent that sets it apart from
1410
- * the controls above it.
1411
- */
1412
- .dz-token-warning.is-note {
1413
- border-color: var(--border);
1414
- color: var(--ink-soft);
1415
- }
1416
-
1417
- .dz-token-warning[hidden] {
1418
- display: none;
1419
- }
1420
-
1421
- /**
1422
- * The band an item is about to land in, or has just been put in.
1423
- *
1424
- * A drag used to leave the item in the band it started from however far it was
1425
- * moved, so there was nothing to show - and inserting a field chooses a band on
1426
- * the user's behalf, which is worth pointing at rather than leaving to be found.
1427
- */
1428
- .dz-zone.is-target {
1429
- outline: 2px solid var(--accent-strong);
1430
- outline-offset: -2px;
1431
- background: var(--accent-soft);
1432
- }
1433
-
1434
- /* the gutter name lights with it, so the band is identified and not just lit */
1435
- .dz-sheet:has(.dz-zone.is-target) .dz-tag {
1436
- opacity: .45;
1437
- }
1438
-
1439
- .dz-tag.is-target {
1440
- opacity: 1;
1441
- color: var(--accent-ink);
1442
- font-weight: 600;
1443
- }
1444
-
1445
- /* ---------------- several items at once ---------------- */
1446
-
1447
- /**
1448
- * The one whose handles are drawn is solid; the rest are dashed. Without the
1449
- * distinction a group of six looks like six things that can each be resized,
1450
- * and only one of them can.
1451
- */
1452
- .dz-select.is-secondary {
1453
- outline-style: dashed;
1454
- }
1455
-
1456
- .dz-selected {
1457
- display: flex;
1458
- flex-direction: column;
1459
- gap: 4px;
1460
- margin-bottom: 10px;
1461
- padding: 0;
1462
- list-style: none;
1463
- max-height: 30vh;
1464
- overflow-y: auto;
1465
- }
1466
-
1467
- .dz-selected li {
1468
- display: flex;
1469
- align-items: baseline;
1470
- gap: 8px;
1471
- padding: 5px 8px;
1472
- border: 1px solid var(--border);
1473
- border-radius: 5px;
1474
- background: var(--backdrop);
1475
- }
1476
-
1477
- .dz-selected-type {
1478
- color: var(--ink-soft);
1479
- font-size: 10px;
1480
- letter-spacing: .04em;
1481
- text-transform: uppercase;
1482
- }
1483
-
1484
- .dz-selected-id {
1485
- font-family: "Courier Prime", monospace;
1486
- overflow: hidden;
1487
- text-overflow: ellipsis;
1488
- white-space: nowrap;
1489
- }
1490
-
1491
- /* ---------------- the value box ---------------- */
1492
-
1493
- .dz-field-top {
1494
- display: flex;
1495
- align-items: center;
1496
- justify-content: space-between;
1497
- gap: 8px;
1498
- }
1499
-
1500
- /* the button sits opposite the label, across the top of the value box */
1501
- .dz-brace {
1502
- padding: 1px 7px;
1503
- border: 1px solid var(--border);
1504
- border-radius: 4px;
1505
- background: var(--surface);
1506
- color: var(--accent-ink);
1507
- font-family: "Courier Prime", monospace;
1508
- font-size: 11px;
1509
- line-height: 1.5;
1510
- cursor: pointer;
1511
- }
1512
-
1513
- .dz-brace:hover {
1514
- border-color: var(--accent);
1515
- background: var(--accent-soft);
1516
- }
1517
-
1518
- .dz-brace:focus-visible {
1519
- outline: 2px solid var(--accent-strong);
1520
- outline-offset: 1px;
1521
- }
1522
-
1523
- /**
1524
- * A textarea cannot style its own contents, so the placeholders are marked on a
1525
- * layer behind it and the box itself is given transparent text.
1526
- *
1527
- * Everything that affects where a character lands has to match between the two
1528
- * exactly - font, size, line height, padding, border width, wrapping - or the
1529
- * marks drift off the text they belong to. That is why both take their metrics
1530
- * from the same declarations here rather than inheriting separately.
1531
- */
1532
- .dz-value {
1533
- position: relative;
1534
- }
1535
-
1536
- .dz-value textarea,
1537
- .dz-value-marks {
1538
- box-sizing: border-box;
1539
- width: 100%;
1540
- padding: 6px 8px;
1541
- border: 1px solid transparent;
1542
- border-radius: 4px;
1543
-
1544
- font-family: "Courier Prime", monospace;
1545
- font-size: 12px;
1546
- line-height: 1.5;
1547
- letter-spacing: normal;
1548
-
1549
- white-space: pre-wrap;
1550
- overflow-wrap: break-word;
1551
- word-break: normal;
1552
- tab-size: 2;
1553
- }
1554
-
1555
- .dz-value textarea {
1556
- position: relative;
1557
- z-index: 1;
1558
- display: block;
1559
- min-height: 52px;
1560
- border-color: var(--border);
1561
- background: transparent;
1562
- /* the text is drawn by the layer behind; only the caret shows through */
1563
- color: transparent;
1564
- caret-color: var(--ink);
1565
- resize: vertical;
1566
- }
1567
-
1568
- .dz-value textarea::selection {
1569
- /* a transparent-text selection would be invisible without a fill */
1570
- background: var(--accent-tint);
1571
- }
1572
-
1573
- .dz-value textarea:focus-visible {
1574
- outline: 2px solid var(--accent-strong);
1575
- outline-offset: -1px;
1576
- border-color: var(--accent-strong);
1577
- }
1578
-
1579
- .dz-value-marks {
1580
- position: absolute;
1581
- inset: 0;
1582
- z-index: 0;
1583
- overflow: hidden;
1584
- color: var(--ink);
1585
- background: var(--surface);
1586
- pointer-events: none;
1587
- }
1588
-
1589
- /**
1590
- * The braces and what is between them, so a placeholder is told apart from the
1591
- * words around it - and a half-typed one, with only an opening brace, is told
1592
- * apart by not being marked at all.
1593
- */
1594
- .dz-mark {
1595
- border-radius: 3px;
1596
- background: var(--accent-soft);
1597
- color: var(--accent-ink);
1598
- font-weight: 700;
1599
- }
1600
-
1601
- /* the link to the other screen sits among the tools and behaves like one */
1602
- a.dz-tool {
1603
- text-decoration: none;
1604
- }
1605
-
1606
- a.dz-tool[aria-disabled="true"] {
1607
- opacity: .35;
1608
- cursor: default;
1609
- pointer-events: auto;
1610
- }
1611
-
1612
- a.dz-tool[aria-disabled="true"]:hover {
1613
- border-color: transparent;
1614
- background: none;
1615
- color: var(--ink);
1616
- }
1
+ /**
2
+ * The designer's chrome. How the report itself looks is render/report.css,
3
+ * shared with the preview - so this file styles the bar, the gutter, the zone
4
+ * outlines and the error panel, and nothing that ends up on paper.
5
+ *
6
+ * The viewer's chrome is imported too, and is not dead weight here: "open the
7
+ * report in its own tab" builds a window out of *this page's* stylesheets and
8
+ * mounts a viewer into it, so a toolbar and a pager the designer never draws
9
+ * itself still have to be reachable from here or that window arrives unstyled.
10
+ */
11
+
12
+ @import "../shared/theme.css";
13
+ @import "../render/report.css";
14
+ @import "../shared/modal.css";
15
+ @import "../shared/dropdown.css";
16
+ @import "../preview/chrome.css";
17
+
18
+ :root {
19
+ --dz-bar-height: 56px;
20
+ /* wide enough for "reportHeader", the longest band name */
21
+ --dz-gutter: 96px;
22
+ --dz-panel: 268px;
23
+ --dz-foot-height: 44px;
24
+ /* how far the floating tools sit off the bottom edge, as the pager does */
25
+ --dz-foot-offset: 20px;
26
+ }
27
+
28
+ .report-designer {
29
+ min-height: 100vh;
30
+ background-color: var(--backdrop);
31
+ }
32
+
33
+ /**
34
+ * The designer takes the focus so its shortcuts have somewhere to arrive, but
35
+ * it is not a control - a ring around the whole screen would be saying that it
36
+ * is. Nothing inside it loses its own ring; they are separate stops.
37
+ */
38
+ .report-designer:focus {
39
+ outline: none;
40
+ }
41
+
42
+ /* ---------------- the bar ---------------- */
43
+
44
+ .dz-bar {
45
+ position: fixed;
46
+ inset: 0 0 auto 0;
47
+ z-index: 10;
48
+
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 16px;
52
+ height: var(--dz-bar-height);
53
+ padding: 0 20px;
54
+
55
+ background: var(--surface);
56
+ border-bottom: 1px solid var(--border);
57
+
58
+ font-family: "Instrument Sans", system-ui, sans-serif;
59
+ font-size: 13px;
60
+ color: var(--ink);
61
+ }
62
+
63
+ /*
64
+ * The wordmark, drawn rather than typed. The text stays in the markup and is
65
+ * only pushed out of sight, so the bar still has an accessible name and a
66
+ * document read aloud still starts with "Report Studio".
67
+ *
68
+ * Height is set and the width follows from the mark's own ratio, so the bar
69
+ * keeps its rhythm if the artwork is ever redrawn at another size.
70
+ */
71
+ .dz-brand {
72
+ height: 18px;
73
+ width: calc(18px * var(--brand-logo-ratio));
74
+ flex: none;
75
+
76
+ background-image: var(--brand-logo);
77
+ background-repeat: no-repeat;
78
+ background-position: left center;
79
+ background-size: contain;
80
+
81
+ /* the name is for screen readers now, not for eyes */
82
+ text-indent: -9999px;
83
+ overflow: hidden;
84
+ white-space: nowrap;
85
+ }
86
+
87
+ /* the report's name is the subject of the screen, so it takes the middle */
88
+ .dz-name {
89
+ flex: 1;
90
+ color: var(--ink);
91
+ font-weight: 500;
92
+ }
93
+
94
+ .dz-size {
95
+ color: var(--ink-soft);
96
+ font-variant-numeric: tabular-nums;
97
+ }
98
+
99
+ /* ---------------- the canvas ---------------- */
100
+
101
+ /* the bar is fixed, so the row below it starts where the bar ends */
102
+ .dz-body {
103
+ display: flex;
104
+ align-items: stretch;
105
+ margin-top: var(--dz-bar-height);
106
+ height: calc(100vh - var(--dz-bar-height));
107
+ }
108
+
109
+ /**
110
+ * The page and its tools; the rail is the other half of .dz-body. Positioned,
111
+ * because the tool pill floats inside it - centring on the window instead would
112
+ * put the pill off-centre from the page by half the width of the rail.
113
+ */
114
+ .dz-main {
115
+ position: relative;
116
+ flex: 1;
117
+ min-width: 0;
118
+ display: flex;
119
+ flex-direction: column;
120
+ }
121
+
122
+ /**
123
+ * The tools float over this rather than taking a strip of it, so the bottom
124
+ * padding is what lets the end of the page scroll clear of the pill.
125
+ */
126
+ .dz-canvas {
127
+ flex: 1;
128
+ min-height: 0;
129
+ overflow: auto;
130
+ padding: 24px 24px calc(var(--dz-foot-height) + var(--dz-foot-offset) + 24px);
131
+ }
132
+
133
+ /**
134
+ * The two boxes the zoom works through.
135
+ *
136
+ * The layer is what is scaled, and a transform changes nothing about layout -
137
+ * so at 200% there would be nothing to scroll. The stage is given the scaled
138
+ * size in px by applyZoom, and is what the canvas scrolls and centres.
139
+ */
140
+ .dz-stage {
141
+ width: max-content;
142
+ margin: 0 auto;
143
+ }
144
+
145
+ .dz-zoom-layer {
146
+ width: max-content;
147
+ transform-origin: top left;
148
+ }
149
+
150
+ /* the zoom group in the bar, which is the viewer's three controls again */
151
+ .dz-zoom-group .dropdown-trigger {
152
+ min-width: 92px;
153
+ }
154
+
155
+ /**
156
+ * The gutter, the rulers and the page scroll together, so they stay in step.
157
+ *
158
+ * A grid rather than a row, because the rulers have to line up with the page on
159
+ * both axes at once: the horizontal one starts where the page's left margin
160
+ * ends, and the vertical one starts where its top margin does. With the rulers
161
+ * off, both of their tracks collapse to nothing and the sheet is the row it
162
+ * always was.
163
+ */
164
+ .dz-sheet {
165
+ display: grid;
166
+ grid-template-areas:
167
+ ". corner ruler-x"
168
+ "gutter ruler-y page";
169
+ grid-template-columns: var(--dz-gutter) auto auto;
170
+ grid-template-rows: auto auto;
171
+ align-items: start;
172
+ column-gap: 8px;
173
+ width: max-content;
174
+ }
175
+
176
+ .dz-gutter { grid-area: gutter; }
177
+ .dz-page { grid-area: page; }
178
+ .dz-ruler-corner { grid-area: corner; }
179
+ .dz-ruler-x { grid-area: ruler-x; }
180
+ .dz-ruler-y { grid-area: ruler-y; }
181
+
182
+ .dz-gutter {
183
+ position: relative;
184
+ flex: none;
185
+ width: var(--dz-gutter);
186
+ height: var(--page-height);
187
+ }
188
+
189
+ /**
190
+ * Band names sit beside the page, not on it. Over the design they would cover
191
+ * an item at the top-left of every band - which is exactly where a title goes.
192
+ */
193
+ .dz-tag {
194
+ position: absolute;
195
+ right: 0;
196
+ transform: translateY(-1px);
197
+
198
+ font-family: "Instrument Sans", system-ui, sans-serif;
199
+ font-size: 10px;
200
+ letter-spacing: .04em;
201
+ color: var(--ink-soft);
202
+ white-space: nowrap;
203
+ user-select: none;
204
+ }
205
+
206
+ .dz-page {
207
+ flex: none;
208
+ }
209
+
210
+ /**
211
+ * Dashed, and drawn inside the zone with a negative offset, so the boundary is
212
+ * visible while designing without adding a pixel to anything's position.
213
+ */
214
+ .dz-zone {
215
+ outline: 1px dashed var(--border);
216
+ outline-offset: -1px;
217
+ }
218
+
219
+ /* ---------------- the error panel ---------------- */
220
+
221
+ .dz-problems h2 {
222
+ margin-bottom: 12px;
223
+ font-size: 15px;
224
+ font-weight: 600;
225
+ }
226
+
227
+ .dz-problems ul {
228
+ margin: 0;
229
+ padding-left: 18px;
230
+ }
231
+
232
+ .dz-problems li {
233
+ margin: 4px 0;
234
+ color: var(--ink-soft);
235
+ line-height: 1.5;
236
+ }
237
+
238
+ /* ---------------- selection ---------------- */
239
+
240
+ /**
241
+ * The outline is a sibling of the bands, laid over the page - spec 5.2 asks for
242
+ * the preview's drawing plus chrome on top, and drawing selection *into* an
243
+ * item is how the two paths start to differ.
244
+ *
245
+ * pointer-events: none, or the outline would swallow the click that lands on
246
+ * the item beneath it. The handles opt back in.
247
+ */
248
+ .dz-select {
249
+ position: absolute;
250
+ z-index: 2;
251
+ pointer-events: none;
252
+ outline: 1px solid var(--accent-strong);
253
+ outline-offset: 0;
254
+ }
255
+
256
+ .dz-handle {
257
+ position: absolute;
258
+ width: 9px;
259
+ height: 9px;
260
+ pointer-events: auto;
261
+
262
+ background: var(--surface);
263
+ border: 1px solid var(--accent-strong);
264
+ border-radius: 1px;
265
+ }
266
+
267
+ /* the four corners, then the four edge midpoints */
268
+ .dz-handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
269
+ .dz-handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
270
+ .dz-handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
271
+ .dz-handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
272
+
273
+ .dz-handle-n { top: -5px; left: 50%; margin-left: -5px; cursor: ns-resize; }
274
+ .dz-handle-s { bottom: -5px; left: 50%; margin-left: -5px; cursor: ns-resize; }
275
+ .dz-handle-w { left: -5px; top: 50%; margin-top: -5px; cursor: ew-resize; }
276
+ .dz-handle-e { right: -5px; top: 50%; margin-top: -5px; cursor: ew-resize; }
277
+
278
+ /* a toggle that is on says so, the way the preview button does */
279
+ .dz-tool.is-on {
280
+ color: var(--accent-ink);
281
+ background: var(--accent-soft);
282
+ border-color: var(--accent-tint);
283
+ }
284
+
285
+ /* an item is grabbable, so it says so before it is grabbed */
286
+ .dz-page [data-item-id] {
287
+ cursor: move;
288
+ }
289
+
290
+ /**
291
+ * A drag that crosses a text item would otherwise select its text, and the
292
+ * browser's selection highlight then sits under the outline for the rest of
293
+ * the gesture.
294
+ */
295
+ .dz-canvas.is-dragging {
296
+ user-select: none;
297
+ cursor: grabbing;
298
+ }
299
+
300
+ /* ---------------- rulers and guides ---------------- */
301
+
302
+ :root {
303
+ --dz-ruler: 18px;
304
+ }
305
+
306
+ /**
307
+ * The rulers measure the printable area, not the paper - the number under an
308
+ * item is the `x` the properties rail shows for it, and a ruler that disagreed
309
+ * with the rail would be worse than no ruler. They start where the margins end,
310
+ * which says how wide the margins are without a number for that too.
311
+ */
312
+ .dz-ruler {
313
+ position: relative;
314
+ background: var(--surface-muted);
315
+ border: 1px solid var(--border);
316
+ cursor: crosshair;
317
+ user-select: none;
318
+ overflow: hidden;
319
+ }
320
+
321
+ .dz-ruler-x {
322
+ height: var(--dz-ruler);
323
+ /* the page's left margin, so 0 on the ruler is 0 for an item */
324
+ margin: 0 0 4px var(--dz-margin-left);
325
+ }
326
+
327
+ .dz-ruler-y {
328
+ width: var(--dz-ruler);
329
+ margin: var(--dz-margin-top) 4px 0 0;
330
+ }
331
+
332
+ /**
333
+ * A tick is drawn from the far edge inwards, so the labelled ones reach further
334
+ * into the ruler than the fine ones and the scale is readable without counting.
335
+ */
336
+ .dz-tick {
337
+ position: absolute;
338
+ background: var(--border);
339
+ }
340
+
341
+ .dz-ruler-x .dz-tick { bottom: 0; width: 1px; height: 4px; }
342
+ .dz-ruler-y .dz-tick { right: 0; height: 1px; width: 4px; }
343
+
344
+ .dz-ruler-x .dz-tick.is-major { height: 8px; }
345
+ .dz-ruler-y .dz-tick.is-major { width: 8px; }
346
+
347
+ .dz-tick i {
348
+ position: absolute;
349
+ font-family: "Instrument Sans", system-ui, sans-serif;
350
+ font-size: 8px;
351
+ font-style: normal;
352
+ line-height: 1;
353
+ color: var(--ink-soft);
354
+ white-space: nowrap;
355
+ }
356
+
357
+ .dz-ruler-x .dz-tick i { bottom: 9px; left: 2px; }
358
+
359
+ /**
360
+ * Turned on its side, so the vertical ruler stays 18px wide. Reading a number
361
+ * sideways beats a ruler wide enough to print it flat, which would push the
362
+ * page off centre by more than the ruler is worth.
363
+ */
364
+ .dz-ruler-y .dz-tick i {
365
+ right: 9px;
366
+ top: 1px;
367
+ transform-origin: 100% 0;
368
+ transform: rotate(-90deg) translate(-100%, 0);
369
+ }
370
+
371
+ /* where a guide meets its ruler, so one dragged off the page is still findable */
372
+ .dz-ruler-guide {
373
+ position: absolute;
374
+ background: var(--accent-strong);
375
+ }
376
+
377
+ .dz-ruler-x .dz-ruler-guide { top: 0; bottom: 0; width: 1px; }
378
+ .dz-ruler-y .dz-ruler-guide { left: 0; right: 0; height: 1px; }
379
+
380
+ /* the empty square where the two meet; it squares the corner off, nothing more */
381
+ .dz-ruler-corner {
382
+ width: var(--dz-ruler);
383
+ height: var(--dz-ruler);
384
+ margin: 0 4px 4px 0;
385
+ background: var(--surface-muted);
386
+ border: 1px solid var(--border);
387
+ }
388
+
389
+ /**
390
+ * The guides on the page. Under the selection outline and over the design, and
391
+ * they take no pointer events: select.js finds the one nearest the pointer by
392
+ * arithmetic instead, because a one-pixel line is not something anyone can hit
393
+ * and a line wide enough to hit would cover the design it is aligning.
394
+ */
395
+ .dz-rules {
396
+ position: absolute;
397
+ inset: 0;
398
+ z-index: 1;
399
+ pointer-events: none;
400
+ }
401
+
402
+ .dz-rule {
403
+ position: absolute;
404
+ background: var(--accent-tint);
405
+ }
406
+
407
+ .dz-rule-v { top: 0; bottom: 0; width: 1px; }
408
+ .dz-rule-h { left: 0; right: 0; height: 1px; }
409
+
410
+ /* the whole page is a place a guide might be picked up from */
411
+ .dz-sheet.has-rulers .dz-page { cursor: default; }
412
+
413
+ /* ---------------- alignment guides ---------------- */
414
+
415
+ /**
416
+ * The guides sit above the design and below nothing - they are the only thing
417
+ * on the canvas that is about the gesture rather than about the report, so they
418
+ * are drawn last and take no pointer events at all. A guide that could be
419
+ * clicked would end the drag that is drawing it.
420
+ */
421
+ .dz-guides {
422
+ position: absolute;
423
+ inset: 0;
424
+ z-index: 3;
425
+ pointer-events: none;
426
+ }
427
+
428
+ /**
429
+ * A hairline, not a rule: it is saying "these two agree", and anything thicker
430
+ * reads as part of the design it is drawn over. The colour is the accent's
431
+ * darkest mix, which is the one shade that holds up over a white page and over
432
+ * a table header both.
433
+ */
434
+ .dz-guide {
435
+ position: absolute;
436
+ background: var(--accent-strong);
437
+ }
438
+
439
+ .dz-guide-v { width: 1px; }
440
+ .dz-guide-h { height: 1px; }
441
+
442
+ /* a centre line is dashed, so "these middles agree" is not read as "these edges do" */
443
+ .dz-guide-v.is-centre {
444
+ width: 0;
445
+ background: none;
446
+ border-left: 1px dashed var(--accent-strong);
447
+ }
448
+
449
+ .dz-guide-h.is-centre {
450
+ height: 0;
451
+ background: none;
452
+ border-top: 1px dashed var(--accent-strong);
453
+ }
454
+
455
+ /**
456
+ * A measurement, drawn as the space it is measuring rather than as a line
457
+ * beside it - the bar is the gap, and the number is on it.
458
+ */
459
+ .dz-gap {
460
+ position: absolute;
461
+ display: flex;
462
+ align-items: center;
463
+ justify-content: center;
464
+ }
465
+
466
+ .dz-gap-v {
467
+ width: 0;
468
+ border-left: 1px solid var(--accent-ink);
469
+ }
470
+
471
+ .dz-gap-h {
472
+ height: 0;
473
+ border-top: 1px solid var(--accent-ink);
474
+ }
475
+
476
+ /* the gap to the band's own edge is the quieter of the two: it is always there */
477
+ .dz-gap.is-band {
478
+ opacity: 0.55;
479
+ }
480
+
481
+ /* the ticks that close the measurement off, so a 0px gap is still visible */
482
+ .dz-gap::before,
483
+ .dz-gap::after {
484
+ content: "";
485
+ position: absolute;
486
+ background: var(--accent-ink);
487
+ }
488
+
489
+ .dz-gap-v::before,
490
+ .dz-gap-v::after {
491
+ left: -3px;
492
+ width: 7px;
493
+ height: 1px;
494
+ }
495
+
496
+ .dz-gap-v::before { top: 0; }
497
+ .dz-gap-v::after { bottom: 0; }
498
+
499
+ .dz-gap-h::before,
500
+ .dz-gap-h::after {
501
+ top: -3px;
502
+ width: 1px;
503
+ height: 7px;
504
+ }
505
+
506
+ .dz-gap-h::before { left: 0; }
507
+ .dz-gap-h::after { right: 0; }
508
+
509
+ /**
510
+ * The number. Absolutely placed so it never stretches the bar it sits on, and
511
+ * given the page's own background so the line does not run through the digits.
512
+ */
513
+ .dz-gap i {
514
+ position: absolute;
515
+ padding: 0 3px;
516
+
517
+ font-family: "Instrument Sans", system-ui, sans-serif;
518
+ font-size: 10px;
519
+ font-style: normal;
520
+ line-height: 14px;
521
+ white-space: nowrap;
522
+
523
+ color: var(--surface);
524
+ background: var(--accent-ink);
525
+ border-radius: 2px;
526
+ }
527
+
528
+ /* clear of the bar, on the side there is most room on */
529
+ .dz-gap-v i { left: 5px; }
530
+ .dz-gap-h i { top: 5px; }
531
+
532
+ /* ---------------- the properties rail ---------------- */
533
+
534
+ .dz-panel {
535
+ flex: none;
536
+ width: var(--dz-panel);
537
+ overflow-y: auto;
538
+ padding: 16px;
539
+
540
+ background: var(--surface);
541
+ border-left: 1px solid var(--border);
542
+
543
+ font-family: "Instrument Sans", system-ui, sans-serif;
544
+ font-size: 12px;
545
+ color: var(--ink);
546
+ }
547
+
548
+ .dz-panel-empty {
549
+ padding: 24px 4px;
550
+ text-align: center;
551
+ color: var(--ink-soft);
552
+ }
553
+
554
+ .dz-panel-empty p {
555
+ margin-bottom: 6px;
556
+ }
557
+
558
+ .dz-panel-head {
559
+ display: flex;
560
+ align-items: baseline;
561
+ gap: 8px;
562
+ padding-bottom: 12px;
563
+ margin-bottom: 4px;
564
+ border-bottom: 1px solid var(--border);
565
+ }
566
+
567
+ .dz-panel-type {
568
+ padding: 2px 7px;
569
+ border-radius: 999px;
570
+ background: var(--accent-soft);
571
+ color: var(--accent-ink);
572
+ font-size: 10px;
573
+ letter-spacing: .04em;
574
+ text-transform: uppercase;
575
+ }
576
+
577
+ .dz-panel-id {
578
+ color: var(--ink-soft);
579
+ font-family: "Courier Prime", monospace;
580
+ overflow: hidden;
581
+ text-overflow: ellipsis;
582
+ white-space: nowrap;
583
+ }
584
+
585
+ .dz-section {
586
+ padding: 12px 0;
587
+ border-bottom: 1px solid var(--border);
588
+ }
589
+
590
+ .dz-section:last-child {
591
+ border-bottom: none;
592
+ }
593
+
594
+ .dz-section h3 {
595
+ margin-bottom: 10px;
596
+ font-size: 10px;
597
+ font-weight: 600;
598
+ letter-spacing: .06em;
599
+ text-transform: uppercase;
600
+ color: var(--ink-soft);
601
+ }
602
+
603
+ /**
604
+ * Label left, control right, on one line. Two lines per field would make the
605
+ * rail twice as tall as the page it describes.
606
+ */
607
+ .dz-field {
608
+ display: grid;
609
+ grid-template-columns: 1fr 1.2fr;
610
+ align-items: center;
611
+ gap: 8px;
612
+ margin-bottom: 8px;
613
+ }
614
+
615
+ .dz-field label {
616
+ color: var(--ink-soft);
617
+ }
618
+
619
+ /* the value box and its hint take the full width instead */
620
+ .dz-field-textarea {
621
+ grid-template-columns: 1fr;
622
+ gap: 4px;
623
+ }
624
+
625
+ .dz-field input,
626
+ .dz-field select,
627
+ .dz-field textarea {
628
+ width: 100%;
629
+ padding: 5px 7px;
630
+ border: 1px solid var(--border);
631
+ border-radius: 4px;
632
+ background: var(--surface);
633
+ color: var(--ink);
634
+ font: inherit;
635
+ }
636
+
637
+ .dz-field textarea {
638
+ font-family: "Courier Prime", monospace;
639
+ resize: vertical;
640
+ line-height: 1.4;
641
+ }
642
+
643
+ .dz-field input[type="number"] {
644
+ font-variant-numeric: tabular-nums;
645
+ }
646
+
647
+ .dz-field input[type="checkbox"] {
648
+ width: 15px;
649
+ height: 15px;
650
+ justify-self: start;
651
+ accent-color: var(--accent-strong);
652
+ }
653
+
654
+ .dz-field input[type="color"] {
655
+ height: 26px;
656
+ padding: 2px;
657
+ cursor: pointer;
658
+ }
659
+
660
+ .dz-field input:focus-visible,
661
+ .dz-field select:focus-visible,
662
+ .dz-field textarea:focus-visible {
663
+ outline: 2px solid var(--accent-strong);
664
+ outline-offset: -1px;
665
+ border-color: var(--accent-strong);
666
+ }
667
+
668
+ .dz-hint {
669
+ grid-column: 1 / -1;
670
+ color: var(--ink-soft);
671
+ font-size: 11px;
672
+ line-height: 1.4;
673
+ }
674
+
675
+ /* ---------------- the tool footer ---------------- */
676
+
677
+ /**
678
+ * The tools sit under the page, not in the bar: the bar is about the report as
679
+ * a whole, and these act on the band being looked at.
680
+ *
681
+ * A floating pill rather than a docked strip, matching the preview's pager - so
682
+ * the two screens read as the same product, and neither takes a permanent slice
683
+ * off the height of the page being worked on.
684
+ */
685
+ .dz-foot {
686
+ position: absolute;
687
+ left: 50%;
688
+ bottom: var(--dz-foot-offset);
689
+ transform: translateX(-50%);
690
+ z-index: 5;
691
+
692
+ display: flex;
693
+ align-items: center;
694
+ gap: 4px;
695
+ height: var(--dz-foot-height);
696
+ padding: 0 8px;
697
+
698
+ background: var(--surface);
699
+ border: 1px solid var(--border);
700
+ border-radius: 999px;
701
+ box-shadow: 0 4px 16px rgba(34, 39, 44, .12);
702
+ }
703
+
704
+ .dz-tool {
705
+ display: grid;
706
+ place-items: center;
707
+ width: 32px;
708
+ height: 32px;
709
+ padding: 0;
710
+
711
+ /* transparent rather than none, so hover adds no width and nothing shifts */
712
+ border: 1px solid transparent;
713
+ border-radius: 999px;
714
+ background: none;
715
+ /* the glyph is stroked with currentColor, so this colours it too */
716
+ color: var(--ink);
717
+ cursor: pointer;
718
+ }
719
+
720
+ .dz-tool:hover {
721
+ border-color: var(--accent);
722
+ background: var(--accent-soft);
723
+ color: var(--accent-ink);
724
+ }
725
+
726
+ .dz-tool:active {
727
+ background: var(--accent-tint);
728
+ }
729
+
730
+ .dz-tool:focus-visible {
731
+ outline: 2px solid var(--accent-strong);
732
+ outline-offset: 1px;
733
+ }
734
+
735
+ .dz-name {
736
+ flex: 1;
737
+ overflow: hidden;
738
+ text-overflow: ellipsis;
739
+ white-space: nowrap;
740
+ }
741
+
742
+ /* ---------------- structure controls ---------------- */
743
+
744
+ /**
745
+ * The right-click pill.
746
+ *
747
+ * Absolute inside .dz-main rather than fixed to the window, so it scrolls out
748
+ * of the way with the page area it belongs to and cannot be left hanging over
749
+ * the rail. Above the selection outline and its handles, below the bar.
750
+ */
751
+ .dz-menu {
752
+ position: absolute;
753
+ z-index: 8;
754
+
755
+ display: flex;
756
+ align-items: center;
757
+ gap: 2px;
758
+ padding: 4px;
759
+
760
+ border: 1px solid var(--border);
761
+ border-radius: 999px;
762
+ background: var(--surface);
763
+ box-shadow: 0 8px 24px rgb(34 39 44 / .18);
764
+ }
765
+
766
+ .dz-menu-item {
767
+ display: inline-flex;
768
+ align-items: center;
769
+ justify-content: center;
770
+ width: 30px;
771
+ height: 30px;
772
+ border: 0;
773
+ border-radius: 999px;
774
+ background: none;
775
+ color: var(--ink-soft);
776
+ cursor: pointer;
777
+ }
778
+
779
+ .dz-menu-item:hover:not(:disabled),
780
+ .dz-menu-item:focus-visible {
781
+ background: var(--accent-soft);
782
+ color: var(--accent-ink);
783
+ outline: none;
784
+ }
785
+
786
+ /* the one action that cannot be taken back by moving something else */
787
+ .dz-menu-item.is-danger:hover:not(:disabled),
788
+ .dz-menu-item.is-danger:focus-visible {
789
+ background: var(--danger-soft);
790
+ color: var(--danger);
791
+ }
792
+
793
+ .dz-menu-item:disabled {
794
+ opacity: .35;
795
+ cursor: default;
796
+ }
797
+
798
+ .dz-menu-sep {
799
+ width: 1px;
800
+ height: 18px;
801
+ margin: 0 3px;
802
+ background: var(--border);
803
+ }
804
+
805
+ /* the column editor's remove button; .dz-column-head lays it out on the right */
806
+ .dz-icon {
807
+ display: inline-flex;
808
+ align-items: center;
809
+ justify-content: center;
810
+ margin-left: auto;
811
+ width: 20px;
812
+ height: 20px;
813
+ border: 1px solid transparent;
814
+ border-radius: 4px;
815
+ background: none;
816
+ color: var(--ink-soft);
817
+ font: inherit;
818
+ font-size: 15px;
819
+ line-height: 1;
820
+ cursor: pointer;
821
+ }
822
+
823
+ .dz-icon:hover {
824
+ border-color: var(--accent);
825
+ background: var(--accent-soft);
826
+ color: var(--accent-ink);
827
+ }
828
+
829
+ .dz-add-row {
830
+ width: 100%;
831
+ padding: 6px;
832
+ border: 1px dashed var(--border);
833
+ border-radius: 5px;
834
+ background: none;
835
+ color: var(--ink-soft);
836
+ font: inherit;
837
+ cursor: pointer;
838
+ }
839
+
840
+ .dz-add-row::before {
841
+ content: "+";
842
+ margin-right: 5px;
843
+ }
844
+
845
+ .dz-add-row:hover {
846
+ border-color: var(--accent);
847
+ border-style: solid;
848
+ background: var(--accent-soft);
849
+ color: var(--accent-ink);
850
+ }
851
+
852
+ /* the stored picture, small, with what can be done to it underneath */
853
+ .dz-image {
854
+ display: grid;
855
+ gap: 6px;
856
+ }
857
+
858
+ .dz-image-thumb,
859
+ .dz-image-none {
860
+ box-sizing: border-box;
861
+ width: 100%;
862
+ height: 72px;
863
+ border: 1px solid var(--border);
864
+ border-radius: 5px;
865
+ background: var(--backdrop);
866
+ }
867
+
868
+ .dz-image-thumb {
869
+ object-fit: contain;
870
+ }
871
+
872
+ .dz-image-none {
873
+ display: flex;
874
+ align-items: center;
875
+ justify-content: center;
876
+ border-style: dashed;
877
+ color: var(--ink-soft);
878
+ }
879
+
880
+ .dz-image-actions {
881
+ display: flex;
882
+ gap: 6px;
883
+ }
884
+
885
+ /* nothing is being added by these two, so the plus goes */
886
+ .dz-image-actions .dz-add-row::before {
887
+ content: none;
888
+ }
889
+
890
+ /* a column is a card, because four controls will not sit on one rail-wide row */
891
+ .dz-column {
892
+ margin-bottom: 10px;
893
+ padding: 8px;
894
+ border: 1px solid var(--border);
895
+ border-radius: 5px;
896
+ background: var(--backdrop);
897
+ }
898
+
899
+ .dz-column-head {
900
+ display: flex;
901
+ align-items: center;
902
+ margin-bottom: 6px;
903
+ color: var(--ink-soft);
904
+ font-size: 10px;
905
+ letter-spacing: .06em;
906
+ }
907
+
908
+ .dz-column .dz-field:last-child {
909
+ margin-bottom: 0;
910
+ }
911
+
912
+ /* ---------------- the band list ---------------- */
913
+
914
+ .dz-band-row {
915
+ display: grid;
916
+ grid-template-columns: 1fr 72px;
917
+ align-items: center;
918
+ gap: 6px;
919
+ padding: 5px 0;
920
+ }
921
+
922
+ .dz-band-name {
923
+ display: flex;
924
+ align-items: center;
925
+ gap: 7px;
926
+ cursor: pointer;
927
+ color: var(--ink-soft);
928
+ }
929
+
930
+ /* an inactive band is legible but plainly off */
931
+ .dz-band-row.is-on .dz-band-name {
932
+ color: var(--ink);
933
+ }
934
+
935
+ .dz-band-name input {
936
+ width: 14px;
937
+ height: 14px;
938
+ accent-color: var(--accent-strong);
939
+ }
940
+
941
+ .dz-band-height {
942
+ width: 100%;
943
+ padding: 4px 6px;
944
+ border: 1px solid var(--border);
945
+ border-radius: 4px;
946
+ background: var(--surface);
947
+ color: var(--ink);
948
+ font: inherit;
949
+ font-variant-numeric: tabular-nums;
950
+ text-align: right;
951
+ }
952
+
953
+ .dz-band-height:focus-visible {
954
+ outline: 2px solid var(--accent-strong);
955
+ outline-offset: -1px;
956
+ }
957
+
958
+ .dz-band-height-none {
959
+ color: var(--ink-soft);
960
+ font-size: 10px;
961
+ text-align: right;
962
+ }
963
+
964
+ .dz-band-row .dz-hint {
965
+ grid-column: 1 / -1;
966
+ margin-top: -2px;
967
+ padding-left: 21px;
968
+ font-size: 10px;
969
+ }
970
+
971
+ /* ---------------- the corner ---------------- */
972
+
973
+ /**
974
+ * Messages stack in the top right of the page area.
975
+ *
976
+ * Out of the flow rather than above the page: one placed there pushed the
977
+ * design down the canvas every time a half-finished layout failed to validate,
978
+ * which moved the very thing the author was pointing at.
979
+ *
980
+ * The corner of the page area, not of the window - the window's corner is the
981
+ * top of the properties rail, and that is where the band switches are, so a
982
+ * message pinned there would cover the fix for what it was complaining about.
983
+ *
984
+ * The column itself lets the pointer through, so it never takes a click meant
985
+ * for the page behind it; each toast takes its own back.
986
+ */
987
+ .dz-toasts {
988
+ position: absolute;
989
+ top: 16px;
990
+ right: 16px;
991
+ z-index: 20;
992
+
993
+ display: flex;
994
+ flex-direction: column;
995
+ gap: 10px;
996
+ width: min(340px, calc(100vw - 32px));
997
+
998
+ pointer-events: none;
999
+ }
1000
+
1001
+ .dz-toast {
1002
+ pointer-events: auto;
1003
+
1004
+ display: flex;
1005
+ align-items: flex-start;
1006
+ gap: 10px;
1007
+ padding: 12px 12px 12px 14px;
1008
+
1009
+ background: var(--surface);
1010
+ border: 1px solid var(--border);
1011
+ border-radius: 2px;
1012
+ box-shadow: 0 10px 28px rgb(34 39 44 / .16);
1013
+
1014
+ font-family: "Instrument Sans", system-ui, sans-serif;
1015
+ font-size: 12px;
1016
+ color: var(--ink);
1017
+
1018
+ animation: dz-toast-in .18s ease-out;
1019
+ }
1020
+
1021
+ /* it arrives from the edge it lives on */
1022
+ @keyframes dz-toast-in {
1023
+ from { opacity: 0; transform: translateX(12px); }
1024
+ to { opacity: 1; transform: none; }
1025
+ }
1026
+
1027
+ @media (prefers-reduced-motion: reduce) {
1028
+ .dz-toast { animation: none; }
1029
+ }
1030
+
1031
+ .dz-toast-text {
1032
+ flex: 1;
1033
+ min-width: 0;
1034
+ }
1035
+
1036
+ .dz-toast-title {
1037
+ display: block;
1038
+ margin-bottom: 6px;
1039
+ font-size: 12px;
1040
+ font-weight: 600;
1041
+ }
1042
+
1043
+ /* the findings themselves, which are field names as often as sentences */
1044
+ .dz-toast ul {
1045
+ margin: 0;
1046
+ padding-left: 16px;
1047
+ color: var(--ink-soft);
1048
+ line-height: 1.5;
1049
+ overflow-wrap: anywhere;
1050
+ }
1051
+
1052
+ .dz-toast-close {
1053
+ flex: none;
1054
+ width: 20px;
1055
+ height: 20px;
1056
+ display: inline-flex;
1057
+ align-items: center;
1058
+ justify-content: center;
1059
+
1060
+ border: 1px solid transparent;
1061
+ border-radius: 4px;
1062
+ background: none;
1063
+ color: var(--ink-soft);
1064
+ font: inherit;
1065
+ font-size: 15px;
1066
+ line-height: 1;
1067
+ cursor: pointer;
1068
+ }
1069
+
1070
+ .dz-toast-close:hover {
1071
+ border-color: var(--accent);
1072
+ background: var(--accent-soft);
1073
+ color: var(--accent-ink);
1074
+ }
1075
+
1076
+ /* ---------------- the dialog ---------------- */
1077
+
1078
+ /* wide enough for a report name to be read in full */
1079
+ .modal-card.is-roomy {
1080
+ width: min(560px, calc(100vw - 32px));
1081
+ }
1082
+
1083
+ /**
1084
+ * A dialog field stacks: the label above, the control across the full card.
1085
+ *
1086
+ * This used to be `auto 90px` for every field inside a modal, which was written
1087
+ * for the column count and then silently squeezed everything else that arrived
1088
+ * later - the report picker and the save dialog's name box were both 90px wide
1089
+ * because of it. Narrow is now the exception, and it asks for itself by name.
1090
+ */
1091
+ .modal-card .dz-field {
1092
+ grid-template-columns: 1fr;
1093
+ gap: 6px;
1094
+ margin-bottom: 14px;
1095
+ }
1096
+
1097
+ .modal-card .dz-field label {
1098
+ color: var(--ink-soft);
1099
+ font-size: 10px;
1100
+ font-weight: 600;
1101
+ letter-spacing: .06em;
1102
+ text-transform: uppercase;
1103
+ }
1104
+
1105
+ /* a count is two digits; a box the width of the card would be absurd */
1106
+ .modal-card .dz-field-count {
1107
+ grid-template-columns: auto 90px;
1108
+ align-items: center;
1109
+ justify-content: start;
1110
+ gap: 12px;
1111
+ }
1112
+
1113
+ .modal-card .dz-field-count label {
1114
+ font-size: 12px;
1115
+ font-weight: 400;
1116
+ letter-spacing: 0;
1117
+ text-transform: none;
1118
+ color: var(--ink);
1119
+ }
1120
+
1121
+ /* ---------------- the bar's controls ---------------- */
1122
+
1123
+ /* the report's name, with what the disk currently knows underneath it */
1124
+ .dz-title {
1125
+ flex: 1;
1126
+ display: flex;
1127
+ flex-direction: column;
1128
+ gap: 1px;
1129
+ min-width: 0;
1130
+ }
1131
+
1132
+ .dz-status {
1133
+ font-size: 10px;
1134
+ color: var(--ink-soft);
1135
+ overflow: hidden;
1136
+ text-overflow: ellipsis;
1137
+ white-space: nowrap;
1138
+ }
1139
+
1140
+ /* unsaved is a state to notice, not to be alarmed by */
1141
+ .dz-bar[data-dirty="true"] .dz-status {
1142
+ color: var(--accent-ink);
1143
+ }
1144
+
1145
+ /* a failure the user has to read, so it takes the accent outright */
1146
+ .dz-status[data-problem] {
1147
+ color: var(--accent-ink);
1148
+ font-weight: 600;
1149
+ }
1150
+
1151
+ .dz-bar-group {
1152
+ display: flex;
1153
+ align-items: center;
1154
+ gap: 2px;
1155
+ padding: 0 6px;
1156
+ border-left: 1px solid var(--border);
1157
+ }
1158
+
1159
+ .dz-bar-group:first-of-type {
1160
+ border-left: none;
1161
+ }
1162
+
1163
+ .dz-tool:disabled {
1164
+ opacity: .35;
1165
+ cursor: default;
1166
+ }
1167
+
1168
+ .dz-tool:disabled:hover {
1169
+ border-color: transparent;
1170
+ background: none;
1171
+ color: var(--ink);
1172
+ }
1173
+
1174
+ /* ---------------- the report picker ---------------- */
1175
+
1176
+ /**
1177
+ * The label sits above the control, not beside it: the picker is the dialog's
1178
+ * one job, and a label in the same row would take a fifth of the width off the
1179
+ * thing being read - which is a report name, and report names are long.
1180
+ */
1181
+ .modal-card .dz-field-picker {
1182
+ margin-bottom: 6px;
1183
+ }
1184
+
1185
+ /* the dropdown fills the card rather than sizing to its longest report name */
1186
+ .modal-card .dz-field-picker .dropdown,
1187
+ .modal-card .dz-field-picker .dropdown-trigger {
1188
+ width: 100%;
1189
+ }
1190
+
1191
+ /* and the name gets whatever the caret does not */
1192
+ .modal-card .dz-field-picker .dropdown-value {
1193
+ flex: 1;
1194
+ min-width: 0;
1195
+ overflow: hidden;
1196
+ text-overflow: ellipsis;
1197
+ white-space: nowrap;
1198
+ text-align: left;
1199
+ }
1200
+
1201
+ /**
1202
+ * The shared component is sized for the preview's zoom control, where the value
1203
+ * is "100%" in a crowded toolbar. Here it carries a report name in a dialog, so
1204
+ * it takes the dialog's type size rather than the toolbar's.
1205
+ */
1206
+ .modal-card .dz-field-picker .dropdown-trigger,
1207
+ .modal-card .dz-field-picker .dropdown-item {
1208
+ font-size: 13px;
1209
+ }
1210
+
1211
+ .modal-card .dz-field-picker .dropdown-trigger {
1212
+ height: 38px;
1213
+ padding: 0 12px;
1214
+ }
1215
+
1216
+ /**
1217
+ * Vertical padding only. The left inset is the tick's ::before placeholder,
1218
+ * which the component already sizes - adding to it here would indent the
1219
+ * selected and unselected items by different amounts.
1220
+ *
1221
+ * A report name is as long as someone typed it and the menu is a fixed width,
1222
+ * so it clips rather than pushing the menu wider than the trigger under it.
1223
+ */
1224
+ .modal-card .dz-field-picker .dropdown-item {
1225
+ padding: 9px 12px 9px 8px;
1226
+ overflow: hidden;
1227
+ text-overflow: ellipsis;
1228
+ }
1229
+
1230
+ .modal-card .dz-field-picker .dropdown-menu {
1231
+ width: 100%;
1232
+ max-height: 40vh;
1233
+ overflow-y: auto;
1234
+ }
1235
+
1236
+ /**
1237
+ * A dropdown shows one line, so what the name alone does not settle - which
1238
+ * file it is, when it last changed - goes underneath rather than being lost.
1239
+ */
1240
+ .dz-report-meta {
1241
+ margin-bottom: 16px;
1242
+ padding-left: 1px;
1243
+ color: var(--ink-soft);
1244
+ font-size: 11px;
1245
+ }
1246
+
1247
+ /* a report that will not parse is still offered - it is the one to go and fix */
1248
+ .dz-report-meta[data-unreadable] {
1249
+ color: var(--accent-ink);
1250
+ }
1251
+
1252
+ .modal-card code {
1253
+ font-family: "Courier Prime", monospace;
1254
+ color: var(--ink);
1255
+ }
1256
+
1257
+ /* ---------------- the data dialog ---------------- */
1258
+
1259
+ /* a payload needs room to be read; the other dialogs do not */
1260
+ .modal-card.is-wide {
1261
+ width: min(640px, calc(100vw - 32px));
1262
+ }
1263
+
1264
+ .dz-payload {
1265
+ width: 100%;
1266
+ padding: 10px 12px;
1267
+ border: 1px solid var(--border);
1268
+ border-radius: 6px;
1269
+ background: var(--backdrop);
1270
+ color: var(--ink);
1271
+
1272
+ font-family: "Courier Prime", monospace;
1273
+ font-size: 12px;
1274
+ line-height: 1.5;
1275
+ tab-size: 2;
1276
+ resize: vertical;
1277
+ }
1278
+
1279
+ .dz-payload:focus-visible {
1280
+ outline: 2px solid var(--accent-strong);
1281
+ outline-offset: -1px;
1282
+ border-color: var(--accent-strong);
1283
+ }
1284
+
1285
+ /**
1286
+ * Beside the box rather than after the click that was meant to save: a payload
1287
+ * someone has pasted and broken should say so while they can still see where.
1288
+ */
1289
+ .dz-parse-error {
1290
+ min-height: 16px;
1291
+ margin: 6px 0 12px;
1292
+ color: var(--accent-ink);
1293
+ font-size: 11px;
1294
+ line-height: 1.4;
1295
+ }
1296
+
1297
+ .modal-actions button:disabled {
1298
+ opacity: .5;
1299
+ cursor: default;
1300
+ }
1301
+
1302
+ /* ---------------- running the report ---------------- */
1303
+
1304
+ /**
1305
+ * The rail and the tools go while the report is running. There is nothing on
1306
+ * the rail that applies to a rendered page, and the insert tools would be
1307
+ * offering to add a text box to something that is no longer a design.
1308
+ */
1309
+ .report-designer[data-mode="preview"] .dz-panel,
1310
+ .report-designer[data-mode="preview"] .dz-foot {
1311
+ display: none;
1312
+ }
1313
+
1314
+ /* the pages stack down the canvas, as sheets coming off a printer do */
1315
+ .report-designer[data-mode="preview"] #main-page {
1316
+ display: flex;
1317
+ flex-direction: column;
1318
+ align-items: center;
1319
+ gap: 24px;
1320
+ width: max-content;
1321
+ margin: 0 auto;
1322
+ }
1323
+
1324
+ /* nothing here is grabbable; saying so with the cursor stops the invitation */
1325
+ .report-designer[data-mode="preview"] .dz-canvas [data-item-id] {
1326
+ cursor: default;
1327
+ }
1328
+
1329
+ /* the toggle stays lit while it is the thing being looked at */
1330
+ .dz-tool[aria-pressed="true"] {
1331
+ border-color: var(--accent);
1332
+ background: var(--accent-soft);
1333
+ color: var(--accent-ink);
1334
+ }
1335
+
1336
+ .dz-pages {
1337
+ color: var(--ink-soft);
1338
+ font-variant-numeric: tabular-nums;
1339
+ white-space: nowrap;
1340
+ }
1341
+
1342
+ .dz-truncated {
1343
+ max-width: 640px;
1344
+ margin: 4px auto 0;
1345
+ padding: 10px 14px;
1346
+
1347
+ background: var(--surface);
1348
+ border: 1px dashed var(--border);
1349
+ border-radius: 6px;
1350
+
1351
+ font-family: "Instrument Sans", system-ui, sans-serif;
1352
+ font-size: 12px;
1353
+ color: var(--ink-soft);
1354
+ text-align: center;
1355
+ }
1356
+
1357
+ /* ---------------- the field list ---------------- */
1358
+
1359
+ .dz-tokens {
1360
+ display: grid;
1361
+ grid-template-columns: 1fr 1fr;
1362
+ gap: 6px;
1363
+ max-height: 42vh;
1364
+ overflow-y: auto;
1365
+ margin-bottom: 16px;
1366
+ }
1367
+
1368
+ .dz-token {
1369
+ display: flex;
1370
+ align-items: flex-start;
1371
+ gap: 9px;
1372
+ padding: 9px 11px;
1373
+ border: 1px solid var(--border);
1374
+ border-radius: 8px;
1375
+ cursor: pointer;
1376
+ }
1377
+
1378
+ .dz-token:hover {
1379
+ border-color: var(--accent);
1380
+ background: var(--accent-soft);
1381
+ }
1382
+
1383
+ /* the darker mix on the border, so the chosen one is legible not just tinted */
1384
+ .dz-token:has(input:checked) {
1385
+ border-color: var(--accent-strong);
1386
+ background: var(--accent-soft);
1387
+ }
1388
+
1389
+ .dz-token:has(input:focus-visible) {
1390
+ outline: 2px solid var(--accent-strong);
1391
+ outline-offset: 1px;
1392
+ }
1393
+
1394
+ .dz-token input {
1395
+ margin-top: 2px;
1396
+ width: 14px;
1397
+ height: 14px;
1398
+ flex: none;
1399
+ accent-color: var(--accent-strong);
1400
+ }
1401
+
1402
+ .dz-token-body {
1403
+ display: flex;
1404
+ flex-direction: column;
1405
+ gap: 2px;
1406
+ min-width: 0;
1407
+ }
1408
+
1409
+ .dz-token-name {
1410
+ font-weight: 500;
1411
+ }
1412
+
1413
+ /**
1414
+ * The syntax is shown rather than hidden behind the label: the point is that
1415
+ * someone stops needing this dialog, and they only stop by seeing what it
1416
+ * writes.
1417
+ */
1418
+ .dz-token-syntax {
1419
+ font-family: "Courier Prime", monospace;
1420
+ font-size: 11px;
1421
+ color: var(--accent-ink);
1422
+ overflow: hidden;
1423
+ text-overflow: ellipsis;
1424
+ white-space: nowrap;
1425
+ }
1426
+
1427
+ .dz-token-note {
1428
+ color: var(--ink-soft);
1429
+ font-size: 11px;
1430
+ line-height: 1.35;
1431
+ }
1432
+
1433
+ /* a warning, not a refusal - it is the author's report */
1434
+ .dz-token-warning {
1435
+ margin-bottom: 14px;
1436
+ padding: 9px 12px;
1437
+ border: 1px solid var(--accent-strong);
1438
+ border-radius: 6px;
1439
+ color: var(--accent-ink);
1440
+ font-size: 11px;
1441
+ line-height: 1.45;
1442
+ }
1443
+
1444
+ /**
1445
+ * The same box saying which rows an aggregate will cover, which is information
1446
+ * rather than a caution - so it drops back to the quiet border every other
1447
+ * field in the dialog has, and keeps only the indent that sets it apart from
1448
+ * the controls above it.
1449
+ */
1450
+ .dz-token-warning.is-note {
1451
+ border-color: var(--border);
1452
+ color: var(--ink-soft);
1453
+ }
1454
+
1455
+ .dz-token-warning[hidden] {
1456
+ display: none;
1457
+ }
1458
+
1459
+ /**
1460
+ * The band an item is about to land in, or has just been put in.
1461
+ *
1462
+ * A drag used to leave the item in the band it started from however far it was
1463
+ * moved, so there was nothing to show - and inserting a field chooses a band on
1464
+ * the user's behalf, which is worth pointing at rather than leaving to be found.
1465
+ */
1466
+ .dz-zone.is-target {
1467
+ outline: 2px solid var(--accent-strong);
1468
+ outline-offset: -2px;
1469
+ background: var(--accent-soft);
1470
+ }
1471
+
1472
+ /* the gutter name lights with it, so the band is identified and not just lit */
1473
+ .dz-sheet:has(.dz-zone.is-target) .dz-tag {
1474
+ opacity: .45;
1475
+ }
1476
+
1477
+ .dz-tag.is-target {
1478
+ opacity: 1;
1479
+ color: var(--accent-ink);
1480
+ font-weight: 600;
1481
+ }
1482
+
1483
+ /* ---------------- several items at once ---------------- */
1484
+
1485
+ /**
1486
+ * The one whose handles are drawn is solid; the rest are dashed. Without the
1487
+ * distinction a group of six looks like six things that can each be resized,
1488
+ * and only one of them can.
1489
+ */
1490
+ .dz-select.is-secondary {
1491
+ outline-style: dashed;
1492
+ }
1493
+
1494
+ .dz-selected {
1495
+ display: flex;
1496
+ flex-direction: column;
1497
+ gap: 4px;
1498
+ margin-bottom: 10px;
1499
+ padding: 0;
1500
+ list-style: none;
1501
+ max-height: 30vh;
1502
+ overflow-y: auto;
1503
+ }
1504
+
1505
+ .dz-selected li {
1506
+ display: flex;
1507
+ align-items: baseline;
1508
+ gap: 8px;
1509
+ padding: 5px 8px;
1510
+ border: 1px solid var(--border);
1511
+ border-radius: 5px;
1512
+ background: var(--backdrop);
1513
+ }
1514
+
1515
+ .dz-selected-type {
1516
+ color: var(--ink-soft);
1517
+ font-size: 10px;
1518
+ letter-spacing: .04em;
1519
+ text-transform: uppercase;
1520
+ }
1521
+
1522
+ .dz-selected-id {
1523
+ font-family: "Courier Prime", monospace;
1524
+ overflow: hidden;
1525
+ text-overflow: ellipsis;
1526
+ white-space: nowrap;
1527
+ }
1528
+
1529
+ /* ---------------- the value box ---------------- */
1530
+
1531
+ .dz-field-top {
1532
+ display: flex;
1533
+ align-items: center;
1534
+ justify-content: space-between;
1535
+ gap: 8px;
1536
+ }
1537
+
1538
+ /* the button sits opposite the label, across the top of the value box */
1539
+ .dz-brace {
1540
+ padding: 1px 7px;
1541
+ border: 1px solid var(--border);
1542
+ border-radius: 4px;
1543
+ background: var(--surface);
1544
+ color: var(--accent-ink);
1545
+ font-family: "Courier Prime", monospace;
1546
+ font-size: 11px;
1547
+ line-height: 1.5;
1548
+ cursor: pointer;
1549
+ }
1550
+
1551
+ .dz-brace:hover {
1552
+ border-color: var(--accent);
1553
+ background: var(--accent-soft);
1554
+ }
1555
+
1556
+ .dz-brace:focus-visible {
1557
+ outline: 2px solid var(--accent-strong);
1558
+ outline-offset: 1px;
1559
+ }
1560
+
1561
+ /**
1562
+ * A textarea cannot style its own contents, so the placeholders are marked on a
1563
+ * layer behind it and the box itself is given transparent text.
1564
+ *
1565
+ * Everything that affects where a character lands has to match between the two
1566
+ * exactly - font, size, line height, padding, border width, wrapping - or the
1567
+ * marks drift off the text they belong to. That is why both take their metrics
1568
+ * from the same declarations here rather than inheriting separately.
1569
+ */
1570
+ .dz-value {
1571
+ position: relative;
1572
+ }
1573
+
1574
+ .dz-value textarea,
1575
+ .dz-value-marks {
1576
+ box-sizing: border-box;
1577
+ width: 100%;
1578
+ padding: 6px 8px;
1579
+ border: 1px solid transparent;
1580
+ border-radius: 4px;
1581
+
1582
+ font-family: "Courier Prime", monospace;
1583
+ font-size: 12px;
1584
+ line-height: 1.5;
1585
+ letter-spacing: normal;
1586
+
1587
+ white-space: pre-wrap;
1588
+ overflow-wrap: break-word;
1589
+ word-break: normal;
1590
+ tab-size: 2;
1591
+ }
1592
+
1593
+ .dz-value textarea {
1594
+ position: relative;
1595
+ z-index: 1;
1596
+ display: block;
1597
+ min-height: 52px;
1598
+ border-color: var(--border);
1599
+ background: transparent;
1600
+ /* the text is drawn by the layer behind; only the caret shows through */
1601
+ color: transparent;
1602
+ caret-color: var(--ink);
1603
+ resize: vertical;
1604
+ }
1605
+
1606
+ .dz-value textarea::selection {
1607
+ /* a transparent-text selection would be invisible without a fill */
1608
+ background: var(--accent-tint);
1609
+ }
1610
+
1611
+ .dz-value textarea:focus-visible {
1612
+ outline: 2px solid var(--accent-strong);
1613
+ outline-offset: -1px;
1614
+ border-color: var(--accent-strong);
1615
+ }
1616
+
1617
+ .dz-value-marks {
1618
+ position: absolute;
1619
+ inset: 0;
1620
+ z-index: 0;
1621
+ overflow: hidden;
1622
+ color: var(--ink);
1623
+ background: var(--surface);
1624
+ pointer-events: none;
1625
+ }
1626
+
1627
+ /**
1628
+ * The braces and what is between them, so a placeholder is told apart from the
1629
+ * words around it - and a half-typed one, with only an opening brace, is told
1630
+ * apart by not being marked at all.
1631
+ */
1632
+ .dz-mark {
1633
+ border-radius: 3px;
1634
+ background: var(--accent-soft);
1635
+ color: var(--accent-ink);
1636
+ font-weight: 700;
1637
+ }
1638
+
1639
+ /* the link to the other screen sits among the tools and behaves like one */
1640
+ a.dz-tool {
1641
+ text-decoration: none;
1642
+ }
1643
+
1644
+ a.dz-tool[aria-disabled="true"] {
1645
+ opacity: .35;
1646
+ cursor: default;
1647
+ pointer-events: auto;
1648
+ }
1649
+
1650
+ a.dz-tool[aria-disabled="true"]:hover {
1651
+ border-color: transparent;
1652
+ background: none;
1653
+ color: var(--ink);
1654
+ }