@dxos/react-ui-menu 0.8.4-main.8360d9e660 → 0.8.4-main.8baae0fced
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/LICENSE +102 -5
- package/dist/lib/browser/index.mjs +43 -58
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +14 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +43 -58
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/translations.mjs +16 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/types/src/builder.d.ts +23 -4
- package/dist/types/src/builder.d.ts.map +1 -1
- package/dist/types/src/builder.test.d.ts +2 -0
- package/dist/types/src/builder.test.d.ts.map +1 -0
- package/dist/types/src/components/ActionLabel.d.ts.map +1 -1
- package/dist/types/src/components/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menu.d.ts +3 -1
- package/dist/types/src/components/Menu.d.ts.map +1 -1
- package/dist/types/src/components/Menu.stories.d.ts.map +1 -1
- package/dist/types/src/components/ToolbarMenu.d.ts +3 -1
- package/dist/types/src/components/ToolbarMenu.d.ts.map +1 -1
- package/dist/types/src/components/ToolbarMenu.stories.d.ts +15 -1
- package/dist/types/src/components/ToolbarMenu.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useMenuActions.d.ts +9 -1
- package/dist/types/src/hooks/useMenuActions.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.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 +1 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +2 -2
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -22
- package/src/builder.test.ts +224 -0
- package/src/builder.ts +41 -18
- package/src/components/ActionLabel.tsx +2 -1
- package/src/components/DropdownMenu.tsx +0 -1
- package/src/components/Menu.stories.tsx +2 -1
- package/src/components/Menu.test.tsx +0 -1
- package/src/components/Menu.tsx +4 -3
- package/src/components/ToolbarMenu.stories.tsx +23 -9
- package/src/components/ToolbarMenu.tsx +32 -16
- package/src/hooks/useMenuActions.ts +14 -2
- package/src/index.ts +1 -1
- package/src/testing/generator.ts +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/util.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/util.ts":{"bytes":7911,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/ActionLabel.tsx":{"bytes":3895,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/types.ts":{"bytes":4432,"imports":[{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"format":"esm"},"src/components/DropdownMenu.tsx":{"bytes":10853,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/util.ts","kind":"import-statement","original":"../util"},{"path":"src/components/ActionLabel.tsx","kind":"import-statement","original":"./ActionLabel"},{"path":"src/components/Menu.tsx","kind":"import-statement","original":"./Menu"}],"format":"esm"},"src/components/ToolbarMenu.tsx":{"bytes":26367,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"src/util.ts","kind":"import-statement","original":"../util"},{"path":"src/components/ActionLabel.tsx","kind":"import-statement","original":"./ActionLabel"},{"path":"src/components/DropdownMenu.tsx","kind":"import-statement","original":"./DropdownMenu"},{"path":"src/components/Menu.tsx","kind":"import-statement","original":"./Menu"}],"format":"esm"},"src/components/Menu.tsx":{"bytes":31593,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/util.ts","kind":"import-statement","original":"../util"},{"path":"src/components/ActionLabel.tsx","kind":"import-statement","original":"./ActionLabel"},{"path":"src/components/ToolbarMenu.tsx","kind":"import-statement","original":"./ToolbarMenu"}],"format":"esm"},"src/components/index.ts":{"bytes":368,"imports":[{"path":"src/components/Menu.tsx","kind":"import-statement","original":"./Menu"}],"format":"esm"},"src/hooks/useMenuActions.ts":{"bytes":6673,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":394,"imports":[{"path":"src/hooks/useMenuActions.ts","kind":"import-statement","original":"./useMenuActions"}],"format":"esm"},"src/builder.ts":{"bytes":11182,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/index.ts":{"bytes":1214,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/util.ts","kind":"import-statement","original":"./util"},{"path":"src/builder.ts","kind":"import-statement","original":"./builder"}],"format":"esm"},"src/translations.ts":{"bytes":968,"imports":[],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":53896},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["Menu","MenuBuilder","MenuSeparatorType","createGapSeparator","createLineSeparator","createMenuAction","createMenuItemGroup","isMenuGroup","isSeparator","menuContextDefaults","useMenu","useMenuActions","useMenuBuilder","useMenuItems","useMenuScoped"],"entryPoint":"src/index.ts","inputs":{"src/components/Menu.tsx":{"bytesInOutput":6930},"src/util.ts":{"bytesInOutput":1475},"src/components/ActionLabel.tsx":{"bytesInOutput":890},"src/components/ToolbarMenu.tsx":{"bytesInOutput":6383},"src/types.ts":{"bytesInOutput":235},"src/components/DropdownMenu.tsx":{"bytesInOutput":2516},"src/index.ts":{"bytesInOutput":0},"src/hooks/useMenuActions.ts":{"bytesInOutput":955},"src/builder.ts":{"bytesInOutput":2241}},"bytes":22309},"dist/lib/node-esm/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":525},"dist/lib/node-esm/translations.mjs":{"imports":[],"exports":["translationKey","translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":124}},"bytes":327}}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/translations.ts
|
|
4
|
+
var translationKey = "@dxos/react-ui-menu";
|
|
5
|
+
var translations = [
|
|
6
|
+
{
|
|
7
|
+
"en-US": {
|
|
8
|
+
[translationKey]: {}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
export {
|
|
13
|
+
translationKey,
|
|
14
|
+
translations
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-menu';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {},\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB,CAAC;IACrB;EACF;;",
|
|
6
|
+
"names": ["translationKey", "translations"]
|
|
7
|
+
}
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import type { MenuActionProperties, MenuItemGroupProperties } from '@dxos/ui-types';
|
|
2
2
|
import type { ActionGraphProps } from './hooks';
|
|
3
|
+
/** Callback that populates an action group builder. */
|
|
4
|
+
export type ActionGroupBuilderFn = (builder: ActionGroupBuilder) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Fluent builder for composing menu action graphs.
|
|
7
|
+
* Subgraph functions return a callback that receives the builder, enabling composition via partial application:
|
|
8
|
+
* ```ts
|
|
9
|
+
* const addHeadings = (state): ActionGroupBuilderFn => (builder) => {
|
|
10
|
+
* builder.group('headings', { ... }, (group) => { ... });
|
|
11
|
+
* };
|
|
12
|
+
*
|
|
13
|
+
* MenuBuilder.make()
|
|
14
|
+
* .subgraph(showHeadings && addHeadings(state))
|
|
15
|
+
* .subgraph(showFormatting && addFormatting(state))
|
|
16
|
+
* .build();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
3
19
|
export interface ActionGroupBuilder {
|
|
4
20
|
/** Add an action node as a child of the current group. */
|
|
5
21
|
action<P extends {} = {}>(id: string, props: P & MenuActionProperties, invoke: () => void): this;
|
|
6
22
|
/** Add a nested action group. */
|
|
7
|
-
group<P extends {} = {}>(id: string, props: P & MenuItemGroupProperties, cb:
|
|
8
|
-
/** Merge pre-built nodes and edges
|
|
9
|
-
subgraph(
|
|
23
|
+
group<P extends {} = {}>(id: string, props: P & MenuItemGroupProperties, cb: ActionGroupBuilderFn): this;
|
|
24
|
+
/** Merge pre-built nodes and edges, or build a subgraph via callback scoped to the current group. Falsy values are ignored. */
|
|
25
|
+
subgraph(subgraphOrCb: ActionGraphProps | ActionGroupBuilderFn | false | null | undefined): this;
|
|
10
26
|
/** Add a separator. */
|
|
11
|
-
separator(
|
|
27
|
+
separator(variant?: 'gap' | 'line'): this;
|
|
12
28
|
}
|
|
29
|
+
/** Top-level builder that creates the root group and produces the final action graph. */
|
|
13
30
|
export interface MenuBuilder extends ActionGroupBuilder {
|
|
31
|
+
/** Set properties on the root menu group. May only be called once. */
|
|
14
32
|
root(props: MenuItemGroupProperties): this;
|
|
33
|
+
/** Return the assembled action graph. */
|
|
15
34
|
build(): ActionGraphProps;
|
|
16
35
|
}
|
|
17
36
|
export declare const MenuBuilder: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/builder.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIhD,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,MAAM,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,oBAAoB,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/builder.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIhD,uDAAuD;AACvD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,MAAM,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,oBAAoB,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAEjG,iCAAiC;IACjC,KAAK,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,uBAAuB,EAAE,EAAE,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAEzG,+HAA+H;IAC/H,QAAQ,CAAC,YAAY,EAAE,gBAAgB,GAAG,oBAAoB,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IAEjG,uBAAuB;IACvB,SAAS,CAAC,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,yFAAyF;AACzF,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,sEAAsE;IACtE,IAAI,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAE3C,yCAAyC;IACzC,KAAK,IAAI,gBAAgB,CAAC;CAC3B;AA4DD,eAAO,MAAM,WAAW;gBACZ,WAAW;EACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.test.d.ts","sourceRoot":"","sources":["../../../src/builder.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionLabel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,KAAK,SAAS,EAAqC,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionLabel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,KAAK,SAAS,EAAqC,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAM3D,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAAC;AAE1G,eAAO,MAAM,WAAW,eAAgB;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,sBASzD,CAAC;AAEF,eAAO,MAAM,WAAW,WAAY,MAAM,KAAK,SAAS,WAGvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,KAAK,qBAAqB,EAA6C,MAAM,gBAAgB,CAAC;AAEvG,OAAO,EAAmB,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,KAAK,qBAAqB,EAA6C,MAAM,gBAAgB,CAAC;AAEvG,OAAO,EAAmB,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9E,OAAO,EAAE,KAAK,eAAe,EAA+B,MAAM,QAAQ,CAAC;AAE3E,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GAAG;IACtD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAkFF,eAAO,MAAM,YAAY;IACvB,IAAI,kHA9CH,eAAe,CAAC,iBAAiB,CAAC;IA+CnC,OAAO;;;IACP,cAAc;;;;;;CACf,CAAC"}
|
|
@@ -40,7 +40,9 @@ declare const Menu: {
|
|
|
40
40
|
}): React.JSX.Element;
|
|
41
41
|
displayName: string;
|
|
42
42
|
};
|
|
43
|
-
Toolbar:
|
|
43
|
+
Toolbar: React.ForwardRefExoticComponent<Omit<MenuScopedProps<import("@dxos/react-ui").ToolbarRootProps>, "className"> & {
|
|
44
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
45
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
46
|
};
|
|
45
47
|
export { Menu, menuContextDefaults, useMenu, useMenuItems, useMenuScoped };
|
|
46
48
|
export type { MenuContentProps, MenuRootProps, MenuScopedProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAE,EAAkC,KAAK,iBAAiB,EAAoC,MAAM,OAAO,CAAC;AAGxH,OAAO,EAAE,KAAK,qBAAqB,EAA6C,MAAM,gBAAgB,CAAC;AAEvG,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,aAAa,EAInB,MAAM,UAAU,CAAC;AASlB,KAAK,eAAe,CAAC,CAAC,IAAI,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"Menu.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAiB5D,QAAA,MAAM,IAAI;;;;;;;;;;;CAOwB,CAAC;eAEpB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA0CnC,eAAO,MAAM,WAAW,EAAE,KAsBzB,CAAC;AAaF,eAAO,MAAM,aAAa,EAAE,KA8C3B,CAAC;AAsBF,eAAO,MAAM,eAAe,EAAE,KAqB7B,CAAC;AA0CF,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAC"}
|
|
@@ -21,5 +21,7 @@ export type ToolbarMenuActionProps = {
|
|
|
21
21
|
group: MenuItemGroup<ToolbarMenuActionGroupProperties>;
|
|
22
22
|
action: MenuAction;
|
|
23
23
|
};
|
|
24
|
-
export declare const ToolbarMenu:
|
|
24
|
+
export declare const ToolbarMenu: React.ForwardRefExoticComponent<Omit<MenuScopedProps<ToolbarRootProps>, "className"> & {
|
|
25
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
26
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
27
|
//# sourceMappingURL=ToolbarMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/ToolbarMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,C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,UAAU,CAAC;CACpB,CAAC;AAkKF,eAAO,MAAM,WAAW;;2HAmBvB,CAAC"}
|
|
@@ -2,7 +2,9 @@ import { type StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("./Menu").MenuScopedProps<import("@dxos/react-ui").ToolbarRootProps>, "className"> & {
|
|
6
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
7
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
8
|
decorators: import("@storybook/react").Decorator[];
|
|
7
9
|
parameters: {
|
|
8
10
|
translations: [{
|
|
@@ -16,5 +18,17 @@ export default meta;
|
|
|
16
18
|
type Story = StoryObj<typeof meta>;
|
|
17
19
|
export declare const DropdownMenu: Story;
|
|
18
20
|
export declare const Toolbar: Story;
|
|
21
|
+
/**
|
|
22
|
+
* Reactive toolbar driven by an atom-backed actions hook.
|
|
23
|
+
*
|
|
24
|
+
* Defining actions inside a hook lets them subscribe to reactive state
|
|
25
|
+
* (echo, atoms, settings) without re-rendering the toolbar shell.
|
|
26
|
+
* The menu structure is data, not JSX.
|
|
27
|
+
*
|
|
28
|
+
* @idiom org.dxos.react-ui-menu.toolbarMenu
|
|
29
|
+
* applies: Toolbars whose entries depend on reactive state
|
|
30
|
+
* instead-of: Hand-wired children inside a bespoke `Toolbar.Root`
|
|
31
|
+
* uses: {@link useMenuActions}, {@link Menu.Root}, {@link Menu.Toolbar}
|
|
32
|
+
*/
|
|
19
33
|
export declare const UseMenuActionsToolbar: Story;
|
|
20
34
|
//# sourceMappingURL=ToolbarMenu.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarMenu.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ToolbarMenu.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolbarMenu.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ToolbarMenu.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA8B,MAAM,OAAO,CAAC;AAenD,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAO2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,KAsB1B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAWnC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
2
|
+
import { type DependencyList } from 'react';
|
|
2
3
|
import { Graph, Node } from '@dxos/app-graph';
|
|
3
4
|
import { type MenuItemsAccessor } from '../types';
|
|
4
5
|
export type ActionGraphNodes = Node.NodeArg<any>[];
|
|
@@ -11,4 +12,11 @@ export type MenuActions = {
|
|
|
11
12
|
items: MenuItemsAccessor;
|
|
12
13
|
};
|
|
13
14
|
export declare const useMenuActions: (props: Atom.Atom<ActionGraphProps>) => MenuActions;
|
|
15
|
+
/**
|
|
16
|
+
* Convenience wrapper around `useMenuActions` that creates the backing atom inline.
|
|
17
|
+
* Pass a builder thunk and a dependency list — the hook memoizes `Atom.make(build)` and threads
|
|
18
|
+
* it through `useMenuActions`. Saves the `useMemo(() => Atom.make(...), deps)` boilerplate when
|
|
19
|
+
* the action graph is composed from local state (e.g. a toolbar driven by component state).
|
|
20
|
+
*/
|
|
21
|
+
export declare const useMenuBuilder: (build: (get: Atom.Context) => ActionGraphProps, deps: DependencyList) => MenuActions;
|
|
14
22
|
//# sourceMappingURL=useMenuActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMenuActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useMenuActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMenuActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAiC,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,KAAK,cAAc,EAAoC,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAqC,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;AACnD,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;AAC5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,iBAAiB,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAG,WAuBnE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,UAAW,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,KAAK,gBAAgB,QAAQ,cAAc,KAAG,WAIrG,CAAC"}
|
|
@@ -2,5 +2,5 @@ export * from './components';
|
|
|
2
2
|
export * from './hooks';
|
|
3
3
|
export * from './types';
|
|
4
4
|
export { createMenuAction, createMenuItemGroup, createLineSeparator, createGapSeparator } from './util';
|
|
5
|
-
export { MenuBuilder } from './builder';
|
|
5
|
+
export { type ActionGroupBuilder, type ActionGroupBuilderFn, MenuBuilder } from './builder';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACxG,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACxG,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -9,13 +9,13 @@ export type CreateActionsProps = Partial<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export declare const createActions: (params?: CreateActionsProps) => {
|
|
11
11
|
id: string;
|
|
12
|
-
type: "org.dxos.type.
|
|
12
|
+
type: "org.dxos.type.graphAction" | "org.dxos.type.graphActionGroup";
|
|
13
13
|
data: symbol | (() => void);
|
|
14
14
|
properties: {
|
|
15
|
-
variant?: string | undefined;
|
|
16
15
|
label: string;
|
|
17
16
|
icon: string;
|
|
18
17
|
disabled: boolean;
|
|
18
|
+
variant?: string | undefined;
|
|
19
19
|
};
|
|
20
20
|
}[];
|
|
21
21
|
export declare const createNestedActions: Atom.Writable<ActionGraphProps, ActionGraphProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,yBAAyB,CAAC;AAG1E,OAAO,EAAS,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAqC,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErF,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACvC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,UAAU,GAAG,OAAO,IAAI,CAAC,eAAe,CAAC;IAC5D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAqBH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,yBAAyB,CAAC;AAG1E,OAAO,EAAS,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAqC,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErF,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACvC,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC,UAAU,GAAG,OAAO,IAAI,CAAC,eAAe,CAAC;IAC5D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAqBH,eAAO,MAAM,aAAa,YAAa,kBAAkB;;;0BAvBvC,IAAI;;;;;;;GAuCrB,CAAC;AAgBF,eAAO,MAAM,mBAAmB,mDAAuD,CAAC;AAExF,eAAO,MAAM,2BAA2B,WAAY;IAClD,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAC9B;;CAkBA,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,gBAAiB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SA0B5E,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { Node } from '@dxos/app-graph';
|
|
|
3
3
|
import { type IconButtonProps, type ToolbarSeparatorProps } from '@dxos/react-ui';
|
|
4
4
|
import { type MenuActionProperties } from '@dxos/ui-types';
|
|
5
5
|
export type MenuAction<P extends {} = {}> = Node.Action<P & MenuActionProperties>;
|
|
6
|
-
export declare const MenuSeparatorType:
|
|
6
|
+
export declare const MenuSeparatorType: '@dxos/react-ui-toolbar/separator';
|
|
7
7
|
export type MenuSeparator = Node.Node<never, Pick<ToolbarSeparatorProps, 'variant'>> & {
|
|
8
8
|
type: typeof MenuSeparatorType;
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC;AAElF,eAAO,MAAM,iBAAiB,EAAG,kCAA2C,CAAC;AAE7E,MAAM,MAAM,aAAa,GAAG,I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,IAAI,CAAC,YAAY,CAAC,CAAC;IACvC,+DAA+D;IAC/D,YAAY,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,gDAAgD;IAChD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,wFAAwF;IACxF,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC"}
|
package/dist/types/src/util.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare const createGapSeparator: (id?: string, source?: string) => {
|
|
|
33
33
|
edges: {
|
|
34
34
|
source: string;
|
|
35
35
|
target: string;
|
|
36
|
-
relation:
|
|
36
|
+
relation: 'child';
|
|
37
37
|
}[];
|
|
38
38
|
};
|
|
39
39
|
export declare const createLineSeparator: (id?: string, source?: string) => {
|
|
@@ -48,7 +48,7 @@ export declare const createLineSeparator: (id?: string, source?: string) => {
|
|
|
48
48
|
edges: {
|
|
49
49
|
source: string;
|
|
50
50
|
target: string;
|
|
51
|
-
relation:
|
|
51
|
+
relation: 'child';
|
|
52
52
|
}[];
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAGzF,OAAO,EAAE,KAAK,UAAU,EAA0C,MAAM,SAAS,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,IAAI,EAA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