@gustavolmo/react-window-manager 0.3.1 → 0.4.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/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +1290 -735
- package/dist/index.js.map +1 -1
- package/dist/window-manager/internal/features/cursor/cursor-move-listener.d.ts.map +1 -1
- package/dist/window-manager/internal/features/cursor/cursor-state.d.ts +1 -2
- package/dist/window-manager/internal/features/cursor/cursor-state.d.ts.map +1 -1
- package/dist/window-manager/internal/features/docking/docking-api.d.ts +0 -2
- package/dist/window-manager/internal/features/docking/docking-api.d.ts.map +1 -1
- package/dist/window-manager/internal/features/docking/docking-controls.d.ts +1 -1
- package/dist/window-manager/internal/features/docking/docking-controls.d.ts.map +1 -1
- package/dist/window-manager/internal/features/drag/drag-api.d.ts +5 -0
- package/dist/window-manager/internal/features/drag/drag-api.d.ts.map +1 -0
- package/dist/window-manager/internal/features/drag/drag-handle.d.ts.map +1 -1
- package/dist/window-manager/internal/features/focus/focus-api.d.ts +5 -0
- package/dist/window-manager/internal/features/focus/focus-api.d.ts.map +1 -0
- package/dist/window-manager/internal/features/grid/grid-orchestrator.d.ts +4 -0
- package/dist/window-manager/internal/features/grid/grid-orchestrator.d.ts.map +1 -0
- package/dist/window-manager/internal/features/resizing/resizing-api.d.ts +3 -4
- package/dist/window-manager/internal/features/resizing/resizing-api.d.ts.map +1 -1
- package/dist/window-manager/internal/features/resizing/resizing-controls.d.ts.map +1 -1
- package/dist/window-manager/internal/features/stack/stack-api.d.ts +0 -2
- package/dist/window-manager/internal/features/stack/stack-api.d.ts.map +1 -1
- package/dist/window-manager/internal/features/window-button.d.ts +5 -3
- package/dist/window-manager/internal/features/window-button.d.ts.map +1 -1
- package/dist/window-manager/internal/features/window-layout.d.ts +14 -2
- package/dist/window-manager/internal/features/window-layout.d.ts.map +1 -1
- package/dist/window-manager/internal/features/workspace/workspace-api.d.ts +15 -3
- package/dist/window-manager/internal/features/workspace/workspace-api.d.ts.map +1 -1
- package/dist/window-manager/internal/features/workspace/workspace-resize-listener.d.ts +2 -0
- package/dist/window-manager/internal/features/workspace/workspace-resize-listener.d.ts.map +1 -0
- package/dist/window-manager/internal/features/workspace/workspace-state.d.ts.map +1 -1
- package/dist/window-manager/internal/runtime/dock-resolver/dock-commands.d.ts +10 -0
- package/dist/window-manager/internal/runtime/dock-resolver/dock-commands.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/drag-resolver/drag-commands.d.ts +7 -0
- package/dist/window-manager/internal/runtime/drag-resolver/drag-commands.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/drag-resolver/drag-loop.d.ts +6 -0
- package/dist/window-manager/internal/runtime/drag-resolver/drag-loop.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/focus-resolver/focus-commands.d.ts +6 -0
- package/dist/window-manager/internal/runtime/focus-resolver/focus-commands.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/resize-resolver/resize-commands.d.ts +7 -0
- package/dist/window-manager/internal/runtime/resize-resolver/resize-commands.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/resize-resolver/resize-loop.d.ts +6 -0
- package/dist/window-manager/internal/runtime/resize-resolver/resize-loop.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/rwm-runtime.d.ts +67 -0
- package/dist/window-manager/internal/runtime/rwm-runtime.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/stack-resolver/stack-commands.d.ts +6 -0
- package/dist/window-manager/internal/runtime/stack-resolver/stack-commands.d.ts.map +1 -0
- package/dist/window-manager/internal/runtime/workspace-resolver/workspace-commands.d.ts +12 -0
- package/dist/window-manager/internal/runtime/workspace-resolver/workspace-commands.d.ts.map +1 -0
- package/dist/window-manager/model/window-types.d.ts +14 -22
- package/dist/window-manager/model/window-types.d.ts.map +1 -1
- package/dist/window-manager/model/workspace-types.d.ts +18 -6
- package/dist/window-manager/model/workspace-types.d.ts.map +1 -1
- package/dist/window-manager/registration/window-registry.d.ts +3 -0
- package/dist/window-manager/registration/window-registry.d.ts.map +1 -0
- package/dist/window-manager/registration/window-store-factory.d.ts +1 -4
- package/dist/window-manager/registration/window-store-factory.d.ts.map +1 -1
- package/dist/window-manager/rwm.d.ts +25 -10
- package/dist/window-manager/rwm.d.ts.map +1 -1
- package/dist/window-manager/workspace-layout.d.ts +1 -13
- package/dist/window-manager/workspace-layout.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/window-manager/internal/features/grid/grid-api.d.ts +0 -4
- package/dist/window-manager/internal/features/grid/grid-api.d.ts.map +0 -1
- package/dist/window-manager/internal/features/view-port/view-port-resize-listener.d.ts +0 -2
- package/dist/window-manager/internal/features/view-port/view-port-resize-listener.d.ts.map +0 -1
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { DockPosition } from '../../model/window-types';
|
|
2
2
|
export type WindowLayoutProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
windowName: string | React.ReactNode;
|
|
5
5
|
winId: string;
|
|
6
6
|
navbarChildren?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* @default 'deafult'
|
|
9
|
+
* @param `deafult` keeps the window near full width but detached from the workspace edges
|
|
10
|
+
* @param `full`
|
|
11
|
+
* @param `right`
|
|
12
|
+
* @param `left`
|
|
13
|
+
* @param `top`
|
|
14
|
+
* @param `bottom`
|
|
15
|
+
* @param `top-right`
|
|
16
|
+
* @param `top-left`
|
|
17
|
+
* @param `bottom-right`
|
|
18
|
+
* @param `bottom-left`
|
|
19
|
+
* */
|
|
7
20
|
defaultDock?: DockPosition;
|
|
8
21
|
/** @note use CSS values such as hex or supported color names */
|
|
9
22
|
style?: {
|
|
@@ -13,5 +26,4 @@ export type WindowLayoutProps = {
|
|
|
13
26
|
};
|
|
14
27
|
};
|
|
15
28
|
export default function WindowLayout({ children, windowName, navbarChildren, winId, defaultDock, style, }: WindowLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
17
29
|
//# sourceMappingURL=window-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-layout.d.ts","sourceRoot":"","sources":["../../../../src/window-manager/internal/features/window-layout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"window-layout.d.ts","sourceRoot":"","sources":["../../../../src/window-manager/internal/features/window-layout.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEhC;;;;;;;;;;;;SAYK;IACL,WAAW,CAAC,EAAE,YAAY,CAAA;IAE1B,gEAAgE;IAChE,KAAK,CAAC,EAAE;QACN,kBAAkB,CAAC,EAAE,MAAM,CAAA;QAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;QAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,cAAc,EACd,KAAK,EACL,WAAuB,EACvB,KAAK,GACN,EAAE,iBAAiB,2CA8HnB"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResponsiveSizes } from '../../../model/workspace-types';
|
|
2
|
+
import { WorkspaceCtx } from '../../runtime/workspace-resolver/workspace-commands';
|
|
2
3
|
export declare const wsApi: {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Always relative to the WorkspaceLayout dimensions. Use `wsApi.setWsResponsiveBreak` to modify the value
|
|
6
|
+
* @default 'sm'
|
|
7
|
+
* @param sm uses mobile format at 640px
|
|
8
|
+
* @param md uses mobile format at 768px
|
|
9
|
+
* @param lg uses mobile format at 1024px
|
|
10
|
+
* @param xl uses mobile format at 1280px
|
|
11
|
+
* @param never never uses mobile format
|
|
12
|
+
* @param always always uses mobile format
|
|
13
|
+
* @param number set custom break point value in px */
|
|
14
|
+
setWsResponsiveBreak: (breakPoint: ResponsiveSizes) => void;
|
|
15
|
+
setWsFeatures: ({ isDockPannelEnabled, isGridEnabled }: WorkspaceCtx) => void;
|
|
16
|
+
updateWsRect: () => void;
|
|
5
17
|
};
|
|
6
18
|
//# sourceMappingURL=workspace-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-api.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/features/workspace/workspace-api.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"workspace-api.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/features/workspace/workspace-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAA;AAElF,eAAO,MAAM,KAAK;IAChB;;;;;;;;;0DASsD;uCACnB,eAAe;4DAQoB,YAAY;;CAWnF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-resize-listener.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/features/workspace/workspace-resize-listener.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,uBAAuB,4CAmB9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-state.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/features/workspace/workspace-state.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"workspace-state.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/features/workspace/workspace-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAE/D,eAAO,MAAM,iBAAiB,6EAoB3B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WorkspaceRect } from '../../../model/workspace-types';
|
|
2
|
+
import { WindowMutation } from '../rwm-runtime';
|
|
3
|
+
export type DockCommands = 'DOCK_WINDOW_RIGHT' | 'DOCK_WINDOW_LEFT' | 'DOCK_WINDOW_TOP' | 'DOCK_WINDOW_BOTTOM' | 'DOCK_WINDOW_BOTTOM_RIGHT' | 'DOCK_WINDOW_TOP_RIGHT' | 'DOCK_WINDOW_BOTTOM_LEFT' | 'DOCK_WINDOW_TOP_LEFT' | 'MAXIMIZE_WINDOW' | 'DEMAXIMIZE_WINDOW';
|
|
4
|
+
type DockResolver = Record<DockCommands, (targetWinId: string, wsRect: WorkspaceRect) => WindowMutation[]>;
|
|
5
|
+
export declare const dockCommandResolver: DockResolver;
|
|
6
|
+
export declare const getDockDependencies: () => {
|
|
7
|
+
wsRect: WorkspaceRect;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=dock-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock-commands.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/dock-resolver/dock-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,YAAY,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,oBAAoB,GACpB,0BAA0B,GAC1B,uBAAuB,GACvB,yBAAyB,GACzB,sBAAsB,GACtB,iBAAiB,GACjB,mBAAmB,CAAA;AAEvB,KAAK,YAAY,GAAG,MAAM,CACxB,YAAY,EACZ,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,KAAK,cAAc,EAAE,CACjE,CAAA;AACD,eAAO,MAAM,mBAAmB,EAAE,YAgJjC,CAAA;AAED,eAAO,MAAM,mBAAmB;;CAG/B,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WindowMutation } from '../rwm-runtime';
|
|
2
|
+
export type DragCommands = 'ENABLE_DRAG' | 'DISABLE_DRAG';
|
|
3
|
+
type DragResolver = Record<DragCommands, (targetWinId: string) => WindowMutation[]>;
|
|
4
|
+
export declare const dragCommandResolver: DragResolver;
|
|
5
|
+
export declare const isDragAllowed: () => boolean;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=drag-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag-commands.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/drag-resolver/drag-commands.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,cAAc,CAAA;AAEzD,KAAK,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,cAAc,EAAE,CAAC,CAAA;AACnF,eAAO,MAAM,mBAAmB,EAAE,YAiCjC,CAAA;AAED,eAAO,MAAM,aAAa,QAAO,OAEhC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WindowMutation } from '../rwm-runtime';
|
|
2
|
+
export type RafDragCommands = 'LOOP_DRAG';
|
|
3
|
+
type RafDragResolver = Record<RafDragCommands, (targetWinId: string, commitCb: (patchStack: WindowMutation[]) => void) => void>;
|
|
4
|
+
export declare const rafDragLoopResolver: RafDragResolver;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=drag-loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag-loop.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/drag-resolver/drag-loop.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG,WAAW,CAAA;AAEzC,KAAK,eAAe,GAAG,MAAM,CAC3B,eAAe,EACf,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,IAAI,KAAK,IAAI,CAChF,CAAA;AACD,eAAO,MAAM,mBAAmB,EAAE,eAejC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BatchMutation } from '../rwm-runtime';
|
|
2
|
+
export type FocusCommands = 'FOCUS_WINDOW' | 'CLOSE_WINDOW_AND_REFOCUS';
|
|
3
|
+
type FocusResolver = Record<FocusCommands, (targetWinId: string) => BatchMutation>;
|
|
4
|
+
export declare const focusCommandResolver: FocusResolver;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=focus-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-commands.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/focus-resolver/focus-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAqC,MAAM,gBAAgB,CAAA;AAEjF,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,0BAA0B,CAAA;AAEvE,KAAK,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,aAAa,CAAC,CAAA;AAClF,eAAO,MAAM,oBAAoB,EAAE,aAgFlC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ResizeDirection } from '../../../model/window-types';
|
|
2
|
+
import { WindowMutation } from '../rwm-runtime';
|
|
3
|
+
export type ResizeCommands = 'ENABLE_RESIZE' | 'DISABLE_RESIZE';
|
|
4
|
+
type ResizeResolver = Record<ResizeCommands, (targetWinId: string, ctx: ResizeDirection) => WindowMutation[]>;
|
|
5
|
+
export declare const resizeCommandResolver: ResizeResolver;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=resize-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-commands.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/resize-resolver/resize-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,gBAAgB,CAAA;AAE/D,KAAK,cAAc,GAAG,MAAM,CAC1B,cAAc,EACd,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,KAAK,cAAc,EAAE,CAChE,CAAA;AACD,eAAO,MAAM,qBAAqB,EAAE,cA4BnC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WindowMutation } from '../rwm-runtime';
|
|
2
|
+
export type RafResizeCommands = 'LOOP_RESIZE';
|
|
3
|
+
type RafResizeResolver = Record<RafResizeCommands, (targetWinId: string, commitCb: (patchStack: WindowMutation[]) => void) => void>;
|
|
4
|
+
export declare const rafResizeLoopResolver: RafResizeResolver;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=resize-loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-loop.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/resize-resolver/resize-loop.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAA;AAC7C,KAAK,iBAAiB,GAAG,MAAM,CAC7B,iBAAiB,EACjB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,IAAI,KAAK,IAAI,CAChF,CAAA;AACD,eAAO,MAAM,qBAAqB,EAAE,iBAgBnC,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ResizeDirection, WindowStore } from '../../model/window-types';
|
|
2
|
+
import { DockCommands } from './dock-resolver/dock-commands';
|
|
3
|
+
import { RafDragCommands } from './drag-resolver/drag-loop';
|
|
4
|
+
import { DragCommands } from './drag-resolver/drag-commands';
|
|
5
|
+
import { FocusCommands } from './focus-resolver/focus-commands';
|
|
6
|
+
import { StackCommands } from './stack-resolver/stack-commands';
|
|
7
|
+
import { WorkspaceCommands, WorkspaceCtx } from './workspace-resolver/workspace-commands';
|
|
8
|
+
import { ResizeCommands } from './resize-resolver/resize-commands';
|
|
9
|
+
import { RafResizeCommands } from './resize-resolver/resize-loop';
|
|
10
|
+
import { WorkspaceStore } from '../../model/workspace-types';
|
|
11
|
+
type rwmMessage = {
|
|
12
|
+
targetWinId: string;
|
|
13
|
+
subsystem: 'DOCK';
|
|
14
|
+
cmd: DockCommands;
|
|
15
|
+
ctx?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
targetWinId: string;
|
|
18
|
+
subsystem: 'DRAG';
|
|
19
|
+
cmd: DragCommands;
|
|
20
|
+
ctx?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
targetWinId: string;
|
|
23
|
+
subsystem: 'FOCUS';
|
|
24
|
+
cmd: FocusCommands;
|
|
25
|
+
ctx?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
targetWinId: string;
|
|
28
|
+
subsystem: 'RESIZE';
|
|
29
|
+
cmd: ResizeCommands;
|
|
30
|
+
ctx: ResizeDirection;
|
|
31
|
+
} | {
|
|
32
|
+
targetWinId?: string;
|
|
33
|
+
subsystem: 'STACK';
|
|
34
|
+
cmd: StackCommands;
|
|
35
|
+
ctx?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
targetWinId?: string;
|
|
38
|
+
subsystem: 'WORKSPACE';
|
|
39
|
+
cmd: WorkspaceCommands;
|
|
40
|
+
ctx?: WorkspaceCtx;
|
|
41
|
+
};
|
|
42
|
+
export declare const rwmRuntime: {
|
|
43
|
+
dispatch: ({ subsystem, cmd, targetWinId, ctx }: rwmMessage) => void;
|
|
44
|
+
};
|
|
45
|
+
type rafMessage = {
|
|
46
|
+
targetWinId: string;
|
|
47
|
+
subsystem: 'RAF_DRAG';
|
|
48
|
+
cmd: RafDragCommands;
|
|
49
|
+
} | {
|
|
50
|
+
targetWinId: string;
|
|
51
|
+
subsystem: 'RAF_RESIZE';
|
|
52
|
+
cmd: RafResizeCommands;
|
|
53
|
+
};
|
|
54
|
+
export declare const rafRuntime: {
|
|
55
|
+
dispatch: ({ subsystem, cmd, targetWinId }: rafMessage) => void;
|
|
56
|
+
};
|
|
57
|
+
export type BatchMutation = {
|
|
58
|
+
ws: WorkspaceMutation;
|
|
59
|
+
win: WindowMutation[];
|
|
60
|
+
};
|
|
61
|
+
export type WindowMutation = {
|
|
62
|
+
winId: string;
|
|
63
|
+
patch: Partial<WindowStore>;
|
|
64
|
+
};
|
|
65
|
+
export type WorkspaceMutation = Partial<WorkspaceStore>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=rwm-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rwm-runtime.d.ts","sourceRoot":"","sources":["../../../../src/window-manager/internal/runtime/rwm-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAGvE,OAAO,EAEL,YAAY,EAEb,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAuB,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAuB,YAAY,EAAiB,MAAM,+BAA+B,CAAA;AAChG,OAAO,EAAwB,aAAa,EAAE,MAAM,iCAAiC,CAAA;AACrF,OAAO,EAAwB,aAAa,EAAE,MAAM,iCAAiC,CAAA;AACrF,OAAO,EAEL,iBAAiB,EACjB,YAAY,EACb,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAAyB,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACzF,OAAO,EAAE,iBAAiB,EAAyB,MAAM,+BAA+B,CAAA;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAU5D,KAAK,UAAU,GACX;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,YAAY,CAAC;IAAC,GAAG,CAAC,EAAE,SAAS,CAAA;CAAE,GAC9E;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,YAAY,CAAC;IAAC,GAAG,CAAC,EAAE,SAAS,CAAA;CAAE,GAC9E;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,SAAS,CAAA;CAAE,GAChF;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,cAAc,CAAC;IAAC,GAAG,EAAE,eAAe,CAAA;CAAE,GACvF;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,SAAS,CAAA;CAAE,GACjF;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,iBAAiB,CAAC;IAAC,GAAG,CAAC,EAAE,YAAY,CAAA;CAAE,CAAA;AAEhG,eAAO,MAAM,UAAU;qDAC4B,UAAU,KAAG,IAAI;CAoCnE,CAAA;AAED,KAAK,UAAU,GACX;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,eAAe,CAAA;CAAE,GACpE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,iBAAiB,CAAA;CAAE,CAAA;AAE5E,eAAO,MAAM,UAAU;gDACuB,UAAU,KAAG,IAAI;CAa9D,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,iBAAiB,CAAC;IAAC,GAAG,EAAE,cAAc,EAAE,CAAA;CAAE,CAAA;AAM5E,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;CAAE,CAAA;AAO3E,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WindowMutation } from "../rwm-runtime";
|
|
2
|
+
export type StackCommands = 'RESET_STACK';
|
|
3
|
+
type StackResolver = Record<StackCommands, (targetWinId?: string) => WindowMutation[]>;
|
|
4
|
+
export declare const stackCommandResolver: StackResolver;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=stack-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-commands.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/stack-resolver/stack-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,aAAa,GAAG,aAAa,CAAA;AAEzC,KAAK,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,cAAc,EAAE,CAAC,CAAA;AACtF,eAAO,MAAM,oBAAoB,EAAE,aAiBlC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResponsiveSizes } from '../../../model/workspace-types';
|
|
2
|
+
import { WorkspaceMutation } from '../rwm-runtime';
|
|
3
|
+
export type WorkspaceCommands = 'UPDATE_WORKSPACE_RECT' | 'SET_RESPONSIVE_BREAK' | 'SET_WORKSPACE_FEATURES';
|
|
4
|
+
export type WorkspaceCtx = {
|
|
5
|
+
responsiveBreak?: ResponsiveSizes;
|
|
6
|
+
isDockPannelEnabled?: boolean;
|
|
7
|
+
isGridEnabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type WorkspaceResolver = Record<WorkspaceCommands, (targetWinId?: string, ctx?: WorkspaceCtx) => WorkspaceMutation>;
|
|
10
|
+
export declare const workspaceCommandResolver: WorkspaceResolver;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=workspace-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-commands.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/runtime/workspace-resolver/workspace-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,iBAAiB,GACzB,uBAAuB,GACvB,sBAAsB,GACtB,wBAAwB,CAAA;AAE5B,MAAM,MAAM,YAAY,GAAG;IACzB,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,KAAK,iBAAiB,GAAG,MAAM,CAC7B,iBAAiB,EACjB,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,YAAY,KAAK,iBAAiB,CAChE,CAAA;AACD,eAAO,MAAM,wBAAwB,EAAE,iBAgDtC,CAAA"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { JSX
|
|
1
|
+
import { JSX } from 'react';
|
|
2
2
|
import { WindowLayoutProps } from '../internal/features/window-layout';
|
|
3
3
|
import { WindowButtonProps } from '../internal/features/window-button';
|
|
4
4
|
import { StoreApi, UseBoundStore } from 'zustand';
|
|
5
|
-
export type
|
|
5
|
+
export type RwmWindowProps = Omit<WindowLayoutProps, 'winId'>;
|
|
6
|
+
export type RwmButtonProps = Omit<WindowButtonProps, 'winId'>;
|
|
7
|
+
export type DockPosition = 'right' | 'left' | 'full' | 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'default';
|
|
8
|
+
export type WindowRegistry = Record<string, UseBoundStore<StoreApi<WindowStore>>>;
|
|
9
|
+
export type ResizeDirection = false | 's' | 'e' | 'n' | 'w' | 'se' | 'sw' | 'ne' | 'nw';
|
|
6
10
|
export type WindowStates = 'maximized' | 'demaximized';
|
|
7
11
|
export type Coord = {
|
|
8
12
|
pointX: number;
|
|
@@ -11,36 +15,24 @@ export type Coord = {
|
|
|
11
15
|
export type WindowRegistration = {
|
|
12
16
|
id: string;
|
|
13
17
|
store: UseBoundStore<StoreApi<WindowStore>>;
|
|
14
|
-
Window: (props:
|
|
15
|
-
Button: (props:
|
|
18
|
+
Window: (props: RwmWindowProps) => JSX.Element;
|
|
19
|
+
Button: (props: RwmButtonProps) => JSX.Element;
|
|
16
20
|
};
|
|
17
21
|
export type WindowStore = {
|
|
22
|
+
setWinElement: (ref: HTMLDivElement | null) => void;
|
|
23
|
+
winElement: HTMLDivElement | null | undefined;
|
|
18
24
|
windowId: string;
|
|
19
|
-
isActive: boolean;
|
|
20
|
-
setIsActive: (isActive: boolean) => void;
|
|
21
25
|
resetFlag: boolean;
|
|
22
|
-
reset: () => void;
|
|
23
26
|
zIndex: number;
|
|
24
|
-
|
|
25
|
-
self: RefObject<HTMLDivElement | null> | undefined;
|
|
26
|
-
setSelf: (ref: RefObject<HTMLDivElement | null>) => void;
|
|
27
|
+
winCoord: Coord;
|
|
27
28
|
winVisualState: WindowStates;
|
|
28
|
-
|
|
29
|
-
isWindowClosed: boolean;
|
|
30
|
-
setisWindowClosed: (isMini: boolean) => void;
|
|
29
|
+
isActive: boolean;
|
|
31
30
|
isDragging: boolean;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setWinCoord: (newWinCoord: Coord) => void;
|
|
35
|
-
resizeAction: ResizeState;
|
|
36
|
-
setResizeAction: (updatedIsResizing: ResizeState) => void;
|
|
31
|
+
isWindowClosed: boolean;
|
|
32
|
+
resizeAction: ResizeDirection;
|
|
37
33
|
winWidth: number;
|
|
38
|
-
setWinWidth: (newWinWidth: number) => void;
|
|
39
34
|
winHeight: number;
|
|
40
|
-
setWinHeight: (newWinHeight: number) => void;
|
|
41
35
|
WIN_MIN_WIDTH: number;
|
|
42
36
|
WIN_MIN_HEIGHT: number;
|
|
43
|
-
setWIN_MIN_WIDTH: (w: number) => void;
|
|
44
|
-
setWIN_MIN_HEIGHT: (h: number) => void;
|
|
45
37
|
};
|
|
46
38
|
//# sourceMappingURL=window-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-types.d.ts","sourceRoot":"","sources":["../../../src/window-manager/model/window-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"window-types.d.ts","sourceRoot":"","sources":["../../../src/window-manager/model/window-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEjD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;AAC7D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;AAE7D,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,MAAM,GACN,MAAM,GACN,KAAK,GACL,QAAQ,GACR,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,GACb,SAAS,CAAA;AAEb,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AACjF,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AACvF,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,aAAa,CAAA;AACtD,MAAM,MAAM,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAA;IAC3C,MAAM,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,GAAG,CAAC,OAAO,CAAA;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,GAAG,CAAC,OAAO,CAAA;CAC/C,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAA;IACnD,UAAU,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAA;IAC7C,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAElB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,KAAK,CAAA;IACf,cAAc,EAAE,YAAY,CAAA;IAE5B,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,YAAY,EAAE,eAAe,CAAA;IAE7B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IAEjB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type ResponsiveSizes = 'sm' | 'md' | 'lg' | 'xl' | 'never' | 'always' | number;
|
|
2
1
|
export type WorkspaceRect = {
|
|
3
2
|
top: number;
|
|
4
3
|
left: number;
|
|
@@ -9,12 +8,25 @@ export type WorkspaceRect = {
|
|
|
9
8
|
centerX: number;
|
|
10
9
|
centerY: number;
|
|
11
10
|
};
|
|
11
|
+
export type ResponsiveSizes = 'sm' | 'md' | 'lg' | 'xl' | 'never' | 'always' | number;
|
|
12
12
|
export type WorkspaceStore = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
wsElement: HTMLElement | null;
|
|
14
|
+
setWsElement: (newRef: HTMLElement | null) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Always relative to the WorkspaceLayout dimensions. Use `wsApi.setWsResponsiveBreak` to modify the value
|
|
17
|
+
* @default 'sm'
|
|
18
|
+
* @param sm uses mobile format at 640px
|
|
19
|
+
* @param md uses mobile format at 768px
|
|
20
|
+
* @param lg uses mobile format at 1024px
|
|
21
|
+
* @param xl uses mobile format at 1280px
|
|
22
|
+
* @param never never uses mobile format
|
|
23
|
+
* @param always always uses mobile format
|
|
24
|
+
* @param number set custom break point value in px */
|
|
25
|
+
isBelowBreakPoint: boolean;
|
|
26
|
+
isGridEnabled: boolean;
|
|
27
|
+
isDockPannelEnabled: boolean;
|
|
17
28
|
responsiveBreak: ResponsiveSizes;
|
|
18
|
-
|
|
29
|
+
activeWindowId: string;
|
|
30
|
+
wsRect: WorkspaceRect;
|
|
19
31
|
};
|
|
20
32
|
//# sourceMappingURL=workspace-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-types.d.ts","sourceRoot":"","sources":["../../../src/window-manager/model/workspace-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"workspace-types.d.ts","sourceRoot":"","sources":["../../../src/window-manager/model/workspace-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAErF,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,WAAW,GAAG,IAAI,CAAA;IAC7B,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAElD;;;;;;;;;0DASsD;IACtD,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,EAAE,OAAO,CAAA;IACtB,mBAAmB,EAAE,OAAO,CAAA;IAE5B,eAAe,EAAE,eAAe,CAAA;IAChC,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,aAAa,CAAA;CACtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-registry.d.ts","sourceRoot":"","sources":["../../../src/window-manager/registration/window-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,eAAO,MAAM,cAAc,EAAE,cAAmB,CAAA"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WindowRegistration, WindowStore } from '../model/window-types';
|
|
3
|
-
/** @howToUse use the syntax `windowRegistry[<winId>]()` to access a store */
|
|
4
|
-
export declare const windowRegistry: Record<string, UseBoundStore<StoreApi<WindowStore>>>;
|
|
1
|
+
import { WindowRegistration } from '../model/window-types';
|
|
5
2
|
/**
|
|
6
3
|
* @return `id` auto generated id at the root of the window component.`id` can be used in `windowRegistry` to access the state store associated to this window instnace
|
|
7
4
|
* @return
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-store-factory.d.ts","sourceRoot":"","sources":["../../../src/window-manager/registration/window-store-factory.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"window-store-factory.d.ts","sourceRoot":"","sources":["../../../src/window-manager/registration/window-store-factory.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,uBAAuB,CAAA;AAQ9B;;;;;;;qDAOqD;AACrD,eAAO,MAAM,iBAAiB,QAAO,kBAqCpC,CAAA"}
|
|
@@ -10,24 +10,39 @@ declare const rwm: {
|
|
|
10
10
|
dockWindowTopLeft: (winId: string) => void;
|
|
11
11
|
maximizeWindow: (winId: string) => void;
|
|
12
12
|
demaximizeWindow: (winId: string) => void;
|
|
13
|
-
closeWindow: (winId: string) => void;
|
|
14
|
-
openWindow: (winId: string) => void;
|
|
15
13
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
dispatchResizeAction: (winId: string) => void;
|
|
14
|
+
focusApi: {
|
|
15
|
+
bringWindowToFocus: (targetId: string) => void;
|
|
16
|
+
closeWindowAndRefocus: (targetId: string) => void;
|
|
20
17
|
};
|
|
21
18
|
stackApi: {
|
|
22
|
-
bringTargetWindowToFront: (targetId: string) => void;
|
|
23
|
-
getOpenedWindowCount: () => number;
|
|
24
19
|
resetStack: () => void;
|
|
25
20
|
};
|
|
26
21
|
workspaceApi: {
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
setWsResponsiveBreak: (breakPoint: import("..").ResponsiveSizes) => void;
|
|
23
|
+
setWsFeatures: ({ isDockPannelEnabled, isGridEnabled }: import("./internal/runtime/workspace-resolver/workspace-commands").WorkspaceCtx) => void;
|
|
29
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* @about
|
|
27
|
+
* Zustand hook, can be used to access the current state of the workspace by either
|
|
28
|
+
* calling `const { <someState> } = worskpaceState()` inside a component or by calling
|
|
29
|
+
* `worskpaceState.getState()` anywhere.
|
|
30
|
+
*
|
|
31
|
+
* @note
|
|
32
|
+
* The hook also exposes the `setState()` method, however, this is highly discouraged. Prefer calling
|
|
33
|
+
* the exposed apis in rwm for state mutation.
|
|
34
|
+
*/
|
|
30
35
|
worskpaceState: import("zustand").UseBoundStore<import("zustand").StoreApi<import("..").WorkspaceStore>>;
|
|
36
|
+
/**
|
|
37
|
+
* @about
|
|
38
|
+
* use the syntax `const { <someState> } = windowRegistry[<winId>]()` inside a component to access
|
|
39
|
+
* the zustand hook or `windowRegistry[<winId>].getState()` to get the current state of a window anywhere
|
|
40
|
+
*
|
|
41
|
+
* @note
|
|
42
|
+
* Each hook also exposes the `setState()` method, however, this is highly discouraged. Prefer calling
|
|
43
|
+
* the exposed apis in rwm for state mutation.
|
|
44
|
+
*/
|
|
45
|
+
windowRegistry: import("..").WindowRegistry;
|
|
31
46
|
};
|
|
32
47
|
export default rwm;
|
|
33
48
|
//# sourceMappingURL=rwm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rwm.d.ts","sourceRoot":"","sources":["../../src/window-manager/rwm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rwm.d.ts","sourceRoot":"","sources":["../../src/window-manager/rwm.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;IAMP;;;;;;;;;OASG;;IAGH;;;;;;;;OAQG;;CAEJ,CAAA;AAED,eAAe,GAAG,CAAA"}
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
import { ResponsiveSizes } from './model/workspace-types';
|
|
2
1
|
type Props = {
|
|
3
2
|
children: React.ReactNode;
|
|
4
3
|
className?: string;
|
|
5
|
-
/**
|
|
6
|
-
* Always relative to the WorkspaceLayout dimensions
|
|
7
|
-
* @default 'sm'
|
|
8
|
-
* @param sm uses mobile format at 640px
|
|
9
|
-
* @param md uses mobile format at 768px
|
|
10
|
-
* @param lg uses mobile format at 1024px
|
|
11
|
-
* @param xl uses mobile format at 1280px
|
|
12
|
-
* @param never never uses mobile format
|
|
13
|
-
* @param always always uses mobile format
|
|
14
|
-
* @param number set custom break point value in px */
|
|
15
|
-
responsiveBreak?: ResponsiveSizes;
|
|
16
4
|
};
|
|
17
|
-
export default function WorkspaceLayout({ children, className
|
|
5
|
+
export default function WorkspaceLayout({ children, className }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
6
|
export {};
|
|
19
7
|
//# sourceMappingURL=workspace-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-layout.d.ts","sourceRoot":"","sources":["../../src/window-manager/workspace-layout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-layout.d.ts","sourceRoot":"","sources":["../../src/window-manager/workspace-layout.tsx"],"names":[],"mappings":"AAQA,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,2CA8BrE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gustavolmo/react-window-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -32,19 +32,20 @@
|
|
|
32
32
|
"@types/react": "^19.0.8",
|
|
33
33
|
"@types/react-dom": "^19.0.3",
|
|
34
34
|
"tailwindcss": "^3.4.17",
|
|
35
|
-
"eslint": "^9.19.0"
|
|
35
|
+
"eslint": "^9.19.0",
|
|
36
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
37
|
+
"eslint-plugin-react-refresh": "^0.4.18",
|
|
38
|
+
"typescript-eslint": "^8.22.0"
|
|
36
39
|
},
|
|
37
40
|
"scripts": {
|
|
38
41
|
"build": "tsup",
|
|
39
42
|
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
|
|
40
43
|
"build:css": "tailwindcss -c tailwind.config.js -i ./src/index.css -o ./dist/index.css --minify",
|
|
41
44
|
"build:all": "pnpm run build && pnpm run build:types && pnpm run build:css",
|
|
42
|
-
|
|
43
45
|
"dev": "pnpm run dev:js & pnpm run dev:css",
|
|
44
46
|
"dev:js": "tsup --watch",
|
|
45
47
|
"dev:css": "tailwindcss -c tailwind.config.js -i ./src/index.css -o ./dist/index.css --watch",
|
|
46
48
|
"lint": "eslint src --ext .ts,.tsx",
|
|
47
|
-
|
|
48
49
|
"prepublishOnly": "pnpm run build:all",
|
|
49
50
|
"publish": "npm publish --access public"
|
|
50
51
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-api.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/features/grid/grid-api.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;mCACa,MAAM;CACtC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"view-port-resize-listener.d.ts","sourceRoot":"","sources":["../../../../../src/window-manager/internal/features/view-port/view-port-resize-listener.tsx"],"names":[],"mappings":"AAGA,wBAAgB,sBAAsB,4CAQrC"}
|