@human-kit/ui 1.4.7 → 1.4.8

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.
@@ -67,7 +67,14 @@
67
67
  // (`bottom-start`) already matches how a native context menu unfolds down and to the
68
68
  // right, and `flip`/`shift` handle the viewport edges.
69
69
  const resolvedOffset = $derived(offset ?? (ctx.isContextMenu ? 0 : 4));
70
- const anchorPoint = $derived(ctx.anchorPoint);
70
+ // The point the menu is shown at, held through its exit: the state drops the point as soon as
71
+ // the menu closes (a later keyboard open must land on the trigger), and following it then
72
+ // moved a leaving context menu onto its surface for the frames of its exit animation.
73
+ let shownAnchorPoint: typeof ctx.anchorPoint = null;
74
+ const anchorPoint = $derived.by(() => {
75
+ if (ctx.isOpen) shownAnchorPoint = ctx.anchorPoint;
76
+ return shownAnchorPoint;
77
+ });
71
78
  const resolvedAnchor = $derived(
72
79
  anchorPoint ? createPointAnchor(anchorPoint.x, anchorPoint.y, triggerRef) : triggerRef
73
80
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@human-kit/ui",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "Accessible, typed UI components for Svelte 5 — shipped as native ESM with per-component subpath exports so bundlers only include what you import.",
5
5
  "license": "MIT",
6
6
  "author": "Agustin Delgado <agustindariodelgado@gmail.com>",