@omnigrid/resize-plugin 0.1.3 → 0.1.4
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.d.ts +2 -22
- package/dist/types.d.ts +22 -0
- package/dist/types.js +1 -0
- package/package.json +39 -39
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
import type { GridApi, GridPlugin } from "@omnigrid/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
export interface ColumnResizeGuide {
|
|
6
|
-
/** ID of the column being resized. */
|
|
7
|
-
columnId: string;
|
|
8
|
-
/** Current pointer x-coordinate, in viewport pixels. */
|
|
9
|
-
x: number;
|
|
10
|
-
/** Whether the guide is currently visible. */
|
|
11
|
-
visible: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Configuration for the column resize plugin.
|
|
15
|
-
*/
|
|
16
|
-
export interface ColumnResizePluginOptions<T> {
|
|
17
|
-
/** Called with the column id and clamped width each time the width changes during a drag. */
|
|
18
|
-
onResize?: (columnId: string, width: number) => void;
|
|
19
|
-
/** Called when a drag begins, with the column id and its starting width. */
|
|
20
|
-
onResizeStart?: (columnId: string, width: number) => void;
|
|
21
|
-
/** Called when a drag completes, with the column id and its final width. */
|
|
22
|
-
onResizeEnd?: (columnId: string, width: number) => void;
|
|
23
|
-
}
|
|
2
|
+
import type { ColumnResizeGuide, ColumnResizePluginOptions } from "./types";
|
|
3
|
+
export type { ColumnResizeGuide, ColumnResizePluginOptions } from "./types";
|
|
24
4
|
/**
|
|
25
5
|
* Headless column-resize controller.
|
|
26
6
|
*
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live drag-guide state for the currently resizing column.
|
|
3
|
+
*/
|
|
4
|
+
export interface ColumnResizeGuide {
|
|
5
|
+
/** ID of the column being resized. */
|
|
6
|
+
columnId: string;
|
|
7
|
+
/** Current pointer x-coordinate, in viewport pixels. */
|
|
8
|
+
x: number;
|
|
9
|
+
/** Whether the guide is currently visible. */
|
|
10
|
+
visible: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for the column resize plugin.
|
|
14
|
+
*/
|
|
15
|
+
export interface ColumnResizePluginOptions<T> {
|
|
16
|
+
/** Called with the column id and clamped width each time the width changes during a drag. */
|
|
17
|
+
onResize?: (columnId: string, width: number) => void;
|
|
18
|
+
/** Called when a drag begins, with the column id and its starting width. */
|
|
19
|
+
onResizeStart?: (columnId: string, width: number) => void;
|
|
20
|
+
/** Called when a drag completes, with the column id and its final width. */
|
|
21
|
+
onResizeEnd?: (columnId: string, width: number) => void;
|
|
22
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
"name": "@omnigrid/resize-plugin",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Headless column resize plugin for OmniGrid",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"omnigrid",
|
|
7
|
+
"grid",
|
|
8
|
+
"resize",
|
|
9
|
+
"plugin"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/KRZK-Apps/omnigrid.git",
|
|
14
|
+
"directory": "plugins/base/resize"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/KRZK-Apps/omnigrid/tree/main/plugins/base/resize#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/KRZK-Apps/omnigrid/issues"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "dist/index.js",
|
|
23
|
+
"types": "dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "npx tsc -p tsconfig.json",
|
|
35
|
+
"lint": "npx tsc --noEmit -p tsconfig.json",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"prepublishOnly": "npm run build"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@omnigrid/core": "^0.1.0"
|
|
28
41
|
}
|
|
29
|
-
},
|
|
30
|
-
"files": [
|
|
31
|
-
"dist"
|
|
32
|
-
],
|
|
33
|
-
"scripts": {
|
|
34
|
-
"build": "npx tsc -p tsconfig.json",
|
|
35
|
-
"lint": "npx tsc --noEmit -p tsconfig.json",
|
|
36
|
-
"test": "vitest run",
|
|
37
|
-
"prepublishOnly": "npm run build"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"@omnigrid/core": "^0.1.0"
|
|
41
|
-
}
|
|
42
42
|
}
|