@surdeddd/wmkit 0.4.1 → 0.5.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.
Files changed (41) hide show
  1. package/README.md +2 -1
  2. package/README.ru.md +2 -1
  3. package/dist/angular.cjs +3 -3
  4. package/dist/angular.d.cts +2 -2
  5. package/dist/angular.d.ts +2 -2
  6. package/dist/angular.js +1 -1
  7. package/dist/{binder-B2A2IZGh.d.ts → binder-Ca3GOfZX.d.ts} +5 -1
  8. package/dist/{binder-Dl07SXIM.d.cts → binder-EBroZTRw.d.cts} +5 -1
  9. package/dist/{chunk-OOEDFA7K.js → chunk-L43XBN44.js} +290 -28
  10. package/dist/chunk-L43XBN44.js.map +1 -0
  11. package/dist/{chunk-TJ6QOOJ2.cjs → chunk-RXAMUBUJ.cjs} +290 -28
  12. package/dist/chunk-RXAMUBUJ.cjs.map +1 -0
  13. package/dist/index.cjs +18 -18
  14. package/dist/index.d.cts +4 -4
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +1 -1
  17. package/dist/persist.d.cts +1 -1
  18. package/dist/persist.d.ts +1 -1
  19. package/dist/popout.d.cts +1 -1
  20. package/dist/popout.d.ts +1 -1
  21. package/dist/react.cjs +3 -3
  22. package/dist/react.d.cts +2 -2
  23. package/dist/react.d.ts +2 -2
  24. package/dist/react.js +1 -1
  25. package/dist/solid.cjs +3 -3
  26. package/dist/solid.d.cts +2 -2
  27. package/dist/solid.d.ts +2 -2
  28. package/dist/solid.js +1 -1
  29. package/dist/svelte.cjs +3 -3
  30. package/dist/svelte.d.cts +2 -2
  31. package/dist/svelte.d.ts +2 -2
  32. package/dist/svelte.js +1 -1
  33. package/dist/{types-t6pyVYKN.d.cts → types-LP7Inhxx.d.cts} +18 -0
  34. package/dist/{types-t6pyVYKN.d.ts → types-LP7Inhxx.d.ts} +18 -0
  35. package/dist/vue.cjs +3 -3
  36. package/dist/vue.d.cts +2 -2
  37. package/dist/vue.d.ts +2 -2
  38. package/dist/vue.js +1 -1
  39. package/package.json +7 -7
  40. package/dist/chunk-OOEDFA7K.js.map +0 -1
  41. package/dist/chunk-TJ6QOOJ2.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
@@ -376,7 +377,7 @@ This README is the tour. The reference lives in [`docs/`](./docs/README.md):
376
377
 
377
378
  ## Quality
378
379
 
379
- - 216 unit tests, **100%** line/branch/function/statement coverage on the core state machine and persistence
380
+ - 250 unit tests: **100%** line/branch/function/statement coverage on the core state machine and persistence, with enforced floors on the DOM layer and the adapters
380
381
  - 190+ Playwright scenarios on Chromium, WebKit and mobile emulation: drag, 8-way resize, snap, magnetism, workspaces, undo after drag, keyboard, touch, persistence across reloads, 50-window stress, modal traps, axe accessibility scans, visual regression screenshots
381
382
  - performance benchmarks run in CI on every push (`vitest bench`): 1 000 windows open in ~150 ms, a move among 50 windows costs ~1.2 µs, a full 100-step undo/redo sweep ~52 µs
382
383
  - `publint` + `@arethetypeswrong/cli` validate the published package, `size-limit` guards bundle budgets
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 схлопывается в одну запись истории
@@ -273,7 +274,7 @@ if (isPopoutSupported()) await popout(wm, 'docs', contentElement)
273
274
 
274
275
  ## Качество
275
276
 
276
- - 216 юнит-тестов, **100%** покрытие стейт-машины и persist по строкам/веткам/функциям
277
+ - 250 юнит-тестов: **100%** покрытие стейт-машины и persist по строкам/веткам/функциям, плюс обязательные пороги на DOM-слой и адаптеры
277
278
  - 190+ Playwright-сценариев на Chromium, WebKit и мобильной эмуляции: drag, ресайз во все стороны, снэп, магнетизм, рабочие столы, undo после drag, клавиатура, touch, персист через перезагрузку, стресс на 50 окон, модальные ловушки, axe-аудиты доступности, визуальная регрессия по скриншотам
278
279
  - перф-бенчмарки в CI на каждый push (`vitest bench`): 1 000 окон открываются за ~150 мс, move среди 50 окон ~1.2 мкс, полный undo/redo-проход на 100 шагов ~52 мкс
279
280
  - `publint` + `@arethetypeswrong/cli` проверяют валидность пакета, `size-limit` следит за бюджетами
package/dist/angular.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkTJ6QOOJ2_cjs = require('./chunk-TJ6QOOJ2.cjs');
3
+ var chunkRXAMUBUJ_cjs = require('./chunk-RXAMUBUJ.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 = chunkTJ6QOOJ2_cjs.createWindowManager(options);
16
+ const wm = chunkRXAMUBUJ_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 = chunkTJ6QOOJ2_cjs.createDesktopBinder(wm, options);
31
+ const binder = chunkRXAMUBUJ_cjs.createDesktopBinder(wm, options);
32
32
  onDestroy(() => binder.destroy());
33
33
  return {
34
34
  binder,
@@ -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-t6pyVYKN.cjs';
3
- import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-Dl07SXIM.cjs';
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-t6pyVYKN.js';
3
- import { D as DesktopBinder, W as WindowAttachOptions, a as DesktopOptions } from './binder-B2A2IZGh.js';
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 { createWindowManager, createDesktopBinder } from './chunk-OOEDFA7K.js';
1
+ import { createWindowManager, createDesktopBinder } from './chunk-L43XBN44.js';
2
2
  import { signal, computed, inject, DestroyRef } from '@angular/core';
3
3
 
4
4
  function onDestroy(dispose) {
@@ -1,4 +1,4 @@
1
- import { f as Size, B as Bounds, g as SnapZone, W as WindowManager, b as WindowState } from './types-t6pyVYKN.js';
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-t6pyVYKN.cjs';
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>;