@surdeddd/wmkit 0.4.2 → 0.5.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/README.md +1 -0
- package/README.ru.md +1 -0
- 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-B2A2IZGh.d.ts → binder-Ca3GOfZX.d.ts} +5 -1
- package/dist/{binder-Dl07SXIM.d.cts → binder-EBroZTRw.d.cts} +5 -1
- package/dist/{chunk-GGDF2EWV.js → chunk-2WQHHYYR.js} +280 -23
- package/dist/chunk-2WQHHYYR.js.map +1 -0
- package/dist/{chunk-GLBVT4AQ.cjs → chunk-C2UHNBSA.cjs} +280 -23
- package/dist/chunk-C2UHNBSA.cjs.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-t6pyVYKN.d.cts → types-LP7Inhxx.d.cts} +18 -0
- package/dist/{types-t6pyVYKN.d.ts → types-LP7Inhxx.d.ts} +18 -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 +7 -7
- package/dist/chunk-GGDF2EWV.js.map +0 -1
- package/dist/chunk-GLBVT4AQ.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
- 🪟 **Full window lifecycle** — open, close, focus, minimize, maximize, restore, drag, 8-direction resize
|
|
16
16
|
- 🧠 **Headless core** — a serializable state machine plus a DOM controller; bring your own markup or use the glass theme
|
|
17
17
|
- ⚛️ **Official adapters** — `@surdeddd/wmkit/react`, `/vue`, `/svelte`, `/solid`, `/angular`, all thin sugar over one core
|
|
18
|
+
- 🗃️ **Tab groups** — drop one titlebar onto another and the windows share a frame, dockview style
|
|
18
19
|
- ⊞ **Snap zones** — halves, quarters, thirds and drag-to-top maximize with a live preview
|
|
19
20
|
- 🧲 **Magnetism** — window edges align to neighbours and the viewport while dragging
|
|
20
21
|
- ↩️ **Undo/redo** — every mutation is one step; a whole drag collapses into a single history entry
|
package/README.ru.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
- 🪟 **Полный жизненный цикл окна** — открытие, закрытие, фокус, сворачивание, разворачивание, восстановление, drag, ресайз в 8 направлениях
|
|
12
12
|
- 🧠 **Headless-ядро** — сериализуемая стейт-машина плюс DOM-контроллер; своя разметка или готовая стеклянная тема
|
|
13
13
|
- ⚛️ **Родные адаптеры** — `@surdeddd/wmkit/react`, `/vue`, `/svelte`, `/solid`, `/angular`, тонкий сахар над одним ядром
|
|
14
|
+
- 🗃️ **Вкладочные группы** — бросьте заголовок на заголовок, и окна начнут делить одну рамку
|
|
14
15
|
- ⊞ **Snap-зоны** — половины, четверти, трети и максимизация от верхнего края с живым превью
|
|
15
16
|
- 🧲 **Магнетизм** — края окна прилипают к соседям и вьюпорту при перетаскивании
|
|
16
17
|
- ↩️ **Undo/redo** — каждая мутация = один шаг; целый drag схлопывается в одну запись истории
|
package/dist/angular.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkC2UHNBSA_cjs = require('./chunk-C2UHNBSA.cjs');
|
|
4
4
|
var core = require('@angular/core');
|
|
5
5
|
|
|
6
6
|
function onDestroy(dispose) {
|
|
@@ -13,7 +13,7 @@ function onDestroy(dispose) {
|
|
|
13
13
|
destroyRef?.onDestroy(dispose);
|
|
14
14
|
}
|
|
15
15
|
function useWindowManager(options) {
|
|
16
|
-
const wm =
|
|
16
|
+
const wm = chunkC2UHNBSA_cjs.createWindowManager(options);
|
|
17
17
|
onDestroy(() => wm.destroy());
|
|
18
18
|
return wm;
|
|
19
19
|
}
|
|
@@ -28,7 +28,7 @@ function useWmWindow(wm, id) {
|
|
|
28
28
|
return core.computed(() => state().windows[id]);
|
|
29
29
|
}
|
|
30
30
|
function createDesktop(wm, options) {
|
|
31
|
-
const binder =
|
|
31
|
+
const binder = chunkC2UHNBSA_cjs.createDesktopBinder(wm, options);
|
|
32
32
|
onDestroy(() => binder.destroy());
|
|
33
33
|
return {
|
|
34
34
|
binder,
|
package/dist/angular.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signal } from '@angular/core';
|
|
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-LP7Inhxx.cjs';
|
|
3
|
+
import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-EBroZTRw.cjs';
|
|
4
4
|
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
|
6
6
|
declare function useWmState(wm: WindowManager): Signal<ManagerState>;
|
package/dist/angular.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signal } from '@angular/core';
|
|
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-LP7Inhxx.js';
|
|
3
|
+
import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-Ca3GOfZX.js';
|
|
4
4
|
|
|
5
5
|
declare function useWindowManager(options?: ManagerOptions): WindowManager;
|
|
6
6
|
declare function useWmState(wm: WindowManager): Signal<ManagerState>;
|
package/dist/angular.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as Size, B as Bounds, g as SnapZone, W as WindowManager, b as WindowState } from './types-
|
|
1
|
+
import { f as Size, B as Bounds, g as SnapZone, W as WindowManager, b as WindowState } from './types-LP7Inhxx.js';
|
|
2
2
|
|
|
3
3
|
declare function clamp(value: number, min: number, max: number): number;
|
|
4
4
|
declare function clampSize(size: Size, min: Size, max: Size | null): Size;
|
|
@@ -54,7 +54,11 @@ interface HitAreaOptions {
|
|
|
54
54
|
interface MagnetismOptions {
|
|
55
55
|
threshold?: number;
|
|
56
56
|
}
|
|
57
|
+
interface GroupingOptions {
|
|
58
|
+
dwell?: number;
|
|
59
|
+
}
|
|
57
60
|
interface DesktopOptions {
|
|
61
|
+
grouping?: boolean | GroupingOptions;
|
|
58
62
|
snap?: boolean | DesktopSnapOptions;
|
|
59
63
|
keyboard?: boolean | DesktopKeyboardOptions;
|
|
60
64
|
announce?: boolean | Partial<AnnouncerMessages>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as Size, B as Bounds, g as SnapZone, W as WindowManager, b as WindowState } from './types-
|
|
1
|
+
import { f as Size, B as Bounds, g as SnapZone, W as WindowManager, b as WindowState } from './types-LP7Inhxx.cjs';
|
|
2
2
|
|
|
3
3
|
declare function clamp(value: number, min: number, max: number): number;
|
|
4
4
|
declare function clampSize(size: Size, min: Size, max: Size | null): Size;
|
|
@@ -54,7 +54,11 @@ interface HitAreaOptions {
|
|
|
54
54
|
interface MagnetismOptions {
|
|
55
55
|
threshold?: number;
|
|
56
56
|
}
|
|
57
|
+
interface GroupingOptions {
|
|
58
|
+
dwell?: number;
|
|
59
|
+
}
|
|
57
60
|
interface DesktopOptions {
|
|
61
|
+
grouping?: boolean | GroupingOptions;
|
|
58
62
|
snap?: boolean | DesktopSnapOptions;
|
|
59
63
|
keyboard?: boolean | DesktopKeyboardOptions;
|
|
60
64
|
announce?: boolean | Partial<AnnouncerMessages>;
|