@dxos/react-ui-table 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65

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-table",
3
- "version": "0.8.4-main.c85a9c8dae",
3
+ "version": "0.8.4-main.d05673bc65",
4
4
  "description": "A table component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -68,31 +68,31 @@
68
68
  "@radix-ui/react-use-controllable-state": "1.1.0",
69
69
  "date-fns": "^3.3.1",
70
70
  "lodash.orderby": "^4.6.0",
71
- "@dxos/async": "0.8.4-main.c85a9c8dae",
72
- "@dxos/context": "0.8.4-main.c85a9c8dae",
73
- "@dxos/effect": "0.8.4-main.c85a9c8dae",
74
- "@dxos/debug": "0.8.4-main.c85a9c8dae",
75
- "@dxos/echo-atom": "0.8.4-main.c85a9c8dae",
76
- "@dxos/invariant": "0.8.4-main.c85a9c8dae",
77
- "@dxos/keys": "0.8.4-main.c85a9c8dae",
78
- "@dxos/log": "0.8.4-main.c85a9c8dae",
79
- "@dxos/lit-grid": "0.8.4-main.c85a9c8dae",
80
- "@dxos/random": "0.8.4-main.c85a9c8dae",
81
- "@dxos/react-ui-attention": "0.8.4-main.c85a9c8dae",
82
- "@dxos/react-client": "0.8.4-main.c85a9c8dae",
83
- "@dxos/react-ui-editor": "0.8.4-main.c85a9c8dae",
84
- "@dxos/react-ui-components": "0.8.4-main.c85a9c8dae",
85
- "@dxos/echo": "0.8.4-main.c85a9c8dae",
86
- "@dxos/react-ui-form": "0.8.4-main.c85a9c8dae",
87
- "@dxos/react-ui-menu": "0.8.4-main.c85a9c8dae",
88
- "@dxos/react-ui-searchlist": "0.8.4-main.c85a9c8dae",
89
- "@dxos/react-ui-grid": "0.8.4-main.c85a9c8dae",
90
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.c85a9c8dae",
91
- "@dxos/schema": "0.8.4-main.c85a9c8dae",
92
- "@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
93
- "@dxos/util": "0.8.4-main.c85a9c8dae",
94
- "@dxos/types": "0.8.4-main.c85a9c8dae",
95
- "@dxos/ui-types": "0.8.4-main.c85a9c8dae"
71
+ "@dxos/async": "0.8.4-main.d05673bc65",
72
+ "@dxos/context": "0.8.4-main.d05673bc65",
73
+ "@dxos/effect": "0.8.4-main.d05673bc65",
74
+ "@dxos/echo-atom": "0.8.4-main.d05673bc65",
75
+ "@dxos/invariant": "0.8.4-main.d05673bc65",
76
+ "@dxos/lit-grid": "0.8.4-main.d05673bc65",
77
+ "@dxos/keys": "0.8.4-main.d05673bc65",
78
+ "@dxos/log": "0.8.4-main.d05673bc65",
79
+ "@dxos/random": "0.8.4-main.d05673bc65",
80
+ "@dxos/react-ui-attention": "0.8.4-main.d05673bc65",
81
+ "@dxos/echo": "0.8.4-main.d05673bc65",
82
+ "@dxos/react-client": "0.8.4-main.d05673bc65",
83
+ "@dxos/react-ui-editor": "0.8.4-main.d05673bc65",
84
+ "@dxos/react-ui-form": "0.8.4-main.d05673bc65",
85
+ "@dxos/react-ui-grid": "0.8.4-main.d05673bc65",
86
+ "@dxos/react-ui-menu": "0.8.4-main.d05673bc65",
87
+ "@dxos/react-ui-searchlist": "0.8.4-main.d05673bc65",
88
+ "@dxos/react-ui-stack": "0.8.4-main.d05673bc65",
89
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.d05673bc65",
90
+ "@dxos/schema": "0.8.4-main.d05673bc65",
91
+ "@dxos/types": "0.8.4-main.d05673bc65",
92
+ "@dxos/util": "0.8.4-main.d05673bc65",
93
+ "@dxos/ui-types": "0.8.4-main.d05673bc65",
94
+ "@dxos/react-ui-components": "0.8.4-main.d05673bc65",
95
+ "@dxos/debug": "0.8.4-main.d05673bc65"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@effect/platform": "0.94.4",
@@ -104,13 +104,13 @@
104
104
  "react": "~19.2.3",
