@dxos/plugin-simple-layout 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (116) hide show
  1. package/dist/lib/browser/SimpleLayoutPlugin-Q5BZE6KD.mjs +50 -0
  2. package/dist/lib/browser/SimpleLayoutPlugin-Q5BZE6KD.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +17 -75
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +34 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/node-esm/SimpleLayoutPlugin-OD45TNPO.mjs +52 -0
  9. package/dist/lib/node-esm/SimpleLayoutPlugin-OD45TNPO.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +17 -75
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/translations.mjs +36 -0
  14. package/dist/lib/node-esm/translations.mjs.map +7 -0
  15. package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -0
  16. package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
  17. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/index.d.ts +2 -2
  19. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  20. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  21. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/spotlight-dismiss.d.ts +1 -1
  25. package/dist/types/src/capabilities/spotlight-dismiss.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  27. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  28. package/dist/types/src/components/ContentError.stories.d.ts +21 -21
  29. package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
  30. package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -1
  31. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  32. package/dist/types/src/components/Home/Home.d.ts.map +1 -1
  33. package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -1
  34. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +2 -2
  35. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
  36. package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -1
  37. package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -1
  38. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  39. package/dist/types/src/components/SimpleLayout/AppBar.d.ts +1 -1
  40. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +21 -21
  41. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/SimpleLayout/Drawer.d.ts +4 -7
  43. package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -1
  44. package/dist/types/src/components/SimpleLayout/Main.d.ts +4 -7
  45. package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
  46. package/dist/types/src/components/SimpleLayout/NavBar.d.ts +1 -1
  47. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +22 -22
  48. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
  49. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +21 -21
  50. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
  51. package/dist/types/src/components/hooks.d.ts.map +1 -1
  52. package/dist/types/src/hooks/actions.d.ts +1 -1
  53. package/dist/types/src/hooks/actions.d.ts.map +1 -1
  54. package/dist/types/src/hooks/useAppBarProps.d.ts +1 -1
  55. package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -1
  56. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  57. package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -1
  58. package/dist/types/src/index.d.ts +3 -1
  59. package/dist/types/src/index.d.ts.map +1 -1
  60. package/dist/types/src/operations/close.d.ts +1 -1
  61. package/dist/types/src/operations/close.d.ts.map +1 -1
  62. package/dist/types/src/operations/index.d.ts +1 -1
  63. package/dist/types/src/operations/index.d.ts.map +1 -1
  64. package/dist/types/src/operations/open.d.ts +1 -1
  65. package/dist/types/src/operations/open.d.ts.map +1 -1
  66. package/dist/types/src/operations/revert-workspace.d.ts +1 -1
  67. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -1
  68. package/dist/types/src/operations/set-layout-mode.d.ts +1 -1
  69. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -1
  70. package/dist/types/src/operations/set.d.ts +1 -1
  71. package/dist/types/src/operations/set.d.ts.map +1 -1
  72. package/dist/types/src/operations/switch-workspace.d.ts +1 -1
  73. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
  74. package/dist/types/src/operations/update-complementary.d.ts +1 -1
  75. package/dist/types/src/operations/update-complementary.d.ts.map +1 -1
  76. package/dist/types/src/operations/update-dialog.d.ts +1 -1
  77. package/dist/types/src/operations/update-dialog.d.ts.map +1 -1
  78. package/dist/types/src/operations/update-popover.d.ts +1 -1
  79. package/dist/types/src/operations/update-popover.d.ts.map +1 -1
  80. package/dist/types/src/operations/update-sidebar.d.ts +1 -1
  81. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -1
  82. package/dist/types/src/translations.d.ts +21 -22
  83. package/dist/types/src/translations.d.ts.map +1 -1
  84. package/dist/types/src/types/events.d.ts.map +1 -1
  85. package/dist/types/tsconfig.tsbuildinfo +1 -1
  86. package/package.json +38 -30
  87. package/src/SimpleLayoutPlugin.ts +4 -3
  88. package/src/capabilities/app-graph-builder.ts +1 -1
  89. package/src/capabilities/index.ts +1 -1
  90. package/src/capabilities/operation-handler.ts +1 -1
  91. package/src/capabilities/react-surface.tsx +1 -1
  92. package/src/components/ContentError.stories.tsx +1 -1
  93. package/src/components/Dialog/Dialog.tsx +13 -2
  94. package/src/components/MobileLayout/MobileLayout.stories.tsx +2 -2
  95. package/src/components/NavBranch/NavBranch.tsx +1 -5
  96. package/src/components/Popover/Popover.tsx +6 -3
  97. package/src/components/SimpleLayout/AppBar.stories.tsx +2 -1
  98. package/src/components/SimpleLayout/Drawer.tsx +8 -2
  99. package/src/components/SimpleLayout/Main.tsx +2 -2
  100. package/src/components/SimpleLayout/NavBar.stories.tsx +2 -1
  101. package/src/components/SimpleLayout/SimpleLayout.stories.tsx +3 -3
  102. package/src/hooks/useAppBarProps.ts +0 -20
  103. package/src/index.ts +7 -1
  104. package/src/meta.ts +1 -1
  105. package/src/operations/close.ts +1 -1
  106. package/src/operations/index.ts +1 -1
  107. package/src/operations/open.ts +1 -1
  108. package/src/operations/revert-workspace.ts +1 -1
  109. package/src/operations/set-layout-mode.ts +1 -1
  110. package/src/operations/set.ts +1 -1
  111. package/src/operations/switch-workspace.ts +1 -1
  112. package/src/operations/update-complementary.ts +1 -1
  113. package/src/operations/update-dialog.ts +1 -1
  114. package/src/operations/update-popover.ts +1 -1
  115. package/src/operations/update-sidebar.ts +1 -1
  116. package/src/translations.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-simple-layout",
