@dxos/react-ui-grid 0.8.4-main.5acf9ea → 0.8.4-main.5ea62a8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-grid",
3
- "version": "0.8.4-main.5acf9ea",
3
+ "version": "0.8.4-main.5ea62a8",
4
4
  "description": "React component which manages a `dx-grid` Lit web component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,9 +10,9 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
- "browser": "./dist/lib/browser/index.mjs",
15
- "source": "./src/index.ts"
15
+ "browser": "./dist/lib/browser/index.mjs"
16
16
  }
17
17
  },
18
18
  "types": "dist/types/src/index.d.ts",
@@ -32,27 +32,27 @@
32
32
  "@radix-ui/react-context": "1.1.1",
33
33
  "@radix-ui/react-popper": "1.2.2",
34
34
  "@radix-ui/react-use-controllable-state": "1.1.0",
35
- "@dxos/lit-grid": "0.8.4-main.5acf9ea",
36
- "@dxos/react-ui-editor": "0.8.4-main.5acf9ea",
37
- "@dxos/util": "0.8.4-main.5acf9ea"
35
+ "@dxos/lit-grid": "0.8.4-main.5ea62a8",
36
+ "@dxos/react-ui-editor": "0.8.4-main.5ea62a8",
37
+ "@dxos/util": "0.8.4-main.5ea62a8"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/react": "~18.2.0",
41
41
  "@types/react-dom": "~18.2.0",
42
42
  "react": "~18.2.0",
43
43
  "react-dom": "~18.2.0",
44
- "vite": "5.4.7",
45
- "@dxos/random": "0.8.4-main.5acf9ea",
46
- "@dxos/react-ui-theme": "0.8.4-main.5acf9ea",
47
- "@dxos/react-ui": "0.8.4-main.5acf9ea",
48
- "@dxos/react-ui-searchlist": "0.8.4-main.5acf9ea",
49
- "@dxos/storybook-utils": "0.8.4-main.5acf9ea"
44
+ "vite": "7.1.1",
45
+ "@dxos/random": "0.8.4-main.5ea62a8",
46
+ "@dxos/react-ui-theme": "0.8.4-main.5ea62a8",
47
+ "@dxos/storybook-utils": "0.8.4-main.5ea62a8",
48
+ "@dxos/react-ui": "0.8.4-main.5ea62a8",
49
+ "@dxos/react-ui-searchlist": "0.8.4-main.5ea62a8"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": "~18.2.0",
53
53
  "react-dom": "~18.2.0",
54
- "@dxos/react-ui": "0.8.4-main.5acf9ea",
55
- "@dxos/react-ui-theme": "0.8.4-main.5acf9ea"
54
+ "@dxos/react-ui": "0.8.4-main.5ea62a8",
55
+ "@dxos/react-ui-theme": "0.8.4-main.5ea62a8"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public"
@@ -11,8 +11,8 @@ import { withTheme } from '@dxos/storybook-utils';
11
11
 
12
12
  import { CellEditor, type CellEditorProps, type EditorKeyEvent, editorKeys } from './CellEditor';
13
13
 