105
105
  "react-dom": "~19.2.3",
106
106
  "vite": "^7.1.11",
107
- "@dxos/random": "0.8.4-main.c85a9c8dae",
108
- "@dxos/react-client": "0.8.4-main.c85a9c8dae",
109
- "@dxos/lit-ui": "0.8.4-main.c85a9c8dae",
110
- "@dxos/storybook-utils": "0.8.4-main.c85a9c8dae",
111
- "@dxos/test-utils": "0.8.4-main.c85a9c8dae",
112
- "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
113
- "@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
107
+ "@dxos/lit-ui": "0.8.4-main.d05673bc65",
108
+ "@dxos/random": "0.8.4-main.d05673bc65",
109
+ "@dxos/react-client": "0.8.4-main.d05673bc65",
110
+ "@dxos/react-ui": "0.8.4-main.d05673bc65",
111
+ "@dxos/storybook-utils": "0.8.4-main.d05673bc65",
112
+ "@dxos/test-utils": "0.8.4-main.d05673bc65",
113
+ "@dxos/ui-theme": "0.8.4-main.d05673bc65"
114
114
  },
115
115
  "peerDependencies": {
116
116
  "@effect-atom/atom-react": "^0.5.0",
@@ -118,8 +118,8 @@
118
118
  "effect": "3.19.16",
119
119
  "react": "~19.2.3",
120
120
  "react-dom": "~19.2.3",
121
- "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
122
- "@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
121
+ "@dxos/react-ui": "0.8.4-main.d05673bc65",
122
+ "@dxos/ui-theme": "0.8.4-main.d05673bc65"
123
123
  },
124
124
  "publishConfig": {
125
125
  "access": "public"
@@ -39,7 +39,7 @@ export type DynamicTableProps<T extends Type.AnyEntity = Type.AnyEntity> = Theme
39
39
  export const DynamicTable = <T extends Type.AnyEntity = Type.AnyEntity>({
40
40
  classNames,
41
41
  schema,
42
- name = 'example.com/dynamic-table', // Rmove default or make random; this will lead to type collisions.
42
+ name = 'com.example.dynamic-table', // Remove default or make random; this will lead to type collisions.
43
43
  rows,
44
44
  properties,
45
45
  jsonSchema: jsonSchemaProp,
@@ -52,7 +52,7 @@ const Example = Schema.Struct({
52
52
  title: 'Parent',
53
53
  }),
54
54
  }).pipe(
55
- Type.object({ typename: `example.com/type/${PublicKey.random().truncate()}`, version: '0.1.0' }),
55
+ Type.object({ typename: `com.example.type.${PublicKey.random().truncate()}`, version: '0.1.0' }),
56
56
  Annotation.LabelAnnotation.set(['name']),
57
57
  );
58
58
  interface Example extends Schema.Schema.Type<typeof Example> {}
@@ -252,7 +252,7 @@ const ContactWithArrayOfEmails = Schema.Struct({
252
252
  ),
253
253
  }).pipe(
254
254
  Type.object({
255
- typename: 'dxos.org/type/ContactWithArrayOfEmails',
255
+ typename: 'org.dxos.type.contact-with-array-of-emails',
256
256
  version: '0.1.0',
257
257
  }),
258
258
  );
