@dxos/react-ui-canvas 0.9.1-main.c7dcc2e112 → 0.10.0
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/lib/browser/index.mjs +3 -1
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +3 -1
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/CellGrid/CellGrid.d.ts.map +1 -1
- package/dist/types/src/components/CellGrid/CellGrid.stories.d.ts +2 -2
- package/dist/types/src/components/CellGrid/CellGrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/Grid/Grid.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/src/components/CellGrid/CellGrid.stories.tsx +3 -3
- package/src/components/CellGrid/CellGrid.tsx +2 -2
- package/src/components/Grid/Grid.tsx +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-canvas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "A canvas component.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -31,30 +31,30 @@
|
|
|
31
31
|
"d3": "^7.9.0",
|
|
32
32
|
"react-resize-detector": "^11.0.1",
|
|
33
33
|
"transformation-matrix": "^2.16.1",
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/log": "0.
|
|
37
|
-
"@dxos/
|
|
34
|
+
"@dxos/invariant": "0.10.0",
|
|
35
|
+
"@dxos/util": "0.10.0",
|
|
36
|
+
"@dxos/log": "0.10.0",
|
|
37
|
+
"@dxos/debug": "0.10.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/d3": "^7.4.3",
|
|
41
|
-
"@types/react": "~19.2.
|
|
41
|
+
"@types/react": "~19.2.17",
|
|
42
42
|
"@types/react-dom": "~19.2.3",
|
|
43
|
-
"effect": "3.21.
|
|
44
|
-
"react": "~19.2.
|
|
45
|
-
"react-dom": "~19.2.
|
|
43
|
+
"effect": "3.21.4",
|
|
44
|
+
"react": "~19.2.7",
|
|
45
|
+
"react-dom": "~19.2.7",
|
|
46
46
|
"vite": "^8.0.16",
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/ui-theme": "0.
|
|
47
|
+
"@dxos/react-ui": "0.10.0",
|
|
48
|
+
"@dxos/random": "0.10.0",
|
|
49
|
+
"@dxos/storybook-utils": "0.10.0",
|
|
50
|
+
"@dxos/ui-theme": "0.10.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"effect": "3.21.
|
|
54
|
-
"react": "~19.2.
|
|
55
|
-
"react-dom": "~19.2.
|
|
56
|
-
"@dxos/react-ui": "0.
|
|
57
|
-
"@dxos/ui-theme": "0.
|
|
53
|
+
"effect": "3.21.4",
|
|
54
|
+
"react": "~19.2.7",
|
|
55
|
+
"react-dom": "~19.2.7",
|
|
56
|
+
"@dxos/react-ui": "0.10.0",
|
|
57
|
+
"@dxos/ui-theme": "0.10.0"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Registry, RegistryContext } from '@effect-atom/atom-react';
|
|
6
6
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
7
7
|
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
8
8
|
|
|
@@ -79,7 +79,7 @@ const makeLcg = (seed: number) => {
|
|
|
79
79
|
|
|
80
80
|
type Variant = 'sequencer' | 'data-viz';
|
|
81
81
|
|
|
82
|
-
type
|
|
82
|
+
type StoryArgs = Pick<CellGridProps, 'headers'> & {
|
|
83
83
|
variant: Variant;
|
|
84
84
|
tool: Tool;
|
|
85
85
|
numCols: number;
|
|
@@ -89,7 +89,7 @@ type StoryProps = Pick<CellGridProps, 'headers'> & {
|
|
|
89
89
|
playback: boolean;
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
const DefaultStory = ({ variant, tool, numCols, numRows, cellWidth, cellHeight, playback, headers }:
|
|
92
|
+
const DefaultStory = ({ variant, tool, numCols, numRows, cellWidth, cellHeight, playback, headers }: StoryArgs) => {
|
|
93
93
|
const registry = useContext(RegistryContext);
|
|
94
94
|
|
|
95
95
|
const atoms = useMemo(
|
|
@@ -10,8 +10,8 @@ import type { ThemedClassName } from '@dxos/react-ui';
|
|
|
10
10
|
import { mx } from '@dxos/ui-theme';
|
|
11
11
|
|
|
12
12
|
import { Ruler, TrackHeader } from './headers';
|
|
13
|
-
import { attachPointerHandlers, attachWheelHandlers
|
|
14
|
-
import {
|
|
13
|
+
import { type PointerHandlers, attachPointerHandlers, attachWheelHandlers } from './input';
|
|
14
|
+
import { type OverlayStyle, type RenderCell, type StaticLayerStyle, drawCells, drawOverlay } from './render';
|
|
15
15
|
import type { CellGridAtoms } from './state/atoms';
|
|
16
16
|
import type { Cell, Headers, Row } from './state/types';
|
|
17
17
|
|
|
@@ -54,7 +54,13 @@ export const GridComponent = forwardRef<SVGSVGElement, GridProps>(
|
|
|
54
54
|
<svg
|
|
55
55
|
{...testId('dx-canvas-grid')}
|
|
56
56
|
ref={svgRef}
|
|
57
|
-
|
|
57
|
+
// `dx-fullscreen` (absolute inset-0) does not stretch a replaced <svg> element — without an explicit
|
|
58
|
+
// size it falls back to the intrinsic 300x150, clipping the 100%-sized grid rects. Force full size.
|
|
59
|
+
className={mx(
|
|
60
|
+
'dx-fullscreen w-full h-full pointer-events-none touch-none select-none',
|
|
61
|
+
'stroke-neutral-500',
|
|
62
|
+
classNames,
|
|
63
|
+
)}
|
|
58
64
|
>
|
|
59
65
|
{/* NOTE: The pattern is offset so that the middle of the pattern aligns with the grid. */}
|
|
60
66
|
<defs>
|