@dxos/plugin-simple-layout 0.8.4-main.9735255 → 0.8.4-main.bcb3aa67d6

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.
Files changed (246) hide show
  1. package/dist/lib/browser/index.mjs +44 -64
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +44 -63
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -1
  8. package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
  9. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  10. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  11. package/dist/types/src/capabilities/index.d.ts +21 -6
  12. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  13. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  14. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  15. package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +1 -1
  16. package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
  17. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  18. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  19. package/dist/types/src/capabilities/{spotlight-dismiss/spotlight-dismiss.d.ts → spotlight-dismiss.d.ts} +1 -1
  20. package/dist/types/src/capabilities/spotlight-dismiss.d.ts.map +1 -0
  21. package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +2 -2
  22. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  23. package/dist/types/src/capabilities/url-handler.d.ts +12 -0
  24. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
  25. package/dist/types/src/components/ContentError.stories.d.ts +26 -21
  26. package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
  27. package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts +19 -0
  28. package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -0
  29. package/dist/types/src/components/DebugOverlay/index.d.ts +2 -0
  30. package/dist/types/src/components/DebugOverlay/index.d.ts.map +1 -0
  31. package/dist/types/src/components/Home/Home.d.ts.map +1 -1
  32. package/dist/types/src/components/Loading/Loading.d.ts +3 -0
  33. package/dist/types/src/components/Loading/Loading.d.ts.map +1 -0
  34. package/dist/types/src/components/{ContentLoading.stories.d.ts → Loading/Loading.stories.d.ts} +1 -1
  35. package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -0
  36. package/dist/types/src/components/Loading/index.d.ts +2 -0
  37. package/dist/types/src/components/Loading/index.d.ts.map +1 -0
  38. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +35 -0
  39. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -0
  40. package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts +7 -0
  41. package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -0
  42. package/dist/types/src/components/MobileLayout/index.d.ts +2 -0
  43. package/dist/types/src/components/MobileLayout/index.d.ts.map +1 -0
  44. package/dist/types/src/components/NavBranch/NavBranch.d.ts +11 -0
  45. package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -0
  46. package/dist/types/src/components/NavBranch/index.d.ts +2 -0
  47. package/dist/types/src/components/NavBranch/index.d.ts.map +1 -0
  48. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  49. package/dist/types/src/components/SimpleLayout/AppBar.d.ts +28 -0
  50. package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -0
  51. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +54 -0
  52. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -0
  53. package/dist/types/src/components/SimpleLayout/Drawer.d.ts +1 -1
  54. package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -1
  55. package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
  56. package/dist/types/src/components/SimpleLayout/NavBar.d.ts +17 -8
  57. package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
  58. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +35 -25
  59. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
  60. package/dist/types/src/components/SimpleLayout/SimpleLayout.d.ts.map +1 -1
  61. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +26 -25
  62. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
  63. package/dist/types/src/components/SimpleLayout/index.d.ts +3 -0
  64. package/dist/types/src/components/SimpleLayout/index.d.ts.map +1 -1
  65. package/dist/types/src/components/hooks.d.ts +4 -2
  66. package/dist/types/src/components/hooks.d.ts.map +1 -1
  67. package/dist/types/src/components/index.d.ts +4 -2
  68. package/dist/types/src/components/index.d.ts.map +1 -1
  69. package/dist/types/src/hooks/actions.d.ts +19 -0
  70. package/dist/types/src/hooks/actions.d.ts.map +1 -0
  71. package/dist/types/src/hooks/index.d.ts +4 -0
  72. package/dist/types/src/hooks/index.d.ts.map +1 -1
  73. package/dist/types/src/hooks/useAppBarProps.d.ts +7 -0
  74. package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -0
  75. package/dist/types/src/hooks/useCompanions.d.ts +5 -1
  76. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  77. package/dist/types/src/hooks/useDrawerActions.d.ts +13 -0
  78. package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -0
  79. package/dist/types/src/hooks/useNavbarActions.d.ts +14 -0
  80. package/dist/types/src/hooks/useNavbarActions.d.ts.map +1 -0
  81. package/dist/types/src/hooks/useSimpleLayoutState.d.ts +3 -3
  82. package/dist/types/src/hooks/useSimpleLayoutState.d.ts.map +1 -1
  83. package/dist/types/src/operations/close.d.ts +5 -0
  84. package/dist/types/src/operations/close.d.ts.map +1 -0
  85. package/dist/types/src/operations/index.d.ts +3 -0
  86. package/dist/types/src/operations/index.d.ts.map +1 -0
  87. package/dist/types/src/operations/open.d.ts +5 -0
  88. package/dist/types/src/operations/open.d.ts.map +1 -0
  89. package/dist/types/src/operations/revert-workspace.d.ts +5 -0
  90. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
  91. package/dist/types/src/operations/set-layout-mode.d.ts +5 -0
  92. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
  93. package/dist/types/src/operations/set.d.ts +5 -0
  94. package/dist/types/src/operations/set.d.ts.map +1 -0
  95. package/dist/types/src/operations/state-access.d.ts +8 -0
  96. package/dist/types/src/operations/state-access.d.ts.map +1 -0
  97. package/dist/types/src/operations/switch-workspace.d.ts +5 -0
  98. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
  99. package/dist/types/src/operations/update-complementary.d.ts +5 -0
  100. package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
  101. package/dist/types/src/operations/update-dialog.d.ts +5 -0
  102. package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
  103. package/dist/types/src/operations/update-popover.d.ts +5 -0
  104. package/dist/types/src/operations/update-popover.d.ts.map +1 -0
  105. package/dist/types/src/operations/update-sidebar.d.ts +5 -0
  106. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
  107. package/dist/types/src/translations.d.ts +26 -19
  108. package/dist/types/src/translations.d.ts.map +1 -1
  109. package/dist/types/src/types/capabilities.d.ts +7 -6
  110. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  111. package/dist/types/src/types/events.d.ts.map +1 -1
  112. package/dist/types/tsconfig.tsbuildinfo +1 -1
  113. package/package.json +46 -30
  114. package/src/SimpleLayoutPlugin.ts +24 -13
  115. package/src/capabilities/app-graph-builder.ts +21 -0
  116. package/src/capabilities/index.ts +13 -6
  117. package/src/capabilities/operation-handler.ts +14 -0
  118. package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +4 -4
  119. package/src/capabilities/react-surface.tsx +51 -0
  120. package/src/capabilities/{spotlight-dismiss/spotlight-dismiss.ts → spotlight-dismiss.ts} +2 -2
  121. package/src/capabilities/{state/state.tsx → state.tsx} +6 -5
  122. package/src/capabilities/url-handler.ts +161 -0
  123. package/src/components/ContentError.stories.tsx +8 -7
  124. package/src/components/DebugOverlay/DebugOverlay.tsx +96 -0
  125. package/src/components/DebugOverlay/index.ts +5 -0
  126. package/src/components/Dialog/Dialog.tsx +6 -6
  127. package/src/components/Home/Home.tsx +50 -43
  128. package/src/components/{ContentLoading.stories.tsx → Loading/Loading.stories.tsx} +5 -5
  129. package/src/components/{ContentLoading.tsx → Loading/Loading.tsx} +2 -2
  130. package/src/components/Loading/index.ts +5 -0
  131. package/src/components/MobileLayout/MobileLayout.stories.tsx +133 -0
  132. package/src/components/MobileLayout/MobileLayout.tsx +374 -0
  133. package/src/components/MobileLayout/index.ts +5 -0
  134. package/src/components/NavBranch/NavBranch.tsx +127 -0
  135. package/src/components/{Workspace → NavBranch}/index.ts +1 -1
  136. package/src/components/Popover/Popover.tsx +9 -9
  137. package/src/components/SimpleLayout/AppBar.stories.tsx +144 -0
  138. package/src/components/SimpleLayout/AppBar.tsx +93 -0
  139. package/src/components/SimpleLayout/Drawer.tsx +27 -82
  140. package/src/components/SimpleLayout/Main.tsx +40 -34
  141. package/src/components/SimpleLayout/NavBar.stories.tsx +131 -23
  142. package/src/components/SimpleLayout/NavBar.tsx +18 -51
  143. package/src/components/SimpleLayout/SimpleLayout.stories.tsx +45 -57
  144. package/src/components/SimpleLayout/SimpleLayout.tsx +40 -22
  145. package/src/components/SimpleLayout/index.ts +3 -0
  146. package/src/components/hooks.ts +9 -9
  147. package/src/components/index.ts +4 -2
  148. package/src/hooks/actions.ts +84 -0
  149. package/src/hooks/index.ts +4 -0
  150. package/src/hooks/useAppBarProps.ts +115 -0
  151. package/src/hooks/useCompanions.ts +8 -5
  152. package/src/hooks/useDrawerActions.ts +100 -0
  153. package/src/hooks/useNavbarActions.ts +87 -0
  154. package/src/hooks/useSimpleLayoutState.ts +5 -5
  155. package/src/meta.ts +1 -1
  156. package/src/operations/close.ts +34 -0
  157. package/src/operations/index.ts +16 -0
  158. package/src/operations/open.ts +63 -0
  159. package/src/operations/revert-workspace.ts +22 -0
  160. package/src/operations/set-layout-mode.ts +12 -0
  161. package/src/operations/set.ts +23 -0
  162. package/src/operations/state-access.ts +19 -0
  163. package/src/operations/switch-workspace.ts +26 -0
  164. package/src/operations/update-complementary.ts +35 -0
  165. package/src/operations/update-dialog.ts +28 -0
  166. package/src/operations/update-popover.ts +35 -0
  167. package/src/operations/update-sidebar.ts +12 -0
  168. package/src/translations.ts +21 -19
  169. package/src/types/capabilities.ts +12 -8
  170. package/src/types/events.ts +3 -2
  171. package/dist/lib/browser/chunk-LR3EE3VB.mjs +0 -789
  172. package/dist/lib/browser/chunk-LR3EE3VB.mjs.map +0 -7
  173. package/dist/lib/browser/chunk-P77G4YTR.mjs +0 -29
  174. package/dist/lib/browser/chunk-P77G4YTR.mjs.map +0 -7
  175. package/dist/lib/browser/operation-resolver-775UYAC2.mjs +0 -203
  176. package/dist/lib/browser/operation-resolver-775UYAC2.mjs.map +0 -7
  177. package/dist/lib/browser/react-root-KM55OMGJ.mjs +0 -21
  178. package/dist/lib/browser/react-root-KM55OMGJ.mjs.map +0 -7
  179. package/dist/lib/browser/react-surface-BABGAWGY.mjs +0 -39
  180. package/dist/lib/browser/react-surface-BABGAWGY.mjs.map +0 -7
  181. package/dist/lib/browser/spotlight-dismiss-VSNOPETH.mjs +0 -66
  182. package/dist/lib/browser/spotlight-dismiss-VSNOPETH.mjs.map +0 -7
  183. package/dist/lib/browser/state-OUFTC2KV.mjs +0 -47
  184. package/dist/lib/browser/state-OUFTC2KV.mjs.map +0 -7
  185. package/dist/lib/browser/url-handler-DOUFQIAC.mjs +0 -54
  186. package/dist/lib/browser/url-handler-DOUFQIAC.mjs.map +0 -7
  187. package/dist/lib/node-esm/chunk-F5TEKVJG.mjs +0 -31
  188. package/dist/lib/node-esm/chunk-F5TEKVJG.mjs.map +0 -7
  189. package/dist/lib/node-esm/chunk-HB2B3LLG.mjs +0 -790
  190. package/dist/lib/node-esm/chunk-HB2B3LLG.mjs.map +0 -7
  191. package/dist/lib/node-esm/operation-resolver-LDNYS3DI.mjs +0 -204
  192. package/dist/lib/node-esm/operation-resolver-LDNYS3DI.mjs.map +0 -7
  193. package/dist/lib/node-esm/react-root-36UYFEEB.mjs +0 -22
  194. package/dist/lib/node-esm/react-root-36UYFEEB.mjs.map +0 -7
  195. package/dist/lib/node-esm/react-surface-CGHFVWU3.mjs +0 -40
  196. package/dist/lib/node-esm/react-surface-CGHFVWU3.mjs.map +0 -7
  197. package/dist/lib/node-esm/spotlight-dismiss-L5PCWIJG.mjs +0 -68
  198. package/dist/lib/node-esm/spotlight-dismiss-L5PCWIJG.mjs.map +0 -7
  199. package/dist/lib/node-esm/state-Q2ZA26W5.mjs +0 -48
  200. package/dist/lib/node-esm/state-Q2ZA26W5.mjs.map +0 -7
  201. package/dist/lib/node-esm/url-handler-DVAZZEUO.mjs +0 -55
  202. package/dist/lib/node-esm/url-handler-DVAZZEUO.mjs.map +0 -7
  203. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  204. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  205. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  206. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  207. package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
  208. package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
  209. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
  210. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  211. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  212. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  213. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  214. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts +0 -3
  215. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts.map +0 -1
  216. package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts.map +0 -1
  217. package/dist/types/src/capabilities/state/index.d.ts +0 -13
  218. package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
  219. package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
  220. package/dist/types/src/capabilities/url-handler/index.d.ts +0 -3
  221. package/dist/types/src/capabilities/url-handler/index.d.ts.map +0 -1
  222. package/dist/types/src/capabilities/url-handler/url-handler.d.ts +0 -10
  223. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +0 -1
  224. package/dist/types/src/components/ContentError.d.ts +0 -5
  225. package/dist/types/src/components/ContentError.d.ts.map +0 -1
  226. package/dist/types/src/components/ContentLoading.d.ts +0 -3
  227. package/dist/types/src/components/ContentLoading.d.ts.map +0 -1
  228. package/dist/types/src/components/ContentLoading.stories.d.ts.map +0 -1
  229. package/dist/types/src/components/SimpleLayout/Banner.d.ts +0 -8
  230. package/dist/types/src/components/SimpleLayout/Banner.d.ts.map +0 -1
  231. package/dist/types/src/components/Workspace/Workspace.d.ts +0 -9
  232. package/dist/types/src/components/Workspace/Workspace.d.ts.map +0 -1
  233. package/dist/types/src/components/Workspace/index.d.ts +0 -2
  234. package/dist/types/src/components/Workspace/index.d.ts.map +0 -1
  235. package/src/capabilities/operation-resolver/index.ts +0 -10
  236. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -215
  237. package/src/capabilities/react-root/index.ts +0 -7
  238. package/src/capabilities/react-surface/index.ts +0 -7
  239. package/src/capabilities/react-surface/react-surface.tsx +0 -40
  240. package/src/capabilities/spotlight-dismiss/index.ts +0 -7
  241. package/src/capabilities/state/index.ts +0 -9
  242. package/src/capabilities/url-handler/index.ts +0 -7
  243. package/src/capabilities/url-handler/url-handler.ts +0 -80
  244. package/src/components/ContentError.tsx +0 -23
  245. package/src/components/SimpleLayout/Banner.tsx +0 -113
  246. package/src/components/Workspace/Workspace.tsx +0 -115
