@bitovi/vybit 0.13.0 → 0.13.1
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/overlay/dist/overlay.js +21 -45
- package/package.json +1 -1
package/overlay/dist/overlay.js
CHANGED
|
@@ -4183,6 +4183,19 @@ ${pad}</${tag}>`;
|
|
|
4183
4183
|
await positionWithFlip(toolbar, msgRow, "top-start", { disableFlip: true });
|
|
4184
4184
|
}
|
|
4185
4185
|
}
|
|
4186
|
+
function clearSelection() {
|
|
4187
|
+
cancelInsert();
|
|
4188
|
+
clearLockedInsert();
|
|
4189
|
+
revertPreview();
|
|
4190
|
+
clearHighlights();
|
|
4191
|
+
state.currentEquivalentNodes = [];
|
|
4192
|
+
state.currentTargetEl = null;
|
|
4193
|
+
state.currentBoundary = null;
|
|
4194
|
+
state.cachedNearGroups = null;
|
|
4195
|
+
state.cachedExactMatches = null;
|
|
4196
|
+
state.manuallyAddedNodes = /* @__PURE__ */ new Set();
|
|
4197
|
+
state.addMode = false;
|
|
4198
|
+
}
|
|
4186
4199
|
function showDrawButton(targetEl) {
|
|
4187
4200
|
removeDrawButton();
|
|
4188
4201
|
const instanceCount = state.currentEquivalentNodes.length;
|
|
@@ -4201,19 +4214,9 @@ ${pad}</${tag}>`;
|
|
|
4201
4214
|
selectBtn.style.cssText = "color: #5fd4da; border-radius: 0;";
|
|
4202
4215
|
selectBtn.addEventListener("click", (e) => {
|
|
4203
4216
|
e.stopPropagation();
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
clearHighlights();
|
|
4208
|
-
state.currentEquivalentNodes = [];
|
|
4209
|
-
state.currentTargetEl = null;
|
|
4210
|
-
state.currentBoundary = null;
|
|
4211
|
-
state.cachedNearGroups = null;
|
|
4212
|
-
state.cachedExactMatches = null;
|
|
4213
|
-
state.manuallyAddedNodes = /* @__PURE__ */ new Set();
|
|
4214
|
-
state.addMode = false;
|
|
4215
|
-
setSelectMode(false);
|
|
4216
|
-
sendTo("panel", { type: "MODE_CHANGED", mode: null });
|
|
4217
|
+
clearSelection();
|
|
4218
|
+
setSelectMode(true);
|
|
4219
|
+
sendTo("panel", { type: "DESELECT_ELEMENT" });
|
|
4217
4220
|
});
|
|
4218
4221
|
selectGroup.appendChild(selectBtn);
|
|
4219
4222
|
const innerSep = document.createElement("div");
|
|
@@ -4250,17 +4253,7 @@ ${pad}</${tag}>`;
|
|
|
4250
4253
|
selectBtn.style.cssText = "opacity: 0.4;";
|
|
4251
4254
|
selectBtn.addEventListener("click", (e) => {
|
|
4252
4255
|
e.stopPropagation();
|
|
4253
|
-
|
|
4254
|
-
clearLockedInsert();
|
|
4255
|
-
revertPreview();
|
|
4256
|
-
clearHighlights();
|
|
4257
|
-
state.currentEquivalentNodes = [];
|
|
4258
|
-
state.currentTargetEl = null;
|
|
4259
|
-
state.currentBoundary = null;
|
|
4260
|
-
state.cachedNearGroups = null;
|
|
4261
|
-
state.cachedExactMatches = null;
|
|
4262
|
-
state.manuallyAddedNodes = /* @__PURE__ */ new Set();
|
|
4263
|
-
state.addMode = false;
|
|
4256
|
+
clearSelection();
|
|
4264
4257
|
state.currentMode = "select";
|
|
4265
4258
|
state.currentTab = resolveTab();
|
|
4266
4259
|
sendTo("panel", { type: "MODE_CHANGED", mode: "select" });
|
|
@@ -4278,20 +4271,11 @@ ${pad}</${tag}>`;
|
|
|
4278
4271
|
}
|
|
4279
4272
|
insertBtn.addEventListener("click", (e) => {
|
|
4280
4273
|
e.stopPropagation();
|
|
4281
|
-
|
|
4282
|
-
clearLockedInsert();
|
|
4283
|
-
revertPreview();
|
|
4284
|
-
clearHighlights();
|
|
4274
|
+
clearSelection();
|
|
4285
4275
|
setSelectMode(false);
|
|
4286
|
-
state.currentEquivalentNodes = [];
|
|
4287
|
-
state.currentTargetEl = null;
|
|
4288
|
-
state.currentBoundary = null;
|
|
4289
|
-
state.cachedNearGroups = null;
|
|
4290
|
-
state.cachedExactMatches = null;
|
|
4291
|
-
state.manuallyAddedNodes = /* @__PURE__ */ new Set();
|
|
4292
|
-
state.addMode = false;
|
|
4293
4276
|
if (state.currentMode === "insert") {
|
|
4294
|
-
sendTo("panel", { type: "
|
|
4277
|
+
sendTo("panel", { type: "DESELECT_ELEMENT" });
|
|
4278
|
+
startBrowse(state.shadowHost, onBrowseLocked);
|
|
4295
4279
|
return;
|
|
4296
4280
|
}
|
|
4297
4281
|
state.currentMode = "insert";
|
|
@@ -7611,15 +7595,7 @@ ${pad}</${tag}>`;
|
|
|
7611
7595
|
return;
|
|
7612
7596
|
}
|
|
7613
7597
|
if (state.currentTargetEl) {
|
|
7614
|
-
|
|
7615
|
-
clearHighlights();
|
|
7616
|
-
state.currentEquivalentNodes = [];
|
|
7617
|
-
state.currentTargetEl = null;
|
|
7618
|
-
state.currentBoundary = null;
|
|
7619
|
-
state.cachedNearGroups = null;
|
|
7620
|
-
state.cachedExactMatches = null;
|
|
7621
|
-
state.manuallyAddedNodes = /* @__PURE__ */ new Set();
|
|
7622
|
-
state.addMode = false;
|
|
7598
|
+
clearSelection();
|
|
7623
7599
|
if (state.currentMode === "select") {
|
|
7624
7600
|
setSelectMode2(true);
|
|
7625
7601
|
sendTo("panel", { type: "DESELECT_ELEMENT" });
|