@@ -297,7 +297,7 @@ export const Tags: Meta<StoryProps> = {
297
297
  createSpace: true,
298
298
  onCreateSpace: async ({ space }) => {
299
299
  // Configure schema.
300
- const typename = 'example.com/SingleSelect';
300
+ const typename = 'com.example.type.single-select';
301
301
  const selectOptions = [
302
302
  { id: 'one', title: 'One', color: 'emerald' },
303
303
  { id: 'two', title: 'Two', color: 'blue' },
@@ -35,7 +35,7 @@ import {
35
35
  gridSeparatorInlineEnd,
36
36
  } from '@dxos/react-ui-grid';
37
37
  import { DxEditRequest } from '@dxos/react-ui-grid';
38
- import { mx, useComposableProps } from '@dxos/ui-theme';
38
+ import { composableProps, mx } from '@dxos/ui-theme';
39
39
  import { type ComposableProps } from '@dxos/ui-types';
40
40
 
41
41
  import { type InsertRowResult, ModalController, type TableModel, type TablePresentation } from '../../model';
@@ -73,7 +73,7 @@ export type TableController = {
73
73
  handleInsertRowResult?: (insertRowResult?: InsertRowResult) => void;
74
74
  };
75
75
 
76
- export type TableMainProps<T extends Type.AnyEntity = Type.AnyEntity> = ComposableProps<{
76
+ export type TableMainProps<T extends Type.AnyEntity = Type.AnyEntity> = ComposableProps<HTMLDivElement> & {
77
77
  schema?: T;
78
78
  model?: TableModel;
79
79
  presentation?: TablePresentation;
@@ -82,7 +82,7 @@ export type TableMainProps<T extends Type.AnyEntity = Type.AnyEntity> = Composab
82
82
  onCreate?: OnCreateHandler;
83
83
  onRowClick?: (row: any) => void;
84
84
  testId?: string;
85
- }>;
85
+ };
86
86
 
87
87
  const TableMainInner = <T extends Type.AnyEntity = Type.AnyEntity>(
88
88
  { schema, model, presentation, ignoreAttention, onCreate, onRowClick, testId, ...props }: TableMainProps<T>,
@@ -415,9 +415,8 @@ const TableMainInner = <T extends Type.AnyEntity = Type.AnyEntity>(
415
415
  return <span role='none' className='dx-attention-surface' />;
416
416
  }
417
417
 
418
- const { className, ...rest } = useComposableProps(props);
419
418
  return (
420
- <div {...rest} role='none' className={mx('dx-container relative', className)}>
419
+ <div {...composableProps(props, { role: 'none', className: 'dx-container relative' })}>
421
420
  <Grid.Root id={model.id ?? 'table-grid'}>
422
421
  <TableValueEditor<T>
423
422
  model={model}
@@ -19,7 +19,7 @@ export const TestSchema = Schema.Struct({
19
19
  netWorth: Schema.optional(Schema.Number),
20
20
  }).pipe(
21
21
  Type.object({
22
- typename: 'example.com/type/Test',
22
+ typename: 'com.example.type.test',
23
23
  version: '0.1.0',
24
24
  }),
25
25
  );
@@ -121,7 +121,7 @@ const Test = Schema.Struct({
121
121
  completed: Schema.Boolean,
122
122
  }).pipe(
123
123
  Type.object({
124
- typename: 'example.com/type/Test',
124
+ typename: 'com.example.type.test',
125
125
  version: '0.1.0',
126
126
  }),
127
127
  );
@@ -92,7 +92,7 @@ const Test = Schema.Struct({
92
92
  count: Schema.Number,
93
93
  }).pipe(
94
94
  Type.object({
95
- typename: 'example.com/type/Test',
95
+ typename: 'com.example.type.test',
96
96
  version: '0.1.0',
97
97
  }),
98
98
  );
@@ -23,8 +23,8 @@ export const Table = Schema.Struct({
23
23
  }).pipe(Schema.mutable, FormInputAnnotation.set(false)),
24
24
  }).pipe(
25
25
  Type.object({
26
- typename: 'dxos.org/type/Table',
27
- version: '0.2.0',
26
+ typename: 'org.dxos.type.table',
27
+ version: '0.1.0',
28
28
  }),
29
29
  LabelAnnotation.set(['name']),
30
30
  ViewAnnotation.set(true),
@@ -77,19 +77,3 @@ export const make = ({ name, sizes = {}, view, jsonSchema }: MakeProps): Table =
77
77
 
78
78
  return table;
79
79
  };
80
-
81
- //
82
- // V1
83
- //
84
-
85
- export const TableV1 = Schema.Struct({
86
- sizes: Schema.Record({
87
- key: Schema.String,
88
- value: Schema.Number,
89
- }).pipe(Schema.mutable),
90
- }).pipe(
91
- Type.object({
92
- typename: 'dxos.org/type/Table',
93
- version: '0.1.0',
94
- }),
95
- );
@@ -49,7 +49,7 @@ describe('makeDynamicTable', () => {
49
49
  */
50
50
  test('makeDynamicTable with jsonSchema from getBaseSchema(typename, properties) and properties with title does not throw', () => {
51
51
  const registry = Registry.make();
52
- const typename = 'example.com/type/DynamicTableTest';
52
+ const typename = 'com.example.type.dynamic-table-test';
53
53
  const properties: TablePropertyDefinition[] = [
54
54
  { name: 'id', format: Format.TypeFormat.String },
55
55
  { name: 'name', format: Format.TypeFormat.String, title: 'Name' },