@@ -0,0 +1,144 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Atom } from '@effect-atom/atom-react';
6
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
7
+ import React, { useMemo } from 'react';
8
+ import { type Mock, expect, fn, screen, userEvent, within } from 'storybook/test';
9
+
10
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
+ import { type ActionGraphProps, createMenuAction } from '@dxos/react-ui-menu';
12
+ import { withRegistry } from '@dxos/storybook-utils';
13
+
14
+ import { translations } from '../../translations';
15
+ import { MobileLayout } from '../MobileLayout';
16
+
17
+ import { AppBar, type AppBarProps } from './AppBar';
18
+
19
+ const buildEmptyActions = (): ActionGraphProps => ({ nodes: [], edges: [] });
20
+
21
+ const buildDefaultActions = (): ActionGraphProps => {
22
+ const result: ActionGraphProps = { nodes: [], edges: [] };
23
+ const actions = [
24
+ createMenuAction('action-edit.menu', () => console.log('Edit'), {
25
+ icon: 'ph--pencil--regular',
26
+ label: 'Edit',
27
+ }),
28
+ createMenuAction('action-share.menu', () => console.log('Share'), {
29
+ icon: 'ph--share--regular',
30
+ label: 'Share',
31
+ }),
32
+ createMenuAction('action-delete.menu', () => console.log('Delete'), {
33
+ icon: 'ph--trash--regular',
34
+ label: 'Delete',
35
+ }),
36
+ ];
37
+ result.nodes.push(...actions);
38
+ result.edges.push(...actions.map((a) => ({ source: 'root', target: a.id, relation: 'child' })));
39
+ return result;
40
+ };
41
+
42
+ type DefaultStoryProps = Omit<AppBarProps, 'actions'> & {
43
+ actions: ActionGraphProps;
44
+ };
45
+
46
+ const DefaultStory = ({ actions: actionsProp, ...props }: DefaultStoryProps) => {
47
+ const actions = useMemo(() => Atom.make(actionsProp).pipe(Atom.keepAlive), [actionsProp]);
48
+ return (
49
+ <MobileLayout.Root>
50
+ <AppBar {...props} actions={actions} />
51
+ </MobileLayout.Root>
52
+ );
53
+ };
54
+
55
+ const meta = {
56
+ title: 'plugins/plugin-simple-layout/components/AppBar',
57
+ render: DefaultStory,
58
+ decorators: [
59
+ withTheme(),
60
+ withLayout({
61
+ layout: 'column',
62
+ classNames: 'relative',
63
+ }),
64
+ withRegistry,
65
+ ],
66
+ parameters: {
67
+ layout: 'fullscreen',
68
+ translations,
69
+ },
70
+ } satisfies Meta<typeof DefaultStory>;
71
+
72
+ export default meta;
73
+
74
+ type Story = StoryObj<DefaultStoryProps>;
75
+
76
+ export const Default: Story = {
77
+ tags: ['test'],
78
+ args: {
79
+ actions: buildDefaultActions(),
80
+ title: 'Document Title',
81
+ showBackButton: true,
82
+ onAction: fn(),
83
+ onBack: fn(),
84
+ },
85
+ play: async ({ args, canvasElement }) => {
86
+ const canvas = within(canvasElement);
87
+
88
+ // Verify the banner renders with the correct title.
89
+ await expect(canvas.getByRole('banner')).toBeInTheDocument();
90
+ await expect(canvas.getByText('Document Title')).toBeInTheDocument();
91
+
92
+ // Test back button click.
93
+ const backButton = canvas.getByRole('button', { name: /back/i });
94
+ await expect(backButton).toBeInTheDocument();
95
+ await userEvent.click(backButton);
96
+ await expect(args.onBack).toHaveBeenCalledTimes(1);
97
+
98
+ // Test actions menu opens and action fires.
99
+ const menuTrigger = canvas.getByRole('button', { name: /actions/i });
100
+ await expect(menuTrigger).toBeInTheDocument();
101
+ await userEvent.click(menuTrigger);
102
+
103
+ // Wait for menu to open and click an action (menu items render in a portal).
104
+ const editAction = await screen.findByRole('menuitem', { name: /edit/i });
105
+ await userEvent.click(editAction);
106
+ await expect(args.onAction).toHaveBeenCalledTimes(1);
107
+ await expect((args.onAction as Mock).mock.calls[0][0]).toHaveProperty('id', 'action-edit.menu');
108
+ },
109
+ };
110
+
111
+ export const NoBackButton: Story = {
112
+ args: {
113
+ actions: buildDefaultActions(),
114
+ title: 'Home',
115
+ showBackButton: false,
116
+ onAction: (action) => console.log('Action:', action.id),
117
+ },
118
+ };
119
+
120
+ export const LongTitle: Story = {
121
+ args: {
122
+ actions: buildDefaultActions(),
123
+ title: 'This is a very long document title that should be truncated when it exceeds the available space',
124
+ showBackButton: true,
125
+ onBack: () => console.log('Back clicked'),
126
+ onAction: (action) => console.log('Action:', action.id),
127
+ },
128
+ };
129
+
130
+ export const NoActions: Story = {
131
+ args: {
132
+ actions: buildEmptyActions(),
133
+ title: 'Empty Document',
134
+ showBackButton: true,
135
+ onBack: () => console.log('Back clicked'),
136
+ onAction: (action) => console.log('Action:', action.id),
137
+ },
138
+ };
139
+
140
+ export const Empty: Story = {
141
+ args: {
142
+ actions: buildEmptyActions(),
143
+ },
144
+ };
@@ -0,0 +1,93 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Atom, useAtomValue } from '@effect-atom/atom-react';
6
+ import React, { Fragment } from 'react';
7
+
8
+ import { IconButton, Popover, Toolbar, useTranslation } from '@dxos/react-ui';
9
+ import { type ActionExecutor, type ActionGraphProps, Menu, useMenuActions } from '@dxos/react-ui-menu';
10
+ import { composable, composableProps, osTranslations } from '@dxos/ui-theme';
11
+
12
+ import { meta } from '#meta';
13
+ import { useMobileLayout } from '../MobileLayout';
14
+
15
+ const APP_BAR_NAME = 'SimpleLayout.AppBar';
16
+
17
+ export type AppBarProps = {
18
+ /** Title/label to display in the banner. */
19
+ title?: string;
20
+ /** Action graph atom for the dropdown menu. */
21
+ actions: Atom.Atom<ActionGraphProps>;
22
+ /** Whether to show the back button. */
23
+ showBackButton?: boolean;
24
+ /** Popover anchor ID for the dropdown trigger. */
25
+ popoverAnchorId?: string;
26
+ /** Action executor callback. */
27
+ onAction?: ActionExecutor;
28
+ /** Callback when back button is clicked. */
29
+ onBack?: () => void;
30
+ };
31
+
32
+ /**
33
+ * AppBar component that renders a title, optional back button, and actions dropdown.
34
+ */
35
+ export const AppBar = composable<HTMLDivElement, AppBarProps>(
36
+ ({ classNames, title, actions, showBackButton, popoverAnchorId, onAction, onBack, ...props }, forwardedRef) => {
37
+ const { t } = useTranslation(meta.id);
38
+ const menuActions = useMenuActions(actions);
39
+ const actionsValue = useAtomValue(actions);
40
+ const hasActions = actionsValue.nodes.length > 0;
41
+ const { keyboardOpen } = useMobileLayout(APP_BAR_NAME);
42
+
43
+ // Fall back to app name if no title provided.
44
+ const displayTitle = title ?? t('current-app.name', { ns: osTranslations });
45
+
46
+ // Wrap the menu trigger with Popover.Anchor when the popoverAnchorId is set.
47
+ const AnchorRoot = popoverAnchorId ? Popover.Anchor : Fragment;
48
+
49
+ return (
50
+ <Toolbar.Root
51
+ {...composableProps(props, {
52
+ role: 'banner',
53
+ classNames: 'grid grid-cols-[var(--dx-rail-size)_1fr_var(--dx-rail-size)] items-center dx-density-fine',
54
+ })}
55
+ ref={forwardedRef}
56
+ >
57
+ {keyboardOpen ? (
58
+ <IconButton variant='ghost' icon='ph--x--regular' iconOnly label={t('done.label')} />
59
+ ) : showBackButton ? (
60
+ <IconButton
61
+ variant='ghost'
62
+ icon='ph--caret-left--regular'
63
+ iconOnly
64
+ label={t('back.label')}
65
+ onClick={onBack}
66
+ />
67
+ ) : (
68
+ <div />
69
+ )}
70
+ <h1 className='text-center truncate font-thin uppercase'>{displayTitle}</h1>
71
+ {hasActions ? (
72
+ <AnchorRoot>
73
+ <Menu.Root {...menuActions} caller={meta.id} onAction={onAction}>
74
+ <Menu.Trigger asChild>
75
+ <IconButton
76
+ variant='ghost'
77
+ icon='ph--dots-three-vertical--regular'
78
+ iconOnly
79
+ label={t('actions-menu.label')}
80
+ />
81
+ </Menu.Trigger>
82
+ <Menu.Content />
83
+ </Menu.Root>
84
+ </AnchorRoot>
85
+ ) : (
86
+ <span />
87
+ )}
88
+ </Toolbar.Root>
89
+ );
90
+ },
91
+ );
92
+
93
+ AppBar.displayName = APP_BAR_NAME;
@@ -2,17 +2,17 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import React, { useCallback, useMemo } from 'react';
5
+ import React, { useMemo } from 'react';
6
6
 
