@dxos/react-ui-menu 0.8.4-main.dedc0f3 → 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/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -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/ToolbarMenu.stories.d.ts +0 -1
- package/dist/types/src/components/ToolbarMenu.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useMenuActions.d.ts +2 -1
- package/dist/types/src/hooks/useMenuActions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -24
- package/src/components/ToolbarMenu.stories.tsx +1 -3
- package/src/hooks/useMenuActions.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-menu",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.ead640a",
|
|
4
4
|
"description": "Components for facilitating reactive and consistent menus.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -26,38 +26,38 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@preact-signals/safe-react": "^0.9.0",
|
|
29
|
-
"@preact/signals-react": "^3.
|
|
29
|
+
"@preact/signals-react": "^3.3.0",
|
|
30
30
|
"@radix-ui/react-context": "1.1.1",
|
|
31
31
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
32
|
+
"@dxos/app-graph": "0.8.4-main.ead640a",
|
|
33
|
+
"@dxos/keyboard": "0.8.4-main.ead640a",
|
|
34
|
+
"@dxos/react-ui-attention": "0.8.4-main.ead640a",
|
|
35
|
+
"@dxos/util": "0.8.4-main.ead640a",
|
|
36
|
+
"@dxos/invariant": "0.8.4-main.ead640a"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@effect-rx/rx-react": "0.
|
|
40
|
-
"@effect/platform": "0.
|
|
41
|
-
"@types/react": "~
|
|
42
|
-
"@types/react-dom": "~
|
|
43
|
-
"effect": "3.
|
|
44
|
-
"react": "~
|
|
45
|
-
"react-dom": "~
|
|
46
|
-
"vite": "7.1.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
50
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
51
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
39
|
+
"@effect-rx/rx-react": "0.42.4",
|
|
40
|
+
"@effect/platform": "0.92.1",
|
|
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/live-object": "0.8.4-main.ead640a",
|
|
49
|
+
"@dxos/react-ui": "0.8.4-main.ead640a",
|
|
50
|
+
"@dxos/react-ui-theme": "0.8.4-main.ead640a",
|
|
51
|
+
"@dxos/storybook-utils": "0.8.4-main.ead640a"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@effect-rx/rx-react": "^0.34.1",
|
|
55
55
|
"@effect/platform": "^0.80.12",
|
|
56
56
|
"effect": "^3.13.3",
|
|
57
|
-
"react": "
|
|
58
|
-
"react-dom": "
|
|
59
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
60
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
57
|
+
"react": "^19.0.0",
|
|
58
|
+
"react-dom": "^19.0.0",
|
|
59
|
+
"@dxos/react-ui": "0.8.4-main.ead640a",
|
|
60
|
+
"@dxos/react-ui-theme": "0.8.4-main.ead640a"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
@@ -2,14 +2,12 @@
|
|
|
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, { useCallback, useMemo } from 'react';
|
|
9
7
|
|
|
10
8
|
import { faker } from '@dxos/random';
|
|
11
9
|
import { IconButton } from '@dxos/react-ui';
|
|
12
|
-
import { withTheme } from '@dxos/
|
|
10
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
13
11
|
|
|
14
12
|
import { MenuProvider, DropdownMenu as NaturalDropdownMenu, ToolbarMenu } from '../components';
|
|
15
13
|
import { useMenuActions } from '../hooks';
|
|
@@ -38,9 +38,14 @@ const edgesArrayToRecord = (edges: Edge[]): Record<string, Edges> => {
|
|
|
38
38
|
|
|
39
39
|
export type ActionGraphNodes = NodeArg<any>[];
|
|
40
40
|
export type ActionGraphEdges = Edge[];
|
|
41
|
-
export type ActionGraphProps = {
|
|
41
|
+
export type ActionGraphProps = {
|
|
42
|
+
nodes: ActionGraphNodes;
|
|
43
|
+
edges: ActionGraphEdges;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type MenuActions = { useGroupItems: (sourceNode?: MenuItemGroup) => MenuItem[] };
|
|
42
47
|
|
|
43
|
-
export const useMenuActions = (props: Rx.Rx<ActionGraphProps>) => {
|
|
48
|
+
export const useMenuActions = (props: Rx.Rx<ActionGraphProps>): MenuActions => {
|
|
44
49
|
const registry = useContext(RegistryContext);
|
|
45
50
|
const menuGraphProps = useRxValue(props);
|
|
46
51
|
|