@dxos/react-ui-mosaic 0.3.9-next.8ad58eb → 0.3.10-main.04816d3
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/types/src/views/Demo/Echo.stories.d.ts +1 -5
- package/dist/types/src/views/Demo/Echo.stories.d.ts.map +1 -1
- package/dist/types/src/views/Kanban/Echo.stories.d.ts +1 -6
- package/dist/types/src/views/Kanban/Echo.stories.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/views/Demo/Echo.stories.tsx +10 -10
- package/src/views/Kanban/Echo.stories.tsx +28 -26
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type PublicKey } from '@dxos/react-client';
|
|
3
1
|
declare const _default: {
|
|
4
2
|
title: string;
|
|
5
|
-
render:
|
|
6
|
-
spaceKey: PublicKey;
|
|
7
|
-
}>;
|
|
3
|
+
render: () => JSX.Element;
|
|
8
4
|
decorators: (import("@storybook/csf").DecoratorFunction<import("@storybook/react/dist/types-0fc72a6d").R> | import("@storybook/react").Decorator)[];
|
|
9
5
|
};
|
|
10
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Echo.stories.d.ts","sourceRoot":"","sources":["../../../../../src/views/Demo/Echo.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Echo.stories.d.ts","sourceRoot":"","sources":["../../../../../src/views/Demo/Echo.stories.tsx"],"names":[],"mappings":";;;;;AA2CA,wBA4BE;AAIF,eAAO,MAAM,IAAI,IAAK,CAAC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type PublicKey } from '@dxos/react-client';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
4
|
component: ({ id, columns, Component: TileComponent, debug, onDrop, }: import("./Kanban").KanbanProps<import("../../mosaic").MosaicDataItem>) => JSX.Element;
|
|
6
|
-
render: (
|
|
7
|
-
basePath: string;
|
|
8
|
-
spaceKey: PublicKey;
|
|
9
|
-
debug: boolean;
|
|
10
|
-
}) => JSX.Element;
|
|
5
|
+
render: () => JSX.Element;
|
|
11
6
|
decorators: (import("@storybook/csf").DecoratorFunction<import("@storybook/react/dist/types-0fc72a6d").R> | import("@storybook/react").Decorator)[];
|
|
12
7
|
parameters: {
|
|
13
8
|
layout: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Echo.stories.d.ts","sourceRoot":"","sources":["../../../../../src/views/Kanban/Echo.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Echo.stories.d.ts","sourceRoot":"","sources":["../../../../../src/views/Kanban/Echo.stories.tsx"],"names":[],"mappings":";;;;;;;;;;AAoCA,wBAgCE;AAEF,eAAO,MAAM,IAAI,IAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-mosaic",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10-main.04816d3",
|
|
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",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"lodash.defaultsdeep": "^4.6.1",
|
|
26
26
|
"lodash.pick": "^4.4.0",
|
|
27
27
|
"react-resize-detector": "^7.1.2",
|
|
28
|
-
"@dxos/
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/react-ui-
|
|
33
|
-
"@dxos/react-ui-types": "0.3.
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
28
|
+
"@dxos/keys": "0.3.10-main.04816d3",
|
|
29
|
+
"@dxos/debug": "0.3.10-main.04816d3",
|
|
30
|
+
"@dxos/react-ui": "0.3.10-main.04816d3",
|
|
31
|
+
"@dxos/invariant": "0.3.10-main.04816d3",
|
|
32
|
+
"@dxos/react-ui-theme": "0.3.10-main.04816d3",
|
|
33
|
+
"@dxos/react-ui-types": "0.3.10-main.04816d3",
|
|
34
|
+
"@dxos/react-ui-card": "0.3.10-main.04816d3",
|
|
35
|
+
"@dxos/util": "0.3.10-main.04816d3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@faker-js/faker": "^8.0.2",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"react-dom": "^18.2.0",
|
|
48
48
|
"vite": "^4.3.9",
|
|
49
49
|
"vite-plugin-turbosnap": "^1.0.2",
|
|
50
|
-
"@dxos/app-graph": "0.3.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/react-client": "0.3.
|
|
54
|
-
"@dxos/storybook-utils": "0.3.
|
|
50
|
+
"@dxos/app-graph": "0.3.10-main.04816d3",
|
|
51
|
+
"@dxos/gem-core": "0.3.10-main.04816d3",
|
|
52
|
+
"@dxos/echo-schema": "0.3.10-main.04816d3",
|
|
53
|
+
"@dxos/react-client": "0.3.10-main.04816d3",
|
|
54
|
+
"@dxos/storybook-utils": "0.3.10-main.04816d3"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@phosphor-icons/react": "^2.0.5",
|
|
@@ -7,7 +7,7 @@ import React, { type FC } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { type PublicKey } from '@dxos/react-client';
|
|
9
9
|
import { Expando } from '@dxos/react-client/echo';
|
|
10
|
-
import {
|
|
10
|
+
import { ClientRepeater } from '@dxos/react-client/testing';
|
|
11
11
|
import { withTheme } from '@dxos/storybook-utils';
|
|
12
12
|
|
|
13
13
|
import { Mosaic } from '../../mosaic';
|
|
@@ -43,12 +43,10 @@ const Story: FC<{ spaceKey: PublicKey }> = ({ spaceKey }) => {
|
|
|
43
43
|
|
|
44
44
|
export default {
|
|
45
45
|
title: 'Views/Demo',
|
|
46
|
-
render:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
ClientSpaceDecorator({
|
|
51
|
-
onCreateSpace: async (space) => {
|
|
46
|
+
render: () => (
|
|
47
|
+
<ClientRepeater
|
|
48
|
+
Component={Story}
|
|
49
|
+
onCreateSpace={async (space) => {
|
|
52
50
|
const factory = generator.factories.project;
|
|
53
51
|
const objects = [
|
|
54
52
|
factory.schema,
|
|
@@ -66,9 +64,11 @@ export default {
|
|
|
66
64
|
|
|
67
65
|
// TODO(burdon): Batch API.
|
|
68
66
|
objects.forEach((object) => space.db.add(object));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
}}
|
|
68
|
+
createSpace
|
|
69
|
+
/>
|
|
70
|
+
),
|
|
71
|
+
decorators: [withTheme, FullscreenDecorator()],
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
// TODO(wittjosiah): This currently has a bug where empty over events are fired when dragging from tree onto kanban.
|
|
@@ -6,7 +6,7 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { type PublicKey } from '@dxos/react-client';
|
|
8
8
|
import { Expando } from '@dxos/react-client/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { ClientRepeater } from '@dxos/react-client/testing';
|
|
10
10
|
import { withTheme } from '@dxos/storybook-utils';
|
|
11
11
|
|
|
12
12
|
import { Kanban } from './Kanban';
|
|
@@ -16,31 +16,30 @@ import { FullscreenDecorator, TestObjectGenerator, range } from '../../testing';
|
|
|
16
16
|
|
|
17
17
|
const generator = new TestObjectGenerator();
|
|
18
18
|
|
|
19
|
+
const Story = ({
|
|
20
|
+
// TODO(wittjosiah): Can't use id because of ClientSpaceDecorator.
|
|
21
|
+
basePath = 'projects',
|
|
22
|
+
spaceKey,
|
|
23
|
+
debug,
|
|
24
|
+
}: {
|
|
25
|
+
basePath: string;
|
|
26
|
+
spaceKey: PublicKey;
|
|
27
|
+
debug: boolean;
|
|
28
|
+
}) => {
|
|
29
|
+
return (
|
|
30
|
+
<Mosaic.Root debug={debug}>
|
|
31
|
+
<Mosaic.DragOverlay />
|
|
32
|
+
<EchoKanban id={basePath} spaceKey={spaceKey} generator={generator} debug={debug} />
|
|
33
|
+
</Mosaic.Root>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
19
37
|
export default {
|
|
20
38
|
title: 'Views/Kanban',
|
|
21
39
|
component: Kanban,
|
|
22
|
-
render: (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
spaceKey,
|
|
26
|
-
debug,
|
|
27
|
-
}: {
|
|
28
|
-
basePath: string;
|
|
29
|
-
spaceKey: PublicKey;
|
|
30
|
-
debug: boolean;
|
|
31
|
-
}) => {
|
|
32
|
-
return (
|
|
33
|
-
<Mosaic.Root debug={debug}>
|
|
34
|
-
<Mosaic.DragOverlay />
|
|
35
|
-
<EchoKanban id={basePath} spaceKey={spaceKey} generator={generator} debug={debug} />
|
|
36
|
-
</Mosaic.Root>
|
|
37
|
-
);
|
|
38
|
-
},
|
|
39
|
-
decorators: [
|
|
40
|
-
withTheme,
|
|
41
|
-
FullscreenDecorator(),
|
|
42
|
-
ClientSpaceDecorator({
|
|
43
|
-
onCreateSpace: async (space) => {
|
|
40
|
+
render: () => (
|
|
41
|
+
<ClientRepeater
|
|
42
|
+
onCreateSpace={async (space) => {
|
|
44
43
|
const factory = generator.factories.project;
|
|
45
44
|
const objects = [
|
|
46
45
|
factory.schema,
|
|
@@ -58,9 +57,12 @@ export default {
|
|
|
58
57
|
|
|
59
58
|
// TODO(burdon): Batch API.
|
|
60
59
|
objects.forEach((object) => space.db.add(object));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
}}
|
|
61
|
+
Component={Story}
|
|
62
|
+
createSpace
|
|
63
|
+
/>
|
|
64
|
+
),
|
|
65
|
+
decorators: [withTheme, FullscreenDecorator()],
|
|
64
66
|
parameters: {
|
|
65
67
|
layout: 'fullscreen',
|
|
66
68
|
},
|