7
- import { Surface, useAppGraph } from '@dxos/app-framework/react';
7
+ import { Surface } from '@dxos/app-framework/ui';
8
+ import { getLinkedVariant } from '@dxos/react-ui-attention';
9
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
8
10
  import { type Node, useNode } from '@dxos/plugin-graph';
9
- import { IconButton, Main as NaturalMain, Toolbar, toLocalizedString, useTranslation } from '@dxos/react-ui';
10
- import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';
11
+ import { ErrorFallback, Panel } from '@dxos/react-ui';
12
+ import { Menu, useMenuActions } from '@dxos/react-ui-menu';
11
13
 
12
- import { useCompanions, useSimpleLayoutState } from '../../hooks';
13
- import { meta } from '../../meta';
14
- import { ContentError } from '../ContentError';
15
- import { ContentLoading } from '../ContentLoading';
14
+ import { useCompanions, useDrawerActions, useSimpleLayoutState } from '#hooks';
15
+ import { Loading } from '../Loading';
16
16
 
17
17
  const DRAWER_NAME = 'SimpleLayout.Drawer';
18
18
 
@@ -20,16 +20,15 @@ const DRAWER_NAME = 'SimpleLayout.Drawer';
20
20
  * Companion drawer component.
21
21
  */
22
22
  export const Drawer = () => {
23
- const { t } = useTranslation(meta.id);
24
- const { state, updateState } = useSimpleLayoutState();
25
23
  const { graph } = useAppGraph();
24
+ const { state: layoutState } = useSimpleLayoutState();
26
25
 
27
- const placeholder = useMemo(() => <ContentLoading />, []);
26
+ const placeholder = useMemo(() => <Loading />, []);
28
27
 
29
28
  // Get all companions for the current active (primary) item.
30
- const activeId = state.active ?? state.workspace;
29
+ const activeId = layoutState.active ?? layoutState.workspace;
31
30
  const companions = useCompanions(activeId);
32
- const { companionId, variant } = useSelectedCompanion(companions, state.companionVariant);
31
+ const { companionId, variant } = useSelectedCompanion(companions, layoutState.companionVariant);
33
32
 
34
33
  // Get node for the selected companion.
35
34
  const node = useNode(graph, companionId);
@@ -48,77 +47,26 @@ export const Drawer = () => {
48
47
  );
49
48
  }, [companionId, node, parentNode, variant]);
