@crossworks/share-ui 0.239.33 → 0.239.34
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/package.json +3 -3
- package/src/app-frame-html.ts +4 -11
- package/styles/app.css +78 -55
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossworks/share-ui",
|
|
3
|
-
"version": "0.239.
|
|
3
|
+
"version": "0.239.34",
|
|
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.
|
|
43
|
-
"@mantle/content-core": "npm:@crossworks/content-core@0.239.
|
|
42
|
+
"@mantle/client-types": "npm:@crossworks/client-types@0.239.34",
|
|
43
|
+
"@mantle/content-core": "npm:@crossworks/content-core@0.239.34",
|
|
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/src/app-frame-html.ts
CHANGED
|
@@ -189,17 +189,10 @@ export function buildAppFrameHtml(opts: {
|
|
|
189
189
|
non-propagating body background) paints in the normal layers, above the
|
|
190
190
|
backdrop, and hides it. */
|
|
191
191
|
html,body{margin:0}body{background:var(--background)}#root{padding:0}
|
|
192
|
-
/*
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
(scoped here, so the host is untouched). Vars resolve from the linked theme. */
|
|
197
|
-
*{scrollbar-width:thin;scrollbar-color:color-mix(in oklab,var(--muted-foreground) 30%,transparent) transparent}
|
|
198
|
-
::-webkit-scrollbar{width:10px;height:10px}
|
|
199
|
-
::-webkit-scrollbar-track{background:transparent}
|
|
200
|
-
::-webkit-scrollbar-thumb{background-color:color-mix(in oklab,var(--muted-foreground) 30%,transparent);border-radius:6px;border:2px solid transparent;background-clip:padding-box}
|
|
201
|
-
::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab,var(--muted-foreground) 50%,transparent);background-clip:padding-box}
|
|
202
|
-
::-webkit-scrollbar-corner{background:transparent}
|
|
192
|
+
/* Scrollbars: no rules here. The linked /share-runtime/styles.css carries
|
|
193
|
+
share-ui's global needle default, the same bar as the host. This block used
|
|
194
|
+
to set scrollbar-width on every element, which in Chromium switches the
|
|
195
|
+
::-webkit-scrollbar rules off and drew the platform's 11px grey bar. */
|
|
203
196
|
${
|
|
204
197
|
opts.viewport
|
|
205
198
|
? `/* Viewport frame: the iframe IS the viewport, so viewport-height utilities
|
package/styles/app.css
CHANGED
|
@@ -186,8 +186,41 @@
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
/* ============================================================================
|
|
189
|
-
|
|
189
|
+
Scrollbars: ONE global needle default. No exceptions.
|
|
190
190
|
========================================================================== */
|
|
191
|
+
|
|
192
|
+
/* Every scroller in the app gets the same bar: a needle thumb in the theme's
|
|
193
|
+
primary colour on a transparent track. No buttons, no corner, no grey
|
|
194
|
+
gutter. The only opt-out is hiding the bar: `.scrollbar-hidden`, or
|
|
195
|
+
Tailwind's own `scrollbar-none` utility.
|
|
196
|
+
|
|
197
|
+
It is global because an opt-in class failed twice. First, anything that
|
|
198
|
+
scrolled without the class fell back to the platform bar. Then the class
|
|
199
|
+
itself broke: Tailwind 4 ships a `scrollbar-thin` utility of its own
|
|
200
|
+
(`scrollbar-width: thin`), so every `.scrollbar-thin` element carried a
|
|
201
|
+
standard scrollbar property again. Since Chromium 121, a standard property
|
|
202
|
+
(`scrollbar-width` OR `scrollbar-color`, the latter INHERITED) switches the
|
|
203
|
+
`::-webkit-scrollbar` pseudo elements off for that element. Chrome then drew
|
|
204
|
+
its own 11px grey bar with a grey track (measured on the live web app in
|
|
205
|
+
Chrome 154, 2026-10-07), the bar this section exists to stop.
|
|
206
|
+
|
|
207
|
+
So in engines WITH the pseudo elements (Chromium, Safari, Electron) the
|
|
208
|
+
standard properties are reset to `auto` on every element, unlayered, which
|
|
209
|
+
beats Tailwind's layered utility whatever its specificity. The pseudo
|
|
210
|
+
elements then give the exact pixels. Engines WITHOUT them (Firefox) get the
|
|
211
|
+
standard properties: `thin` is its narrowest visible value, in the same
|
|
212
|
+
colours. Firefox has no pixel control; that is the floor, not a bug.
|
|
213
|
+
|
|
214
|
+
`.scrollbar-thin` and `.scrollbar-hair` stay valid as markup and are plain
|
|
215
|
+
aliases of this default. Touch devices draw overlay bars and ignore it.
|
|
216
|
+
|
|
217
|
+
Colour: the theme's primary with a third of the foreground mixed in. Pure
|
|
218
|
+
primary is too pale on some light themes (a contrast of 1.2 against the
|
|
219
|
+
background); the mix keeps every one of the 86 theme and mode pairs at 2.1
|
|
220
|
+
or better idle while the hue still reads as the theme's own.
|
|
221
|
+
|
|
222
|
+
Shape: a 6px gutter holds a 4px thumb (1px clear border each side), so it
|
|
223
|
+
reads as a needle and grows to 6px under the pointer with no layout shift. */
|
|
191
224
|
.scrollbar-hidden {
|
|
192
225
|
-ms-overflow-style: none;
|
|
193
226
|
scrollbar-width: none;
|
|
@@ -196,67 +229,57 @@
|
|
|
196
229
|
display: none;
|
|
197
230
|
}
|
|
198
231
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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. */
|
|
216
|
-
.scrollbar-thin::-webkit-scrollbar {
|
|
217
|
-
width: 6px;
|
|
218
|
-
height: 6px;
|
|
219
|
-
}
|
|
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;
|
|
232
|
+
@supports selector(::-webkit-scrollbar) {
|
|
233
|
+
/* `.scrollbar-none` is Tailwind's own hide utility; leave it hiding. */
|
|
234
|
+
*:not(.scrollbar-hidden, .scrollbar-none) {
|
|
235
|
+
scrollbar-width: auto;
|
|
236
|
+
scrollbar-color: auto;
|
|
237
|
+
}
|
|
231
238
|
}
|
|
232
|
-
|
|
233
|
-
|
|
239
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
240
|
+
*:not(.scrollbar-hidden, .scrollbar-none) {
|
|
241
|
+
scrollbar-width: thin;
|
|
242
|
+
scrollbar-color: color-mix(
|
|
243
|
+
in oklab,
|
|
244
|
+
color-mix(in oklab, var(--primary) 65%, var(--foreground)) 80%,
|
|
245
|
+
transparent
|
|
246
|
+
)
|
|
247
|
+
transparent;
|
|
248
|
+
}
|
|
234
249
|
}
|
|
235
250
|
|
|
236
|
-
|
|
237
|
-
|
|
251
|
+
::-webkit-scrollbar {
|
|
252
|
+
width: 6px;
|
|
253
|
+
height: 6px;
|
|
238
254
|
background: transparent;
|
|
239
255
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
transition: background-color 0.2s ease;
|
|
244
|
-
}
|
|
245
|
-
.scrollbar-thin::-webkit-scrollbar-thumb:hover,
|
|
246
|
-
.scrollbar-hair::-webkit-scrollbar-thumb:hover {
|
|
247
|
-
background-color: color-mix(in oklab, var(--muted-foreground) 50%, transparent);
|
|
248
|
-
}
|
|
249
|
-
.scrollbar-thin::-webkit-scrollbar-corner,
|
|
250
|
-
.scrollbar-hair::-webkit-scrollbar-corner {
|
|
256
|
+
::-webkit-scrollbar-track,
|
|
257
|
+
::-webkit-scrollbar-track-piece,
|
|
258
|
+
::-webkit-scrollbar-corner {
|
|
251
259
|
background: transparent;
|
|
260
|
+
border: 0;
|
|
252
261
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
262
|
+
::-webkit-scrollbar-button {
|
|
263
|
+
display: none;
|
|
264
|
+
width: 0;
|
|
265
|
+
height: 0;
|
|
266
|
+
}
|
|
267
|
+
::-webkit-scrollbar-thumb {
|
|
268
|
+
background-color: color-mix(
|
|
269
|
+
in oklab,
|
|
270
|
+
color-mix(in oklab, var(--primary) 65%, var(--foreground)) 80%,
|
|
271
|
+
transparent
|
|
272
|
+
);
|
|
273
|
+
background-clip: padding-box;
|
|
274
|
+
border: 1px solid transparent;
|
|
275
|
+
border-radius: 9999px;
|
|
276
|
+
min-height: 24px;
|
|
277
|
+
min-width: 24px;
|
|
278
|
+
}
|
|
279
|
+
::-webkit-scrollbar-thumb:hover,
|
|
280
|
+
::-webkit-scrollbar-thumb:active {
|
|
281
|
+
background-color: color-mix(in oklab, var(--primary) 65%, var(--foreground));
|
|
282
|
+
border-width: 0;
|
|
260
283
|
}
|
|
261
284
|
|
|
262
285
|
/* React Flow controls (trace step graph). The library's default control
|