@alekstar79/draggable-resizable-container 1.0.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/LICENSE +21 -0
- package/README.md +265 -0
- package/dist/LICENSE +21 -0
- package/dist/README.md +265 -0
- package/dist/core/ContainerManager.d.ts +298 -0
- package/dist/core/types.d.ts +130 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.es.js +970 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +9 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/package.json +89 -0
- package/dist/plugins/EdgeDockingPlugin.d.ts +112 -0
- package/dist/plugins/LoggingPlugin.d.ts +53 -0
- package/dist/plugins/SnappingPlugin.d.ts +70 -0
- package/dist/plugins/StatePersistencePlugin.d.ts +159 -0
- package/dist/plugins/index.d.ts +7 -0
- package/dist/utils/BoundaryTracker.d.ts +155 -0
- package/dist/utils/ContainerInitializer.d.ts +9 -0
- package/dist/utils/ContentCreator.d.ts +22 -0
- package/dist/utils/Notifications.d.ts +29 -0
- package/dist/utils/StatsManager.d.ts +51 -0
- package/dist/utils/TemplateLoader.d.ts +24 -0
- package/dist/utils/helpers.d.ts +31 -0
- package/dist/utils/index.d.ts +13 -0
- package/package.json +89 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface StateInterface {
|
|
2
|
+
zIndex(uid: string): string;
|
|
3
|
+
push(uid: string): this;
|
|
4
|
+
remove(uid: string): this;
|
|
5
|
+
sort(uid: string): this;
|
|
6
|
+
}
|
|
7
|
+
export declare class State implements StateInterface {
|
|
8
|
+
static inatance: StateInterface;
|
|
9
|
+
static highestZIndex: number;
|
|
10
|
+
static init: () => StateInterface;
|
|
11
|
+
private draggable;
|
|
12
|
+
zIndex(uid: string): string;
|
|
13
|
+
push(uid: string): this;
|
|
14
|
+
remove(uid: string): this;
|
|
15
|
+
sort(uid: string): this;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Check if element is within viewport boundaries
|
|
19
|
+
*/
|
|
20
|
+
export declare function isInViewport(element: HTMLElement): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Get viewport dimensions
|
|
23
|
+
*/
|
|
24
|
+
export declare function getViewportDimensions(): {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @returns {State} - Класс вычисляющий z-index позиции контейнеров
|
|
30
|
+
*/
|
|
31
|
+
export declare function getState(): StateInterface;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility exports for Container Manager library
|
|
3
|
+
*/
|
|
4
|
+
export { NotificationSystem, defaultNotificationSystem } from './Notifications';
|
|
5
|
+
export { ContainerInitializer } from './ContainerInitializer';
|
|
6
|
+
export { ContentCreator } from './ContentCreator';
|
|
7
|
+
export { StatsManager } from './StatsManager';
|
|
8
|
+
export type { LoaderMetrics, TemplateConfig, TemplateSource } from './TemplateLoader';
|
|
9
|
+
export { TemplateCache, TemplateLoader, TemplateRegistry, createDemoLoader, createLibraryLoader, getTemplateLoader, initializeTemplateSystem } from './TemplateLoader';
|
|
10
|
+
export type { IBoundaryTracker, IEdgeController, Edge, Event, EdgeZoneInfo, SourceEdgeInfo } from './BoundaryTracker';
|
|
11
|
+
export { EventEmitter, InternalBoundaryTracker, EdgeController, createTracker } from './BoundaryTracker';
|
|
12
|
+
export type { StateInterface } from './helpers';
|
|
13
|
+
export { getViewportDimensions, isInViewport, getState } from './helpers';
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alekstar79/draggable-resizable-container",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A modern TypeScript library for managing draggable and resizable containers",
|
|
5
|
+
"author": "Aleksey Tarasenko <alekstar79@yandex.ru>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"main": "dist/index.esm.js",
|
|
10
|
+
"module": "dist/index.esm.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"require": "./dist/index.umd.js",
|
|
15
|
+
"import": "./dist/index.esm.js"
|
|
16
|
+
},
|
|
17
|
+
"./plugins": {
|
|
18
|
+
"types": "./dist/plugins/index.d.ts",
|
|
19
|
+
"require": "./dist/plugins/index.umd.js",
|
|
20
|
+
"import": "./dist/plugins/index.esm.js"
|
|
21
|
+
},
|
|
22
|
+
"./styles": {
|
|
23
|
+
"import": "./dist/styles/base.css",
|
|
24
|
+
"require": "./dist/styles/base.css"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"dev": "vite",
|
|
34
|
+
"build": "yarn build:lib && vite build --config vite.config.ts",
|
|
35
|
+
"build:lib": "vite build --config vite.lib.config.ts",
|
|
36
|
+
"test": "vitest",
|
|
37
|
+
"test:run": "vitest run",
|
|
38
|
+
"test:ui": "vitest --ui",
|
|
39
|
+
"coverage": "vitest run --coverage",
|
|
40
|
+
"type-check": "tsc --noEmit",
|
|
41
|
+
"preview": "vite preview",
|
|
42
|
+
"prepublishOnly": "yarn build:lib"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"reactive",
|
|
46
|
+
"edge-docking",
|
|
47
|
+
"draggable",
|
|
48
|
+
"resizable",
|
|
49
|
+
"container",
|
|
50
|
+
"typescript",
|
|
51
|
+
"plugin-system"
|
|
52
|
+
],
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/alekstar79/draggable-resizable-container.git"
|
|
56
|
+
},
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/alekstar79/draggable-resizable-container/issues"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/alekstar79/draggable-resizable-container#readme",
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/node": "^24.10.0",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
64
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
65
|
+
"@vitest/coverage-v8": "^4.0.13",
|
|
66
|
+
"@vitest/ui": "^4.0.13",
|
|
67
|
+
"eslint": "^9.39.1",
|
|
68
|
+
"jsdom": "^27.2.0",
|
|
69
|
+
"typescript": "^5.3.3",
|
|
70
|
+
"vite": "^5.0.8",
|
|
71
|
+
"vite-plugin-dts": "^3.6.4",
|
|
72
|
+
"vite-plugin-generate-file": "^0.3.1",
|
|
73
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
74
|
+
"vite-plugin-static-copy": "^3.1.4",
|
|
75
|
+
"vitest": "^4.0.13"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@alekstar79/reactive-event-system": "^1.0.1",
|
|
79
|
+
"@alekstar79/template-loader": "^1.0.2",
|
|
80
|
+
"@alekstar79/utility": "^1.1.5"
|
|
81
|
+
},
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"access": "public"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=20.0.0",
|
|
87
|
+
"npm": ">=10.0.0"
|
|
88
|
+
}
|
|
89
|
+
}
|