@surdeddd/wmkit 0.7.0 → 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-VQ3TLK3N.js → chunk-FOWW4LXS.js} +51 -30
- package/dist/chunk-FOWW4LXS.js.map +1 -0
- package/dist/{chunk-E47Q36LM.cjs → chunk-NJAI5R4J.cjs} +51 -30
- package/dist/chunk-NJAI5R4J.cjs.map +1 -0
- 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-E47Q36LM.cjs.map +0 -1
- package/dist/chunk-VQ3TLK3N.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { applyAspect, attachDesktop, boundsEqual, clamp, clampSize, clampToViewport, createAnnouncer, createDesktopBinder, createEmitter, createWindowManager, defaultMessages, detectSnapZone, flipFromTarget, flipToTarget, magnetize, prefersReducedMotion, zoneBounds } from './chunk-
|
|
1
|
+
export { applyAspect, attachDesktop, boundsEqual, clamp, clampSize, clampToViewport, createAnnouncer, createDesktopBinder, createEmitter, createWindowManager, defaultMessages, detectSnapZone, flipFromTarget, flipToTarget, magnetize, prefersReducedMotion, zoneBounds } from './chunk-FOWW4LXS.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/react.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNJAI5R4J_cjs = require('./chunk-NJAI5R4J.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
|
|
6
6
|
function useWindowManager(options) {
|
|
7
|
-
const [wm] = react.useState(() =>
|
|
7
|
+
const [wm] = react.useState(() => chunkNJAI5R4J_cjs.createWindowManager(options));
|
|
8
8
|
react.useEffect(() => () => wm.destroy(), [wm]);
|
|
9
9
|
return wm;
|
|
10
10
|
}
|
|
@@ -17,7 +17,7 @@ function useWmWindow(wm, id) {
|
|
|
17
17
|
}
|
|
18
18
|
function useDesktop(wm, options) {
|
|
19
19
|
const optionsRef = react.useRef(options);
|
|
20
|
-
const binder = react.useMemo(() =>
|
|
20
|
+
const binder = react.useMemo(() => chunkNJAI5R4J_cjs.createDesktopBinder(wm, optionsRef.current), [wm]);
|
|
21
21
|
react.useEffect(() => () => binder.destroy(), [binder]);
|
|
22
22
|
const cleanupRef = react.useRef(null);
|
|
23
23
|
const ref = react.useCallback(
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createWindowManager, createDesktopBinder } from './chunk-
|
|
1
|
+
import { createWindowManager, createDesktopBinder } from './chunk-FOWW4LXS.js';
|
|
2
2
|
import { useState, useEffect, useSyncExternalStore, useCallback, useRef, useMemo } from 'react';
|
|
3
3
|
|
|
4
4
|
function useWindowManager(options) {
|
package/dist/solid.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNJAI5R4J_cjs = require('./chunk-NJAI5R4J.cjs');
|
|
4
4
|
var solidJs = require('solid-js');
|
|
5
5
|
|
|
6
6
|
function disposeWithOwner(dispose) {
|
|
7
7
|
if (solidJs.getOwner()) solidJs.onCleanup(dispose);
|
|
8
8
|
}
|
|
9
9
|
function useWindowManager(options) {
|
|
10
|
-
const wm =
|
|
10
|
+
const wm = chunkNJAI5R4J_cjs.createWindowManager(options);
|
|
11
11
|
disposeWithOwner(() => wm.destroy());
|
|
12
12
|
return wm;
|
|
13
13
|
}
|
|
@@ -21,7 +21,7 @@ function useWmWindow(wm, id) {
|
|
|
21
21
|
return () => state().windows[typeof id === "function" ? id() : id];
|
|
22
22
|
}
|
|
23
23
|
function createDesktop(wm, options) {
|
|
24
|
-
const binder =
|
|
24
|
+
const binder = chunkNJAI5R4J_cjs.createDesktopBinder(wm, options);
|
|
25
25
|
disposeWithOwner(() => binder.destroy());
|
|
26
26
|
return {
|
|
27
27
|
binder,
|
package/dist/solid.js
CHANGED
package/dist/svelte.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNJAI5R4J_cjs = require('./chunk-NJAI5R4J.cjs');
|
|
4
4
|
|
|
5
5
|
// src/adapters/svelte.ts
|
|
6
6
|
function createManager(options) {
|
|
7
|
-
return
|
|
7
|
+
return chunkNJAI5R4J_cjs.createWindowManager(options);
|
|
8
8
|
}
|
|
9
9
|
function wmStore(wm) {
|
|
10
10
|
return {
|
|
@@ -30,7 +30,7 @@ function wmWindowStore(wm, id) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
function createDesktop(wm, options) {
|
|
33
|
-
const binder =
|
|
33
|
+
const binder = chunkNJAI5R4J_cjs.createDesktopBinder(wm, options);
|
|
34
34
|
return {
|
|
35
35
|
binder,
|
|
36
36
|
desktop(node) {
|
package/dist/svelte.js
CHANGED
package/dist/vue.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNJAI5R4J_cjs = require('./chunk-NJAI5R4J.cjs');
|
|
4
4
|
var vue = require('vue');
|
|
5
5
|
|
|
6
6
|
function disposeWithScope(dispose) {
|
|
7
7
|
if (vue.getCurrentScope()) vue.onScopeDispose(dispose);
|
|
8
8
|
}
|
|
9
9
|
function useWindowManager(options) {
|
|
10
|
-
const wm =
|
|
10
|
+
const wm = chunkNJAI5R4J_cjs.createWindowManager(options);
|
|
11
11
|
disposeWithScope(() => wm.destroy());
|
|
12
12
|
return wm;
|
|
13
13
|
}
|
|
@@ -25,7 +25,7 @@ function useWmWindow(wm, id) {
|
|
|
25
25
|
return vue.computed(() => state.value.windows[vue.toValue(id)]);
|
|
26
26
|
}
|
|
27
27
|
function useDesktop(wm, target, options) {
|
|
28
|
-
const binder =
|
|
28
|
+
const binder = chunkNJAI5R4J_cjs.createDesktopBinder(wm, options);
|
|
29
29
|
disposeWithScope(() => binder.destroy());
|
|
30
30
|
vue.watch(
|
|
31
31
|
target,
|
package/dist/vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createWindowManager, createDesktopBinder } from './chunk-
|
|
1
|
+
import { createWindowManager, createDesktopBinder } from './chunk-FOWW4LXS.js';
|
|
2
2
|
import { shallowRef, computed, toValue, watch, getCurrentScope, onScopeDispose } from 'vue';
|
|
3
3
|
|
|
4
4
|
function disposeWithScope(dispose) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surdeddd/wmkit",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Headless, framework-agnostic window manager for the web — draggable, resizable, snappable windows with first-class accessibility and 60fps performance",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"window-manager",
|