3
- "version": "0.8.4-main.9be5663bfe",
3
+ "version": "0.8.4-main.abd8ff62ef",
4
4
  "description": "Simple layout plugin for minimal UI contexts like popover windows.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -18,6 +18,7 @@
18
18
  "#hooks": "./src/hooks/index.ts",
19
19
  "#meta": "./src/meta.ts",
20
20
  "#operations": "./src/operations/index.ts",
21
+ "#translations": "./src/translations.ts",
21
22
  "#types": "./src/types/index.ts"
22
23
  },
23
24
  "exports": {
@@ -26,6 +27,12 @@
26
27
  "browser": "./dist/lib/browser/index.mjs",
27
28
  "node": "./dist/lib/node-esm/index.mjs",
28
29
  "types": "./dist/types/src/index.d.ts"
30
+ },
31
+ "./translations": {
32
+ "source": "./src/translations.ts",
33
+ "types": "./dist/types/src/translations.d.ts",
34
+ "browser": "./dist/lib/browser/translations.mjs",
35
+ "node": "./dist/lib/node-esm/translations.mjs"
29
36
  }
30
37
  },
31
38
  "types": "dist/types/src/index.d.ts",
@@ -39,23 +46,24 @@
39
46
  "@radix-ui/react-context": "1.1.1",
40
47
  "@tauri-apps/plugin-deep-link": "^2.2.0",
41
48
  "@tauri-apps/plugin-haptics": "^2.3.2",
