@crossworks/share-ui 0.239.18 → 0.239.22

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 (2) hide show
  1. package/package.json +3 -3
  2. package/styles/app.css +51 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossworks/share-ui",
3
- "version": "0.239.18",
3
+ "version": "0.239.22",
4
4
  "description": "The server-rendered share surface — the /s/<token> presenters, view-payload contract, mini-app sandbox, and the few primitives they need. Lives in MANTLE (the server renders these), published for jackdaw to consume; may depend only on @mantle/{client-types,content-core} (the jackdaw-repo-split boundary).",
5
5
  "exports": {
6
6
  "./app-presenter": "./src/app-presenter.tsx",
@@ -39,8 +39,8 @@
39
39
  "@dicebear/core": "^10.7.0",
40
40
  "@dicebear/styles": "^10.6.0",
41
41
  "@firecms/neat": "1.0.2",
42
- "@mantle/client-types": "npm:@crossworks/client-types@0.239.18",
43
- "@mantle/content-core": "npm:@crossworks/content-core@0.239.18",
42
+ "@mantle/client-types": "npm:@crossworks/client-types@0.239.22",
43
+ "@mantle/content-core": "npm:@crossworks/content-core@0.239.22",
44
44
  "@radix-ui/react-label": "^2.1.15",
45
45
  "@radix-ui/react-slot": "^1.3.3",
46
46
  "class-variance-authority": "^0.7.1",
package/styles/app.css CHANGED
@@ -196,25 +196,68 @@
196
196
  display: none;
197
197
  }
198
198
 
199
- .scrollbar-thin {
200
- scrollbar-width: thin;
201
- scrollbar-color: color-mix(in oklab, var(--muted-foreground) 30%, transparent) transparent;
202
- }
199
+ /* HOW THE TWO VISIBLE UTILITIES ARE BUILT, and why it is not the obvious way.
200
+
201
+ There are two ways to style a scrollbar: the standard properties
202
+ (`scrollbar-width`, `scrollbar-color`) and the `::-webkit-scrollbar` pseudo
203
+ elements. Only the pseudo elements take a pixel width. And since Chromium
204
+ 121, setting EITHER standard property on an element switches the pseudo
205
+ elements off for it. Setting both, as `.scrollbar-thin` used to, meant
206
+ Chrome drew the platform's "thin" bar (11px with classic scrollbars) and the
207
+ 6px rule below it was dead code. Measured in Chrome 152: 11px, not 6.
208
+
209
+ So the standard properties are gated to engines WITHOUT the pseudo elements
210
+ (Firefox). Chromium and Safari get the exact pixel width; Firefox gets
211
+ `thin`, its narrowest visible value, in the same colours. Firefox has no
212
+ pixel control at all, so there `.scrollbar-hair` and `.scrollbar-thin` look
213
+ the same; that is the floor, not a bug to chase.
214
+
215
+ Touch devices draw overlay scrollbars and ignore all of this. */
203
216
  .scrollbar-thin::-webkit-scrollbar {
204
217
  width: 6px;
205
218
  height: 6px;
206
219
  }
207
- .scrollbar-thin::-webkit-scrollbar-track {
220
+ .scrollbar-thin::-webkit-scrollbar-thumb {
221
+ border-radius: 3px;
222
+ }
223
+
224
+ /* The hairline: for SMALL POPOVERS only (a slash menu, a select, a dropdown),
225
+ where a 6px bar is a visible share of a narrow list. Leave page-level panes,
226
+ tables, code blocks and textareas on `.scrollbar-thin`: 3px is a poor drag
227
+ target on a long document. */
228
+ .scrollbar-hair::-webkit-scrollbar {
229
+ width: 3px;
230
+ height: 3px;
231
+ }
232
+ .scrollbar-hair::-webkit-scrollbar-thumb {
233
+ border-radius: 2px;
234
+ }
235
+
236
+ .scrollbar-thin::-webkit-scrollbar-track,
237
+ .scrollbar-hair::-webkit-scrollbar-track {
208
238
  background: transparent;
209
239
  }
210
- .scrollbar-thin::-webkit-scrollbar-thumb {
240
+ .scrollbar-thin::-webkit-scrollbar-thumb,
241
+ .scrollbar-hair::-webkit-scrollbar-thumb {
211
242
  background-color: color-mix(in oklab, var(--muted-foreground) 30%, transparent);
212
- border-radius: 3px;
213
243
  transition: background-color 0.2s ease;
214
244
  }
215
- .scrollbar-thin::-webkit-scrollbar-thumb:hover {
245
+ .scrollbar-thin::-webkit-scrollbar-thumb:hover,
246
+ .scrollbar-hair::-webkit-scrollbar-thumb:hover {
216
247
  background-color: color-mix(in oklab, var(--muted-foreground) 50%, transparent);
217
248
  }
249
+ .scrollbar-thin::-webkit-scrollbar-corner,
250
+ .scrollbar-hair::-webkit-scrollbar-corner {
251
+ background: transparent;
252
+ }
253
+
254
+ @supports not selector(::-webkit-scrollbar) {
255
+ .scrollbar-thin,
256
+ .scrollbar-hair {
257
+ scrollbar-width: thin;
258
+ scrollbar-color: color-mix(in oklab, var(--muted-foreground) 30%, transparent) transparent;
259
+ }
260
+ }
218
261
 
219
262
  /* React Flow controls (trace step graph). The library's default control
220
263
  buttons render white-on-white in some of our themes; pin them to theme