@archie/devtools 0.0.30 → 0.0.31
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/client/client.js +25 -9
- package/dist/client/client.mjs +25 -9
- package/package.json +1 -1
package/dist/client/client.js
CHANGED
|
@@ -6696,6 +6696,7 @@ function useOverlayRefs(undoRequestId, redoRequestId) {
|
|
|
6696
6696
|
const lastIntentRef = (0, import_react11.useRef)(null);
|
|
6697
6697
|
const visualIntentRef = (0, import_react11.useRef)(null);
|
|
6698
6698
|
const sourceContainerIdRef = (0, import_react11.useRef)(null);
|
|
6699
|
+
const rowLockedRef = (0, import_react11.useRef)(false);
|
|
6699
6700
|
const dragSessionAnchorRef = (0, import_react11.useRef)(null);
|
|
6700
6701
|
const lockRef = (0, import_react11.useRef)({ containerId: null, isCrossUnlocked: false, exitSince: null, unlockUntilTs: null });
|
|
6701
6702
|
const targetPlaneRef = (0, import_react11.useRef)("lane");
|
|
@@ -6727,6 +6728,7 @@ function useOverlayRefs(undoRequestId, redoRequestId) {
|
|
|
6727
6728
|
lastIntentRef,
|
|
6728
6729
|
visualIntentRef,
|
|
6729
6730
|
sourceContainerIdRef,
|
|
6731
|
+
rowLockedRef,
|
|
6730
6732
|
dragSessionAnchorRef,
|
|
6731
6733
|
lockRef,
|
|
6732
6734
|
targetPlaneRef,
|
|
@@ -7632,6 +7634,12 @@ function buildPreviewLayout({
|
|
|
7632
7634
|
var CONTAINER_SWITCH_HYSTERESIS = 12;
|
|
7633
7635
|
var SMALL_NODE_NEST_DWELL_MS = 100;
|
|
7634
7636
|
var LARGE_NODE_NEST_DWELL_MS = 320;
|
|
7637
|
+
function computeAllowNest(nestPreview, isLargeDraggedNode, rowLocked) {
|
|
7638
|
+
if (rowLocked) return false;
|
|
7639
|
+
if (!nestPreview) return false;
|
|
7640
|
+
const childId = nestPreview.slotId.split("::nest::")[1] ?? "";
|
|
7641
|
+
return !!childId && !isLargeDraggedNode;
|
|
7642
|
+
}
|
|
7635
7643
|
function useDragVisualLoop({
|
|
7636
7644
|
activeDrag,
|
|
7637
7645
|
refs,
|
|
@@ -7681,11 +7689,7 @@ function useDragVisualLoop({
|
|
|
7681
7689
|
const adjustedPy = py + scrollDy;
|
|
7682
7690
|
const nestPreview = engine.peekNestIntent(px, py, window.scrollX, window.scrollY, snapshot.scroll.x, snapshot.scroll.y);
|
|
7683
7691
|
const isLargeDraggedNode = shouldBlockNestForLargeNode(activeDrag.w, activeDrag.h);
|
|
7684
|
-
|
|
7685
|
-
if (nestPreview) {
|
|
7686
|
-
const childId = nestPreview.slotId.split("::nest::")[1] ?? "";
|
|
7687
|
-
allowNest = !!childId && !isLargeDraggedNode;
|
|
7688
|
-
}
|
|
7692
|
+
const allowNest = computeAllowNest(nestPreview, isLargeDraggedNode, !!refs.rowLockedRef.current);
|
|
7689
7693
|
if (!allowNest) {
|
|
7690
7694
|
refs.nestCandidateRef.current = null;
|
|
7691
7695
|
refs.nestTargetRef.current = null;
|
|
@@ -7870,6 +7874,18 @@ function useDragVisualLoop({
|
|
|
7870
7874
|
|
|
7871
7875
|
// src/client/dnd/design-mode/useDragLifecycle.ts
|
|
7872
7876
|
var import_react13 = require("react");
|
|
7877
|
+
function resolveLaneAllowedContainers(anchorElement, srcContainerId) {
|
|
7878
|
+
if (!srcContainerId) return null;
|
|
7879
|
+
if (!resolveRowBinding(anchorElement)) return null;
|
|
7880
|
+
return /* @__PURE__ */ new Set([srcContainerId]);
|
|
7881
|
+
}
|
|
7882
|
+
function buildDragIntentEngineOptions(anchorElement, srcContainerId, blockedContainerIds) {
|
|
7883
|
+
return {
|
|
7884
|
+
laneRootContainerId: srcContainerId,
|
|
7885
|
+
laneAllowedContainers: resolveLaneAllowedContainers(anchorElement, srcContainerId),
|
|
7886
|
+
blockedContainerIds
|
|
7887
|
+
};
|
|
7888
|
+
}
|
|
7873
7889
|
function buildRuntimeIdentityLocal(nodeId, resolveNodeElement, effectiveLaneSnapshot) {
|
|
7874
7890
|
if (!nodeId) return null;
|
|
7875
7891
|
const element = resolveNodeElement(nodeId);
|
|
@@ -8069,6 +8085,7 @@ function useDragLifecycle({
|
|
|
8069
8085
|
refs.lastIntentRef.current = null;
|
|
8070
8086
|
refs.visualIntentRef.current = null;
|
|
8071
8087
|
refs.sourceContainerIdRef.current = null;
|
|
8088
|
+
refs.rowLockedRef.current = false;
|
|
8072
8089
|
refs.dragSessionAnchorRef.current = null;
|
|
8073
8090
|
refs.lockRef.current = { containerId: null, isCrossUnlocked: false, exitSince: null, unlockUntilTs: null };
|
|
8074
8091
|
refs.targetPlaneRef.current = "lane";
|
|
@@ -8124,10 +8141,9 @@ function useDragLifecycle({
|
|
|
8124
8141
|
const startPosition = getCurrentCommitPlacement(anchorNodeId, srcContainerId);
|
|
8125
8142
|
const blockedContainerIds = buildBlockedStructuralContainerIds(proj, refs.nodeMapRef.current, srcContainerId);
|
|
8126
8143
|
refs.blockedContainerIdsRef.current = blockedContainerIds;
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
});
|
|
8144
|
+
const engineOptions = buildDragIntentEngineOptions(anchorScanned.element, srcContainerId, blockedContainerIds);
|
|
8145
|
+
refs.rowLockedRef.current = !!engineOptions.laneAllowedContainers;
|
|
8146
|
+
refs.engineRef.current = createDragIntentEngine(proj, anchorNodeId, engineOptions);
|
|
8131
8147
|
refs.engineRef.current.setTargetPlane("lane");
|
|
8132
8148
|
refs.targetPlaneRef.current = "lane";
|
|
8133
8149
|
refs.sourceContainerIdRef.current = srcContainerId;
|
package/dist/client/client.mjs
CHANGED
|
@@ -6661,6 +6661,7 @@ function useOverlayRefs(undoRequestId, redoRequestId) {
|
|
|
6661
6661
|
const lastIntentRef = useRef8(null);
|
|
6662
6662
|
const visualIntentRef = useRef8(null);
|
|
6663
6663
|
const sourceContainerIdRef = useRef8(null);
|
|
6664
|
+
const rowLockedRef = useRef8(false);
|
|
6664
6665
|
const dragSessionAnchorRef = useRef8(null);
|
|
6665
6666
|
const lockRef = useRef8({ containerId: null, isCrossUnlocked: false, exitSince: null, unlockUntilTs: null });
|
|
6666
6667
|
const targetPlaneRef = useRef8("lane");
|
|
@@ -6692,6 +6693,7 @@ function useOverlayRefs(undoRequestId, redoRequestId) {
|
|
|
6692
6693
|
lastIntentRef,
|
|
6693
6694
|
visualIntentRef,
|
|
6694
6695
|
sourceContainerIdRef,
|
|
6696
|
+
rowLockedRef,
|
|
6695
6697
|
dragSessionAnchorRef,
|
|
6696
6698
|
lockRef,
|
|
6697
6699
|
targetPlaneRef,
|
|
@@ -7597,6 +7599,12 @@ function buildPreviewLayout({
|
|
|
7597
7599
|
var CONTAINER_SWITCH_HYSTERESIS = 12;
|
|
7598
7600
|
var SMALL_NODE_NEST_DWELL_MS = 100;
|
|
7599
7601
|
var LARGE_NODE_NEST_DWELL_MS = 320;
|
|
7602
|
+
function computeAllowNest(nestPreview, isLargeDraggedNode, rowLocked) {
|
|
7603
|
+
if (rowLocked) return false;
|
|
7604
|
+
if (!nestPreview) return false;
|
|
7605
|
+
const childId = nestPreview.slotId.split("::nest::")[1] ?? "";
|
|
7606
|
+
return !!childId && !isLargeDraggedNode;
|
|
7607
|
+
}
|
|
7600
7608
|
function useDragVisualLoop({
|
|
7601
7609
|
activeDrag,
|
|
7602
7610
|
refs,
|
|
@@ -7646,11 +7654,7 @@ function useDragVisualLoop({
|
|
|
7646
7654
|
const adjustedPy = py + scrollDy;
|
|
7647
7655
|
const nestPreview = engine.peekNestIntent(px, py, window.scrollX, window.scrollY, snapshot.scroll.x, snapshot.scroll.y);
|
|
7648
7656
|
const isLargeDraggedNode = shouldBlockNestForLargeNode(activeDrag.w, activeDrag.h);
|
|
7649
|
-
|
|
7650
|
-
if (nestPreview) {
|
|
7651
|
-
const childId = nestPreview.slotId.split("::nest::")[1] ?? "";
|
|
7652
|
-
allowNest = !!childId && !isLargeDraggedNode;
|
|
7653
|
-
}
|
|
7657
|
+
const allowNest = computeAllowNest(nestPreview, isLargeDraggedNode, !!refs.rowLockedRef.current);
|
|
7654
7658
|
if (!allowNest) {
|
|
7655
7659
|
refs.nestCandidateRef.current = null;
|
|
7656
7660
|
refs.nestTargetRef.current = null;
|
|
@@ -7835,6 +7839,18 @@ function useDragVisualLoop({
|
|
|
7835
7839
|
|
|
7836
7840
|
// src/client/dnd/design-mode/useDragLifecycle.ts
|
|
7837
7841
|
import { useState as useState5, useCallback as useCallback6 } from "react";
|
|
7842
|
+
function resolveLaneAllowedContainers(anchorElement, srcContainerId) {
|
|
7843
|
+
if (!srcContainerId) return null;
|
|
7844
|
+
if (!resolveRowBinding(anchorElement)) return null;
|
|
7845
|
+
return /* @__PURE__ */ new Set([srcContainerId]);
|
|
7846
|
+
}
|
|
7847
|
+
function buildDragIntentEngineOptions(anchorElement, srcContainerId, blockedContainerIds) {
|
|
7848
|
+
return {
|
|
7849
|
+
laneRootContainerId: srcContainerId,
|
|
7850
|
+
laneAllowedContainers: resolveLaneAllowedContainers(anchorElement, srcContainerId),
|
|
7851
|
+
blockedContainerIds
|
|
7852
|
+
};
|
|
7853
|
+
}
|
|
7838
7854
|
function buildRuntimeIdentityLocal(nodeId, resolveNodeElement, effectiveLaneSnapshot) {
|
|
7839
7855
|
if (!nodeId) return null;
|
|
7840
7856
|
const element = resolveNodeElement(nodeId);
|
|
@@ -8034,6 +8050,7 @@ function useDragLifecycle({
|
|
|
8034
8050
|
refs.lastIntentRef.current = null;
|
|
8035
8051
|
refs.visualIntentRef.current = null;
|
|
8036
8052
|
refs.sourceContainerIdRef.current = null;
|
|
8053
|
+
refs.rowLockedRef.current = false;
|
|
8037
8054
|
refs.dragSessionAnchorRef.current = null;
|
|
8038
8055
|
refs.lockRef.current = { containerId: null, isCrossUnlocked: false, exitSince: null, unlockUntilTs: null };
|
|
8039
8056
|
refs.targetPlaneRef.current = "lane";
|
|
@@ -8089,10 +8106,9 @@ function useDragLifecycle({
|
|
|
8089
8106
|
const startPosition = getCurrentCommitPlacement(anchorNodeId, srcContainerId);
|
|
8090
8107
|
const blockedContainerIds = buildBlockedStructuralContainerIds(proj, refs.nodeMapRef.current, srcContainerId);
|
|
8091
8108
|
refs.blockedContainerIdsRef.current = blockedContainerIds;
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
});
|
|
8109
|
+
const engineOptions = buildDragIntentEngineOptions(anchorScanned.element, srcContainerId, blockedContainerIds);
|
|
8110
|
+
refs.rowLockedRef.current = !!engineOptions.laneAllowedContainers;
|
|
8111
|
+
refs.engineRef.current = createDragIntentEngine(proj, anchorNodeId, engineOptions);
|
|
8096
8112
|
refs.engineRef.current.setTargetPlane("lane");
|
|
8097
8113
|
refs.targetPlaneRef.current = "lane";
|
|
8098
8114
|
refs.sourceContainerIdRef.current = srcContainerId;
|