@dxos/react-ui-menu 0.8.4-main.84f28bd → 0.8.4-main.ae835ea
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 +58 -48
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +58 -48
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/builder.d.ts +2 -2
- package/dist/types/src/builder.d.ts.map +1 -1
- package/dist/types/src/components/ActionLabel.d.ts +1 -1
- package/dist/types/src/components/ActionLabel.d.ts.map +1 -1
- package/dist/types/src/components/DropdownMenu.d.ts +1 -1
- package/dist/types/src/components/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/MenuContext.d.ts +3 -1
- package/dist/types/src/components/MenuContext.d.ts.map +1 -1
- package/dist/types/src/components/ToolbarMenu.d.ts +2 -2
- package/dist/types/src/components/ToolbarMenu.d.ts.map +1 -1
- package/dist/types/src/components/ToolbarMenu.stories.d.ts +20 -0
- package/dist/types/src/components/ToolbarMenu.stories.d.ts.map +1 -0
- package/dist/types/src/hooks/useMenuActions.d.ts +2 -1
- package/dist/types/src/hooks/useMenuActions.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts +2 -2
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +2 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -24
- package/src/builder.ts +10 -10
- package/src/components/ActionLabel.tsx +3 -3
- package/src/components/DropdownMenu.tsx +6 -3
- package/src/components/MenuContext.tsx +7 -3
- package/src/components/{Menus.stories.tsx → ToolbarMenu.stories.tsx} +13 -9
- package/src/components/ToolbarMenu.tsx +45 -30
- package/src/hooks/useMenuActions.ts +8 -3
- package/src/testing/generator.ts +4 -4
- package/src/types.ts +2 -2
- package/src/util.ts +7 -2
- package/dist/types/src/components/Menus.stories.d.ts +0 -25
- package/dist/types/src/components/Menus.stories.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rx } from '@effect-rx/rx-react';
|
|
2
|
-
import {
|
|
2
|
+
import { ACTION_GROUP_TYPE, ACTION_TYPE, type Action } from '@dxos/app-graph';
|
|
3
3
|
import { type ActionGraphProps } from '../hooks/useMenuActions';
|
|
4
|
-
import { type MenuAction, type
|
|
4
|
+
import { type MenuAction, type MenuItem, type MenuItemGroup } from '../types';
|
|
5
5
|
export type CreateActionsParams = Partial<{
|
|
6
6
|
type?: typeof ACTION_TYPE | typeof ACTION_GROUP_TYPE;
|
|
7
7
|
callback: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAGzC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAGzC,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,KAAK,MAAM,EAKZ,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9E,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IACxC,IAAI,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,iBAAiB,CAAC;IACrD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAqBH,eAAO,MAAM,aAAa,GAAI,SAAS,mBAAmB;;;0BAvBxC,IAAI;;;;;;;IAyCrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,yBAY9B,CAAC;AAEH,eAAO,MAAM,2BAA2B,GAAI,cAAc,mBAAmB,EAAE,SAAS,mBAAmB;oCAYlE,aAAa,KACM,QAAQ,EAAE,GAAG,IAAI;CAE5E,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,EAAE,mBAUxD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,SAAS,UAAU,EAAE,SAI9C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type Action, type ActionGroup, type Node } from '@dxos/app-graph';
|
|
2
|
+
import { type ClassNameValue, type IconButtonProps, type Label, type ToolbarSeparatorProps } from '@dxos/react-ui';
|
|
3
3
|
export type MenuActionProperties = {
|
|
4
4
|
label: Label;
|
|
5
5
|
icon?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,KAAK,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEnH,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM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AM,MAAM,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,CAAC,EAAE,aAAa,KAAK,QAAQ,EAAE,GAAG,IAAI,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,iBAAiB,CAAC;IACjC,QAAQ,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
package/dist/types/src/util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ActionLike, actionGroupSymbol } from '@dxos/app-graph';
|
|
2
2
|
import { type MenuActionProperties, type MenuItemGroupProperties } from './types';
|
|
3
3
|
export declare const getShortcut: (action: ActionLike) => any;
|
|
4
4
|
export declare const fallbackIcon = "ph--placeholder--regular";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkC,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkC,KAAK,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGrG,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,uBAAuB,EAE7B,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,WAAW,GAAI,QAAQ,UAAU,QAI7C,CAAC;AAEF,eAAO,MAAM,YAAY,6BAA6B,CAAC;AAEvD,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,EAAE,GAAG,EAAE,EAChD,IAAI,MAAM,EACV,QAAQ,MAAM,IAAI,EAClB,YAAY,CAAC,GAAG,oBAAoB;;;;gBADtB,IAAI;CAQK,CAAC;AAE1B,eAAO,MAAM,mBAAmB,GAC9B,CAAC,SAAS,uBAAuB,GAAG,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC,EAE3F,IAAI,MAAM,EACV,YAAY,CAAC;;;;;CAOa,CAAC;AAE7B,eAAO,MAAM,kBAAkB,GAAI,KAAI,MAAc,EAAE,SAAQ,MAAe;;;;;;;cAMrD,KAAK;;;;;;CAS5B,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,KAAI,MAAe,EAAE,SAAQ,MAAe;;;;;;;cAMvD,KAAK;;;;;;CAI5B,CAAC"}
|