@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.
@@ -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 freezes at its rendered height, transitions to the incoming
48
- * generation's height over the same duration/easing as the travel,
49
- * and releases back to auto on settle. Reduced motion (duration 0)
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 (which releases), and the next freeze reads the cell's
53
- * CURRENT rendered height — the interrupted tween's mid-state —
54
- * never the old start.
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" | "right-start" | "left-start";
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" | "right-start" | "left-start";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celestia-island/hikari",
3
- "version": "0.55.520",
3
+ "version": "0.55.522",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari UI library, Vue 3 runtime — one design system for Vue 3 and Rust/WASM applications",
@@ -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"] {