50
49
 
51
- // Handle tab click to switch companions.
52
- const handleTabClick = useCallback(
53
- (companion: Node.Node) => {
54
- const [, companionVariant] = companion.id.split(ATTENDABLE_PATH_SEPARATOR);
55
- updateState((s) => ({ ...s, companionVariant }));
56
- },
57
- [updateState],
58
- );
59
-
60
- // Handle expand/collapse toggle.
61
- const handleToggleExpand = useCallback(() => {
62
- updateState((s) => ({
63
- ...s,
64
- drawerState: s.drawerState === 'full' ? 'expanded' : 'full',
65
- }));
66
- }, [updateState]);
67
-
68
- // Handle close.
69
- const handleClose = useCallback(() => {
70
- updateState((s) => ({ ...s, drawerState: 'closed' }));
71
- }, [updateState]);
72
-
73
- const drawerState = state.drawerState ?? 'closed';
74
- if (drawerState === 'closed') {
75
- return null;
76
- }
77
-
78
- const isFullyExpanded = drawerState === 'full';
50
+ // Get drawer actions (tabs + toolbar buttons).
51
+ const { actions, onAction } = useDrawerActions(DRAWER_NAME);
52
+ const menuActions = useMenuActions(actions);
79
53
 
80
54
  return (
81
- <NaturalMain.Drawer label={t('drawer label')}>
82
- <Toolbar.Root>
83
- {/* TODO(thure): IMPORTANT: This is a tablist; it should be implemented as such. */}
84
- <div role='tablist' className='flex-1 min-is-0 overflow-x-auto scrollbar-none flex gap-1'>
85
- {/* TODO(burdon): Factor out in common with NavBar. */}
86
- {companions.map((companion) => (
87
- <IconButton
88
- key={companion.id}
89
- role='tab'
90
- aria-selected={companionId === companion.id}
91
- icon={companion.properties.icon}
92
- iconOnly
93
- label={toLocalizedString(companion.properties.label, t)}
94
- variant={companionId === companion.id ? 'primary' : 'ghost'}
95
- onClick={() => handleTabClick(companion)}
96
- />
97
- ))}
98
- </div>
99
- <Toolbar.Separator variant='gap' />
100
- <Toolbar.IconButton
101
- icon={isFullyExpanded ? 'ph--arrow-down--regular' : 'ph--arrow-up--regular'}
102
- iconOnly
103
- label={isFullyExpanded ? t('collapse drawer label') : t('expand drawer label')}
104
- onClick={handleToggleExpand}
105
- />
106
- <Toolbar.IconButton icon='ph--x--regular' iconOnly label={t('close drawer label')} onClick={handleClose} />
107
- </Toolbar.Root>
108
- {/* TODO(burdon): Fix containment. */}
109
- <Surface role='article' data={data} limit={1} fallback={ContentError} placeholder={placeholder} />
110
- </NaturalMain.Drawer>
55
+ <Panel.Root>
56
+ <Panel.Toolbar>
57
+ <Menu.Root {...menuActions} alwaysActive onAction={onAction}>
58
+ <Menu.Toolbar />
59
+ </Menu.Root>
60
+ </Panel.Toolbar>
61
+ <Panel.Content>
62
+ <Surface.Surface role='article' data={data} limit={1} fallback={ErrorFallback} placeholder={placeholder} />
63
+ </Panel.Content>
64
+ </Panel.Root>
111
65
  );
