@dxos/react-ui-canvas 0.8.1-staging.391c573 → 0.8.1-staging.9eaf14f
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-canvas",
|
|
3
|
-
"version": "0.8.1-staging.
|
|
3
|
+
"version": "0.8.1-staging.9eaf14f",
|
|
4
4
|
"description": "A canvas component.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"d3": "^7.9.0",
|
|
30
30
|
"react-resize-detector": "^11.0.1",
|
|
31
31
|
"transformation-matrix": "^2.16.1",
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
32
|
+
"@dxos/debug": "0.8.1-staging.9eaf14f",
|
|
33
|
+
"@dxos/invariant": "0.8.1-staging.9eaf14f",
|
|
34
|
+
"@dxos/util": "0.8.1-staging.9eaf14f",
|
|
35
|
+
"@dxos/log": "0.8.1-staging.9eaf14f"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/d3": "^7.4.3",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"react": "~18.2.0",
|
|
43
43
|
"react-dom": "~18.2.0",
|
|
44
44
|
"vite": "5.4.7",
|
|
45
|
-
"@dxos/random": "0.8.1-staging.
|
|
46
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
47
|
-
"@dxos/react-ui-theme": "0.8.1-staging.
|
|
48
|
-
"@dxos/storybook-utils": "0.8.1-staging.
|
|
45
|
+
"@dxos/random": "0.8.1-staging.9eaf14f",
|
|
46
|
+
"@dxos/react-ui": "0.8.1-staging.9eaf14f",
|
|
47
|
+
"@dxos/react-ui-theme": "0.8.1-staging.9eaf14f",
|
|
48
|
+
"@dxos/storybook-utils": "0.8.1-staging.9eaf14f"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"effect": "3.13.3",
|
|
52
52
|
"react": "~18.2.0",
|
|
53
53
|
"react-dom": "~18.2.0",
|
|
54
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
55
|
-
"@dxos/react-ui-theme": "0.8.1-staging.
|
|
54
|
+
"@dxos/react-ui": "0.8.1-staging.9eaf14f",
|
|
55
|
+
"@dxos/react-ui-theme": "0.8.1-staging.9eaf14f"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
@@ -22,7 +22,7 @@ const points: Point[] = [0, (2 * Math.PI) / 3, (2 * Math.PI * 2) / 3].map((a, i)
|
|
|
22
22
|
y: Math.round(Math.sin(a - Math.PI / 2) * size * 1.5),
|
|
23
23
|
}));
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const DefaultStory = (props: GridProps) => {
|
|
26
26
|
return (
|
|
27
27
|
<Canvas>
|
|
28
28
|
<Grid {...props} />
|
|
@@ -91,7 +91,7 @@ const Item = (p: Point) => {
|
|
|
91
91
|
const meta: Meta<GridProps> = {
|
|
92
92
|
title: 'ui/react-ui-canvas/Canvas',
|
|
93
93
|
component: Grid,
|
|
94
|
-
render:
|
|
94
|
+
render: DefaultStory,
|
|
95
95
|
decorators: [withTheme, withLayout({ fullscreen: true })],
|
|
96
96
|
};
|
|
97
97
|
|
|
@@ -12,7 +12,7 @@ import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
|
12
12
|
import { GridComponent, type GridProps } from './Grid';
|
|
13
13
|
import { type ProjectionState } from '../../hooks';
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const DefaultStory = (props: GridProps) => {
|
|
16
16
|
const ref = useRef<HTMLDivElement>(null);
|
|
17
17
|
const [{ scale, offset }] = useState<ProjectionState>({ scale: 1, offset: { x: 0, y: 0 } });
|
|
18
18
|
|
|
@@ -26,7 +26,7 @@ const Render = (props: GridProps) => {
|
|
|
26
26
|
const meta: Meta<GridProps> = {
|
|
27
27
|
title: 'ui/react-ui-canvas/Grid',
|
|
28
28
|
component: GridComponent,
|
|
29
|
-
render:
|
|
29
|
+
render: DefaultStory,
|
|
30
30
|
decorators: [withTheme, withLayout({ fullscreen: true })],
|
|
31
31
|
};
|
|
32
32
|
|
package/src/util/svg.stories.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import { withTheme } from '@dxos/storybook-utils';
|
|
|
12
12
|
import { Arrow, createPath } from './svg';
|
|
13
13
|
import { testId } from './util';
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const DefaultStory = () => (
|
|
16
16
|
<svg className='border border-neutral-500 w-[30rem] h-[400px]'>
|
|
17
17
|
<defs>
|
|
18
18
|
<Arrow id='arrow-start' classNames='fill-none stroke-red-500' dir='start' />
|
|
@@ -33,7 +33,7 @@ const Render = () => (
|
|
|
33
33
|
|
|
34
34
|
const meta: Meta = {
|
|
35
35
|
title: 'ui/react-ui-canvas/svg',
|
|
36
|
-
render:
|
|
36
|
+
render: DefaultStory,
|
|
37
37
|
decorators: [withTheme],
|
|
38
38
|
parameters: {
|
|
39
39
|
layout: 'centered',
|