@hexdspace/react 0.1.43 → 0.1.45
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/index.d.ts +1 -0
- package/dist/index.js +21 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3370,7 +3370,7 @@ var VimHandleKeyUseCase = class {
|
|
|
3370
3370
|
if (e.ctrlKey || e.metaKey || e.altKey) return;
|
|
3371
3371
|
const scopeId = this.query.getActiveScope();
|
|
3372
3372
|
if (!scopeId) return;
|
|
3373
|
-
this.selection.
|
|
3373
|
+
this.selection.clearSelection({ kind: "activeScope" });
|
|
3374
3374
|
const st = this.stateByScope.get(scopeId);
|
|
3375
3375
|
if (st) {
|
|
3376
3376
|
st.count = "";
|
|
@@ -3388,7 +3388,7 @@ var VimHandleKeyUseCase = class {
|
|
|
3388
3388
|
if (dir === "left" || dir === "right") {
|
|
3389
3389
|
const interDir = dir;
|
|
3390
3390
|
if (meta && !meta.inter.has(interDir)) return;
|
|
3391
|
-
const nextKey = this.
|
|
3391
|
+
const nextKey = this.findNextNonEmptyRegion(scopeId, activeKey, interDir, count);
|
|
3392
3392
|
if (!nextKey) return;
|
|
3393
3393
|
const prevIndex = this.getCursorIndex(activeKey);
|
|
3394
3394
|
this.selection.setActiveRegion(nextKey);
|
|
@@ -3451,6 +3451,24 @@ var VimHandleKeyUseCase = class {
|
|
|
3451
3451
|
const index = items.indexOf(cursor);
|
|
3452
3452
|
return index >= 0 ? index : null;
|
|
3453
3453
|
}
|
|
3454
|
+
findNextNonEmptyRegion(scopeId, activeKey, dir, count) {
|
|
3455
|
+
const regs = this.regions.list(scopeId);
|
|
3456
|
+
if (regs.length === 0) return null;
|
|
3457
|
+
const currentIndex = regs.findIndex((r) => r.key.regionId === activeKey.regionId);
|
|
3458
|
+
const start = currentIndex >= 0 ? currentIndex : 0;
|
|
3459
|
+
const step = dir === "right" ? 1 : -1;
|
|
3460
|
+
const moveBy = Math.max(1, count);
|
|
3461
|
+
const raw = start + step * moveBy;
|
|
3462
|
+
let idx = clamp3(raw, 0, regs.length - 1);
|
|
3463
|
+
while (idx >= 0 && idx < regs.length) {
|
|
3464
|
+
const key = regs[idx]?.key;
|
|
3465
|
+
if (key && this.getItems(key).length > 0) {
|
|
3466
|
+
return key;
|
|
3467
|
+
}
|
|
3468
|
+
idx += step;
|
|
3469
|
+
}
|
|
3470
|
+
return null;
|
|
3471
|
+
}
|
|
3454
3472
|
resolveInterRegionFallback(fallback, prevIndex) {
|
|
3455
3473
|
if (fallback.kind === "sameIndex") {
|
|
3456
3474
|
if (prevIndex === null) {
|
|
@@ -4740,11 +4758,7 @@ function DropdownMenu({
|
|
|
4740
4758
|
children: /* @__PURE__ */ jsx22(
|
|
4741
4759
|
motion4.div,
|
|
4742
4760
|
{
|
|
4743
|
-
className: cn(
|
|
4744
|
-
dropdownMenuContentVariants({ chrome, orientation }),
|
|
4745
|
-
className,
|
|
4746
|
-
contentClassName
|
|
4747
|
-
),
|
|
4761
|
+
className: cn(dropdownMenuContentVariants({ chrome, orientation }), className, contentClassName),
|
|
4748
4762
|
ref: composedContentRef,
|
|
4749
4763
|
initial: initialMotionState,
|
|
4750
4764
|
animate: openMotionState,
|