@omnigrid/resize-plugin 0.0.0-stage → 0.1.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.d.ts +75 -0
- package/dist/index.js +330 -0
- package/package.json +42 -6
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { GridApi, GridPlugin } from "@omnigrid/core";
|
|
2
|
+
export interface ColumnResizeGuide {
|
|
3
|
+
columnId: string;
|
|
4
|
+
x: number;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ColumnResizePluginOptions<T> {
|
|
8
|
+
onResize?: (columnId: string, width: number) => void;
|
|
9
|
+
onResizeStart?: (columnId: string, width: number) => void;
|
|
10
|
+
onResizeEnd?: (columnId: string, width: number) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Headless column-resize controller.
|
|
14
|
+
*
|
|
15
|
+
* The plugin owns the resizing state and writes the next width back into the
|
|
16
|
+
* Grid state store via `api.setColumns()`. Adapter code can wire the actual DOM
|
|
17
|
+
* handle and pointer events to the plugin methods without needing to know the
|
|
18
|
+
* internal column hierarchy.
|
|
19
|
+
*/
|
|
20
|
+
export declare class ColumnResizePlugin<T> implements GridPlugin<T> {
|
|
21
|
+
readonly name = "@omnigrid/column-resize-plugin";
|
|
22
|
+
private api?;
|
|
23
|
+
private activeResize?;
|
|
24
|
+
private guide;
|
|
25
|
+
private readonly onResize?;
|
|
26
|
+
private readonly onResizeStart?;
|
|
27
|
+
private readonly onResizeEnd?;
|
|
28
|
+
constructor(options?: ColumnResizePluginOptions<T>);
|
|
29
|
+
register(api: GridApi<T>): () => void;
|
|
30
|
+
/** Returns the current width of a leaf column. */
|
|
31
|
+
getColumnWidth(columnId: string): number | undefined;
|
|
32
|
+
private canResizeColumn;
|
|
33
|
+
/** Alias for `getColumnWidth`. */
|
|
34
|
+
getWidth(columnId: string): number | undefined;
|
|
35
|
+
/** Sets a column width and clamps it to the configured min/max constraints. */
|
|
36
|
+
setColumnWidth(columnId: string, width: number): number;
|
|
37
|
+
/** Alias for `setColumnWidth`. */
|
|
38
|
+
setWidth(columnId: string, width: number): number;
|
|
39
|
+
/** Changes the width by a delta in pixels. */
|
|
40
|
+
resizeColumn(columnId: string, delta: number): number;
|
|
41
|
+
/** Alias for `resizeColumn`. */
|
|
42
|
+
resize(columnId: string, delta: number): number;
|
|
43
|
+
/** Starts an interactive resize using the pointer x-coordinate. */
|
|
44
|
+
beginResize(columnId: string, clientX: number): number;
|
|
45
|
+
/** Adapter-friendly alias for pointer-down events. */
|
|
46
|
+
handlePointerDown(columnId: string, clientX: number): number;
|
|
47
|
+
/** Updates the current resize using the new pointer x-coordinate. */
|
|
48
|
+
resizeTo(clientX: number): number;
|
|
49
|
+
/** Adapter-friendly alias for pointer-move events. */
|
|
50
|
+
handlePointerMove(clientX: number): number;
|
|
51
|
+
/** Updates the current resize using an already-calculated delta. */
|
|
52
|
+
resizeBy(delta: number): number;
|
|
53
|
+
/** Completes the active pointer drag and hides the resize guide. */
|
|
54
|
+
endResize(): number;
|
|
55
|
+
/** Adapter-friendly alias for double-click auto-fit. */
|
|
56
|
+
handleDoubleClick(columnId: string): number;
|
|
57
|
+
/** Calculates the best-fit width from header text and visible row content. */
|
|
58
|
+
autoSizeColumn(columnId: string): number;
|
|
59
|
+
/** Alias for `autoSizeColumn`. */
|
|
60
|
+
autoFitColumn(columnId: string): number;
|
|
61
|
+
/** Returns the current drag guide state for integrations. */
|
|
62
|
+
getResizeGuide(): ColumnResizeGuide;
|
|
63
|
+
/** Resets the current drag guide state. */
|
|
64
|
+
clearGuide(): void;
|
|
65
|
+
private attachResizeHandles;
|
|
66
|
+
private createResizeHandleNode;
|
|
67
|
+
private bindPointerHandlers;
|
|
68
|
+
private findLeafColumn;
|
|
69
|
+
private clampWidth;
|
|
70
|
+
private withFixedWidth;
|
|
71
|
+
private resolveCellValue;
|
|
72
|
+
private updateColumns;
|
|
73
|
+
}
|
|
74
|
+
export declare const ResizePlugin: typeof ColumnResizePlugin;
|
|
75
|
+
export type ResizePluginOptions<T> = ColumnResizePluginOptions<T>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { flattenColumns, isColumnGroup } from "@omnigrid/core";
|
|
2
|
+
/**
|
|
3
|
+
* Headless column-resize controller.
|
|
4
|
+
*
|
|
5
|
+
* The plugin owns the resizing state and writes the next width back into the
|
|
6
|
+
* Grid state store via `api.setColumns()`. Adapter code can wire the actual DOM
|
|
7
|
+
* handle and pointer events to the plugin methods without needing to know the
|
|
8
|
+
* internal column hierarchy.
|
|
9
|
+
*/
|
|
10
|
+
export class ColumnResizePlugin {
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.name = "@omnigrid/column-resize-plugin";
|
|
13
|
+
this.guide = { columnId: "", x: 0, visible: false };
|
|
14
|
+
this.onResize = options.onResize;
|
|
15
|
+
this.onResizeStart = options.onResizeStart;
|
|
16
|
+
this.onResizeEnd = options.onResizeEnd;
|
|
17
|
+
}
|
|
18
|
+
register(api) {
|
|
19
|
+
this.api = api;
|
|
20
|
+
this.api.setColumns(this.attachResizeHandles(this.api.getState().columns));
|
|
21
|
+
const unregisterPointerHandlers = this.bindPointerHandlers();
|
|
22
|
+
return () => {
|
|
23
|
+
unregisterPointerHandlers();
|
|
24
|
+
this.clearGuide();
|
|
25
|
+
this.activeResize = undefined;
|
|
26
|
+
this.api = undefined;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** Returns the current width of a leaf column. */
|
|
30
|
+
getColumnWidth(columnId) {
|
|
31
|
+
const column = this.findLeafColumn(columnId);
|
|
32
|
+
if (!column)
|
|
33
|
+
return undefined;
|
|
34
|
+
if (column.width !== undefined)
|
|
35
|
+
return column.width;
|
|
36
|
+
if (this.api)
|
|
37
|
+
return this.api.getColumnWidth(columnId) ?? column.minWidth ?? 40;
|
|
38
|
+
return 120;
|
|
39
|
+
}
|
|
40
|
+
canResizeColumn(column) {
|
|
41
|
+
return !!column && column.resizable !== false;
|
|
42
|
+
}
|
|
43
|
+
/** Alias for `getColumnWidth`. */
|
|
44
|
+
getWidth(columnId) {
|
|
45
|
+
return this.getColumnWidth(columnId);
|
|
46
|
+
}
|
|
47
|
+
/** Sets a column width and clamps it to the configured min/max constraints. */
|
|
48
|
+
setColumnWidth(columnId, width) {
|
|
49
|
+
if (!this.api)
|
|
50
|
+
return width;
|
|
51
|
+
const column = this.findLeafColumn(columnId);
|
|
52
|
+
if (!column || !this.canResizeColumn(column))
|
|
53
|
+
return this.getColumnWidth(columnId) ?? width;
|
|
54
|
+
const nextWidth = this.clampWidth(column, width);
|
|
55
|
+
const columns = this.api.getState().columns;
|
|
56
|
+
const fixedFlexWidths = new Map();
|
|
57
|
+
if (!column.pinned) {
|
|
58
|
+
const visibleScrollable = flattenColumns(columns).filter((leaf) => !leaf.hidden && !leaf.pinned);
|
|
59
|
+
const targetIndex = visibleScrollable.findIndex((leaf) => leaf.id === columnId);
|
|
60
|
+
for (const leaf of targetIndex > 0 ? visibleScrollable.slice(0, targetIndex) : []) {
|
|
61
|
+
if (leaf.flex && leaf.flex > 0 && leaf.width === undefined) {
|
|
62
|
+
const currentWidth = this.api.getColumnWidth(leaf.id);
|
|
63
|
+
if (currentWidth !== undefined)
|
|
64
|
+
fixedFlexWidths.set(leaf.id, currentWidth);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const updated = this.updateColumns(columns, (leaf) => {
|
|
69
|
+
if (leaf.id === columnId) {
|
|
70
|
+
return leaf.flex && leaf.flex > 0 && leaf.width === undefined
|
|
71
|
+
? this.withFixedWidth(leaf, nextWidth)
|
|
72
|
+
: { ...leaf, width: nextWidth };
|
|
73
|
+
}
|
|
74
|
+
const fixedWidth = fixedFlexWidths.get(leaf.id);
|
|
75
|
+
return fixedWidth === undefined ? leaf : this.withFixedWidth(leaf, fixedWidth);
|
|
76
|
+
});
|
|
77
|
+
this.api.setColumns(updated);
|
|
78
|
+
this.onResize?.(columnId, nextWidth);
|
|
79
|
+
return nextWidth;
|
|
80
|
+
}
|
|
81
|
+
/** Alias for `setColumnWidth`. */
|
|
82
|
+
setWidth(columnId, width) {
|
|
83
|
+
return this.setColumnWidth(columnId, width);
|
|
84
|
+
}
|
|
85
|
+
/** Changes the width by a delta in pixels. */
|
|
86
|
+
resizeColumn(columnId, delta) {
|
|
87
|
+
const current = this.getColumnWidth(columnId);
|
|
88
|
+
if (current === undefined)
|
|
89
|
+
return delta;
|
|
90
|
+
return this.setColumnWidth(columnId, current + delta);
|
|
91
|
+
}
|
|
92
|
+
/** Alias for `resizeColumn`. */
|
|
93
|
+
resize(columnId, delta) {
|
|
94
|
+
return this.resizeColumn(columnId, delta);
|
|
95
|
+
}
|
|
96
|
+
/** Starts an interactive resize using the pointer x-coordinate. */
|
|
97
|
+
beginResize(columnId, clientX) {
|
|
98
|
+
const column = this.findLeafColumn(columnId);
|
|
99
|
+
if (!this.canResizeColumn(column))
|
|
100
|
+
return this.getColumnWidth(columnId) ?? 0;
|
|
101
|
+
const currentWidth = this.getColumnWidth(columnId);
|
|
102
|
+
if (currentWidth === undefined)
|
|
103
|
+
return 0;
|
|
104
|
+
this.activeResize = {
|
|
105
|
+
columnId,
|
|
106
|
+
startX: clientX,
|
|
107
|
+
startWidth: currentWidth,
|
|
108
|
+
direction: column?.pinned === "right" ? -1 : 1,
|
|
109
|
+
};
|
|
110
|
+
this.guide = { columnId, x: clientX, visible: true };
|
|
111
|
+
this.onResizeStart?.(columnId, currentWidth);
|
|
112
|
+
return currentWidth;
|
|
113
|
+
}
|
|
114
|
+
/** Adapter-friendly alias for pointer-down events. */
|
|
115
|
+
handlePointerDown(columnId, clientX) {
|
|
116
|
+
return this.beginResize(columnId, clientX);
|
|
117
|
+
}
|
|
118
|
+
/** Updates the current resize using the new pointer x-coordinate. */
|
|
119
|
+
resizeTo(clientX) {
|
|
120
|
+
const active = this.activeResize;
|
|
121
|
+
if (!active)
|
|
122
|
+
return 0;
|
|
123
|
+
const delta = (clientX - active.startX) * active.direction;
|
|
124
|
+
this.guide = { columnId: active.columnId, x: clientX, visible: true };
|
|
125
|
+
return this.resizeBy(delta);
|
|
126
|
+
}
|
|
127
|
+
/** Adapter-friendly alias for pointer-move events. */
|
|
128
|
+
handlePointerMove(clientX) {
|
|
129
|
+
return this.resizeTo(clientX);
|
|
130
|
+
}
|
|
131
|
+
/** Updates the current resize using an already-calculated delta. */
|
|
132
|
+
resizeBy(delta) {
|
|
133
|
+
if (!this.activeResize)
|
|
134
|
+
return 0;
|
|
135
|
+
const { columnId, startWidth } = this.activeResize;
|
|
136
|
+
const nextWidth = this.setColumnWidth(columnId, startWidth + delta);
|
|
137
|
+
this.guide = { columnId, x: this.guide.x, visible: true };
|
|
138
|
+
return nextWidth;
|
|
139
|
+
}
|
|
140
|
+
/** Completes the active pointer drag and hides the resize guide. */
|
|
141
|
+
endResize() {
|
|
142
|
+
const active = this.activeResize;
|
|
143
|
+
if (!active)
|
|
144
|
+
return 0;
|
|
145
|
+
const width = this.getColumnWidth(active.columnId) ?? active.startWidth;
|
|
146
|
+
this.onResizeEnd?.(active.columnId, width);
|
|
147
|
+
this.clearGuide();
|
|
148
|
+
this.activeResize = undefined;
|
|
149
|
+
return width;
|
|
150
|
+
}
|
|
151
|
+
/** Adapter-friendly alias for double-click auto-fit. */
|
|
152
|
+
handleDoubleClick(columnId) {
|
|
153
|
+
return this.autoSizeColumn(columnId);
|
|
154
|
+
}
|
|
155
|
+
/** Calculates the best-fit width from header text and visible row content. */
|
|
156
|
+
autoSizeColumn(columnId) {
|
|
157
|
+
const column = this.findLeafColumn(columnId);
|
|
158
|
+
if (!column || !this.canResizeColumn(column) || !this.api)
|
|
159
|
+
return this.getColumnWidth(columnId) ?? 0;
|
|
160
|
+
const data = this.api.getProcessedData();
|
|
161
|
+
const headerLength = String(column.header ?? "").length;
|
|
162
|
+
const rowValues = data
|
|
163
|
+
.map((row) => this.resolveCellValue(row, column))
|
|
164
|
+
.filter((value) => value !== undefined)
|
|
165
|
+
.map((value) => String(value).length);
|
|
166
|
+
const maxLength = Math.max(headerLength, ...rowValues, 0);
|
|
167
|
+
const estimatedWidth = Math.round(maxLength * 8 + 24);
|
|
168
|
+
const minimum = column.minWidth ?? 0;
|
|
169
|
+
const maximum = column.maxWidth ?? Number.POSITIVE_INFINITY;
|
|
170
|
+
return this.setColumnWidth(columnId, Math.min(Math.max(estimatedWidth, minimum), maximum));
|
|
171
|
+
}
|
|
172
|
+
/** Alias for `autoSizeColumn`. */
|
|
173
|
+
autoFitColumn(columnId) {
|
|
174
|
+
return this.autoSizeColumn(columnId);
|
|
175
|
+
}
|
|
176
|
+
/** Returns the current drag guide state for integrations. */
|
|
177
|
+
getResizeGuide() {
|
|
178
|
+
return { ...this.guide };
|
|
179
|
+
}
|
|
180
|
+
/** Resets the current drag guide state. */
|
|
181
|
+
clearGuide() {
|
|
182
|
+
this.guide = { columnId: "", x: 0, visible: false };
|
|
183
|
+
}
|
|
184
|
+
attachResizeHandles(columns) {
|
|
185
|
+
return columns.map((column) => {
|
|
186
|
+
if (isColumnGroup(column)) {
|
|
187
|
+
return { ...column, children: this.attachResizeHandles(column.children) };
|
|
188
|
+
}
|
|
189
|
+
if (column.resizable === false) {
|
|
190
|
+
return column;
|
|
191
|
+
}
|
|
192
|
+
const originalHeaderRenderer = column.headerRenderer;
|
|
193
|
+
return {
|
|
194
|
+
...column,
|
|
195
|
+
headerRenderer: (headerColumn) => {
|
|
196
|
+
const resolvedHeader = originalHeaderRenderer ? originalHeaderRenderer(headerColumn) : headerColumn.header ?? headerColumn.id;
|
|
197
|
+
return this.createResizeHandleNode(headerColumn, resolvedHeader);
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
createResizeHandleNode(column, content) {
|
|
203
|
+
const handleClass = column.pinned === "right"
|
|
204
|
+
? "omnigrid-column-resize-handle omnigrid-column-resize-handle-left"
|
|
205
|
+
: "omnigrid-column-resize-handle";
|
|
206
|
+
const contentStyle = column.pinned === "right"
|
|
207
|
+
? "position:relative; display:flex; align-items:center; width:calc(100% + 12px); margin-left:-12px; padding-left:12px; min-width:0;"
|
|
208
|
+
: "position:relative; display:flex; align-items:center; width:calc(100% + 12px); margin-right:-12px; min-width:0;";
|
|
209
|
+
const sortIndicator = column.sortState && this.api
|
|
210
|
+
? {
|
|
211
|
+
type: "node",
|
|
212
|
+
tag: "span",
|
|
213
|
+
attrs: { class: "omnigrid-sort-indicator", "aria-hidden": true },
|
|
214
|
+
children: [
|
|
215
|
+
this.api.icons.get(column.sortState === "asc" ? "arrow-up" : "arrow-down"),
|
|
216
|
+
...(column.sortIndex !== undefined
|
|
217
|
+
? [
|
|
218
|
+
{
|
|
219
|
+
type: "node",
|
|
220
|
+
tag: "span",
|
|
221
|
+
attrs: { class: "omnigrid-sort-priority" },
|
|
222
|
+
children: [String(column.sortIndex)],
|
|
223
|
+
},
|
|
224
|
+
]
|
|
225
|
+
: []),
|
|
226
|
+
],
|
|
227
|
+
}
|
|
228
|
+
: undefined;
|
|
229
|
+
return {
|
|
230
|
+
type: "node",
|
|
231
|
+
tag: "span",
|
|
232
|
+
attrs: {
|
|
233
|
+
class: "omnigrid-header-content",
|
|
234
|
+
style: contentStyle,
|
|
235
|
+
},
|
|
236
|
+
children: [
|
|
237
|
+
{
|
|
238
|
+
type: "node",
|
|
239
|
+
tag: "span",
|
|
240
|
+
attrs: { class: "omnigrid-header-label", style: "overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" },
|
|
241
|
+
children: [content],
|
|
242
|
+
},
|
|
243
|
+
...(sortIndicator
|
|
244
|
+
? [
|
|
245
|
+
{
|
|
246
|
+
type: "node",
|
|
247
|
+
tag: "span",
|
|
248
|
+
attrs: { class: "omnigrid-header-tools" },
|
|
249
|
+
children: [sortIndicator],
|
|
250
|
+
},
|
|
251
|
+
]
|
|
252
|
+
: []),
|
|
253
|
+
{
|
|
254
|
+
type: "node",
|
|
255
|
+
tag: "span",
|
|
256
|
+
attrs: {
|
|
257
|
+
class: handleClass,
|
|
258
|
+
"aria-hidden": true,
|
|
259
|
+
title: "Resize column",
|
|
260
|
+
},
|
|
261
|
+
on: {
|
|
262
|
+
pointerdown: (_context, event) => {
|
|
263
|
+
if (typeof event.clientX === "number") {
|
|
264
|
+
this.beginResize(column.id, event.clientX);
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
dblclick: (_context) => {
|
|
268
|
+
this.autoSizeColumn(column.id);
|
|
269
|
+
},
|
|
270
|
+
click: () => undefined,
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
bindPointerHandlers() {
|
|
277
|
+
if (typeof document === "undefined") {
|
|
278
|
+
return () => undefined;
|
|
279
|
+
}
|
|
280
|
+
const handlePointerMove = (event) => {
|
|
281
|
+
if (!this.activeResize)
|
|
282
|
+
return;
|
|
283
|
+
this.resizeTo(event.clientX);
|
|
284
|
+
};
|
|
285
|
+
const handlePointerUp = () => {
|
|
286
|
+
if (!this.activeResize)
|
|
287
|
+
return;
|
|
288
|
+
this.endResize();
|
|
289
|
+
};
|
|
290
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
291
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
292
|
+
document.addEventListener("pointercancel", handlePointerUp);
|
|
293
|
+
return () => {
|
|
294
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
295
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
296
|
+
document.removeEventListener("pointercancel", handlePointerUp);
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
findLeafColumn(columnId) {
|
|
300
|
+
if (!this.api)
|
|
301
|
+
return undefined;
|
|
302
|
+
return flattenColumns(this.api.getState().columns).find((column) => column.id === columnId);
|
|
303
|
+
}
|
|
304
|
+
clampWidth(column, width) {
|
|
305
|
+
const minimum = column.minWidth ?? 0;
|
|
306
|
+
const maximum = column.maxWidth ?? Number.POSITIVE_INFINITY;
|
|
307
|
+
return Math.min(Math.max(width, minimum), maximum);
|
|
308
|
+
}
|
|
309
|
+
withFixedWidth(column, width) {
|
|
310
|
+
const fixedColumn = { ...column, width };
|
|
311
|
+
delete fixedColumn.flex;
|
|
312
|
+
return fixedColumn;
|
|
313
|
+
}
|
|
314
|
+
resolveCellValue(row, column) {
|
|
315
|
+
if (column.valueGetter)
|
|
316
|
+
return column.valueGetter(row);
|
|
317
|
+
if (!column.field)
|
|
318
|
+
return undefined;
|
|
319
|
+
return row[String(column.field)];
|
|
320
|
+
}
|
|
321
|
+
updateColumns(columns, updater) {
|
|
322
|
+
return columns.map((column) => {
|
|
323
|
+
if (isColumnGroup(column)) {
|
|
324
|
+
return { ...column, children: this.updateColumns(column.children, updater) };
|
|
325
|
+
}
|
|
326
|
+
return updater(column);
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
export const ResizePlugin = ColumnResizePlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@omnigrid/resize-plugin",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@omnigrid/resize-plugin",
|
|
3
|
+
"version": "0.1.1",
|
|
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"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/README.md
DELETED