@dxos/react-ui-mosaic 0.6.13 → 0.6.14-main.69511f5

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.
@@ -1,10 +1,10 @@
1
- import type { EchoReactiveObject, S } from '@dxos/echo-schema';
1
+ import { type ReactiveObject, type S } from '@dxos/echo-schema';
2
2
  export declare const range: <T>(fn: (i: number) => T | undefined, length: number) => T[];
3
3
  export type TestItem = {
4
4
  id: string;
5
5
  type: string;
6
6
  } & Record<string, any>;
7
- type ObjectFactory<T extends EchoReactiveObject<any>> = {
7
+ type ObjectFactory<T extends ReactiveObject<any>> = {
8
8
  schema?: S.Schema<any>;
9
9
  createObject: () => T;
10
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/generator.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAK/D,eAAO,MAAM,KAAK,GAAI,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,SAAS,UAAU,MAAM,KAAG,CAAC,EAGlD,CAAC;AAE5B,MAAM,MAAM,QAAQ,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAO1E,KAAK,aAAa,CAAC,CAAC,SAAS,kBAAkB,CAAC,GAAG,CAAC,IAAI;IACtD,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC,CAAC;CACvB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC;AAW/D,eAAO,MAAM,MAAM,UAAgC,CAAC;AACpD,eAAO,MAAM,Q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CAAE,CAAC;AAW/D,eAAO,MAAM,MAAM,UAAgC,CAAC;AACpD,eAAO,MAAM,QAAQ,UAAkB,CAAC;AAwDxC;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,SAAgB,SAAS,EAAE,gBAAgB,CAAC;gBAEhC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,gBAAgB,CAAA;KAAO;IASzF,IAAI,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAE5B;IAED,YAAY,CAAC,EAAE,KAAK,EAAE,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAO;IAMjD,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CAGtE"}
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-mosaic",
3
- "version": "0.6.13",
3
+ "version": "0.6.14-main.69511f5",
4
4
  "description": "An intermediate interface for drag-and-drop interactions.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
7
  "license": "MIT",
8
8
  "author": "DXOS.org",
9
+ "sideEffects": true,
9
10
  "exports": {
10
11
  ".": {
11
- "browser": "./dist/lib/browser/index.mjs",
12
- "types": "./dist/types/src/index.d.ts"
12
+ "types": "./dist/types/src/index.d.ts",
13
+ "browser": "./dist/lib/browser/index.mjs"
13
14
  }
14
15
  },
15
16
  "types": "dist/types/src/index.d.ts",
@@ -29,15 +30,14 @@
29
30
  "@radix-ui/react-compose-refs": "^1.0.0",
30
31
  "lodash.defaultsdeep": "^4.6.1",
31
32
  "react-resize-detector": "^11.0.1",
32
- "@dxos/invariant": "0.6.13",
33
- "@dxos/debug": "0.6.13",
34
- "@dxos/log": "0.6.13",
35
- "@dxos/react-ui": "0.6.13",
36
- "@dxos/keys": "0.6.13",
37
- "@dxos/react-ui-theme": "0.6.13",
38
- "@dxos/react-ui-card": "0.6.13",
39
- "@dxos/react-ui-types": "0.6.13",
40
- "@dxos/util": "0.6.13"
33
+ "@dxos/invariant": "0.6.14-main.69511f5",
34
+ "@dxos/debug": "0.6.14-main.69511f5",
35
+ "@dxos/echo-schema": "0.6.14-main.69511f5",
36
+ "@dxos/keys": "0.6.14-main.69511f5",
37
+ "@dxos/log": "0.6.14-main.69511f5",
38
+ "@dxos/react-ui-card": "0.6.14-main.69511f5",
39
+ "@dxos/util": "0.6.14-main.69511f5",
40
+ "@dxos/react-ui-types": "0.6.14-main.69511f5"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@phosphor-icons/react": "^2.1.5",
@@ -48,18 +48,21 @@
48
48
  "d3": "^7.9.0",
49
49
  "react": "~18.2.0",
50
50
  "react-dom": "~18.2.0",
51
- "vite": "^5.3.4",
52
- "@dxos/echo-schema": "0.6.13",
53
- "@dxos/gem-core": "0.6.13",
54
- "@dxos/app-graph": "0.6.13",
55
- "@dxos/random": "0.6.13",
56
- "@dxos/react-client": "0.6.13",
57
- "@dxos/storybook-utils": "0.6.13"
51
+ "vite": "5.4.7",
52
+ "@dxos/app-graph": "0.6.14-main.69511f5",
53
+ "@dxos/gem-core": "0.6.14-main.69511f5",
54
+ "@dxos/react-ui": "0.6.14-main.69511f5",
55
+ "@dxos/random": "0.6.14-main.69511f5",
56
+ "@dxos/react-ui-theme": "0.6.14-main.69511f5",
57
+ "@dxos/storybook-utils": "0.6.14-main.69511f5",
58
+ "@dxos/react-client": "0.6.14-main.69511f5"
58
59
  },
59
60
  "peerDependencies": {
60
61
  "@phosphor-icons/react": "^2.1.5",
61
- "react": "^18.0.0",
62
- "react-dom": "^18.0.0"
62
+ "react": "~18.2.0",
63
+ "react-dom": "~18.2.0",
64
+ "@dxos/react-ui-theme": "0.6.14-main.69511f5",
65
+ "@dxos/react-ui": "0.6.14-main.69511f5"
63
66
  },
64
67
  "publishConfig": {
65
68
  "access": "public"
@@ -2,9 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { expect } from 'chai';
6
-
7
- import { describe, test } from '@dxos/test';
5
+ import { describe, expect, test } from 'vitest';
8
6
 
9
7
  import { Path } from './path';
10
8
 
@@ -2,12 +2,11 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- // TODO(burdon): Reconcile with @dxos/echo-generator.
6
-
7
- import type { EchoReactiveObject, S } from '@dxos/echo-schema';
8
- import { create } from '@dxos/echo-schema';
5
+ import { create, type ReactiveObject, type S } from '@dxos/echo-schema';
9
6
  import { faker } from '@dxos/random';
10
7
 
8
+ // TODO(burdon): Reconcile with @dxos/echo-generator.
9
+
11
10
  // TODO(burdon): Util.
12
11
  export const range = <T>(fn: (i: number) => T | undefined, length: number): T[] =>
13
12
  Array.from({ length })
@@ -21,7 +20,7 @@ type ObjectDataGenerator = {
21
20
  createData: () => any;
22
21
  };
23
22
 
24
- type ObjectFactory<T extends EchoReactiveObject<any>> = {
23
+ type ObjectFactory<T extends ReactiveObject<any>> = {
25
24
  schema?: S.Schema<any>; // TODO(burdon): Support both typed and expando schema.
26
25
  createObject: () => T;
27
26
  };
@@ -19,7 +19,7 @@ import { DemoTree } from '../Tree/testing';
19
19
  faker.seed(5);
20
20
 
21
21
  export default {
22
- title: 'react-ui-mosaic/Demo',
22
+ title: 'ui/react-ui-mosaic/Demo',
23
23
  decorators: [withTheme, withLayout({ fullscreen: true })],
24
24
  parameters: {
25
25
  layout: 'fullscreen',
@@ -40,11 +40,11 @@ const Story = ({ spaceKey }: ClientRepeatedComponentProps) => {
40
40
  };
41
41
 
42
42
  export default {
43
- title: 'react-ui-mosaic/Demo',
43
+ title: 'ui/react-ui-mosaic/Demo',
44
44
  render: () => (
45
45
  <ClientRepeater
46
46
  component={Story}
47
- onCreateSpace={async (space) => {
47
+ onSpaceCreated={async ({ space }) => {
48
48
  const factory = generator.factories.project;
49
49
  const objects = [
50
50
  factory.schema,
@@ -32,7 +32,7 @@ const testLayout = testItems.reduce<GridLayout>((map, item) => {
32
32
  }, {});
33
33
 
34
34
  export default {
35
- title: 'react-ui-mosaic/Grid',
35
+ title: 'ui/react-ui-mosaic/Grid',
36
36
  component: Grid,
37
37
  render: () => {
38
38
  return (
@@ -17,7 +17,7 @@ import { ComplexCard, SimpleCard } from '../../testing';
17
17
  faker.seed(3);
18
18
 
19
19
  export default {
20
- title: 'react-ui-mosaic/Kanban',
20
+ title: 'ui/react-ui-mosaic/Kanban',
21
21
  component: Kanban,
22
22
  render: (args: DemoKanbanProps) => {
23
23
  return (
@@ -17,7 +17,7 @@ import { SimpleCard } from '../../testing';
17
17
  faker.seed(3);
18
18
 
19
19
  export default {
20
- title: 'react-ui-mosaic/Stack',
20
+ title: 'ui/react-ui-mosaic/Stack',
21
21
  component: Stack,
22
22
  render: (args: DemoStackProps) => {
23
23
  return (
@@ -17,7 +17,7 @@ import { ComplexCard, SimpleCard } from '../../testing';
17
17
  faker.seed(3);
18
18
 
19
19
  export default {
20
- title: 'react-ui-mosaic/Stack',
20
+ title: 'ui/react-ui-mosaic/Stack',
21
21
  component: Stack,
22
22
  render: (
23
23
  args: StackProps & {
@@ -16,7 +16,7 @@ import { Tree } from './Tree';
16
16
  faker.seed(3);
17
17
 
18
18
  export default {
19
- title: 'react-ui-mosaic/Tree',
19
+ title: 'ui/react-ui-mosaic/Tree',
20
20
  component: Tree,
21
21
  // render: ({ id = 'tree', debug }: { id: string; debug: boolean }) => {
22
22
  // return (
@@ -70,7 +70,7 @@ const testItems2 = [
70
70
  ];
71
71
 
72
72
  export default {
73
- title: 'react-ui-mosaic/Tree',
73
+ title: 'ui/react-ui-mosaic/Tree',
74
74
  component: Tree,
75
75
  render: (args: DemoTreeProps) => {
76
76
  return (