42
- "@dxos/app-toolkit": "0.8.4-main.9be5663bfe",
43
- "@dxos/app-framework": "0.8.4-main.9be5663bfe",
44
- "@dxos/async": "0.8.4-main.9be5663bfe",
45
- "@dxos/echo": "0.8.4-main.9be5663bfe",
46
- "@dxos/effect": "0.8.4-main.9be5663bfe",
47
- "@dxos/context": "0.8.4-main.9be5663bfe",
48
- "@dxos/plugin-client": "0.8.4-main.9be5663bfe",
49
- "@dxos/operation": "0.8.4-main.9be5663bfe",
50
- "@dxos/react-ui-mosaic": "0.8.4-main.9be5663bfe",
51
- "@dxos/react-ui-attention": "0.8.4-main.9be5663bfe",
52
- "@dxos/react-ui-search": "0.8.4-main.9be5663bfe",
53
- "@dxos/schema": "0.8.4-main.9be5663bfe",
54
- "@dxos/react-ui-stack": "0.8.4-main.9be5663bfe",
55
- "@dxos/plugin-graph": "0.8.4-main.9be5663bfe",
56
- "@dxos/util": "0.8.4-main.9be5663bfe",
57
- "@dxos/log": "0.8.4-main.9be5663bfe",
58
- "@dxos/react-ui-menu": "0.8.4-main.9be5663bfe"
49
+ "@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
50
+ "@dxos/async": "0.8.4-main.abd8ff62ef",
51
+ "@dxos/context": "0.8.4-main.abd8ff62ef",
52
+ "@dxos/compute": "0.8.4-main.abd8ff62ef",
53
+ "@dxos/echo": "0.8.4-main.abd8ff62ef",
54
+ "@dxos/effect": "0.8.4-main.abd8ff62ef",
55
+ "@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
56
+ "@dxos/log": "0.8.4-main.abd8ff62ef",
57
+ "@dxos/react-ui-attention": "0.8.4-main.abd8ff62ef",
58
+ "@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
59
+ "@dxos/react-ui-list": "0.8.4-main.abd8ff62ef",
60
+ "@dxos/react-ui-menu": "0.8.4-main.abd8ff62ef",
61
+ "@dxos/react-ui-mosaic": "0.8.4-main.abd8ff62ef",
62
+ "@dxos/schema": "0.8.4-main.abd8ff62ef",
63
+ "@dxos/app-framework": "0.8.4-main.abd8ff62ef",
64
+ "@dxos/react-ui-search": "0.8.4-main.abd8ff62ef",
65
+ "@dxos/react-ui-stack": "0.8.4-main.abd8ff62ef",
66
+ "@dxos/util": "0.8.4-main.abd8ff62ef"
59
67
  },
60
68
  "devDependencies": {
61
69
  "@types/react": "~19.2.7",
@@ -63,23 +71,23 @@
63
71
  "effect": "3.20.0",
64
72
  "react": "~19.2.3",
65
73
  "react-dom": "~19.2.3",
66
- "vite": "^7.1.11",
67
- "@dxos/app-graph": "0.8.4-main.9be5663bfe",
68
- "@dxos/plugin-search": "0.8.4-main.9be5663bfe",
69
- "@dxos/plugin-preview": "0.8.4-main.9be5663bfe",
70
- "@dxos/plugin-space": "0.8.4-main.9be5663bfe",
71
- "@dxos/plugin-testing": "0.8.4-main.9be5663bfe",
72
- "@dxos/schema": "0.8.4-main.9be5663bfe",
73
- "@dxos/storybook-utils": "0.8.4-main.9be5663bfe",
74
- "@dxos/ui-theme": "0.8.4-main.9be5663bfe",
75
- "@dxos/react-ui": "0.8.4-main.9be5663bfe"
74
+ "vite": "^8.0.10",
75
+ "@dxos/app-graph": "0.8.4-main.abd8ff62ef",
76
+ "@dxos/plugin-search": "0.8.4-main.abd8ff62ef",
77
+ "@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
78
+ "@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
79
+ "@dxos/schema": "0.8.4-main.abd8ff62ef",
80
+ "@dxos/react-ui": "0.8.4-main.abd8ff62ef",
81
+ "@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
82
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef",
83
+ "@dxos/plugin-preview": "0.8.4-main.abd8ff62ef"
76
84
  },
77
85
  "peerDependencies": {
78
86
  "effect": "3.20.0",
79
87
  "react": "~19.2.3",
80
88
  "react-dom": "~19.2.3",
81
- "@dxos/ui-theme": "0.8.4-main.9be5663bfe",
82
- "@dxos/react-ui": "0.8.4-main.9be5663bfe"
89
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef",
90
+ "@dxos/react-ui": "0.8.4-main.abd8ff62ef"
83
91
  },
