@sovereignfs/ui 0.107.3 → 0.110.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.
@@ -0,0 +1,178 @@
1
+ .root {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--sv-space-3);
5
+ min-width: 0;
6
+ color: var(--sv-color-text-primary);
7
+ }
8
+
9
+ .status {
10
+ margin: 0;
11
+ padding: var(--sv-space-2) var(--sv-space-3);
12
+ font-size: var(--sv-font-size-sm);
13
+ background: var(--sv-color-success-surface);
14
+ color: var(--sv-color-success-text);
15
+ border-radius: var(--sv-radius-md);
16
+ }
17
+
18
+ .status[data-open] {
19
+ background: var(--sv-color-warning-surface);
20
+ color: var(--sv-color-warning-text);
21
+ }
22
+
23
+ .lines {
24
+ margin: 0;
25
+ padding: var(--sv-space-2) var(--sv-space-3);
26
+ font-family: var(--sv-font-family-mono);
27
+ font-size: var(--sv-font-size-caption);
28
+ line-height: 1.6;
29
+ tab-size: 2;
30
+ white-space: pre-wrap;
31
+ overflow-wrap: anywhere;
32
+ }
33
+
34
+ .same {
35
+ min-width: 0;
36
+ color: var(--sv-color-text-muted);
37
+ }
38
+
39
+ .empty {
40
+ margin: 0;
41
+ padding: var(--sv-space-2) var(--sv-space-3);
42
+ font-size: var(--sv-font-size-xs);
43
+ font-style: italic;
44
+ color: var(--sv-color-text-muted);
45
+ }
46
+
47
+ .applied {
48
+ min-width: 0;
49
+ border-left: 3px solid var(--sv-color-info-border);
50
+ background: var(--sv-color-surface-sunken);
51
+ }
52
+
53
+ .label {
54
+ margin: 0;
55
+ padding: var(--sv-space-2) var(--sv-space-3) 0;
56
+ font-size: var(--sv-font-size-xs);
57
+ font-weight: var(--sv-font-weight-semibold);
58
+ color: var(--sv-color-text-muted);
59
+ }
60
+
61
+ /* A name written for a sentence, capitalised where it heads something. */
62
+ .label::first-letter,
63
+ .base summary::first-letter {
64
+ text-transform: uppercase;
65
+ }
66
+
67
+ .conflict {
68
+ display: flex;
69
+ flex-direction: column;
70
+ gap: var(--sv-space-3);
71
+ min-width: 0;
72
+ margin: 0;
73
+ padding: var(--sv-space-3);
74
+ border: var(--sv-border-width-hairline) solid var(--sv-color-border-strong);
75
+ border-radius: var(--sv-radius-md);
76
+ }
77
+
78
+ .conflict[data-open] {
79
+ border-color: var(--sv-color-warning-text);
80
+ }
81
+
82
+ .legend {
83
+ padding: 0 var(--sv-space-2);
84
+ font-size: var(--sv-font-size-sm);
85
+ font-weight: var(--sv-font-weight-semibold);
86
+ }
87
+
88
+ .sides {
89
+ display: grid;
90
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
91
+ gap: var(--sv-space-3);
92
+ }
93
+
94
+ .side {
95
+ min-width: 0;
96
+ border: var(--sv-border-width-hairline) solid var(--sv-color-border);
97
+ border-radius: var(--sv-radius-sm);
98
+ }
99
+
100
+ .side[data-chosen] {
101
+ border-color: var(--sv-color-accent);
102
+ box-shadow: inset 0 0 0 1px var(--sv-color-accent);
103
+ }
104
+
105
+ .base summary {
106
+ min-height: 24px;
107
+ font-size: var(--sv-font-size-xs);
108
+ color: var(--sv-color-text-muted);
109
+ cursor: pointer;
110
+ }
111
+
112
+ .base summary:focus-visible,
113
+ .unfold:focus-visible,
114
+ .choice input:focus-visible {
115
+ outline: 2px solid var(--sv-color-focus-ring);
116
+ outline-offset: 2px;
117
+ }
118
+
119
+ .choices {
120
+ display: flex;
121
+ flex-wrap: wrap;
122
+ gap: var(--sv-space-2) var(--sv-space-5);
123
+ }
124
+
125
+ .choice {
126
+ display: inline-flex;
127
+ align-items: center;
128
+ gap: var(--sv-space-2);
129
+ min-height: 28px;
130
+ font-size: var(--sv-font-size-sm);
131
+ cursor: pointer;
132
+ }
133
+
134
+ .choice input {
135
+ margin: 0;
136
+ accent-color: var(--sv-color-accent);
137
+ }
138
+
139
+ .unfold {
140
+ display: block;
141
+ width: 100%;
142
+ min-height: 28px;
143
+ padding: var(--sv-space-1) var(--sv-space-3);
144
+ font-family: var(--sv-font-family);
145
+ font-size: var(--sv-font-size-xs);
146
+ color: var(--sv-color-text-muted);
147
+ background: var(--sv-color-surface-sunken);
148
+ border: 0;
149
+ border-radius: var(--sv-radius-sm);
150
+ cursor: pointer;
151
+ }
152
+
153
+ @media (hover: hover) {
154
+ .unfold:hover,
155
+ .base summary:hover {
156
+ color: var(--sv-color-text-primary);
157
+ }
158
+ }
159
+
160
+ @media (max-width: 768px) {
161
+ .sides {
162
+ grid-template-columns: minmax(0, 1fr);
163
+ }
164
+
165
+ .choices {
166
+ flex-direction: column;
167
+ }
168
+
169
+ .choice,
170
+ .unfold,
171
+ .base summary {
172
+ min-height: var(--sv-touch-target-min);
173
+ }
174
+
175
+ .base summary {
176
+ line-height: var(--sv-touch-target-min);
177
+ }
178
+ }
@@ -0,0 +1,206 @@
1
+ /* Zero specificity, so that a caller's class can set the height. */
2
+ :where(.root) {
3
+ max-height: min(70vh, 720px);
4
+ }
5
+
6
+ .root {
7
+ display: flex;
8
+ flex-direction: column;
9
+ min-width: 0;
10
+ background: var(--sv-color-surface);
11
+ border: var(--sv-border-width-hairline) solid var(--sv-color-border-strong);
12
+ border-radius: var(--sv-radius-md);
13
+ }
14
+
15
+ .root:has(.input:focus-visible) {
16
+ border-color: var(--sv-color-accent);
17
+ box-shadow: 0 0 0 2px var(--sv-color-focus-ring);
18
+ }
19
+
20
+ .root:has(.input:read-only) {
21
+ background: var(--sv-color-surface-sunken);
22
+ }
23
+
24
+ .root:has(.input:disabled) {
25
+ opacity: 0.5;
26
+ }
27
+
28
+ .invalid,
29
+ .invalid:has(.input:focus-visible) {
30
+ border-color: var(--sv-color-error-border);
31
+ }
32
+
33
+ .invalid:has(.input:focus-visible) {
34
+ box-shadow: 0 0 0 2px var(--sv-color-error-border);
35
+ }
36
+
37
+ /* One box scrolls, and the field is as tall as its text, so the two layers never part. */
38
+ .scroll {
39
+ flex: 1 1 auto;
40
+ min-height: 0;
41
+ overflow: auto;
42
+ border-radius: inherit;
43
+ }
44
+
45
+ .stack {
46
+ display: grid;
47
+ grid-template-columns: minmax(0, 1fr);
48
+ counter-reset: sv-source-line;
49
+ }
50
+
51
+ /* The two layers must lay out every character alike: anything that changes a glyph's width or a
52
+ break's place belongs in both. */
53
+ .colours,
54
+ .input {
55
+ grid-area: 1 / 1;
56
+ box-sizing: border-box;
57
+ min-width: 0;
58
+ margin: 0;
59
+ padding: var(--sv-space-3);
60
+ border: 0;
61
+ font-family: var(--sv-font-family-mono);
62
+ font-size: var(--sv-font-size-sm);
63
+ font-weight: var(--sv-font-weight-regular);
64
+ font-variant-ligatures: none;
65
+ line-height: 1.6;
66
+ letter-spacing: normal;
67
+ text-align: start;
68
+ tab-size: 2;
69
+ white-space: pre-wrap;
70
+ overflow-wrap: break-word;
71
+ word-break: normal;
72
+ }
73
+
74
+ .colours {
75
+ color: var(--sv-color-text-primary);
76
+ pointer-events: none;
77
+ user-select: none;
78
+ }
79
+
80
+ .input {
81
+ width: 100%;
82
+ overflow: hidden;
83
+ resize: none;
84
+ color: transparent;
85
+ caret-color: var(--sv-color-text-primary);
86
+ background: transparent;
87
+ outline: none;
88
+ }
89
+
90
+ .input::placeholder {
91
+ color: var(--sv-color-text-muted);
92
+ }
93
+
94
+ .input::selection {
95
+ color: transparent;
96
+ background: color-mix(in srgb, var(--sv-color-accent) 22%, transparent);
97
+ }
98
+
99
+ .input:disabled {
100
+ cursor: not-allowed;
101
+ }
102
+
103
+ /* Without colours the field shows its own text, and scrolls itself. */
104
+ .long .scroll {
105
+ display: flex;
106
+ flex-direction: column;
107
+ overflow: hidden;
108
+ }
109
+
110
+ .long .stack {
111
+ flex: 1 1 auto;
112
+ min-height: 0;
113
+ grid-template-rows: minmax(0, 1fr);
114
+ }
115
+
116
+ .long .input {
117
+ height: min(70vh, 720px);
118
+ min-height: 0;
119
+ overflow: auto;
120
+ color: var(--sv-color-text-primary);
121
+ }
122
+
123
+ .long .input::selection {
124
+ color: var(--sv-color-text-primary);
125
+ }
126
+
127
+ .notice {
128
+ margin: 0;
129
+ padding: var(--sv-space-2) var(--sv-space-3);
130
+ font-size: var(--sv-font-size-xs);
131
+ color: var(--sv-color-text-muted);
132
+ border-top: var(--sv-border-width-hairline) solid var(--sv-color-border);
133
+ }
134
+
135
+ .numbered .colours,
136
+ .numbered .input {
137
+ padding-left: calc(var(--sv-space-3) + 6ch);
138
+ }
139
+
140
+ .numbered .line {
141
+ position: relative;
142
+ counter-increment: sv-source-line;
143
+ }
144
+
145
+ .numbered .line::before {
146
+ content: counter(sv-source-line);
147
+ position: absolute;
148
+ right: calc(100% + 2ch);
149
+ color: var(--sv-color-syntax-marker);
150
+ white-space: pre;
151
+ }
152
+
153
+ /* Each line takes its direction from its own first letter, in both layers. */
154
+ .input,
155
+ .line {
156
+ unicode-bidi: plaintext;
157
+ }
158
+
159
+ /* Colour and underlining only: a bolder or slanted copy would drift from the text typed. */
160
+ .marker,
161
+ .comment {
162
+ color: var(--sv-color-syntax-marker);
163
+ }
164
+
165
+ .heading {
166
+ color: var(--sv-color-syntax-heading);
167
+ }
168
+
169
+ .link,
170
+ .url {
171
+ color: var(--sv-color-syntax-link);
172
+ }
173
+
174
+ .url {
175
+ text-decoration: underline;
176
+ }
177
+
178
+ .code,
179
+ .string {
180
+ color: var(--sv-color-syntax-code);
181
+ }
182
+
183
+ .keyword,
184
+ .tag {
185
+ color: var(--sv-color-syntax-keyword);
186
+ }
187
+
188
+ /* A phone zooms into a field with smaller text than this. */
189
+ @media (max-width: 768px) {
190
+ .colours,
191
+ .input {
192
+ font-size: var(--sv-font-size-md);
193
+ }
194
+ }
195
+
196
+ /* Forced colours would paint the field's transparent text over the copy: show the field alone. */
197
+ @media (forced-colors: active) {
198
+ .colours {
199
+ visibility: hidden;
200
+ }
201
+
202
+ .input {
203
+ color: FieldText;
204
+ forced-color-adjust: auto;
205
+ }
206
+ }