@celestia-island/hikari 0.49.1 → 0.49.3
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
CHANGED
|
@@ -56,18 +56,18 @@
|
|
|
56
56
|
z-index: 1;
|
|
57
57
|
top: 50%;
|
|
58
58
|
left: 50%;
|
|
59
|
+
// The centering translate is part of EVERY transform state — the
|
|
60
|
+
// enter/leave choreography scales on top of it and must never re-seat
|
|
61
|
+
// the frame.
|
|
59
62
|
transform: translate(-50%, -50%);
|
|
60
|
-
interpolate-size: allow-keywords;
|
|
61
63
|
width: 100%;
|
|
62
64
|
// Size changes animate instead of snapping: `height: auto` growth
|
|
63
65
|
// cannot fire a CSS transition (verified in Chromium — neither auto
|
|
64
66
|
// nor calc-size(auto, size) changes its computed value on content
|
|
65
|
-
// growth
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
// choreography's calc-size() keywords. The enter/leave classes below
|
|
70
|
-
// override this transition during open/close, as they always have.
|
|
67
|
+
// growth), so HkModal's useSizeMorph measures the frame's natural
|
|
68
|
+
// (capped) height and pins it as px on every content change — the
|
|
69
|
+
// transition below animates old→new px. Both pinned values are
|
|
70
|
+
// explicit px, so this needs no interpolate-size keyword support.
|
|
71
71
|
transition:
|
|
72
72
|
height var(--duration-fast, 0.15s) var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
73
73
|
max-height var(--duration-fast, 0.15s) var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
|
|
@@ -86,49 +86,64 @@
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
// ------
|
|
89
|
-
// Content enter/leave transitions
|
|
89
|
+
// Content enter/leave transitions (desktop ≥768px)
|
|
90
90
|
//
|
|
91
|
-
// Height-
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
91
|
+
// Height-style unveil WITHOUT layout: the visible box starts at 90% of
|
|
92
|
+
// its height and grows to 100% while the frame settles from a +5% offset
|
|
93
|
+
// back to rest (user spec 2026-09-14). Numbers line up so the character
|
|
94
|
+
// of the old height-grow reveal is preserved exactly:
|
|
95
|
+
// t=0 box [center−0.45h, center+0.45h] shifted +0.05h, bottom 10%
|
|
96
|
+
// clipped → visible [center−0.40h, center+0.40h] (the old 80%
|
|
97
|
+
// centered start);
|
|
98
|
+
// t=1 clip 0, offset 0 → visible [center−0.50h, center+0.50h];
|
|
99
|
+
// the bottom edge is pinned at its final line the whole time and the
|
|
100
|
+
// top edge sweeps up 0.1h — content rides rigidly (never squashed).
|
|
101
|
+
// Implemented with transform (translate) + clip-path (inset) + opacity:
|
|
102
|
+
// all compositor/paint-level, zero layout per frame — the previous
|
|
103
|
+
// height-keyword reveal re-laid-out the entire modal subtree every frame
|
|
104
|
+
// and re-filtered the frame's own backdrop blur per frame (visible frame
|
|
105
|
+
// drops on content-heavy modals, chest history topic detail). Scoped to
|
|
106
|
+
// ≥768px; ≤767px keeps the sheet's translateY choreography below.
|
|
95
107
|
// ------
|
|
96
108
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
var(--hk-modal-
|
|
101
|
-
|
|
102
|
-
var(--hk-modal-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
opacity var(--hk-modal-duration, 0.25s)
|
|
109
|
-
var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1)),
|
|
110
|
-
height var(--hk-modal-duration, 0.25s)
|
|
111
|
-
var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1));
|
|
112
|
-
will-change: height, opacity;
|
|
113
|
-
}
|
|
109
|
+
@media (min-width: 768px) {
|
|
110
|
+
.hk-modal-content-enter-active {
|
|
111
|
+
transition:
|
|
112
|
+
opacity var(--hk-modal-duration, 0.3s)
|
|
113
|
+
var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
|
|
114
|
+
transform var(--hk-modal-duration, 0.3s)
|
|
115
|
+
var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
|
|
116
|
+
clip-path var(--hk-modal-duration, 0.3s)
|
|
117
|
+
var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
|
|
118
|
+
will-change: transform, opacity, clip-path;
|
|
119
|
+
}
|
|
114
120
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
.hk-modal-content-leave-active {
|
|
122
|
+
transition:
|
|
123
|
+
opacity var(--hk-modal-duration, 0.25s)
|
|
124
|
+
var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1)),
|
|
125
|
+
transform var(--hk-modal-duration, 0.25s)
|
|
126
|
+
var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1)),
|
|
127
|
+
clip-path var(--hk-modal-duration, 0.25s)
|
|
128
|
+
var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1));
|
|
129
|
+
will-change: transform, opacity, clip-path;
|
|
130
|
+
}
|
|
121
131
|
|
|
122
|
-
.hk-modal-content-enter-from,
|
|
123
|
-
.hk-modal-content-leave-to {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
.hk-modal-content-enter-from,
|
|
133
|
+
.hk-modal-content-leave-to {
|
|
134
|
+
opacity: 0;
|
|
135
|
+
transform: translate(-50%, -50%) translateY(5%);
|
|
136
|
+
clip-path: inset(0 0 10% 0 round 0 0 var(--hk-modal-radius, var(--radius-lg, 12px))
|
|
137
|
+
var(--hk-modal-radius, var(--radius-lg, 12px)));
|
|
138
|
+
}
|
|
127
139
|
|
|
128
|
-
.hk-modal-content-enter-to,
|
|
129
|
-
.hk-modal-content-leave-from {
|
|
130
|
-
|
|
131
|
-
|
|
140
|
+
.hk-modal-content-enter-to,
|
|
141
|
+
.hk-modal-content-leave-from {
|
|
142
|
+
opacity: 1;
|
|
143
|
+
transform: translate(-50%, -50%);
|
|
144
|
+
clip-path: inset(0 0 0 0 round 0 0 var(--hk-modal-radius, var(--radius-lg, 12px))
|
|
145
|
+
var(--hk-modal-radius, var(--radius-lg, 12px)));
|
|
146
|
+
}
|
|
132
147
|
}
|
|
133
148
|
|
|
134
149
|
// ------
|
|
@@ -344,7 +344,8 @@ export default defineComponent({
|
|
|
344
344
|
surfTrack.cancel();
|
|
345
345
|
onAfterEnter();
|
|
346
346
|
// Size morphs arm once the open choreography finished —
|
|
347
|
-
// pinning during enter would
|
|
347
|
+
// pinning during enter would fight the reveal's transform
|
|
348
|
+
// transition.
|
|
348
349
|
morph.start();
|
|
349
350
|
} else if (to === "closingFrom") {
|
|
350
351
|
// Close-request bookkeeping (was the watcher's close arm): the
|