112
66
  };
113
67
 
114
68
  Drawer.displayName = DRAWER_NAME;
115
69
 
116
- /** Parse entry ID to extract primary ID and variant. */
117
- const parseEntryId = (entryId: string) => {
118
- const [id, variant] = entryId.split(ATTENDABLE_PATH_SEPARATOR);
119
- return { id, variant };
120
- };
121
-
122
70
  /**
123
71
  * Resolves which companion to show based on variant preference.
124
72
  * Falls back to first available if preferred variant not available.
@@ -131,10 +79,7 @@ const useSelectedCompanion = (companions: Node.Node[], preferredVariant?: string
131
79
 
132
80
  // Try to find companion matching the preferred variant.
133
81
  if (preferredVariant) {
134
- const preferred = companions.find((c) => {
135
- const { variant } = parseEntryId(c.id);
136
- return variant === preferredVariant;
137
- });
82
+ const preferred = companions.find((c) => getLinkedVariant(c.id) === preferredVariant);
138
83
  if (preferred) {
139
84
  return preferred;
140
85
  }
@@ -145,7 +90,7 @@ const useSelectedCompanion = (companions: Node.Node[], preferredVariant?: string
145
90
  }, [companions, preferredVariant]);
146
91
 
147
92
  const companionId = selectedCompanion?.id;
148
- const { variant } = parseEntryId(companionId ?? '');
93
+ const variant = companionId ? getLinkedVariant(companionId) : undefined;
149
94
 
150
95
  return { selectedCompanion, companionId, variant };
151
96
  };
@@ -4,17 +4,18 @@
4
4
 
5
5
  import React, { useMemo } from 'react';
6
6
 
7
- import { Surface, useAppGraph } from '@dxos/app-framework/react';
7
+ import { Surface } from '@dxos/app-framework/ui';
8
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
8
9
  import { useNode } from '@dxos/plugin-graph';
9
- import { Main as NaturalMain, useSidebars } from '@dxos/react-ui';
10
- import { mx } from '@dxos/ui-theme';
10
+ import { ErrorFallback, Panel } from '@dxos/react-ui';
11
+ import { useAttentionAttributes } from '@dxos/react-ui-attention';
11
12
 
12
- import { useSimpleLayoutState } from '../../hooks';
13
- import { ContentError } from '../ContentError';
14
- import { ContentLoading } from '../ContentLoading';
15
- import { useLoadDescendents } from '../hooks';
13
+ import { useAppBarProps, useNavbarActions, useSimpleLayoutState } from '#hooks';
14
+ import { Loading } from '../Loading';
15
+ import { useExpandPath } from '../hooks';
16
+ import { useMobileLayout } from '../MobileLayout';
16
17
 
17
- import { Banner } from './Banner';
18
+ import { AppBar } from './AppBar';
18
19
  import { NavBar } from './NavBar';
19
20
 
20
21
  const MAIN_NAME = 'SimpleLayout.Main';
@@ -24,15 +25,16 @@ const MAIN_NAME = 'SimpleLayout.Main';
24
25
  */
