@dxos/react-ui-canvas 0.8.4-main.e098934 → 0.8.4-main.ead640a

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.4-main.e098934",
3
+ "version": "0.8.4-main.ead640a",
4
4
  "description": "A canvas component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -25,36 +25,36 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@preact-signals/safe-react": "^0.9.0",
28
- "@preact/signals-core": "^1.9.0",
28
+ "@preact/signals-core": "^1.12.1",
29
29
  "@radix-ui/react-context": "1.1.1",
30
30
  "bind-event-listener": "^3.0.0",
31
31
  "d3": "^7.9.0",
32
32
  "react-resize-detector": "^11.0.1",
33
33
  "transformation-matrix": "^2.16.1",
34
- "@dxos/debug": "0.8.4-main.e098934",
35
- "@dxos/invariant": "0.8.4-main.e098934",
36
- "@dxos/util": "0.8.4-main.e098934",
37
- "@dxos/log": "0.8.4-main.e098934"
34
+ "@dxos/debug": "0.8.4-main.ead640a",
35
+ "@dxos/invariant": "0.8.4-main.ead640a",
36
+ "@dxos/log": "0.8.4-main.ead640a",
37
+ "@dxos/util": "0.8.4-main.ead640a"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/d3": "^7.4.3",
41
- "@types/react": "~18.2.0",
42
- "@types/react-dom": "~18.2.0",
43
- "effect": "3.17.7",
44
- "react": "~18.2.0",
45
- "react-dom": "~18.2.0",
46
- "vite": "7.1.1",
47
- "@dxos/react-ui": "0.8.4-main.e098934",
48
- "@dxos/random": "0.8.4-main.e098934",
49
- "@dxos/react-ui-theme": "0.8.4-main.e098934",
50
- "@dxos/storybook-utils": "0.8.4-main.e098934"
41
+ "@types/react": "~19.2.2",
42
+ "@types/react-dom": "~19.2.1",
43
+ "effect": "3.18.3",
44
+ "react": "~19.2.0",
45
+ "react-dom": "~19.2.0",
46
+ "vite": "7.1.9",
47
+ "@dxos/random": "0.8.4-main.ead640a",
48
+ "@dxos/react-ui": "0.8.4-main.ead640a",
49
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a",
50
+ "@dxos/storybook-utils": "0.8.4-main.ead640a"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "effect": "3.13.3",
54
- "react": "~18.2.0",
55
- "react-dom": "~18.2.0",
56
- "@dxos/react-ui": "0.8.4-main.e098934",
57
- "@dxos/react-ui-theme": "0.8.4-main.e098934"
54
+ "react": "^19.0.0",
55
+ "react-dom": "^19.0.0",
56
+ "@dxos/react-ui": "0.8.4-main.ead640a",
57
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
@@ -2,12 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import type { Meta, StoryObj } from '@storybook/react-vite';
8
6
  import React from 'react';
9
7
 
10
- import { withLayout, withTheme } from '@dxos/storybook-utils';
8
+ import { withTheme } from '@dxos/react-ui/testing';
11
9
 
12
10
  import { useCanvasContext, useWheel } from '../../hooks';
13
11
  import { type Point } from '../../types';
@@ -93,7 +91,10 @@ const meta = {
93
91
  title: 'ui/react-ui-canvas/Canvas',
94
92
  component: Grid,
95
93
  render: DefaultStory,
96
- decorators: [withTheme, withLayout({ fullscreen: true })],
94
+ decorators: [withTheme],
95
+ parameters: {
96
+ layout: 'fullscreen',
97
+ },
97
98
  } satisfies Meta<typeof Grid>;
98
99
 
99
100
  export default meta;
@@ -53,7 +53,7 @@ export const FPS = ({ classNames, width = 60, height = 30, bar = 'bg-cyan-500' }
53
53
  },
54
54
  );
55
55
 
56
- const requestRef = useRef<number>();
56
+ const requestRef = useRef<number | null>(null);
57
57
  const tick = () => {
58
58
  dispatch();
59
59
  requestRef.current = requestAnimationFrame(tick);
@@ -2,12 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React, { useRef, useState } from 'react';
9
7
 
10
- import { withLayout, withTheme } from '@dxos/storybook-utils';
8
+ import { withTheme } from '@dxos/react-ui/testing';
11
9
 
12
10
  import { type ProjectionState } from '../../hooks';
13
11
 
@@ -28,7 +26,10 @@ const meta = {
28
26
  title: 'ui/react-ui-canvas/Grid',
29
27
  component: GridComponent,
30
28
  render: DefaultStory,
31
- decorators: [withTheme, withLayout({ fullscreen: true })],
29
+ decorators: [withTheme],
30
+ parameters: {
31
+ layout: 'fullscreen',
32
+ },
32
33
  } satisfies Meta<typeof GridComponent>;
33
34
 
34
35
  export default meta;
package/src/types.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  export const Point = Schema.Struct({ x: Schema.Number, y: Schema.Number });
8
8
  export const Dimension = Schema.Struct({ width: Schema.Number, height: Schema.Number });
@@ -2,12 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React from 'react';
9
7
 
10
- import { withTheme } from '@dxos/storybook-utils';
8
+ import { withTheme } from '@dxos/react-ui/testing';
11
9
 
12
10
  import { Arrow, createPath } from './svg';
13
11
  import { testId } from './util';