@sdxc/ui 2026.10.24 → 2026.10.27
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.
|
@@ -41,7 +41,7 @@ export class ViewTransitionEvent extends Event {
|
|
|
41
41
|
* mixin instance reacting to the same Frame's `reloadStart` reuses the one
|
|
42
42
|
* transition already opened for it instead of opening a second.
|
|
43
43
|
*/
|
|
44
|
-
const
|
|
44
|
+
const FRAME_TRANSITIONS = new WeakMap();
|
|
45
45
|
/**
|
|
46
46
|
* Opens (or reuses) the native transition wrapping `frame`'s current reload,
|
|
47
47
|
* skipping `startViewTransition()` when unsupported or reduced motion is
|
|
@@ -50,7 +50,7 @@ const frameTransitions = new WeakMap();
|
|
|
50
50
|
* @param frame Frame whose reload this transition wraps.
|
|
51
51
|
*/
|
|
52
52
|
function ensureFrameTransition(frame) {
|
|
53
|
-
let existing =
|
|
53
|
+
let existing = FRAME_TRANSITIONS.get(frame);
|
|
54
54
|
if (existing)
|
|
55
55
|
return existing;
|
|
56
56
|
let state = { transition: null, completed: false };
|
|
@@ -63,7 +63,7 @@ function ensureFrameTransition(frame) {
|
|
|
63
63
|
state.resolveUpdate = resolve;
|
|
64
64
|
}));
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
FRAME_TRANSITIONS.set(frame, state);
|
|
67
67
|
return state;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -74,12 +74,12 @@ function ensureFrameTransition(frame) {
|
|
|
74
74
|
* @param frame Frame whose reload just finished.
|
|
75
75
|
*/
|
|
76
76
|
function settleFrameTransition(frame) {
|
|
77
|
-
let state =
|
|
77
|
+
let state = FRAME_TRANSITIONS.get(frame);
|
|
78
78
|
if (!state)
|
|
79
79
|
return;
|
|
80
80
|
state.completed = true;
|
|
81
81
|
state.resolveUpdate?.();
|
|
82
|
-
|
|
82
|
+
FRAME_TRANSITIONS.delete(frame);
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Wraps a SharedElement's enclosing Frame reload in one native view
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The single-column stacking layout shared by every field convenience
|
|
3
3
|
* wrapper's outermost host: its caption, control, and optional supporting
|
|
4
|
-
* passage or validation message lay out in a narrow vertical stack with
|
|
5
|
-
*
|
|
6
|
-
* describes.
|
|
4
|
+
* passage or validation message lay out in a narrow vertical stack, with
|
|
5
|
+
* room between a label and its control for the control's focus ring.
|
|
7
6
|
*
|
|
8
7
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
9
8
|
* @copyright Sergio Xalambrí 2026
|
|
@@ -11,8 +10,9 @@
|
|
|
11
10
|
import type { ElementProps, MixinDescriptor } from "remix/component";
|
|
12
11
|
import type { CSSStyles } from "../utils/css-styles.js";
|
|
13
12
|
/**
|
|
14
|
-
* Composes the single-column stack — a `0.
|
|
13
|
+
* Composes the single-column stack — a `0.5rem` gap between a field's own
|
|
15
14
|
* caption, control, and optional supporting text — for a host's `mix` prop.
|
|
15
|
+
* The gap clears the control's focus ring, drawn 2px off its edge and 3px wide.
|
|
16
16
|
* Compose a separate `css()` call for the wider gap between whole fields.
|
|
17
17
|
*
|
|
18
18
|
* @returns A `css()` mixin ready for a host element's `mix` prop.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { vstack } from "@sdxc/u/layout";
|
|
2
2
|
/**
|
|
3
|
-
* Composes the single-column stack — a `0.
|
|
3
|
+
* Composes the single-column stack — a `0.5rem` gap between a field's own
|
|
4
4
|
* caption, control, and optional supporting text — for a host's `mix` prop.
|
|
5
|
+
* The gap clears the control's focus ring, drawn 2px off its edge and 3px wide.
|
|
5
6
|
* Compose a separate `css()` call for the wider gap between whole fields.
|
|
6
7
|
*
|
|
7
8
|
* @returns A `css()` mixin ready for a host element's `mix` prop.
|
|
@@ -12,5 +13,5 @@ import { vstack } from "@sdxc/u/layout";
|
|
|
12
13
|
* </div>;
|
|
13
14
|
*/
|
|
14
15
|
export function fieldStackLayout() {
|
|
15
|
-
return vstack({ gap: "0.
|
|
16
|
+
return vstack({ gap: "0.5rem" });
|
|
16
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdxc/ui",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.27",
|
|
4
4
|
"description": "Styled, accessible remix/component components rendered as server HTML",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"remix": "3.1.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "33abc1099e147f3eb4af00cf5b25e50b8f1271a1",
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|