25
26
  export const Main = () => {
26
27
  const { state } = useSimpleLayoutState();
27
- const { graph } = useAppGraph();
28
28
  const id = state.active ?? state.workspace;
29
- const node = useNode(graph, id);
30
-
31
- // Ensures that children are loaded so that they are available to navigate to.
32
- useLoadDescendents(id);
29
+ const attentionAttrs = useAttentionAttributes(id);
30
+ const { keyboardOpen } = useMobileLayout(MAIN_NAME);
31
+ const { actions, onAction } = useNavbarActions();
32
+ const appBarProps = useAppBarProps();
33
33
 
34
- const placeholder = useMemo(() => <ContentLoading />, []);
34
+ const placeholder = useMemo(() => <Loading />, []);
35
35
 
36
+ const { graph } = useAppGraph();
37
+ const node = useNode(graph, id);
36
38
  const data = useMemo(() => {
37
39
  return (
38
40
  node && {
@@ -44,28 +46,32 @@ export const Main = () => {
44
46
  );
45
47
  }, [id, node, node?.data, node?.properties, state.popoverAnchorId]);
46
48
 
47
- const { drawerState } = useSidebars(MAIN_NAME);
48
- const showNavBar = !state.isPopover && drawerState === 'closed';
49
+ useExpandPath(id);
50
+
51
+ // TODO(burdon): BUG: When showing ANY statusbar the size progressively shrinks when the keyboard opens/closes.
52
+ const showNavBar = !keyboardOpen && !state.isPopover && state.drawerState === 'closed';
49
53
 
50
54
  return (
51
- <NaturalMain.Content
52
- bounce
53
- classNames={mx('bs-full', 'pbs-[env(safe-area-inset-top)] pbe-[env(safe-area-inset-bottom)]')}
54
- >
55
- <div
56
- role='none'
57
- className={mx(
58
- 'grid bs-full overflow-hidden',
59
- showNavBar ? 'grid-rows-[min-content_1fr_min-content]' : 'grid-rows-[min-content_1fr]',
60
- )}
61
- >
62
- <Banner classNames='border-be border-separator' node={node} />
63
- <article className='bs-full overflow-hidden'>
64
- <Surface key={id} role='article' data={data} limit={1} fallback={ContentError} placeholder={placeholder} />
65
- </article>
66
- {showNavBar && <NavBar classNames='border-bs border-separator' activeId={id} />}
67
- </div>
68
- </NaturalMain.Content>
55
+ <Panel.Root {...attentionAttrs} className='dx-document'>
56
+ <Panel.Toolbar asChild>
57
+ <AppBar {...appBarProps} />
58
+ </Panel.Toolbar>
59
+ <Panel.Content role='article' className='bg-base-surface'>
60
+ <Surface.Surface
61
+ key={id}
62
+ role='article'
63
+ data={data}
64
+ limit={1}
65
+ fallback={ErrorFallback}
66
+ placeholder={placeholder}
67
+ />
68
+ </Panel.Content>
69
+ {showNavBar && (
70
+ <Panel.Statusbar asChild>
71
+ <NavBar actions={actions} onAction={onAction} />
72
+ </Panel.Statusbar>
73
+ )}
74
+ </Panel.Root>
69
75
  );
70
76
  };
71
77
 
@@ -2,25 +2,97 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { Atom } from '@effect-atom/atom-react';
5
6
  import { type Meta, type StoryObj } from '@storybook/react-vite';
7
+ import React, { useMemo } from 'react';
8
+ import { type Mock, expect, fn, screen, userEvent, within } from 'storybook/test';
6
9
 
7
- import { withPluginManager } from '@dxos/app-framework/testing';
8
- import { corePlugins } from '@dxos/plugin-testing';
9
- import { withTheme } from '@dxos/react-ui/testing';
10
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
+ import { type ActionGraphProps, createGapSeparator, createMenuAction, createMenuItemGroup } from '@dxos/react-ui-menu';
12
+ import { withRegistry } from '@dxos/storybook-utils';
10
13
 
11
14
  import { translations } from '../../translations';
12
15
 
13
16
  import { NavBar } from './NavBar';
14
17
 
18
+ const MAIN_MENU_GROUP_ID = 'navbar-main-menu';
19
+
20
+ const buildEmptyActions = (): ActionGraphProps => ({ nodes: [], edges: [] });
21
+
22
+ const buildCompanionOnlyActions = (): ActionGraphProps => {
23
+ const result: ActionGraphProps = { nodes: [], edges: [] };
24
+ const companions = [
25
+ createMenuAction('companion-browse', () => console.log('Browse'), {
26
+ icon: 'ph--house--regular',
27
+ label: 'Browse',
28
+ iconOnly: true,
29
+ }),
30
+ createMenuAction('companion-notifications', () => console.log('Notifications'), {
31
+ icon: 'ph--bell--regular',
32
+ label: 'Notifications',
33
+ iconOnly: true,
34
+ }),
35
+ createMenuAction('companion-profile', () => console.log('Profile'), {
36
+ icon: 'ph--user--regular',
37
+ label: 'Profile',
38
+ iconOnly: true,
39
+ }),
40
+ ];
41
+ result.nodes.push(...companions);
42
+ result.edges.push(...companions.map((c) => ({ source: 'root', target: c.id, relation: 'child' })));
43
+ return result;
44
+ };
45
+
46
+ const buildDefaultActions = (): ActionGraphProps => {
47
+ const result: ActionGraphProps = { nodes: [], edges: [] };
48
+ const gapSeparator = createGapSeparator('navbar-gap');
49
+ const mainMenuGroup = createMenuItemGroup(MAIN_MENU_GROUP_ID, {
50
+ variant: 'dropdownMenu',
51
+ icon: 'ph--plus--regular',
52
+ iconOnly: true,
53
+ label: 'Main menu',
54
+ testId: 'simpleLayoutPlugin.addSpace',
55
+ });
56
+ const companions = [
57
+ createMenuAction('companion-browse', () => console.log('Browse'), {
58
+ icon: 'ph--house--regular',
59
+ label: 'Browse',
60
+ iconOnly: true,
61
+ }),
62
+ createMenuAction('companion-notifications', () => console.log('Notifications'), {
63
+ icon: 'ph--bell--regular',
64
+ label: 'Notifications',
65
+ iconOnly: true,
66
+ }),
67
+ ];
68
+ const menuActions = [
69
+ createMenuAction('action-create-space', () => console.log('Create space'), {
70
+ icon: 'ph--planet--regular',
71
+ label: 'Create space',
72
+ }),
73
+ createMenuAction('action-join-space', () => console.log('Join space'), {
74
+ icon: 'ph--sign-in--regular',
75
+ label: 'Join space',
76
+ }),
77
+ createMenuAction('action-settings', () => console.log('Settings'), {
78
+ icon: 'ph--gear--regular',
79
+ label: 'Settings',
80
+ }),
81
+ ];
82
+ result.nodes.push(...companions, ...gapSeparator.nodes, mainMenuGroup, ...menuActions);
83
+ result.edges.push(
84
+ ...companions.map((c) => ({ source: 'root', target: c.id, relation: 'child' })),
85
+ ...gapSeparator.edges,
86
+ { source: 'root', target: mainMenuGroup.id, relation: 'child' },
87
+ ...menuActions.map((action) => ({ source: MAIN_MENU_GROUP_ID, target: action.id, relation: 'child' })),
88
+ );
89
+ return result;
90
+ };
91
+
15
92
  const meta = {
16
- title: 'plugins/plugin-simple-layout/NavBar',
93
+ title: 'plugins/plugin-simple-layout/components/NavBar',
17
94
  component: NavBar,
18
- decorators: [
19
- withTheme,
20
- withPluginManager({
21
- plugins: [...corePlugins()],
22
- }),
23
- ],
95
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withRegistry],
24
96
  parameters: {
25
97
  layout: 'fullscreen',
26
98
  translations,
@@ -31,26 +103,62 @@ export default meta;
31
103
 
32
104
  type Story = StoryObj<typeof meta>;
33
105
 
106
+ const DefaultStory = ({ onAction }: { onAction: (action: { id: string }) => void }) => {
107
+ const actions = useMemo(() => Atom.make(buildDefaultActions()).pipe(Atom.keepAlive), []);
108
+
109
+ return <NavBar classNames='border-y border-separator' actions={actions} onAction={onAction} />;
110
+ };
111
+
34
112
  export const Default: Story = {
113
+ tags: ['test'],
35
114
  args: {
36
- activeId: undefined,
115
+ onAction: fn(),
116
+ } as any,
117
+ render: (args: any) => <DefaultStory onAction={args.onAction} />,
118
+ play: async ({ args, canvasElement }) => {
119
+ const canvas = within(canvasElement);
120
+
121
+ // Verify the navbar renders with the toolbar.
122
+ await expect(canvas.getByRole('toolbar')).toBeInTheDocument();
123
+
124
+ // Test companion action click (Browse button).
125
+ const browseButton = canvas.getByRole('button', { name: /browse/i });
126
+ await expect(browseButton).toBeInTheDocument();
127
+ await userEvent.click(browseButton);
128
+ await expect(args.onAction).toHaveBeenCalledTimes(1);
129
+ await expect((args.onAction as Mock).mock.calls[0][0]).toHaveProperty('id', 'companion-browse');
130
+
131
+ // Test dropdown menu opens and action fires.
132
+ const menuTrigger = canvas.getByRole('button', { name: /main menu/i });
133
+ await expect(menuTrigger).toBeInTheDocument();
134
+ await userEvent.click(menuTrigger);
135
+
136
+ // Wait for menu to open and click an action (menu items render in a portal).
137
+ const createSpaceAction = await screen.findByRole('menuitem', { name: /create space/i });
138
+ await userEvent.click(createSpaceAction);
139
+ await expect(args.onAction).toHaveBeenCalledTimes(2);
140
+ await expect((args.onAction as Mock).mock.calls[1][0]).toHaveProperty('id', 'action-create-space');
37
141
  },
38
142
  };
39
143
 
40
- export const BrowseActive: Story = {
41
- args: {
42
- activeId: 'some-document',
43
- },
144
+ const CompanionsOnlyStory = () => {
145
+ const actions = useMemo(() => Atom.make(buildCompanionOnlyActions()).pipe(Atom.keepAlive), []);
146
+
147
+ return <NavBar actions={actions} onAction={(action) => console.log('Action:', action.id)} />;
44
148
  };
45
149
 
46
- export const NotificationsActive: Story = {
47
- args: {
48
- activeId: 'notifications',
49
- },
150
+ export const CompanionsOnly: Story = {
151
+ args: {} as any,
152
+ render: () => <CompanionsOnlyStory />,
50
153
  };
51
154
 
52
- export const ProfileActive: Story = {
53
- args: {
54
- activeId: 'profile',
55
- },
155
+ const EmptyStory = () => {
156
+ const actions = useMemo(() => Atom.make(buildEmptyActions()).pipe(Atom.keepAlive), []);
157
+
158
+ return <NavBar actions={actions} onAction={(action) => console.log('Action:', action.id)} />;
159
+ };
160
+
161
+ export const Empty: Story = {
162
+ args: {} as any,
163
+ render: () => <EmptyStory />,
56
164
  };