@dxos/react-ui-canvas 0.8.1-main.ae460ac → 0.8.1-staging.31c3ee1
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/components/FPS.d.ts +2 -1
- package/dist/types/src/components/FPS.d.ts.map +1 -1
- package/dist/types/src/components/Grid/Grid.d.ts +1 -1
- package/dist/types/src/components/Grid/Grid.d.ts.map +1 -1
- package/dist/types/src/util/svg.d.ts +5 -5
- package/dist/types/src/util/svg.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/components/Canvas/Canvas.stories.tsx +2 -2
- package/src/components/Grid/Grid.stories.tsx +2 -2
- package/src/util/svg.stories.tsx +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
2
3
|
export type FPSProps = ThemedClassName<{
|
|
3
4
|
width?: number;
|
|
4
5
|
height?: number;
|
|
5
6
|
bar?: string;
|
|
6
7
|
}>;
|
|
7
|
-
export declare const FPS: ({ classNames, width, height, bar }: FPSProps) =>
|
|
8
|
+
export declare const FPS: ({ classNames, width, height, bar }: FPSProps) => React.JSX.Element;
|
|
8
9
|
//# sourceMappingURL=FPS.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FPS.d.ts","sourceRoot":"","sources":["../../../../src/components/FPS.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FPS.d.ts","sourceRoot":"","sources":["../../../../src/components/FPS.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAYH,eAAO,MAAM,GAAG,uCAAkE,QAAQ,sBAuEzF,CAAC"}
|
|
@@ -15,5 +15,5 @@ export declare const GridComponent: React.ForwardRefExoticComponent<Omit<{
|
|
|
15
15
|
}, "className"> & {
|
|
16
16
|
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
17
17
|
} & React.RefAttributes<SVGSVGElement>>;
|
|
18
|
-
export declare const Grid: (props: GridProps) =>
|
|
18
|
+
export declare const Grid: (props: GridProps) => React.JSX.Element;
|
|
19
19
|
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAUzC,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa;WANjB,MAAM;YACL,MAAM;aACL,KAAK;eACH,OAAO;;;uCAwDnB,CAAC;AAGF,eAAO,MAAM,IAAI,UAAW,SAAS,
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAUzC,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa;WANjB,MAAM;YACL,MAAM;aACL,KAAK;eACH,OAAO;;;uCAwDnB,CAAC;AAGF,eAAO,MAAM,IAAI,UAAW,SAAS,sBAGpC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PropsWithChildren, type SVGProps } from 'react';
|
|
1
|
+
import React, { type PropsWithChildren, type SVGProps } from 'react';
|
|
2
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
3
|
import { type Dimension, type Point } from '../types';
|
|
4
4
|
export declare const createPath: (points: Point[], join?: boolean) => string;
|
|
@@ -8,7 +8,7 @@ export declare const createPath: (points: Point[], join?: boolean) => string;
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const Markers: ({ id, classNames }: ThemedClassName<{
|
|
10
10
|
id?: string;
|
|
11
|
-
}>) =>
|
|
11
|
+
}>) => React.JSX.Element;
|
|
12
12
|
export type MarkerProps = SVGProps<SVGMarkerElement> & PropsWithChildren<ThemedClassName<{
|
|
13
13
|
id: string;
|
|
14
14
|
pos: Point;
|
|
@@ -18,16 +18,16 @@ export type MarkerProps = SVGProps<SVGMarkerElement> & PropsWithChildren<ThemedC
|
|
|
18
18
|
/**
|
|
19
19
|
* https://www.w3.org/TR/SVG2/painting.html#Markers
|
|
20
20
|
*/
|
|
21
|
-
export declare const Marker: ({ id, className, children, pos: { x: refX, y: refY }, size: { width: markerWidth, height: markerHeight }, fill, ...rest }: MarkerProps) =>
|
|
21
|
+
export declare const Marker: ({ id, className, children, pos: { x: refX, y: refY }, size: { width: markerWidth, height: markerHeight }, fill, ...rest }: MarkerProps) => React.JSX.Element;
|
|
22
22
|
export declare const Arrow: ({ classNames, id, size, dir, closed, }: ThemedClassName<{
|
|
23
23
|
id: string;
|
|
24
24
|
size?: number;
|
|
25
25
|
dir?: "start" | "end";
|
|
26
26
|
closed?: boolean;
|
|
27
|
-
}>) =>
|
|
27
|
+
}>) => React.JSX.Element;
|
|
28
28
|
export declare const GridPattern: ({ classNames, id, size, offset, }: ThemedClassName<{
|
|
29
29
|
id: string;
|
|
30
30
|
size: number;
|
|
31
31
|
offset: Point;
|
|
32
|
-
}>) =>
|
|
32
|
+
}>) => React.JSX.Element;
|
|
33
33
|
//# sourceMappingURL=svg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../../../src/util/svg.tsx"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../../../src/util/svg.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAMtD,eAAO,MAAM,UAAU,WAAY,KAAK,EAAE,2BAEzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,uBAAsC,eAAe,CAAC;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,sBAYzF,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,gBAAgB,CAAC,GAClD,iBAAiB,CACf,eAAe,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC,CACH,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,MAAM,8HAQhB,WAAW,sBAgBb,CAAC;AAEF,eAAO,MAAM,KAAK,2CAMf,eAAe,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,sBA0BzF,CAAC;AAEF,eAAO,MAAM,WAAW,sCAKrB,eAAe,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAA;CAAE,CAAC,sBAe9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-canvas",
|
|
3
|
-
"version": "0.8.1-
|
|
3
|
+
"version": "0.8.1-staging.31c3ee1",
|
|
4
4
|
"description": "A canvas component.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -29,30 +29,30 @@
|
|
|
29
29
|
"d3": "^7.9.0",
|
|
30
30
|
"react-resize-detector": "^11.0.1",
|
|
31
31
|
"transformation-matrix": "^2.16.1",
|
|
32
|
-
"@dxos/debug": "0.8.1-
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/util": "0.8.1-
|
|
32
|
+
"@dxos/debug": "0.8.1-staging.31c3ee1",
|
|
33
|
+
"@dxos/log": "0.8.1-staging.31c3ee1",
|
|
34
|
+
"@dxos/invariant": "0.8.1-staging.31c3ee1",
|
|
35
|
+
"@dxos/util": "0.8.1-staging.31c3ee1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/d3": "^7.4.3",
|
|
39
39
|
"@types/react": "~18.2.0",
|
|
40
40
|
"@types/react-dom": "~18.2.0",
|
|
41
|
-
"effect": "
|
|
41
|
+
"effect": "3.13.3",
|
|
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-
|
|
46
|
-
"@dxos/react-ui": "0.8.1-
|
|
47
|
-
"@dxos/react-ui-theme": "0.8.1-
|
|
48
|
-
"@dxos/storybook-utils": "0.8.1-
|
|
45
|
+
"@dxos/random": "0.8.1-staging.31c3ee1",
|
|
46
|
+
"@dxos/react-ui": "0.8.1-staging.31c3ee1",
|
|
47
|
+
"@dxos/react-ui-theme": "0.8.1-staging.31c3ee1",
|
|
48
|
+
"@dxos/storybook-utils": "0.8.1-staging.31c3ee1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"effect": "
|
|
51
|
+
"effect": "3.13.3",
|
|
52
52
|
"react": "~18.2.0",
|
|
53
53
|
"react-dom": "~18.2.0",
|
|
54
|
-
"@dxos/react-ui
|
|
55
|
-
"@dxos/react-ui": "0.8.1-
|
|
54
|
+
"@dxos/react-ui": "0.8.1-staging.31c3ee1",
|
|
55
|
+
"@dxos/react-ui-theme": "0.8.1-staging.31c3ee1"
|
|
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',
|