@surdeddd/wmkit 0.6.0 → 0.7.0
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/README.md +1 -1
- package/README.ru.md +1 -1
- package/dist/angular.cjs +3 -3
- package/dist/angular.d.cts +2 -2
- package/dist/angular.d.ts +2 -2
- package/dist/angular.js +1 -1
- package/dist/{binder-CkmOoo1U.d.ts → binder-DvQFmO3K.d.ts} +1 -1
- package/dist/{binder-CQzQJdVj.d.cts → binder-_L3Iww0u.d.cts} +1 -1
- package/dist/{chunk-DYZQY3BE.cjs → chunk-E47Q36LM.cjs} +36 -4
- package/dist/chunk-E47Q36LM.cjs.map +1 -0
- package/dist/{chunk-3HLKVOSI.js → chunk-VQ3TLK3N.js} +36 -4
- package/dist/chunk-VQ3TLK3N.js.map +1 -0
- package/dist/index.cjs +18 -18
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/persist.d.cts +1 -1
- package/dist/persist.d.ts +1 -1
- package/dist/popout.d.cts +1 -1
- package/dist/popout.d.ts +1 -1
- package/dist/react.cjs +3 -3
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/solid.cjs +3 -3
- package/dist/solid.d.cts +2 -2
- package/dist/solid.d.ts +2 -2
- package/dist/solid.js +1 -1
- package/dist/svelte.cjs +3 -3
- package/dist/svelte.d.cts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +1 -1
- package/dist/{types-LP7Inhxx.d.cts → types-jG2lHGcA.d.cts} +2 -0
- package/dist/{types-LP7Inhxx.d.ts → types-jG2lHGcA.d.ts} +2 -0
- package/dist/vue.cjs +3 -3
- package/dist/vue.d.cts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3HLKVOSI.js.map +0 -1
- package/dist/chunk-DYZQY3BE.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as DesktopOptions, b as DesktopController } from './binder-
|
|
2
|
-
export { A as Announcer, c as AnnouncerMessages, D as DesktopBinder, d as DesktopKeyboardOptions, e as DesktopSnapOptions, H as HitAreaOptions, M as MagnetResult, f as MagnetismOptions, S as SnapDetectOptions, W as WindowAttachOptions, g as applyAspect, h as boundsEqual, i as clamp, j as clampSize, k as clampToViewport, l as createAnnouncer, m as createDesktopBinder, n as defaultMessages, o as detectSnapZone, p as magnetize, z as zoneBounds } from './binder-
|
|
3
|
-
import { M as ManagerOptions, W as WindowManager } from './types-
|
|
4
|
-
export { A as ArrangeMode, B as Bounds, c as ManagerEvents, a as ManagerState, S as SerializedMaxSize, d as SerializedState, e as SerializedWindowState, f as Size, g as SnapZone, h as WindowFlags, i as WindowInit, j as WindowLayer, k as WindowStage, b as WindowState, l as WindowUpdate } from './types-
|
|
1
|
+
import { a as DesktopOptions, b as DesktopController } from './binder-_L3Iww0u.cjs';
|
|
2
|
+
export { A as Announcer, c as AnnouncerMessages, D as DesktopBinder, d as DesktopKeyboardOptions, e as DesktopSnapOptions, H as HitAreaOptions, M as MagnetResult, f as MagnetismOptions, S as SnapDetectOptions, W as WindowAttachOptions, g as applyAspect, h as boundsEqual, i as clamp, j as clampSize, k as clampToViewport, l as createAnnouncer, m as createDesktopBinder, n as defaultMessages, o as detectSnapZone, p as magnetize, z as zoneBounds } from './binder-_L3Iww0u.cjs';
|
|
3
|
+
import { M as ManagerOptions, W as WindowManager } from './types-jG2lHGcA.cjs';
|
|
4
|
+
export { A as ArrangeMode, B as Bounds, c as ManagerEvents, a as ManagerState, S as SerializedMaxSize, d as SerializedState, e as SerializedWindowState, f as Size, g as SnapZone, h as WindowFlags, i as WindowInit, j as WindowLayer, k as WindowStage, b as WindowState, l as WindowUpdate } from './types-jG2lHGcA.cjs';
|
|
5
5
|
|
|
6
6
|
type Listener<T> = (payload: T) => void;
|
|
7
7
|
interface Emitter<Events extends Record<keyof Events, unknown>> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as DesktopOptions, b as DesktopController } from './binder-
|
|
2
|
-
export { A as Announcer, c as AnnouncerMessages, D as DesktopBinder, d as DesktopKeyboardOptions, e as DesktopSnapOptions, H as HitAreaOptions, M as MagnetResult, f as MagnetismOptions, S as SnapDetectOptions, W as WindowAttachOptions, g as applyAspect, h as boundsEqual, i as clamp, j as clampSize, k as clampToViewport, l as createAnnouncer, m as createDesktopBinder, n as defaultMessages, o as detectSnapZone, p as magnetize, z as zoneBounds } from './binder-
|
|
3
|
-
import { M as ManagerOptions, W as WindowManager } from './types-
|
|
4
|
-
export { A as ArrangeMode, B as Bounds, c as ManagerEvents, a as ManagerState, S as SerializedMaxSize, d as SerializedState, e as SerializedWindowState, f as Size, g as SnapZone, h as WindowFlags, i as WindowInit, j as WindowLayer, k as WindowStage, b as WindowState, l as WindowUpdate } from './types-
|
|
1
|
+
import { a as DesktopOptions, b as DesktopController } from './binder-DvQFmO3K.js';
|
|
2
|
+
export { A as Announcer, c as AnnouncerMessages, D as DesktopBinder, d as DesktopKeyboardOptions, e as DesktopSnapOptions, H as HitAreaOptions, M as MagnetResult, f as MagnetismOptions, S as SnapDetectOptions, W as WindowAttachOptions, g as applyAspect, h as boundsEqual, i as clamp, j as clampSize, k as clampToViewport, l as createAnnouncer, m as createDesktopBinder, n as defaultMessages, o as detectSnapZone, p as magnetize, z as zoneBounds } from './binder-DvQFmO3K.js';
|
|
3
|
+
import { M as ManagerOptions, W as WindowManager } from './types-jG2lHGcA.js';
|
|
4
|
+
export { A as ArrangeMode, B as Bounds, c as ManagerEvents, a as ManagerState, S as SerializedMaxSize, d as SerializedState, e as SerializedWindowState, f as Size, g as SnapZone, h as WindowFlags, i as WindowInit, j as WindowLayer, k as WindowStage, b as WindowState, l as WindowUpdate } from './types-jG2lHGcA.js';
|
|
5
5
|
|
|
6
6
|
type Listener<T> = (payload: T) => void;
|
|
7
7
|
interface Emitter<Events extends Record<keyof Events, unknown>> {
|
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-VQ3TLK3N.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/persist.d.cts
CHANGED
package/dist/persist.d.ts
CHANGED
package/dist/popout.d.cts
CHANGED
package/dist/popout.d.ts
CHANGED
package/dist/react.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkE47Q36LM_cjs = require('./chunk-E47Q36LM.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
|
|
6
6
|
function useWindowManager(options) {
|
|
7
|
-
const [wm] = react.useState(() =>
|
|
7
|
+
const [wm] = react.useState(() => chunkE47Q36LM_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(() => chunkE47Q36LM_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.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
2
|
-
import { D as DesktopBinder, b as DesktopController, a as DesktopOptions, W as WindowAttachOptions } from './binder-
|
|
1
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.cjs';
|
|
2
|
+
import { D as DesktopBinder, b as DesktopController, a as DesktopOptions, W as WindowAttachOptions } from './binder-_L3Iww0u.cjs';
|
|
3
3
|
|
|
4
4
|
type ElementRef = (node: HTMLElement | null) => void;
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
2
|
-
import { D as DesktopBinder, b as DesktopController, a as DesktopOptions, W as WindowAttachOptions } from './binder-
|
|
1
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.js';
|
|
2
|
+
import { D as DesktopBinder, b as DesktopController, a as DesktopOptions, W as WindowAttachOptions } from './binder-DvQFmO3K.js';
|
|
3
3
|
|
|
4
4
|
type ElementRef = (node: HTMLElement | null) => void;
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createWindowManager, createDesktopBinder } from './chunk-
|
|
1
|
+
import { createWindowManager, createDesktopBinder } from './chunk-VQ3TLK3N.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 chunkE47Q36LM_cjs = require('./chunk-E47Q36LM.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 = chunkE47Q36LM_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 = chunkE47Q36LM_cjs.createDesktopBinder(wm, options);
|
|
25
25
|
disposeWithOwner(() => binder.destroy());
|
|
26
26
|
return {
|
|
27
27
|
binder,
|
package/dist/solid.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
3
|
-
import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-
|
|
2
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.cjs';
|
|
3
|
+
import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-_L3Iww0u.cjs';
|
|
4
4
|
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
|
6
6
|
declare function useWmState(wm: WindowManager): Accessor<ManagerState>;
|
package/dist/solid.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
3
|
-
import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-
|
|
2
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.js';
|
|
3
|
+
import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-DvQFmO3K.js';
|
|
4
4
|
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
|
6
6
|
declare function useWmState(wm: WindowManager): Accessor<ManagerState>;
|
package/dist/solid.js
CHANGED
package/dist/svelte.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkE47Q36LM_cjs = require('./chunk-E47Q36LM.cjs');
|
|
4
4
|
|
|
5
5
|
// src/adapters/svelte.ts
|
|
6
6
|
function createManager(options) {
|
|
7
|
-
return
|
|
7
|
+
return chunkE47Q36LM_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 = chunkE47Q36LM_cjs.createDesktopBinder(wm, options);
|
|
34
34
|
return {
|
|
35
35
|
binder,
|
|
36
36
|
desktop(node) {
|
package/dist/svelte.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
2
|
-
import { W as WindowAttachOptions, D as DesktopBinder, a as DesktopOptions } from './binder-
|
|
1
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.cjs';
|
|
2
|
+
import { W as WindowAttachOptions, D as DesktopBinder, a as DesktopOptions } from './binder-_L3Iww0u.cjs';
|
|
3
3
|
|
|
4
4
|
interface ReadableStore<T> {
|
|
5
5
|
subscribe(run: (value: T) => void): () => void;
|
package/dist/svelte.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
2
|
-
import { W as WindowAttachOptions, D as DesktopBinder, a as DesktopOptions } from './binder-
|
|
1
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.js';
|
|
2
|
+
import { W as WindowAttachOptions, D as DesktopBinder, a as DesktopOptions } from './binder-DvQFmO3K.js';
|
|
3
3
|
|
|
4
4
|
interface ReadableStore<T> {
|
|
5
5
|
subscribe(run: (value: T) => void): () => void;
|
package/dist/svelte.js
CHANGED
|
@@ -183,6 +183,8 @@ interface WindowManager {
|
|
|
183
183
|
group(ids: readonly string[]): string | null;
|
|
184
184
|
ungroup(id: string): boolean;
|
|
185
185
|
activateTab(id: string): boolean;
|
|
186
|
+
moveTab(id: string, index: number): boolean;
|
|
187
|
+
cycleTab(direction?: 1 | -1): string | null;
|
|
186
188
|
groupMembers(groupId: string): readonly WindowState[];
|
|
187
189
|
batch(run: () => void): void;
|
|
188
190
|
serialize(): SerializedState;
|
|
@@ -183,6 +183,8 @@ interface WindowManager {
|
|
|
183
183
|
group(ids: readonly string[]): string | null;
|
|
184
184
|
ungroup(id: string): boolean;
|
|
185
185
|
activateTab(id: string): boolean;
|
|
186
|
+
moveTab(id: string, index: number): boolean;
|
|
187
|
+
cycleTab(direction?: 1 | -1): string | null;
|
|
186
188
|
groupMembers(groupId: string): readonly WindowState[];
|
|
187
189
|
batch(run: () => void): void;
|
|
188
190
|
serialize(): SerializedState;
|
package/dist/vue.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkE47Q36LM_cjs = require('./chunk-E47Q36LM.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 = chunkE47Q36LM_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 = chunkE47Q36LM_cjs.createDesktopBinder(wm, options);
|
|
29
29
|
disposeWithScope(() => binder.destroy());
|
|
30
30
|
vue.watch(
|
|
31
31
|
target,
|
package/dist/vue.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref, ShallowRef, MaybeRefOrGetter, ComputedRef } from 'vue';
|
|
2
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
3
|
-
import { a as DesktopOptions, D as DesktopBinder, W as WindowAttachOptions } from './binder-
|
|
2
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.cjs';
|
|
3
|
+
import { a as DesktopOptions, D as DesktopBinder, W as WindowAttachOptions } from './binder-_L3Iww0u.cjs';
|
|
4
4
|
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
|
6
6
|
declare function useWmState(wm: WindowManager): ShallowRef<ManagerState>;
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref, ShallowRef, MaybeRefOrGetter, ComputedRef } from 'vue';
|
|
2
|
-
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-
|
|
3
|
-
import { a as DesktopOptions, D as DesktopBinder, W as WindowAttachOptions } from './binder-
|
|
2
|
+
import { W as WindowManager, M as ManagerOptions, a as ManagerState, b as WindowState } from './types-jG2lHGcA.js';
|
|
3
|
+
import { a as DesktopOptions, D as DesktopBinder, W as WindowAttachOptions } from './binder-DvQFmO3K.js';
|
|
4
4
|
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
|
6
6
|
declare function useWmState(wm: WindowManager): ShallowRef<ManagerState>;
|
package/dist/vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createWindowManager, createDesktopBinder } from './chunk-
|
|
1
|
+
import { createWindowManager, createDesktopBinder } from './chunk-VQ3TLK3N.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.
|
|
3
|
+
"version": "0.7.0",
|
|
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",
|