14
- const DefaultStory = (args: CellEditorProps) => {
15
- const [value, setValue] = useState(args.value || 'Edit me');
14
+ const DefaultStory = (props: CellEditorProps) => {
15
+ const [value, setValue] = useState(props.value || 'Edit me');
16
16
  const [lastAction, setLastAction] = useState<string>('');
17
17
 
18
18
  const handleBlur = (newValue?: string) => {
@@ -32,7 +32,7 @@ const DefaultStory = (args: CellEditorProps) => {
32
32
  };
33
33
 
34
34
  // Create an extension with editor keys
35
- const extension = args.extension || [
35
+ const extension = props.extension || [
36
36
  editorKeys({
37
37
  onClose: handleKeyEvent,
38
38
  onNav: (value, event) => {
@@ -53,7 +53,7 @@ const DefaultStory = (args: CellEditorProps) => {
53
53
  <CellEditor
54
54
  value={value}
55
55
  extension={extension}
56
- autoFocus={args.autoFocus}
56
+ autoFocus={props.autoFocus}
57
57
  onBlur={handleBlur}
58
58
  box={{
59
59
  insetInlineStart: 10,
@@ -68,7 +68,7 @@ const DefaultStory = (args: CellEditorProps) => {
68
68
  );
69
69
  };
70
70
 
71
- const meta: Meta<CellEditorProps> = {
71
+ const meta = {
72
72
  title: 'ui/react-ui-grid/CellEditor',
73
73
  component: CellEditor,
74
74
  render: DefaultStory,
@@ -76,11 +76,11 @@ const meta: Meta<CellEditorProps> = {
76
76
  parameters: {
77
77
  layout: 'centered',
78
78
  },
79
- };
79
+ } satisfies Meta<typeof CellEditor>;
80
80
 
81
81
  export default meta;
82
82
 
83
- type Story = StoryObj<CellEditorProps>;
83
+ type Story = StoryObj<typeof meta>;
84
84
 
85
85
  export const Default: Story = {
86
86
  args: {
@@ -9,12 +9,12 @@ import React, { type KeyboardEvent } from 'react';
9
9
 
10
10
  import { useThemeContext } from '@dxos/react-ui';
11
11
  import {
12
+ type ThemeExtensionsOptions,
12
13
  type UseTextEditorProps,
13
14
  createBasicExtensions,
14
15
  createThemeExtensions,
15
16
  preventNewline,
16
17
  useTextEditor,
17
- type ThemeExtensionsOptions,
18
18
  } from '@dxos/react-ui-editor';
19
19
  import { mx } from '@dxos/react-ui-theme';
20
20
 
@@ -4,8 +4,9 @@
4
4
 
5
5
  import React, { useCallback } from 'react';
6
6
 
7
+ import { type DxGridCellIndex, type GridScopedProps, useGridContext } from '../Grid';
8
+
7
9
  import { CellEditor, type CellEditorProps } from './CellEditor';
8
- import { type GridScopedProps, useGridContext, type DxGridCellIndex } from '../Grid';
9
10
 
10
11
  export type GridCellEditorProps = GridScopedProps<
11
12
  Pick<CellEditorProps, 'extension' | 'onBlur' | 'slots'> & {
@@ -13,7 +13,7 @@ import { DropdownMenu } from '@dxos/react-ui';
13
13
  import { PopoverCombobox, type PopoverComboboxRootProps } from '@dxos/react-ui-searchlist';
14
14
  import { withTheme } from '@dxos/storybook-utils';
15
15
 
16
- import { Grid, type GridEditing, type GridContentProps, type GridRootProps } from './Grid';
16
+ import { Grid, type GridContentProps, type GridEditing, type GridRootProps } from './Grid';
17
17
 
18
18
  const storybookItems = faker.helpers.uniqueArray(faker.commerce.productName, 16);
19
19
 
@@ -101,12 +101,12 @@ const GridStory = ({ initialCells, ...props }: GridStoryProps) => {
101
101
  );
102
102
  };
103
103
 
104
- const meta: Meta<GridStoryProps> = {
104
+ const meta = {
105
105
  title: 'ui/react-ui-grid/Grid',
106
106
  component: GridStory,
107
107
  decorators: [withTheme],
108
108
  parameters: { layout: 'fullscreen' },
109
- };
109
+ } satisfies Meta<typeof GridStory>;
110
110
 
111
111
  export default meta;
112
112
 
package/src/Grid/Grid.tsx CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  import '@dxos/lit-grid/dx-grid.pcss';
6
6
 
7
- import { createComponent, type EventName } from '@lit/react';
8
- import { createContextScope, type Scope } from '@radix-ui/react-context';
7
+ import { type EventName, createComponent } from '@lit/react';
8
+ import { type Scope, createContextScope } from '@radix-ui/react-context';
9
9
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
10
10
  import React, {
11
11
  type ComponentProps,
@@ -178,6 +178,7 @@ export {
178
178
  toPlaneCellIndex,
179
179
  parseCellIndex,
180
180
  cellQuery,
181
+ DxEditRequest,
181
182
  } from '@dxos/lit-grid';
182
183
 
183
184
  export type {