@celestia-island/hikari 0.55.520 → 0.55.522
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/dist/types/components/HkDirectionalSwap.d.ts +57 -6
- package/dist/types/components/HkInput.d.ts +1 -1
- package/dist/types/components/HkMenu.d.ts +1 -1
- package/dist/types/components/HkRowActions.d.ts +1 -1
- package/dist/types/components/HkTable.d.ts +1 -1
- package/dist/types/components/HkTimePicker.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/HkDirectionalSwap.scss +0 -4
- package/src/components/HkDirectionalSwap.test.tsx +844 -42
- package/src/components/HkDirectionalSwap.tsx +251 -26
- package/src/components/HkScrollProgressDock.scss +71 -2
- package/src/components/HkScrollProgressDock.test.tsx +508 -1
- package/src/components/HkScrollProgressDock.tsx +424 -40
- package/src/errorLandingStandalone/error-landing.html +1 -1
- package/src/i18n/locales/ar/components.json +5 -1
- package/src/i18n/locales/de/components.json +5 -1
- package/src/i18n/locales/en/components.json +5 -1
- package/src/i18n/locales/es/components.json +5 -1
- package/src/i18n/locales/fr/components.json +5 -1
- package/src/i18n/locales/ja/components.json +5 -1
- package/src/i18n/locales/ko/components.json +5 -1
- package/src/i18n/locales/pt/components.json +5 -1
- package/src/i18n/locales/ru/components.json +5 -1
- package/src/i18n/locales/zh-Hans/components.json +5 -1
- package/src/i18n/locales/zh-Hant/components.json +5 -1
|
@@ -44,14 +44,40 @@
|
|
|
44
44
|
* still snaps — taller the moment the exchange starts, shorter the
|
|
45
45
|
* frame it ends (measured on the docs shell's preview/source card,
|
|
46
46
|
* 2026-11-29: 360px → 278px in ONE frame). With the prop on, the
|
|
47
|
-
* wrapper
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* wrapper tweens from the height it had BEFORE the incoming copy
|
|
48
|
+
* inserted (read in the leaving copy's before-hook — by the enter
|
|
49
|
+
* hook the row has already grown to the taller generation) to the
|
|
50
|
+
* incoming generation's OWN height (read with the item un-stretched:
|
|
51
|
+
* a grid item renders at the row's height, i.e. the outgoing copy's),
|
|
52
|
+
* over the same duration/easing as the travel, and releases back to
|
|
53
|
+
* auto once BOTH the enter has settled AND no leaving copy remains in
|
|
54
|
+
* the cell — either alone would jump. Reduced motion (duration 0)
|
|
50
55
|
* keeps the snap — the instant change IS that preference. A faster
|
|
51
56
|
* follow-up swap interrupts the running exchange: Vue cancels the
|
|
52
|
-
* enter
|
|
53
|
-
*
|
|
54
|
-
*
|
|
57
|
+
* enter, the tween STAYS ARMED at its animated mid-state, the next
|
|
58
|
+
* before-leave reads that as its start, and the next enter re-freezes
|
|
59
|
+
* from it without a jump. The Transition's own teardown (the host
|
|
60
|
+
* flipping to `disabled`, a watchdog sweep, unmount) is what releases
|
|
61
|
+
* a stranded tween.
|
|
62
|
+
* - The first cut of this tween (2026-11-29) never ran in a browser:
|
|
63
|
+
* it read BOTH ends after the insertion, so `from` and `target` were
|
|
64
|
+
* the same stretched row height and the whole change happened at the
|
|
65
|
+
* release (measured live 2026-11-30: writes 200px → 200px, the host
|
|
66
|
+
* flat for the exchange, a 200 → 189 snap the frame it ended). The
|
|
67
|
+
* tests were green because happy-dom has no layout and the stubbed
|
|
68
|
+
* heights ignored the stretch; they now model the grid (see the
|
|
69
|
+
* `stubGrid` pins).
|
|
70
|
+
* - Two contracts the tween assumes of its host. (a) Hosts do not pin
|
|
71
|
+
* `height`/`min-height` on `.hk-dswap-item`: an explicit box defeats
|
|
72
|
+
* the un-stretched read — the read returns the pin, and a pin at the
|
|
73
|
+
* row is the no-op again (see `readUnstretchedHeight`); hosts size
|
|
74
|
+
* the pane, the item's child. (b) The host is BORDER-BOX with no
|
|
75
|
+
* padding or border of its own: the reads are `getBoundingClientRect`
|
|
76
|
+
* figures (border-box, fractional) and are written into `height`,
|
|
77
|
+
* which under `box-sizing: content-box` is the content box — a padded
|
|
78
|
+
* or bordered `.hk-dswap` would offset the tween by its box extra
|
|
79
|
+
* (the docs shell's host is border-box with neither, so the target
|
|
80
|
+
* path is exact).
|
|
55
81
|
*/
|
|
56
82
|
import { type PropType } from "vue";
|
|
57
83
|
import "./HkDirectionalSwap.scss";
|
|
@@ -66,6 +92,31 @@ export type SwapDirection = "forward" | "back";
|
|
|
66
92
|
* consistent, repeatable direction rather than a flicker between two.
|
|
67
93
|
*/
|
|
68
94
|
export declare function resolveSwapDirection(order: ReadonlyArray<string | number>, previous: string | number, next: string | number): SwapDirection;
|
|
95
|
+
/**
|
|
96
|
+
* Read a grid item's OWN content height. Under the cell's geometry a
|
|
97
|
+
* grid item stretches to the row (the taller generation), so its
|
|
98
|
+
* rendered height is the outgoing copy's; `align-self: start` sizes it
|
|
99
|
+
* to its content for the read. The item's inline `align-self` is put
|
|
100
|
+
* back exactly as it was — value AND priority — so a style the item
|
|
101
|
+
* arrived with survives. Exported for its own pin: the swap creates the
|
|
102
|
+
* item in the same tick its enter hook reads it, so no test can hand it
|
|
103
|
+
* a prior inline style through the component.
|
|
104
|
+
*
|
|
105
|
+
* CONTRACT: the item's box belongs to the component — hosts must not pin
|
|
106
|
+
* `height` or `min-height` on `.hk-dswap-item`. Un-stretching defeats the
|
|
107
|
+
* ROW, not an explicit box: a pinned item reads its PIN — the explicit
|
|
108
|
+
* box wins over both the row stretch and the content height — and a pin
|
|
109
|
+
* at the row turns the tween back into the no-op this component just
|
|
110
|
+
* fixed (measured, Chrome 155, R5: with the item pinned to the row's
|
|
111
|
+
* 240px, stretched and un-stretched both read 240 while the content is
|
|
112
|
+
* 100). Hosts size the PANE (the item's child); that is where the docs
|
|
113
|
+
* shell's band-fill lives, and this read runs before its attribute
|
|
114
|
+
* exists. The read is the FRACTIONAL layout height
|
|
115
|
+
* (`getBoundingClientRect`), not the integer-rounded `offsetHeight` —
|
|
116
|
+
* the tween then ends exactly where the released `auto` lands, with no
|
|
117
|
+
* sub-pixel step at the release frame.
|
|
118
|
+
*/
|
|
119
|
+
export declare function readUnstretchedHeight(item: HTMLElement): number;
|
|
69
120
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
70
121
|
/** Identity of the content on stage; changing it starts the swap. */
|
|
71
122
|
swapKey: {
|
|
@@ -450,6 +450,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
450
450
|
modelValue: string;
|
|
451
451
|
align: "center" | "end" | "start";
|
|
452
452
|
placeholder: string;
|
|
453
|
+
rows: number;
|
|
453
454
|
placeholderVariant: "marquee" | "truncate";
|
|
454
455
|
readonly: boolean;
|
|
455
456
|
autocomplete: string;
|
|
@@ -461,7 +462,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
461
462
|
strengthEvaluator: PasswordStrengthEvaluator;
|
|
462
463
|
hint: string;
|
|
463
464
|
spellcheck: boolean;
|
|
464
|
-
rows: number;
|
|
465
465
|
autoGrow: boolean;
|
|
466
466
|
hideLabel: boolean;
|
|
467
467
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -405,7 +405,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
405
405
|
variant: "popup" | "sidebar";
|
|
406
406
|
title: string;
|
|
407
407
|
offset: number;
|
|
408
|
-
placement: "bottom-start" | "bottom-end" | "top-start" | "top-end" | "
|
|
408
|
+
placement: "bottom-start" | "bottom-end" | "top-start" | "top-end" | "left-start" | "right-start";
|
|
409
409
|
maxHeight: string;
|
|
410
410
|
anchorRef: PanelAnchor | null;
|
|
411
411
|
autoFlip: boolean;
|
|
@@ -91,7 +91,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
91
91
|
size: 16 | 24 | 40 | 32 | 36 | 28;
|
|
92
92
|
label: string;
|
|
93
93
|
disabled: boolean;
|
|
94
|
-
placement: "bottom-start" | "bottom-end" | "top-start" | "top-end" | "
|
|
94
|
+
placement: "bottom-start" | "bottom-end" | "top-start" | "top-end" | "left-start" | "right-start";
|
|
95
95
|
items: HkMenuItem[];
|
|
96
96
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
97
97
|
export default _default;
|
|
@@ -285,8 +285,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
285
285
|
caption: string;
|
|
286
286
|
total: number;
|
|
287
287
|
draggable: boolean;
|
|
288
|
-
hover: boolean;
|
|
289
288
|
rows: readonly object[];
|
|
289
|
+
hover: boolean;
|
|
290
290
|
emptyText: string;
|
|
291
291
|
rowKey: string;
|
|
292
292
|
bordered: boolean;
|
|
@@ -156,9 +156,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
156
156
|
title: string;
|
|
157
157
|
disabled: boolean;
|
|
158
158
|
modelValue: string;
|
|
159
|
+
placeholder: string;
|
|
159
160
|
confirmLabel: string;
|
|
160
161
|
cancelLabel: string;
|
|
161
|
-
placeholder: string;
|
|
162
162
|
hideLabel: boolean;
|
|
163
163
|
clearable: boolean;
|
|
164
164
|
minuteStep: number;
|
package/package.json
CHANGED
|
@@ -65,10 +65,6 @@
|
|
|
65
65
|
--hk-dswap-leave-to: translateY(var(--hk-swap-travel, 24px));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
// RTL mirrors the horizontal vocabulary: "forward" travels the other way on
|
|
69
|
-
// screen because the reading direction does.
|
|
70
|
-
|
|
71
|
-
|
|
72
68
|
// RTL mirrors the horizontal vocabulary: "forward" travels the other way on
|
|
73
69
|
// screen because the reading direction does.
|
|
74
70
|
[dir="rtl"] .hk-dswap[data-axis="horizontal"] {
|