@dxos/plugin-simple-layout 0.8.4-main.69d29f4 → 0.8.4-main.8360d9e660
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/chunk-2YSUM2L4.mjs +1153 -0
- package/dist/lib/browser/chunk-2YSUM2L4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CLPGTNWJ.mjs → chunk-MRR7PXSM.mjs} +5 -5
- package/dist/lib/browser/chunk-MRR7PXSM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +27 -20
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-LTB63NKP.mjs → operation-resolver-LV5FK6MN.mjs} +46 -19
- package/dist/lib/browser/operation-resolver-LV5FK6MN.mjs.map +7 -0
- package/dist/lib/browser/{react-root-6ARAPH3O.mjs → react-root-JR6OENXV.mjs} +5 -5
- package/dist/lib/browser/react-root-JR6OENXV.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-SO7B23GS.mjs → react-surface-5JOPIP5Z.mjs} +18 -13
- package/dist/lib/browser/react-surface-5JOPIP5Z.mjs.map +7 -0
- package/dist/lib/browser/{spotlight-dismiss-VSNOPETH.mjs → spotlight-dismiss-67PHYS5B.mjs} +3 -3
- package/dist/lib/browser/spotlight-dismiss-67PHYS5B.mjs.map +7 -0
- package/dist/lib/browser/{state-H4IGICBB.mjs → state-TXSMUWYI.mjs} +8 -5
- package/dist/lib/browser/state-TXSMUWYI.mjs.map +7 -0
- package/dist/lib/browser/url-handler-RBRONH7S.mjs +151 -0
- package/dist/lib/browser/url-handler-RBRONH7S.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RCQE6FR2.mjs +1154 -0
- package/dist/lib/node-esm/chunk-RCQE6FR2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MUVVYBUE.mjs → chunk-WMNTJ2MK.mjs} +5 -5
- package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +27 -20
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-7O6O7T4Q.mjs → operation-resolver-FD3EF2LX.mjs} +46 -19
- package/dist/lib/node-esm/operation-resolver-FD3EF2LX.mjs.map +7 -0
- package/dist/lib/node-esm/{react-root-2CPA2ZUS.mjs → react-root-CRTCNH3F.mjs} +5 -5
- package/dist/lib/node-esm/react-root-CRTCNH3F.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-FKAV56MO.mjs → react-surface-NRTDSGFB.mjs} +18 -13
- package/dist/lib/node-esm/react-surface-NRTDSGFB.mjs.map +7 -0
- package/dist/lib/node-esm/{spotlight-dismiss-L5PCWIJG.mjs → spotlight-dismiss-RMLRZUVY.mjs} +3 -3
- package/dist/lib/node-esm/spotlight-dismiss-RMLRZUVY.mjs.map +7 -0
- package/dist/lib/node-esm/{state-QIU2LMLT.mjs → state-JMX6FAG4.mjs} +8 -5
- package/dist/lib/node-esm/state-JMX6FAG4.mjs.map +7 -0
- package/dist/lib/node-esm/url-handler-QSMCH3JB.mjs +152 -0
- package/dist/lib/node-esm/url-handler-QSMCH3JB.mjs.map +7 -0
- package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts +1 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts.map +1 -1
- package/dist/types/src/capabilities/state/index.d.ts +1 -1
- package/dist/types/src/capabilities/state/state.d.ts +1 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -3
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/ContentError.stories.d.ts +7 -3
- package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
- package/dist/types/src/components/ContentLoading/ContentLoading.d.ts.map +1 -0
- package/dist/types/src/components/ContentLoading/ContentLoading.stories.d.ts.map +1 -0
- package/dist/types/src/components/ContentLoading/index.d.ts +2 -0
- package/dist/types/src/components/ContentLoading/index.d.ts.map +1 -0
- package/dist/types/src/components/Home/Home.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +35 -0
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -0
- package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts +7 -0
- package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -0
- package/dist/types/src/components/MobileLayout/index.d.ts +2 -0
- package/dist/types/src/components/MobileLayout/index.d.ts.map +1 -0
- package/dist/types/src/components/NavBranch/NavBranch.d.ts +11 -0
- package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -0
- package/dist/types/src/components/NavBranch/index.d.ts +2 -0
- package/dist/types/src/components/NavBranch/index.d.ts.map +1 -0
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts +26 -0
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -0
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +47 -0
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -0
- package/dist/types/src/components/SimpleLayout/Drawer.d.ts +9 -0
- package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -0
- package/dist/types/src/components/SimpleLayout/Main.d.ts +1 -1
- package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts +13 -3
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +13 -9
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +10 -0
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/index.d.ts +3 -0
- package/dist/types/src/components/SimpleLayout/index.d.ts.map +1 -1
- package/dist/types/src/components/hooks.d.ts +4 -2
- package/dist/types/src/components/hooks.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/actions.d.ts +19 -0
- package/dist/types/src/hooks/actions.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +5 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useAppBarProps.d.ts +7 -0
- package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -0
- package/dist/types/src/hooks/useCompanions.d.ts +12 -0
- package/dist/types/src/hooks/useCompanions.d.ts.map +1 -0
- package/dist/types/src/hooks/useDrawerActions.d.ts +13 -0
- package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useNavbarActions.d.ts +14 -0
- package/dist/types/src/hooks/useNavbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useSimpleLayoutState.d.ts +3 -3
- package/dist/types/src/hooks/useSimpleLayoutState.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +8 -3
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -30
- package/src/SimpleLayoutPlugin.ts +10 -9
- package/src/capabilities/operation-resolver/operation-resolver.ts +44 -19
- package/src/capabilities/react-root/react-root.tsx +2 -2
- package/src/capabilities/react-surface/react-surface.tsx +14 -11
- package/src/capabilities/spotlight-dismiss/spotlight-dismiss.ts +2 -2
- package/src/capabilities/state/state.tsx +6 -3
- package/src/capabilities/url-handler/url-handler.ts +98 -45
- package/src/components/ContentError.stories.tsx +8 -7
- package/src/components/{ContentLoading.stories.tsx → ContentLoading/ContentLoading.stories.tsx} +2 -2
- package/src/components/{ContentLoading.tsx → ContentLoading/ContentLoading.tsx} +1 -1
- package/src/components/ContentLoading/index.ts +5 -0
- package/src/components/Dialog/Dialog.tsx +5 -5
- package/src/components/Home/Home.tsx +44 -36
- package/src/components/MobileLayout/MobileLayout.stories.tsx +129 -0
- package/src/components/MobileLayout/MobileLayout.tsx +305 -0
- package/src/components/MobileLayout/index.ts +5 -0
- package/src/components/NavBranch/NavBranch.tsx +133 -0
- package/src/components/{Workspace → NavBranch}/index.ts +1 -1
- package/src/components/Popover/Popover.tsx +7 -7
- package/src/components/SimpleLayout/AppBar.stories.tsx +144 -0
- package/src/components/SimpleLayout/AppBar.tsx +94 -0
- package/src/components/SimpleLayout/Drawer.tsx +96 -0
- package/src/components/SimpleLayout/Main.tsx +46 -45
- package/src/components/SimpleLayout/NavBar.stories.tsx +131 -26
- package/src/components/SimpleLayout/NavBar.tsx +18 -59
- package/src/components/SimpleLayout/SimpleLayout.stories.tsx +24 -11
- package/src/components/SimpleLayout/SimpleLayout.tsx +45 -6
- package/src/components/SimpleLayout/index.ts +3 -0
- package/src/components/hooks.ts +10 -14
- package/src/components/index.ts +2 -1
- package/src/hooks/actions.ts +83 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useAppBarProps.ts +115 -0
- package/src/hooks/useCompanions.ts +22 -0
- package/src/hooks/useDrawerActions.ts +100 -0
- package/src/hooks/useNavbarActions.ts +87 -0
- package/src/hooks/useSimpleLayoutState.ts +5 -5
- package/src/meta.ts +1 -1
- package/src/translations.ts +6 -0
- package/src/types/capabilities.ts +13 -4
- package/src/types/events.ts +3 -2
- package/dist/lib/browser/chunk-CLPGTNWJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-FK4M7GJV.mjs +0 -613
- package/dist/lib/browser/chunk-FK4M7GJV.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-LTB63NKP.mjs.map +0 -7
- package/dist/lib/browser/react-root-6ARAPH3O.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SO7B23GS.mjs.map +0 -7
- package/dist/lib/browser/spotlight-dismiss-VSNOPETH.mjs.map +0 -7
- package/dist/lib/browser/state-H4IGICBB.mjs.map +0 -7
- package/dist/lib/browser/url-handler-7CFGTLNG.mjs +0 -54
- package/dist/lib/browser/url-handler-7CFGTLNG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EGFZAVBD.mjs +0 -614
- package/dist/lib/node-esm/chunk-EGFZAVBD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MUVVYBUE.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-7O6O7T4Q.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-2CPA2ZUS.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-FKAV56MO.mjs.map +0 -7
- package/dist/lib/node-esm/spotlight-dismiss-L5PCWIJG.mjs.map +0 -7
- package/dist/lib/node-esm/state-QIU2LMLT.mjs.map +0 -7
- package/dist/lib/node-esm/url-handler-4LYP3JM7.mjs +0 -55
- package/dist/lib/node-esm/url-handler-4LYP3JM7.mjs.map +0 -7
- package/dist/types/src/components/ContentError.d.ts +0 -5
- package/dist/types/src/components/ContentError.d.ts.map +0 -1
- package/dist/types/src/components/ContentLoading.d.ts.map +0 -1
- package/dist/types/src/components/ContentLoading.stories.d.ts.map +0 -1
- package/dist/types/src/components/SimpleLayout/Banner.d.ts +0 -8
- package/dist/types/src/components/SimpleLayout/Banner.d.ts.map +0 -1
- package/dist/types/src/components/Workspace/Workspace.d.ts +0 -9
- package/dist/types/src/components/Workspace/Workspace.d.ts.map +0 -1
- package/dist/types/src/components/Workspace/index.d.ts +0 -2
- package/dist/types/src/components/Workspace/index.d.ts.map +0 -1
- package/src/components/ContentError.tsx +0 -23
- package/src/components/SimpleLayout/Banner.tsx +0 -82
- package/src/components/Workspace/Workspace.tsx +0 -115
- /package/dist/types/src/components/{ContentLoading.d.ts → ContentLoading/ContentLoading.d.ts} +0 -0
- /package/dist/types/src/components/{ContentLoading.stories.d.ts → ContentLoading/ContentLoading.stories.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Main.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/Main.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAmBvC;;GAEG;AACH,eAAO,MAAM,IAAI;;;CAqDhB,CAAC"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { type ActionExecutor, type ActionGraphProps } from '@dxos/react-ui-menu';
|
|
2
4
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
5
|
export type NavBarProps = ThemedClassName<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
/** Action graph atom for the toolbar. */
|
|
7
|
+
actions: Atom.Atom<ActionGraphProps>;
|
|
8
|
+
/** Action executor callback. */
|
|
9
|
+
onAction?: ActionExecutor;
|
|
6
10
|
}>;
|
|
7
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Presentational navbar component that renders a toolbar from an action graph.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NavBar: {
|
|
15
|
+
({ classNames, actions, onAction }: NavBarProps): React.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
8
18
|
//# sourceMappingURL=NavBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAwB,MAAM,qBAAqB,CAAC;AACvG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;IACxC,yCAAyC;IACzC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,MAAM;wCAAuC,WAAW;;CAQpE,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
|
-
component:
|
|
5
|
+
component: {
|
|
6
|
+
({ classNames, actions, onAction }: import("./NavBar").NavBarProps): React.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
5
9
|
decorators: import("@storybook/react").Decorator[];
|
|
6
10
|
parameters: {
|
|
7
11
|
layout: string;
|
|
@@ -18,22 +22,22 @@ declare const meta: {
|
|
|
18
22
|
readonly 'profile label': "Profile";
|
|
19
23
|
readonly 'app menu label': "App menu";
|
|
20
24
|
readonly 'main menu label': "Main menu";
|
|
25
|
+
readonly 'companions menu label': "Companions";
|
|
21
26
|
readonly 'error fallback message': "An error occurred";
|
|
22
27
|
readonly 'search placeholder': "Search...";
|
|
28
|
+
readonly 'drawer label': "Drawer";
|
|
29
|
+
readonly 'close drawer label': "Close drawer";
|
|
30
|
+
readonly 'expand drawer label': "Expand drawer";
|
|
31
|
+
readonly 'collapse drawer label': "Collapse drawer";
|
|
32
|
+
readonly 'actions menu label': "Actions";
|
|
23
33
|
};
|
|
24
34
|
};
|
|
25
35
|
}];
|
|
26
36
|
};
|
|
27
|
-
argTypes: {
|
|
28
|
-
onActiveIdChange: {
|
|
29
|
-
action: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
37
|
};
|
|
33
38
|
export default meta;
|
|
34
39
|
type Story = StoryObj<typeof meta>;
|
|
35
40
|
export declare const Default: Story;
|
|
36
|
-
export declare const
|
|
37
|
-
export declare const
|
|
38
|
-
export declare const ProfileActive: Story;
|
|
41
|
+
export declare const CompanionsOnly: Story;
|
|
42
|
+
export declare const Empty: Story;
|
|
39
43
|
//# sourceMappingURL=NavBar.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavBar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/NavBar.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAkB,MAAM,OAAO,CAAC;AAqFvC,QAAA,MAAM,IAAI;;;;;;;;;;;yBArFM,CAAQ,IAAG,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;CA6FA,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAC;AAQF,eAAO,MAAM,cAAc,EAAE,KAG5B,CAAC;AAQF,eAAO,MAAM,KAAK,EAAE,KAGnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"SimpleLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAc3D,eAAO,MAAM,YAAY,yBAwCxB,CAAC"}
|
|
@@ -17,8 +17,14 @@ declare const meta: {
|
|
|
17
17
|
readonly 'profile label': "Profile";
|
|
18
18
|
readonly 'app menu label': "App menu";
|
|
19
19
|
readonly 'main menu label': "Main menu";
|
|
20
|
+
readonly 'companions menu label': "Companions";
|
|
20
21
|
readonly 'error fallback message': "An error occurred";
|
|
21
22
|
readonly 'search placeholder': "Search...";
|
|
23
|
+
readonly 'drawer label': "Drawer";
|
|
24
|
+
readonly 'close drawer label': "Close drawer";
|
|
25
|
+
readonly 'expand drawer label': "Expand drawer";
|
|
26
|
+
readonly 'collapse drawer label': "Collapse drawer";
|
|
27
|
+
readonly 'actions menu label': "Actions";
|
|
22
28
|
};
|
|
23
29
|
};
|
|
24
30
|
} | {
|
|
@@ -32,6 +38,10 @@ declare const meta: {
|
|
|
32
38
|
};
|
|
33
39
|
export default meta;
|
|
34
40
|
type Story = StoryObj<typeof meta>;
|
|
41
|
+
/**
|
|
42
|
+
* NOTE: To expose to iphone on network:
|
|
43
|
+
* `moon run storybook-react:serve dev -H 0.0.0.0`
|
|
44
|
+
*/
|
|
35
45
|
export declare const Default: Story;
|
|
36
46
|
export declare const Popover: Story;
|
|
37
47
|
//# sourceMappingURL=SimpleLayout.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleLayout.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SimpleLayout.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/SimpleLayout.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA6EjE,QAAA,MAAM,IAAI;;;;;;;yBA1EW,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFA,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SimpleLayout/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Expand graph nodes along the full path from root to the given node ID.
|
|
3
|
+
* Walks each progressive prefix, ensuring ancestor nodes are materialized
|
|
4
|
+
* before attempting to access their children.
|
|
3
5
|
*/
|
|
4
|
-
export declare const
|
|
6
|
+
export declare const useExpandPath: (nodeId?: string) => void;
|
|
5
7
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,SAU5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
2
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
3
|
+
import { type ActionGraphProps } from '@dxos/react-ui-menu';
|
|
4
|
+
import { type SimpleLayoutState } from '../types';
|
|
5
|
+
export declare const PLANK_COMPANION_TYPE = "org.dxos.plugin.deck.plank-companion";
|
|
6
|
+
export type CompanionActionsConfig = {
|
|
7
|
+
/** Prefix for companion action IDs (e.g. 'navbar' or 'drawer') */
|
|
8
|
+
idPrefix: string;
|
|
9
|
+
/** Optional: highlight companion with this variant */
|
|
10
|
+
selectedVariant?: string;
|
|
11
|
+
/** State updater for toggling the drawer. */
|
|
12
|
+
updateState: (fn: (state: SimpleLayoutState) => SimpleLayoutState) => void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Creates action graph nodes and edges for companion actions.
|
|
16
|
+
* Shared logic between useNavbarActions and useDrawerActions.
|
|
17
|
+
*/
|
|
18
|
+
export declare const createCompanionActions: (graph: AppCapabilities.AppGraph["graph"], stateAtom: Atom.Atom<SimpleLayoutState>, get: (atom: Atom.Atom<any>) => any, config: CompanionActionsConfig) => Pick<ActionGraphProps, "nodes" | "edges">;
|
|
19
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,KAAK,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,eAAO,MAAM,oBAAoB,yCAAyC,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG;IACnC,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6CAA6C;IAC7C,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,iBAAiB,KAAK,IAAI,CAAC;CAC5E,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,sBAAsB,GACjC,OAAO,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EACxC,WAAW,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,EACvC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,EAClC,QAAQ,sBAAsB,KAC7B,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,OAAO,CA8C1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type AppBarProps } from '../components';
|
|
2
|
+
/**
|
|
3
|
+
* Hook that computes all AppBar props from the app graph.
|
|
4
|
+
* Derives activeId from state atom. Returns props ready to spread into the AppBar component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useAppBarProps: () => Omit<AppBarProps, "classNames">;
|
|
7
|
+
//# sourceMappingURL=useAppBarProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppBarProps.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAppBarProps.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,IAAI,CAAC,WAAW,EAAE,YAAY,CA0F/D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Adopt the pattern from useNavbarActions (deriving from graph atoms)
|
|
3
|
+
* or merge the Drawer companion display into the NavBar component.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useCompanions: (nodeId?: string) => Readonly<{
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
cacheable?: string[];
|
|
9
|
+
properties: Readonly<Record<string, any>>;
|
|
10
|
+
data: any;
|
|
11
|
+
}>[];
|
|
12
|
+
//# sourceMappingURL=useCompanions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCompanions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCompanions.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM;;;;;;IAK5C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
2
|
+
import { type ActionExecutor, type ActionGraphProps } from '@dxos/react-ui-menu';
|
|
3
|
+
export type DrawerActions = {
|
|
4
|
+
/** Action graph atom for the drawer. */
|
|
5
|
+
actions: Atom.Atom<ActionGraphProps>;
|
|
6
|
+
/** Action executor callback. */
|
|
7
|
+
onAction: ActionExecutor;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Builds the drawer actions including companion tabs and toolbar buttons.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useDrawerActions: (consumerName: string) => DrawerActions;
|
|
13
|
+
//# sourceMappingURL=useDrawerActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDrawerActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDrawerActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAQ/C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;AASrG,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,gCAAgC;IAChC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,KAAG,aAoEvD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
2
|
+
import { type ActionExecutor, type ActionGraphProps } from '@dxos/react-ui-menu';
|
|
3
|
+
export type NavbarActions = {
|
|
4
|
+
/** Action graph atom for the navbar. */
|
|
5
|
+
actions: Atom.Atom<ActionGraphProps>;
|
|
6
|
+
/** Action executor callback. */
|
|
7
|
+
onAction: ActionExecutor;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Builds the navbar actions including companion icons, separator, and main menu dropdown.
|
|
11
|
+
* Derives everything from graph connection atoms for proper reactivity.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useNavbarActions: () => NavbarActions;
|
|
14
|
+
//# sourceMappingURL=useNavbarActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavbarActions.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useNavbarActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAO/C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAGtB,MAAM,qBAAqB,CAAC;AAU7B,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,gCAAgC;IAChC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,aAiDnC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type
|
|
1
|
+
import { SimpleLayoutState } from '../types';
|
|
2
|
+
export type UseSimpleLayoutState = {
|
|
3
3
|
state: SimpleLayoutState;
|
|
4
4
|
updateState: (fn: (current: SimpleLayoutState) => SimpleLayoutState) => void;
|
|
5
5
|
};
|
|
6
|
-
export declare const useSimpleLayoutState: () =>
|
|
6
|
+
export declare const useSimpleLayoutState: () => UseSimpleLayoutState;
|
|
7
7
|
//# sourceMappingURL=useSimpleLayoutState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSimpleLayoutState.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSimpleLayoutState.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useSimpleLayoutState.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSimpleLayoutState.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,iBAAiB,CAAC;IACzB,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,iBAAiB,KAAK,IAAI,CAAC;CAC9E,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAO,oBAavC,CAAC"}
|
|
@@ -12,8 +12,14 @@ export declare const translations: [{
|
|
|
12
12
|
readonly 'profile label': "Profile";
|
|
13
13
|
readonly 'app menu label': "App menu";
|
|
14
14
|
readonly 'main menu label': "Main menu";
|
|
15
|
+
readonly 'companions menu label': "Companions";
|
|
15
16
|
readonly 'error fallback message': "An error occurred";
|
|
16
17
|
readonly 'search placeholder': "Search...";
|
|
18
|
+
readonly 'drawer label': "Drawer";
|
|
19
|
+
readonly 'close drawer label': "Close drawer";
|
|
20
|
+
readonly 'expand drawer label': "Expand drawer";
|
|
21
|
+
readonly 'collapse drawer label': "Collapse drawer";
|
|
22
|
+
readonly 'actions menu label': "Actions";
|
|
17
23
|
};
|
|
18
24
|
};
|
|
19
25
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;UAmBR;;EAGwB,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { type Atom } from '@effect-atom/atom-react';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
3
|
import { type Label } from '@dxos/react-ui';
|
|
4
|
+
export type DrawerState = 'closed' | 'open' | 'expanded';
|
|
4
5
|
export type SimpleLayoutState = {
|
|
5
6
|
/** Data to be passed to the main content Surface. */
|
|
6
7
|
content?: any;
|
|
8
|
+
previousWorkspace: string;
|
|
9
|
+
workspace: string;
|
|
10
|
+
active?: string;
|
|
7
11
|
dialogOpen: boolean;
|
|
8
12
|
dialogType?: 'default' | 'alert';
|
|
9
13
|
dialogBlockAlign?: 'start' | 'center' | 'end';
|
|
@@ -19,13 +23,14 @@ export type SimpleLayoutState = {
|
|
|
19
23
|
popoverKind?: 'base' | 'card';
|
|
20
24
|
popoverTitle?: Label;
|
|
21
25
|
popoverContent?: any;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
active?: string;
|
|
26
|
+
/** Bottom drawer state. */
|
|
27
|
+
drawerState: DrawerState;
|
|
25
28
|
/** Stack of previously active item IDs for back navigation. */
|
|
26
29
|
history: string[];
|
|
27
30
|
/** Whether running in popover window context (hides mobile-specific UI). */
|
|
28
31
|
isPopover?: boolean;
|
|
32
|
+
/** Variant of the companion to display in the drawer (e.g., "comments", "assistant-chat"). */
|
|
33
|
+
companionVariant?: string;
|
|
29
34
|
};
|
|
30
35
|
export declare const SimpleLayoutState: Capability.InterfaceDef<Atom.Writable<SimpleLayoutState, SimpleLayoutState>>;
|
|
31
36
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI5C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAGzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC9C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,+CAA+C;IAC/C,aAAa,CAAC,EAAE,GAAG,CAAC;IAEpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClD,cAAc,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACrC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IAErB,2BAA2B;IAC3B,WAAW,EAAE,WAAW,CAAC;IAEzB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,8EAAwE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,yBAAiB,kBAAkB,CAAC;IAClC,wDAAwD;IACjD,MAAM,UAAU,EAAE,eAAe,CAAC,eAExC,CAAC;CACH"}
|