@dxos/lit-grid 0.8.2-main.f11618f → 0.8.2-main.fbd8ed0

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/src/types.ts CHANGED
@@ -153,16 +153,18 @@ export class DxAxisResizeInternal extends Event {
153
153
  }
154
154
  }
155
155
 
156
- export type DxEditRequestProps = Pick<DxEditRequest, 'cellIndex' | 'cellBox' | 'initialContent'>;
156
+ export type DxEditRequestProps = Pick<DxEditRequest, 'cellIndex' | 'cellBox' | 'cellElement' | 'initialContent'>;
157
157
 
158
158
  export class DxEditRequest extends Event {
159
159
  public readonly cellIndex: DxGridCellIndex;
160
160
  public readonly cellBox: Record<'insetInlineStart' | 'insetBlockStart' | 'inlineSize' | 'blockSize', number>;
161
+ public readonly cellElement: HTMLElement | null;
161
162
  public readonly initialContent?: string;
162
163
  constructor(props: DxEditRequestProps) {
163
164
  super('dx-edit-request');
164
165
  this.cellIndex = props.cellIndex;
165
166
  this.cellBox = props.cellBox;
167
+ this.cellElement = props.cellElement;
166
168
  this.initialContent = props.initialContent;
167
169
  }
168
170
  }
package/src/util.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { defaultSizeRow } from './defs';
5
+ import { defaultRowSize } from './defs';
6
6
  import {
7
7
  type DxGridPlaneCellIndex,
8
8
  type DxGridCellIndex,
@@ -16,8 +16,8 @@ import {
16
16
  type DxGridFrozenPlane,
17
17
  type DxGridAxis,
18
18
  type DxGridPlanePosition,
19
- separator,
20
19
  type DxGridReadonlyValue,
20
+ separator,
21
21
  } from './types';
22
22
 
23
23
  export const toPlaneCellIndex = (cellCoords: Partial<DxGridPosition> & DxGridPlanePosition): DxGridPlaneCellIndex =>
@@ -80,9 +80,9 @@ export const selectTolerance = 4;
80
80
  //
81
81
  // `size`, when suffixed with ‘row’ or ‘col’, are limits on size applied when resizing
82
82
  //
83
- export const sizeColMin = defaultSizeRow;
83
+ export const sizeColMin = defaultRowSize;
84
84
  export const sizeColMax = 1024;
85
- export const sizeRowMin = defaultSizeRow;
85
+ export const sizeRowMin = defaultRowSize;
86
86
  export const sizeRowMax = 1024;
87
87
 
88
88
  export const shouldSelect = (pointer: DxGridPointer, { pageX, pageY }: PointerEvent) => {