@surdeddd/wmkit 0.7.1 → 0.7.2
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/angular.cjs +3 -3
- package/dist/angular.js +1 -1
- package/dist/{chunk-WOCAQEM6.js → chunk-FOWW4LXS.js} +17 -10
- package/dist/chunk-FOWW4LXS.js.map +1 -0
- package/dist/{chunk-2VRCYMKH.cjs → chunk-NJAI5R4J.cjs} +17 -10
- package/dist/{chunk-2VRCYMKH.cjs.map → chunk-NJAI5R4J.cjs.map} +1 -1
- package/dist/index.cjs +18 -18
- package/dist/index.js +1 -1
- package/dist/react.cjs +3 -3
- package/dist/react.js +1 -1
- package/dist/solid.cjs +3 -3
- package/dist/solid.js +1 -1
- package/dist/svelte.cjs +3 -3
- package/dist/svelte.js +1 -1
- package/dist/vue.cjs +3 -3
- package/dist/vue.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-WOCAQEM6.js.map +0 -1
|
@@ -2472,7 +2472,7 @@ function attachDesktop(wm, element, options = {}) {
|
|
|
2472
2472
|
// src/dom/binder.ts
|
|
2473
2473
|
function createDesktopBinder(wm, options = {}) {
|
|
2474
2474
|
let controller = null;
|
|
2475
|
-
let
|
|
2475
|
+
let stops = [];
|
|
2476
2476
|
const entries = /* @__PURE__ */ new Set();
|
|
2477
2477
|
function attachEntry(entry) {
|
|
2478
2478
|
if (controller && !entry.detach && wm.get(entry.id)) {
|
|
@@ -2480,8 +2480,8 @@ function createDesktopBinder(wm, options = {}) {
|
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
2482
|
function unbindDesktop() {
|
|
2483
|
-
|
|
2484
|
-
|
|
2483
|
+
for (const stop of stops) stop();
|
|
2484
|
+
stops = [];
|
|
2485
2485
|
for (const entry of entries) entry.detach = null;
|
|
2486
2486
|
controller?.destroy();
|
|
2487
2487
|
controller = null;
|
|
@@ -2492,11 +2492,18 @@ function createDesktopBinder(wm, options = {}) {
|
|
|
2492
2492
|
bindDesktop(element) {
|
|
2493
2493
|
if (controller) throw new Error("wmkit: desktop is already bound");
|
|
2494
2494
|
controller = attachDesktop(wm, element, options);
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2495
|
+
stops.push(
|
|
2496
|
+
wm.on("open", ({ window: win }) => {
|
|
2497
|
+
for (const entry of entries) {
|
|
2498
|
+
if (entry.id === win.id) attachEntry(entry);
|
|
2499
|
+
}
|
|
2500
|
+
}),
|
|
2501
|
+
wm.on("close", ({ window: win }) => {
|
|
2502
|
+
for (const entry of entries) {
|
|
2503
|
+
if (entry.id === win.id) entry.detach = null;
|
|
2504
|
+
}
|
|
2505
|
+
})
|
|
2506
|
+
);
|
|
2500
2507
|
for (const entry of entries) attachEntry(entry);
|
|
2501
2508
|
return unbindDesktop;
|
|
2502
2509
|
},
|
|
@@ -2534,5 +2541,5 @@ exports.flipToTarget = flipToTarget;
|
|
|
2534
2541
|
exports.magnetize = magnetize;
|
|
2535
2542
|
exports.prefersReducedMotion = prefersReducedMotion;
|
|
2536
2543
|
exports.zoneBounds = zoneBounds;
|
|
2537
|
-
//# sourceMappingURL=chunk-
|
|
2538
|
-
//# sourceMappingURL=chunk-
|
|
2544
|
+
//# sourceMappingURL=chunk-NJAI5R4J.cjs.map
|
|
2545
|
+
//# sourceMappingURL=chunk-NJAI5R4J.cjs.map
|