84
92
  "publishConfig": {
85
93
  "access": "public"
@@ -15,10 +15,9 @@ import {
15
15
  UrlHandler,
16
16
  } from '#capabilities';
17
17
  import { meta } from '#meta';
18
+ import { translations } from '#translations';
18
19
  import { SimpleLayoutEvents } from '#types';
19
20
 
20
- import { translations } from './translations';
21
-
22
21
  export type SimpleLayoutPluginOptions = {
23
22
  /** Determines if running in popover window context (hides mobile-specific UI). */
24
23
  isPopover?: boolean;
@@ -31,7 +30,7 @@ export const SimpleLayoutPlugin = Plugin.define<SimpleLayoutPluginOptions>(meta)
31
30
  Plugin.addModule(({ isPopover = false }) => ({
32
31
  id: Capability.getModuleTag(State),
33
32
  activatesOn: ActivationEvents.Startup,
34
- activatesAfter: [SimpleLayoutEvents.StateReady, AppActivationEvents.LayoutReady],
33
+ firesAfterActivation: [SimpleLayoutEvents.StateReady, AppActivationEvents.LayoutReady],
35
34
  activate: () => State({ initialState: { isPopover } }),
36
35
  })),
37
36
  Plugin.addModule(({ isPopover = false }) => ({
@@ -56,3 +55,5 @@ export const SimpleLayoutPlugin = Plugin.define<SimpleLayoutPluginOptions>(meta)
56
55
  }),
57
56
  Plugin.make,
58
57
  );
58
+
59
+ export default SimpleLayoutPlugin;
@@ -11,7 +11,7 @@ import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
11
11
  export default Capability.makeModule(
12
12
  Effect.fnUntraced(function* () {
13
13
  const extensions = yield* GraphBuilder.createExtension({
14
- id: 'org.dxos.plugin.simple-layout.not-found',
14
+ id: 'org.dxos.plugin.simpleLayout.not-found',
15
15
  match: NodeMatcher.whenRoot,
16
16
  connector: () => Effect.succeed([AppNode.makeNotFound()]),
17
17
  });
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { Capability } from '@dxos/app-framework';
6
- import { OperationHandlerSet } from '@dxos/operation';
6
+ import { OperationHandlerSet } from '@dxos/compute';
7
7
 
8
8
  export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
9
9
  export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { Capabilities, Capability } from '@dxos/app-framework';
6
- import type { OperationHandlerSet } from '@dxos/operation';
6
+ import type { OperationHandlerSet } from '@dxos/compute';
7
7
 
8
8
  import { SimpleLayoutOperationHandlerSet } from '#operations';
9
9
 
@@ -18,7 +18,7 @@ type SurfaceData = {
18
18
  properties: Record<string, any>;
19
19
  };
20
20
 
21
- const ALLOWED_DISPOSITIONS = ['workspace', 'user-account', 'pin-end', 'alternate-tree'];
21
+ const ALLOWED_DISPOSITIONS = ['workspace', 'user-account', 'pin-end'];
22
22
 
23
23
  export default Capability.makeModule(() =>
24
24
  Effect.succeed(
@@ -7,7 +7,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
7
7
  import { ErrorFallback } from '@dxos/react-ui';
8
8
  import { withTheme } from '@dxos/react-ui/testing';
9
9
 
10
- import { translations } from '../translations';
10
+ import { translations } from '#translations';
11
11
 
12
12
  const meta = {
13
13
  title: 'plugins/plugin-simple-layout/components/ErrorFallback',
@@ -5,6 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { Surface } from '@dxos/app-framework/ui';
8
+ import { AppSurface } from '@dxos/app-toolkit/ui';
8
9
  import { AlertDialog, Dialog as NaturalDialog } from '@dxos/react-ui';
9
10
  import { ErrorFallback } from '@dxos/react-ui';
10
11
 
@@ -23,14 +24,24 @@ export const Dialog = () => {
23
24
  onOpenChange={(nextOpen) => updateState((state) => ({ ...state, dialogOpen: nextOpen }))}
24
25
  >
25
26
  {state.dialogBlockAlign === 'end' ? (
26
- <Surface.Surface role='dialog' data={state.dialogContent ?? undefined} limit={1} fallback={ErrorFallback} />
27
+ <Surface.Surface
28
+ type={AppSurface.Dialog}
29
+ data={state.dialogContent ?? undefined}
30
+ limit={1}
31
+ fallback={ErrorFallback}
32
+ />
27
33
  ) : (
28
34
  <DialogOverlay
29
35
  blockAlign={state.dialogBlockAlign}
30
36
  classNames={state.dialogOverlayClasses}
31
37
  style={state.dialogOverlayStyle}
32
38
  >
33
- <Surface.Surface role='dialog' data={state.dialogContent ?? undefined} limit={1} fallback={ErrorFallback} />
39
+ <Surface.Surface
40
+ type={AppSurface.Dialog}
41
+ data={state.dialogContent ?? undefined}
42
+ limit={1}
43
+ fallback={ErrorFallback}
44
+ />
34
45
  </DialogOverlay>
35
46
  )}
36
47
  </DialogRoot>
@@ -66,13 +66,13 @@ const StoryPanel = ({ children, label }: PropsWithChildren<{ label: string }>) =
66
66
  </Panel.Toolbar>
67
67
  <Panel.Content asChild>
68
68
  <Column.Root gutter='xs' classNames='py-form-chrome'>
69
- <Column.Content>
69
+ <Column.Center>
70
70
  <Flex column>
71
71
  <Input.Root>
72
72
  <Input.TextInput placeholder={label} />
73
73
  </Input.Root>
74
74
  </Flex>
75
- </Column.Content>
75
+ </Column.Center>
76
76
  </Column.Root>
77
77
  </Panel.Content>
78
78
  </Panel.Root>
@@ -35,12 +35,8 @@ export const NavBranch = ({ id }: NavBranchProps) => {
35
35
 
36
36
  const children = useConnections(graph, id, 'child');
37
37
 
38
- // TODO(wittjosiah): Move alternate-tree nodes to a non-child relation so they don't need filtering.
39
38
  const visibleChildren = useMemo(
40
- () =>
41
- children.filter(
42
- (node) => node.properties.disposition !== 'alternate-tree' && node.properties.disposition !== 'hidden',
43
- ),
39
+ () => children.filter((node) => node.properties.disposition !== 'hidden'),
44
40
  [children],
45
41
  );
46
42
 
@@ -6,6 +6,7 @@ import { createContext } from '@radix-ui/react-context';
6
6
  import React, { type PropsWithChildren, useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
8
  import { Surface } from '@dxos/app-framework/ui';
9
+ import { AppSurface } from '@dxos/app-toolkit/ui';
9
10
  import { Popover, type PopoverContentInteractOutsideEvent, toLocalizedString, useTranslation } from '@dxos/react-ui';
10
11
  import { Card } from '@dxos/react-ui';
11
12
 
@@ -99,8 +100,8 @@ export const PopoverContent = () => {
99
100
  onEscapeKeyDown={handleInteractOutside}
100
101
  >
101
102
  <Popover.Viewport>
102
- {state.popoverKind === 'base' && (
103
- <Surface.Surface role='popover' data={state.popoverContent ?? undefined} limit={1} />
103
+ {state.popoverKind === 'base' && state.popoverContent && 'component' in state.popoverContent && (
104
+ <Surface.Surface type={AppSurface.Popover} data={state.popoverContent} limit={1} />
104
105
  )}
105
106
  {state.popoverKind === 'card' && (
106
107
  <Card.Root border={false} classNames='dx-card-popover'>
@@ -110,7 +111,9 @@ export const PopoverContent = () => {
110
111
  {state.popoverTitle ? <Card.Title>{toLocalizedString(state.popoverTitle, t)}</Card.Title> : <span />}
111
112
  <Card.CloseIconButton onClick={handleClose} />
112
113
  </Card.Toolbar>
113
- <Surface.Surface role='card--content' data={state.popoverContent ?? undefined} limit={1} />
114
+ {state.popoverContent && 'subject' in state.popoverContent && (
115
+ <Surface.Surface type={AppSurface.Card} data={state.popoverContent} limit={1} />
116
+ )}
114
117
  </Card.Root>
115
118
  )}
116
119
  </Popover.Viewport>
@@ -11,7 +11,8 @@ import { type ActionGraphProps, createMenuAction } from '@dxos/react-ui-menu';
11
11
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
12
12
  import { withRegistry } from '@dxos/storybook-utils';
13
13
 
14
- import { translations } from '../../translations';
14
+ import { translations } from '#translations';
15
+
15
16
  import { MobileLayout } from '../MobileLayout';
16
17
  import { AppBar, type AppBarProps } from './AppBar';
17
18
 
@@ -5,7 +5,7 @@
5
5
  import React, { useMemo } from 'react';
6
6
 
7
7
  import { Surface } from '@dxos/app-framework/ui';
8
- import { type AppSurface, useAppGraph } from '@dxos/app-toolkit/ui';
8
+ import { AppSurface, useAppGraph } from '@dxos/app-toolkit/ui';
9
9
  import { type Node, useNode } from '@dxos/plugin-graph';
10
10
  import { ErrorFallback, Panel } from '@dxos/react-ui';
11
11
  import { getLinkedVariant } from '@dxos/react-ui-attention';
@@ -61,7 +61,13 @@ export const Drawer = () => {
61
61
  </Menu.Root>
62
62
  </Panel.Toolbar>
63
63
  <Panel.Content>
64
- <Surface.Surface role='article' data={data} limit={1} fallback={ErrorFallback} placeholder={placeholder} />
64
+ <Surface.Surface
65
+ type={AppSurface.Article}
66
+ data={data}
67
+ limit={1}
68
+ fallback={ErrorFallback}
69
+ placeholder={placeholder}
70
+ />
65
71
  </Panel.Content>
66
72
  </Panel.Root>
67
73
  );
@@ -5,7 +5,7 @@
5
5
  import React, { useMemo } from 'react';
6
6
 
7
7
  import { Surface } from '@dxos/app-framework/ui';
8
- import { useAppGraph } from '@dxos/app-toolkit/ui';
8
+ import { AppSurface, useAppGraph } from '@dxos/app-toolkit/ui';
9
9
  import { useNode } from '@dxos/plugin-graph';
10
10
  import { ErrorFallback, Panel } from '@dxos/react-ui';
11
11
  import { useAttentionAttributes } from '@dxos/react-ui-attention';
@@ -59,7 +59,7 @@ export const Main = () => {
59
59
  <Panel.Content role='article' className='bg-base-surface'>
60
60
  <Surface.Surface
61
61
  key={id}
62
- role='article'
62
+ type={AppSurface.Article}
63
63
  data={data}
64
64
  limit={1}
65
65
  fallback={ErrorFallback}
@@ -11,7 +11,8 @@ import { type ActionGraphProps, createGapSeparator, createMenuAction, createMenu
11
11
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
12
12
  import { withRegistry } from '@dxos/storybook-utils';
13
13
 
14
- import { translations } from '../../translations';
14
+ import { translations } from '#translations';
15
+
15
16
  import { NavBar } from './NavBar';
16
17
 
17
18
  const MAIN_MENU_GROUP_ID = 'navbar-main-menu';
@@ -13,15 +13,15 @@ import { ClientPlugin } from '@dxos/plugin-client';
13
13
  import { SearchPlugin } from '@dxos/plugin-search';
14
14
  import { SpacePlugin } from '@dxos/plugin-space';
15
15
  import { corePlugins } from '@dxos/plugin-testing';
16
- import { translations as searchTranslation } from '@dxos/react-ui-search';
16
+ import { translations as searchTranslation } from '@dxos/react-ui-search/translations';
17
17
  import { withLayout } from '@dxos/react-ui/testing';
18
18
 
19
19
  import { ReactRoot, ReactSurface, State } from '#capabilities';
20
20
  import { meta as pluginMeta } from '#meta';
21
+ import { translations } from '#translations';
21
22
  import { SimpleLayoutEvents } from '#types';
22
23
 
23
24
  import { type SimpleLayoutPluginOptions } from '../../SimpleLayoutPlugin';
24
- import { translations } from '../../translations';
25
25
  import { SimpleLayout } from './SimpleLayout';
26
26
 
27
27
  const createPluginManager = ({ isPopover }: { isPopover?: boolean }) => {
@@ -45,7 +45,7 @@ const createPluginManager = ({ isPopover }: { isPopover?: boolean }) => {
45
45
  Plugin.addModule(({ isPopover = false }) => ({
46
46
  id: Capability.getModuleTag(State),
47
47
  activatesOn: ActivationEvents.Startup,
48
- activatesAfter: [SimpleLayoutEvents.StateReady, AppActivationEvents.LayoutReady],
48
+ firesAfterActivation: [SimpleLayoutEvents.StateReady, AppActivationEvents.LayoutReady],
49
49
  activate: () => State({ initialState: { isPopover } }),
50
50
  })),
51
51
  Plugin.addModule({
@@ -3,7 +3,6 @@
3
3
  //
4
4
 
5
5
  import { Atom, useAtomValue } from '@effect-atom/atom-react';
6
- import * as Effect from 'effect/Effect';
7
6
  import * as Option from 'effect/Option';
8
7
  import { useCallback, useMemo } from 'react';
9
8
 
@@ -55,25 +54,6 @@ export const useAppBarProps = (): Omit<AppBarProps, 'classNames'> => {
55
54
  relation: 'child',
56
55
  }));
57
56
 
58
- // Add alternate-tree action (e.g. Settings) from the workspace node.
59
- const workspaceConnections = state.workspace ? get(graph.connections(state.workspace, 'child')) : [];
60
- const alternateTreeNode = workspaceConnections.find(
61
- (node: Node.Node) => node.properties.disposition === 'alternate-tree',
62
- );
63
- if (alternateTreeNode && activeId !== alternateTreeNode.id) {
64
- const settingsAction = {
65
- id: `appbar-settings-${alternateTreeNode.id}`,
66
- type: Node.ActionType,
67
- data: () => Effect.promise(() => invokePromise(LayoutOperation.Open, { subject: [alternateTreeNode.id] })),
68
- properties: {
69
- label: alternateTreeNode.properties.label ?? alternateTreeNode.id,
70
- icon: alternateTreeNode.properties.icon ?? 'ph--placeholder--regular',
71
- },
72
- };
73
- nodes.push(settingsAction);
74
- edges.push({ source: 'root', target: settingsAction.id, relation: 'child' });
75
- }
76
-
77
57
  return { nodes, edges };
78
58
  }),
79
59
  [graph, stateAtom],
package/src/index.ts CHANGED
@@ -2,4 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './SimpleLayoutPlugin';
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const SimpleLayoutPlugin = Plugin.lazy(meta, () => import('./SimpleLayoutPlugin'));
10
+
11
+ export * from './meta';
package/src/meta.ts CHANGED
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
8
  export const meta: Plugin.Meta = {
9
- id: 'org.dxos.plugin.simple-layout',
9
+ id: 'org.dxos.plugin.simpleLayout',
10
10
  name: 'Simple Layout',
11
11
  description: trim`
12
12
  Minimal layout plugin for simplified UI contexts like popover windows.
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  import { layoutStateAccess } from './state-access';
9
9
 
@@ -1,6 +1,6 @@
1
1
  // Copyright 2025 DXOS.org
2
2
 
3
- import { OperationHandlerSet } from '@dxos/operation';
3
+ import { OperationHandlerSet } from '@dxos/compute';
4
4
 
5
5
  export const SimpleLayoutOperationHandlerSet = OperationHandlerSet.lazy(
6
6
  () => import('./close'),
@@ -9,8 +9,8 @@ import {
9
9
  createEdgeExistenceChecker,
10
10
  validateNavigationTarget,
11
11
  } from '@dxos/app-toolkit';
12
+ import { Operation } from '@dxos/compute';
12
13
  import { Context } from '@dxos/context';
13
- import { Operation } from '@dxos/operation';
14
14
  import { ClientCapabilities } from '@dxos/plugin-client/types';
15
15
 
16
16
  import { layoutStateAccess } from './state-access';
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  import { layoutStateAccess } from './state-access';
9
9
 
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  const handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(
9
9
  Operation.withHandler(Effect.fnUntraced(function* () {})),
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  import { layoutStateAccess } from './state-access';
9
9
 
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  import { layoutStateAccess } from './state-access';
9
9
 
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
  import { getLinkedVariant } from '@dxos/react-ui-attention';
8
8
 
9
9
  import { layoutStateAccess } from './state-access';
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  import { layoutStateAccess } from './state-access';
9
9
 
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  import { layoutStateAccess } from './state-access';
9
9
 
@@ -3,7 +3,7 @@
3
3
  import * as Effect from 'effect/Effect';
4
4
 
5
5
  import { LayoutOperation } from '@dxos/app-toolkit';
6
- import { Operation } from '@dxos/operation';
6
+ import { Operation } from '@dxos/compute';
7
7
 
8
8
  const handler: Operation.WithHandler<typeof LayoutOperation.UpdateSidebar> = LayoutOperation.UpdateSidebar.pipe(
9
9
  Operation.withHandler(() => Effect.void),
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { type Resource } from '@dxos/react-ui';
6
- import { translations as searchTranslations } from '@dxos/react-ui-search';
6
+ import { translations as searchTranslations } from '@dxos/react-ui-search/translations';
7
7
 
8
8
  import { meta } from '#meta';
9
9