@gustavolmo/react-window-manager 0.2.1 → 0.3.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/dist/index.css +1 -644
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +7 -101
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +788 -678
- package/dist/index.js.map +1 -1
- package/dist/window-manager/internal/assets/svg-win-icons.d.ts +8 -0
- package/dist/window-manager/internal/assets/svg-win-icons.d.ts.map +1 -0
- package/dist/window-manager/internal/features/cursor/cursor-move-listener.d.ts +2 -0
- package/dist/window-manager/internal/features/cursor/cursor-move-listener.d.ts.map +1 -0
- package/dist/window-manager/internal/features/cursor/cursor-state.d.ts +9 -0
- package/dist/window-manager/internal/features/cursor/cursor-state.d.ts.map +1 -0
- package/dist/window-manager/internal/features/docking/docking-api.d.ts +15 -0
- package/dist/window-manager/internal/features/docking/docking-api.d.ts.map +1 -0
- package/dist/window-manager/internal/features/docking/docking-controls.d.ts +2 -0
- package/dist/window-manager/internal/features/docking/docking-controls.d.ts.map +1 -0
- package/dist/window-manager/internal/features/drag/drag-handle.d.ts +6 -0
- package/dist/window-manager/internal/features/drag/drag-handle.d.ts.map +1 -0
- package/dist/window-manager/internal/features/grid/grid-api.d.ts +4 -0
- package/dist/window-manager/internal/features/grid/grid-api.d.ts.map +1 -0
- package/dist/window-manager/internal/features/resizing/resizing-api.d.ts +7 -0
- package/dist/window-manager/internal/features/resizing/resizing-api.d.ts.map +1 -0
- package/dist/window-manager/internal/features/resizing/resizing-controls.d.ts +6 -0
- package/dist/window-manager/internal/features/resizing/resizing-controls.d.ts.map +1 -0
- package/dist/window-manager/internal/features/stack/stack-api.d.ts +6 -0
- package/dist/window-manager/internal/features/stack/stack-api.d.ts.map +1 -0
- package/dist/window-manager/internal/features/view-port/view-port-resize-listener.d.ts +2 -0
- package/dist/window-manager/internal/features/view-port/view-port-resize-listener.d.ts.map +1 -0
- package/dist/window-manager/internal/features/window-button.d.ts +11 -0
- package/dist/window-manager/internal/features/window-button.d.ts.map +1 -0
- package/dist/window-manager/internal/features/window-layout.d.ts +17 -0
- package/dist/window-manager/internal/features/window-layout.d.ts.map +1 -0
- package/dist/window-manager/internal/features/workspace/workspace-api.d.ts +6 -0
- package/dist/window-manager/internal/features/workspace/workspace-api.d.ts.map +1 -0
- package/dist/window-manager/internal/features/workspace/workspace-state.d.ts +3 -0
- package/dist/window-manager/internal/features/workspace/workspace-state.d.ts.map +1 -0
- package/dist/window-manager/model/window-types.d.ts +46 -0
- package/dist/window-manager/model/window-types.d.ts.map +1 -0
- package/dist/window-manager/model/workspace-types.d.ts +20 -0
- package/dist/window-manager/model/workspace-types.d.ts.map +1 -0
- package/dist/window-manager/registration/window-store-factory.d.ts +14 -0
- package/dist/window-manager/registration/window-store-factory.d.ts.map +1 -0
- package/dist/window-manager/rwm.d.ts +33 -0
- package/dist/window-manager/rwm.d.ts.map +1 -0
- package/dist/window-manager/workspace-layout.d.ts +19 -0
- package/dist/window-manager/workspace-layout.d.ts.map +1 -0
- package/package.json +6 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
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>>>;
|
|
5
|
+
/**
|
|
6
|
+
* @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
|
+
* @return
|
|
8
|
+
* `store` zustand state store associated to this window instnace
|
|
9
|
+
* @return
|
|
10
|
+
* `window` JSX component representing an interactive window
|
|
11
|
+
* @return
|
|
12
|
+
* `button` JSX component that control this window */
|
|
13
|
+
export declare const createWindowStore: () => WindowRegistration;
|
|
14
|
+
//# sourceMappingURL=window-store-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-store-factory.d.ts","sourceRoot":"","sources":["../../../src/window-manager/registration/window-store-factory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEzD,OAAO,EAGL,kBAAkB,EAElB,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAQ9B,6EAA6E;AAC7E,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAM,CAAA;AAEtF;;;;;;;qDAOqD;AACrD,eAAO,MAAM,iBAAiB,QAAO,kBAkEpC,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const rwm: {
|
|
2
|
+
dockApi: {
|
|
3
|
+
dockWindowRight: (winId: string) => void;
|
|
4
|
+
dockWindowLeft: (winId: string) => void;
|
|
5
|
+
dockWindowTop: (winId: string) => void;
|
|
6
|
+
dockWindowBottom: (winId: string) => void;
|
|
7
|
+
dockWindowBottomRight: (winId: string) => void;
|
|
8
|
+
dockWindowTopRight: (winId: string) => void;
|
|
9
|
+
dockWindowBottomLeft: (winId: string) => void;
|
|
10
|
+
dockWindowTopLeft: (winId: string) => void;
|
|
11
|
+
maximizeWindow: (winId: string) => void;
|
|
12
|
+
demaximizeWindow: (winId: string) => void;
|
|
13
|
+
closeWindow: (winId: string) => void;
|
|
14
|
+
openWindow: (winId: string) => void;
|
|
15
|
+
};
|
|
16
|
+
resizeApi: {
|
|
17
|
+
stopAllDragAndResize: () => void;
|
|
18
|
+
setResizeAction: (winId: string, action: import("..").ResizeState) => void;
|
|
19
|
+
dispatchResizeAction: (winId: string) => void;
|
|
20
|
+
};
|
|
21
|
+
stackApi: {
|
|
22
|
+
bringTargetWindowToFront: (targetId: string) => void;
|
|
23
|
+
getOpenedWindowCount: () => number;
|
|
24
|
+
resetStack: () => void;
|
|
25
|
+
};
|
|
26
|
+
workspaceApi: {
|
|
27
|
+
getRect: () => import("..").WorkspaceRect;
|
|
28
|
+
isBelowBreakPoint: () => boolean;
|
|
29
|
+
};
|
|
30
|
+
worskpaceState: import("zustand").UseBoundStore<import("zustand").StoreApi<import("..").WorkspaceStore>>;
|
|
31
|
+
};
|
|
32
|
+
export default rwm;
|
|
33
|
+
//# sourceMappingURL=rwm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rwm.d.ts","sourceRoot":"","sources":["../../src/window-manager/rwm.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMR,CAAA;AAED,eAAe,GAAG,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ResponsiveSizes } from './model/workspace-types';
|
|
2
|
+
type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
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
|
+
};
|
|
17
|
+
export default function WorkspaceLayout({ children, className, responsiveBreak }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=workspace-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-layout.d.ts","sourceRoot":"","sources":["../../src/window-manager/workspace-layout.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;0DASsD;IACtD,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAsB,EAAE,EAAE,KAAK,2CA2B7F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gustavolmo/react-window-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.001",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,13 +36,16 @@
|
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsup",
|
|
39
|
-
"build:types": "tsc -p tsconfig.
|
|
39
|
+
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
|
|
40
40
|
"build:css": "tailwindcss -c tailwind.config.js -i ./src/index.css -o ./dist/index.css --minify",
|
|
41
|
-
"
|
|
41
|
+
"build:all": "pnpm run build && pnpm run build:types && pnpm run build:css",
|
|
42
|
+
|
|
42
43
|
"dev": "pnpm run dev:js & pnpm run dev:css",
|
|
43
44
|
"dev:js": "tsup --watch",
|
|
44
45
|
"dev:css": "tailwindcss -c tailwind.config.js -i ./src/index.css -o ./dist/index.css --watch",
|
|
45
46
|
"lint": "eslint src --ext .ts,.tsx",
|
|
47
|
+
|
|
48
|
+
"prepublishOnly": "pnpm run build:all",
|
|
46
49
|
"publish": "npm publish --access public"
|
|
47
50
|
}
|
|
48
51
|
}
|