reifyui 0.8.3 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/styles/sheet.css CHANGED
@@ -14,17 +14,22 @@
14
14
  border: 1px solid var(--uic-line, #DDDFE6);
15
15
  padding: 0; height: 34px; box-sizing: border-box;
16
16
  }
17
+ /* 34px is a row's floor; a row is as tall as its tallest cell. Every cell in it reads from the
18
+ top, level with the first line of that tallest one, rather than floating to the middle. */
19
+ .shg-table tbody td { vertical-align: top; }
17
20
  .shg-corner, .shg-rownum {
18
21
  background: var(--uic-surface-2, #F7F8FA);
19
22
  text-align: center; color: var(--uic-mute-2, #8E9199); font-variant-numeric: tabular-nums;
20
23
  position: sticky; left: 0; z-index: 3;
21
24
  }
22
25
  .shg-corner { z-index: 6; }
23
- .shg-rownum span { font-size: 12.5px; }
26
+ /* The number sits in a band the height of a one-line row, so it lines up with the first line of
27
+ a tall row as well as centering in a short one. */
28
+ .shg-rownum span { font-size: 12.5px; display: block; line-height: 32px; }
24
29
  /* A 12x18 target for a destructive action was too small to hit deliberately and too small to
25
30
  read. It is a real button now, and the gutter is wide enough to hold it beside the number. */
26
31
  .shg-rowdel {
27
- position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
32
+ position: absolute; right: 3px; top: 6px;
28
33
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
29
34
  border: none; border-radius: 5px; background: transparent; color: var(--uic-mute-2, #8E9199);
30
35
  cursor: pointer; font-size: 17px; line-height: 1; opacity: 0; padding: 0;
@@ -64,21 +69,33 @@
64
69
  .shg-cell:hover { background: var(--uic-surface-2, #F7F8FA); }
65
70
  /* The cell is the constraint on its own value. This used to carry an inline max-width of the
66
71
  column width minus 20, or 400px where the column had no explicit width — a number nothing
67
- derived, which ellipsised a value long before its own cell ran out of room. */
68
- .shg-val { display: flex; align-items: flex-start; gap: 6px; padding: 6px 10px; height: 100%;
69
- width: 100%; min-width: 0; box-sizing: border-box; }
72
+ derived, which ellipsised a value long before its own cell ran out of room.
73
+
74
+ The value box is what sizes the row, and it stops at --shg-row-max: eight lines by default, or
75
+ the height of a row someone sized. Past that the value scrolls inside its own cell, so one
76
+ long cell can never turn its row into a page. A host changes the cap by setting the variable
77
+ on the grid or anywhere above it. */
78
+ .shg-val { display: flex; align-items: flex-start; gap: 6px; padding: 6px 10px;
79
+ width: 100%; min-width: 0; box-sizing: border-box;
80
+ max-height: var(--shg-row-max, calc(8 * 18px + 12px));
81
+ overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
70
82
  .shg-val-txt {
71
83
  flex: 1; min-width: 0; color: var(--uic-ink, #111317); align-self: flex-start;
72
- /* Wrap to the row's height; the last visible line ellipsizes. Rows at the
73
- default height clamp to one line (classic sheet behavior); taller rows
74
- show more lines. --shg-clamp is set per row from its height. */
75
- display: -webkit-box; -webkit-box-orient: vertical;
76
- -webkit-line-clamp: var(--shg-clamp, 1);
77
- overflow: hidden; white-space: normal; word-break: break-word;
84
+ /* All of the value, as written: its own line breaks kept, and a long word or an address broken
85
+ at the cell's edge, never ellipsised and never pushed past it. */
86
+ white-space: pre-wrap; overflow-wrap: anywhere;
78
87
  line-height: 18px;
79
88
  }
80
- .shg-input { width: 100%; height: 100%; border: 2px solid var(--uic-brand, #285AFF); padding: 0 8px;
81
- font-size: 13px; font-family: inherit; outline: none; box-sizing: border-box; }
89
+ /* The editor lies over its cell. Under it, an invisible copy of the draft (.shg-val-mirror) holds
90
+ the cell's place, so the row keeps its height while you type and grows with the draft. The ring
91
+ is a shadow, not a border, so the textarea wraps at exactly the width the copy does. */
92
+ .shg-val-mirror { visibility: hidden; }
93
+ .shg-input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
94
+ border: none; box-shadow: inset 0 0 0 2px var(--uic-brand, #285AFF); padding: 0 8px;
95
+ font-size: 13px; font-family: inherit; color: var(--uic-ink, #111317);
96
+ background: var(--uic-surface, #FFFFFF); outline: none; box-sizing: border-box; }
97
+ .shg-input-area { display: block; padding: 6px 10px; line-height: 18px; resize: none;
98
+ white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; }
82
99
  .shg-runcell {
83
100
  border: none; background: transparent; color: var(--uic-brand, #285AFF); cursor: pointer;
84
101
  font-size: 10px; opacity: 0; flex-shrink: 0; padding: 2px 4px;
@@ -104,10 +121,12 @@
104
121
  .shg-add-row:hover { border-color: var(--uic-brand, #285AFF); color: var(--uic-brand, #285AFF); }
105
122
 
106
123
  /* ── Typed cell values ─────────────────────────────────────────────────── */
124
+ /* A long option wraps inside its pill like any other value. The radius is half a one-line pill's
125
+ height, so one line still reads as a pill and two read as a rounded box, not a lozenge. */
107
126
  .shg-pill {
108
127
  display: inline-flex; align-items: center; max-width: 100%;
109
- padding: 1.5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
110
- color: var(--uic-ink, #1F2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
128
+ padding: 1.5px 9px; border-radius: 10px; font-size: 12px; font-weight: 600;
129
+ color: var(--uic-ink, #1F2937); white-space: normal; overflow-wrap: anywhere;
111
130
  }
112
131
  .shg-pills { display: flex; gap: 4px; overflow: hidden; flex: 1; min-width: 0;
113
132
  flex-wrap: wrap; max-height: 100%; align-content: center; }
@@ -117,8 +136,8 @@
117
136
  font-size: 12px; font-weight: 700; color: var(--uic-on-brand, #fff); background: var(--uic-surface, #FFFFFF);
118
137
  }
119
138
  .shg-check.on { background: var(--uic-brand, #285AFF); border-color: var(--uic-brand, #285AFF); }
120
- .shg-link { color: var(--uic-brand, #285AFF); text-decoration: none; overflow: hidden;
121
- text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
139
+ .shg-link { color: var(--uic-brand, #285AFF); text-decoration: none; line-height: 18px;
140
+ overflow-wrap: anywhere; flex: 1; min-width: 0; }
122
141
  .shg-link:hover { text-decoration: underline; }
123
142
  .shg-num { text-align: right; font-variant-numeric: tabular-nums; }
124
143
 
@@ -195,7 +214,8 @@
195
214
 
196
215
  /* ── Ghost add-row (Airtable-style, attached to the grid) ───────────────── */
197
216
  .shg-ghost-row { cursor: pointer; }
198
- .shg-ghost-row td { border-color: var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF); }
217
+ .shg-ghost-row td { border-color: var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF);
218
+ vertical-align: middle; }
199
219
  .shg-ghost-num { color: var(--uic-mute-2, #8E9199); font-size: 15px !important; }
200
220
  .shg-ghost-cell { color: var(--uic-mute-2, #8E9199); font-size: 12.5px; padding: 0 10px !important; }
201
221
  .shg-ghost-row:hover td { background: var(--uic-brand-faint, #EFF3FF); }