@dxos/plugin-simple-layout 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/dist/lib/{browser/index.mjs → neutral/SimpleLayoutPlugin.mjs} +10 -38
- package/dist/lib/neutral/SimpleLayoutPlugin.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs +21 -0
- package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +21 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7UDV3JDT.mjs +22 -0
- package/dist/lib/neutral/chunk-7UDV3JDT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-AMTEDJHG.mjs +19 -0
- package/dist/lib/neutral/chunk-AMTEDJHG.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FD2CAY4Q.mjs +26 -0
- package/dist/lib/neutral/chunk-FD2CAY4Q.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XVUAQHKU.mjs +8 -0
- package/dist/lib/neutral/chunk-XVUAQHKU.mjs.map +7 -0
- package/dist/lib/neutral/close-WKMURGUB.mjs +35 -0
- package/dist/lib/neutral/close-WKMURGUB.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +924 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +332 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +14 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/open-XI2T7D5O.mjs +49 -0
- package/dist/lib/neutral/open-XI2T7D5O.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs +13 -0
- package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-root-VE265VX4.mjs +18 -0
- package/dist/lib/neutral/react-root-VE265VX4.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-REZMYKQV.mjs +46 -0
- package/dist/lib/neutral/react-surface-REZMYKQV.mjs.map +7 -0
- package/dist/lib/neutral/revert-workspace-ST6NZUNG.mjs +22 -0
- package/dist/lib/neutral/revert-workspace-ST6NZUNG.mjs.map +7 -0
- package/dist/lib/neutral/set-6ZRLWPJS.mjs +22 -0
- package/dist/lib/neutral/set-6ZRLWPJS.mjs.map +7 -0
- package/dist/lib/neutral/set-layout-mode-L22HRCKS.mjs +13 -0
- package/dist/lib/neutral/set-layout-mode-L22HRCKS.mjs.map +7 -0
- package/dist/lib/neutral/spotlight-dismiss-EIYW5E7M.mjs +58 -0
- package/dist/lib/neutral/spotlight-dismiss-EIYW5E7M.mjs.map +7 -0
- package/dist/lib/neutral/state-7NXKBLPY.mjs +47 -0
- package/dist/lib/neutral/state-7NXKBLPY.mjs.map +7 -0
- package/dist/lib/neutral/switch-workspace-PYWPTMFO.mjs +25 -0
- package/dist/lib/neutral/switch-workspace-PYWPTMFO.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +36 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/update-complementary-HKWF5OXT.mjs +33 -0
- package/dist/lib/neutral/update-complementary-HKWF5OXT.mjs.map +7 -0
- package/dist/lib/neutral/update-dialog-P4ASXCE7.mjs +30 -0
- package/dist/lib/neutral/update-dialog-P4ASXCE7.mjs.map +7 -0
- package/dist/lib/neutral/update-popover-REAKC2GN.mjs +34 -0
- package/dist/lib/neutral/update-popover-REAKC2GN.mjs.map +7 -0
- package/dist/lib/neutral/update-sidebar-O5SQPR6Q.mjs +12 -0
- package/dist/lib/neutral/update-sidebar-O5SQPR6Q.mjs.map +7 -0
- package/dist/lib/neutral/url-handler-GZXUUAHD.mjs +129 -0
- package/dist/lib/neutral/url-handler-GZXUUAHD.mjs.map +7 -0
- package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -0
- package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss.d.ts +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +3 -3
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/ContentError.stories.d.ts +21 -21
- package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
- package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Home/Home.d.ts.map +1 -1
- package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +2 -2
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts +1 -5
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +21 -21
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/Drawer.d.ts +4 -7
- package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/Main.d.ts +4 -7
- package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts +1 -5
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +22 -26
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +21 -21
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/hooks.d.ts.map +1 -1
- package/dist/types/src/hooks/actions.d.ts +3 -3
- package/dist/types/src/hooks/actions.d.ts.map +1 -1
- package/dist/types/src/hooks/useAppBarProps.d.ts +1 -1
- package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -1
- 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/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/close.d.ts +1 -1
- package/dist/types/src/operations/close.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts +1 -1
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/operations/revert-workspace.d.ts +1 -1
- package/dist/types/src/operations/revert-workspace.d.ts.map +1 -1
- package/dist/types/src/operations/set-layout-mode.d.ts +1 -1
- package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -1
- package/dist/types/src/operations/set.d.ts +1 -1
- package/dist/types/src/operations/set.d.ts.map +1 -1
- package/dist/types/src/operations/state-access.d.ts +3 -3
- package/dist/types/src/operations/state-access.d.ts.map +1 -1
- package/dist/types/src/operations/switch-workspace.d.ts +1 -1
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
- package/dist/types/src/operations/update-complementary.d.ts +1 -1
- package/dist/types/src/operations/update-complementary.d.ts.map +1 -1
- package/dist/types/src/operations/update-dialog.d.ts +1 -1
- package/dist/types/src/operations/update-dialog.d.ts.map +1 -1
- package/dist/types/src/operations/update-popover.d.ts +1 -1
- package/dist/types/src/operations/update-popover.d.ts.map +1 -1
- package/dist/types/src/operations/update-sidebar.d.ts +1 -1
- package/dist/types/src/operations/update-sidebar.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +21 -22
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/{capabilities.d.ts → SimpleLayoutCapabilities.d.ts} +2 -8
- package/dist/types/src/types/SimpleLayoutCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/SimpleLayoutEvents.d.ts +4 -0
- package/dist/types/src/types/SimpleLayoutEvents.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +85 -41
- package/src/SimpleLayoutPlugin.ts +4 -3
- package/src/capabilities/app-graph-builder.ts +1 -1
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +1 -1
- package/src/capabilities/state.tsx +5 -6
- package/src/capabilities/url-handler.ts +16 -13
- package/src/components/ContentError.stories.tsx +1 -1
- package/src/components/Dialog/Dialog.tsx +13 -2
- package/src/components/Home/Home.tsx +1 -1
- package/src/components/Loading/Loading.tsx +1 -1
- package/src/components/MobileLayout/MobileLayout.stories.tsx +2 -2
- package/src/components/MobileLayout/MobileLayout.tsx +0 -2
- package/src/components/NavBranch/NavBranch.tsx +2 -6
- package/src/components/Popover/Popover.tsx +7 -3
- package/src/components/SimpleLayout/AppBar.stories.tsx +2 -1
- package/src/components/SimpleLayout/Drawer.tsx +8 -2
- package/src/components/SimpleLayout/Main.tsx +2 -2
- package/src/components/SimpleLayout/NavBar.stories.tsx +2 -1
- package/src/components/SimpleLayout/SimpleLayout.stories.tsx +6 -6
- package/src/components/SimpleLayout/SimpleLayout.tsx +2 -2
- package/src/hooks/actions.ts +5 -3
- package/src/hooks/useAppBarProps.ts +2 -22
- package/src/hooks/useDrawerActions.ts +2 -2
- package/src/hooks/useNavbarActions.ts +2 -2
- package/src/hooks/useSimpleLayoutState.ts +7 -5
- package/src/index.ts +2 -1
- package/src/meta.ts +2 -1
- package/src/operations/close.ts +1 -1
- package/src/operations/index.ts +1 -1
- package/src/operations/open.ts +2 -2
- package/src/operations/revert-workspace.ts +1 -1
- package/src/operations/set-layout-mode.ts +1 -1
- package/src/operations/set.ts +1 -1
- package/src/operations/state-access.ts +5 -3
- package/src/operations/switch-workspace.ts +1 -1
- package/src/operations/update-complementary.ts +1 -1
- package/src/operations/update-dialog.ts +1 -1
- package/src/operations/update-popover.ts +1 -1
- package/src/operations/update-sidebar.ts +1 -1
- package/src/plugin.ts +11 -0
- package/src/translations.ts +1 -1
- package/src/types/{capabilities.ts → SimpleLayoutCapabilities.ts} +3 -15
- package/src/types/SimpleLayoutEvents.ts +15 -0
- package/src/types/index.ts +2 -2
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/node-esm/index.mjs +0 -82
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -6
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/types/events.ts +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-simple-layout",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.765dc60934",
|
|
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",
|
|
@@ -8,24 +8,67 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
|
-
"#capabilities":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"#
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#hooks": {
|
|
27
|
+
"source": "./src/hooks/index.ts",
|
|
28
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#meta": {
|
|
32
|
+
"source": "./src/meta.ts",
|
|
33
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#operations": {
|
|
37
|
+
"source": "./src/operations/index.ts",
|
|
38
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#plugin": {
|
|
42
|
+
"source": "./src/SimpleLayoutPlugin.ts",
|
|
43
|
+
"types": "./dist/types/src/SimpleLayoutPlugin.d.ts",
|
|
44
|
+
"default": "./dist/lib/neutral/SimpleLayoutPlugin.mjs"
|
|
45
|
+
},
|
|
46
|
+
"#translations": {
|
|
47
|
+
"source": "./src/translations.ts",
|
|
48
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
49
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
50
|
+
},
|
|
51
|
+
"#types": {
|
|
52
|
+
"source": "./src/types/index.ts",
|
|
53
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
54
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
55
|
+
}
|
|
22
56
|
},
|
|
23
57
|
"exports": {
|
|
24
58
|
".": {
|
|
25
59
|
"source": "./src/index.ts",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
60
|
+
"types": "./dist/types/src/index.d.ts",
|
|
61
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./plugin": {
|
|
64
|
+
"source": "./src/plugin.ts",
|
|
65
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
66
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./translations": {
|
|
69
|
+
"source": "./src/translations.ts",
|
|
70
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
71
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
29
72
|
}
|
|
30
73
|
},
|
|
31
74
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -37,25 +80,26 @@
|
|
|
37
80
|
"@effect-atom/atom": "^0.5.1",
|
|
38
81
|
"@effect-atom/atom-react": "^0.5.0",
|
|
39
82
|
"@radix-ui/react-context": "1.1.1",
|
|
40
|
-
"@tauri-apps/plugin-deep-link": "^2.
|
|
83
|
+
"@tauri-apps/plugin-deep-link": "^2.4.9",
|
|
41
84
|
"@tauri-apps/plugin-haptics": "^2.3.2",
|
|
42
|
-
"@dxos/app-
|
|
43
|
-
"@dxos/app-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/context": "0.8.4-main.
|
|
46
|
-
"@dxos/echo": "0.8.4-main.
|
|
47
|
-
"@dxos/effect": "0.8.4-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/plugin-
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.
|
|
55
|
-
"@dxos/react-ui-search": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
85
|
+
"@dxos/app-toolkit": "0.8.4-main.765dc60934",
|
|
86
|
+
"@dxos/app-framework": "0.8.4-main.765dc60934",
|
|
87
|
+
"@dxos/compute": "0.8.4-main.765dc60934",
|
|
88
|
+
"@dxos/context": "0.8.4-main.765dc60934",
|
|
89
|
+
"@dxos/echo": "0.8.4-main.765dc60934",
|
|
90
|
+
"@dxos/effect": "0.8.4-main.765dc60934",
|
|
91
|
+
"@dxos/async": "0.8.4-main.765dc60934",
|
|
92
|
+
"@dxos/log": "0.8.4-main.765dc60934",
|
|
93
|
+
"@dxos/plugin-graph": "0.8.4-main.765dc60934",
|
|
94
|
+
"@dxos/plugin-client": "0.8.4-main.765dc60934",
|
|
95
|
+
"@dxos/react-ui-attention": "0.8.4-main.765dc60934",
|
|
96
|
+
"@dxos/react-ui-list": "0.8.4-main.765dc60934",
|
|
97
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.765dc60934",
|
|
98
|
+
"@dxos/react-ui-search": "0.8.4-main.765dc60934",
|
|
99
|
+
"@dxos/react-ui-stack": "0.8.4-main.765dc60934",
|
|
100
|
+
"@dxos/util": "0.8.4-main.765dc60934",
|
|
101
|
+
"@dxos/schema": "0.8.4-main.765dc60934",
|
|
102
|
+
"@dxos/react-ui-menu": "0.8.4-main.765dc60934"
|
|
59
103
|
},
|
|
60
104
|
"devDependencies": {
|
|
61
105
|
"@types/react": "~19.2.7",
|
|
@@ -63,23 +107,23 @@
|
|
|
63
107
|
"effect": "3.20.0",
|
|
64
108
|
"react": "~19.2.3",
|
|
65
109
|
"react-dom": "~19.2.3",
|
|
66
|
-
"vite": "^
|
|
67
|
-
"@dxos/app-graph": "0.8.4-main.
|
|
68
|
-
"@dxos/plugin-preview": "0.8.4-main.
|
|
69
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
75
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
110
|
+
"vite": "^8.0.13",
|
|
111
|
+
"@dxos/app-graph": "0.8.4-main.765dc60934",
|
|
112
|
+
"@dxos/plugin-preview": "0.8.4-main.765dc60934",
|
|
113
|
+
"@dxos/plugin-space": "0.8.4-main.765dc60934",
|
|
114
|
+
"@dxos/plugin-search": "0.8.4-main.765dc60934",
|
|
115
|
+
"@dxos/plugin-testing": "0.8.4-main.765dc60934",
|
|
116
|
+
"@dxos/react-ui": "0.8.4-main.765dc60934",
|
|
117
|
+
"@dxos/schema": "0.8.4-main.765dc60934",
|
|
118
|
+
"@dxos/storybook-utils": "0.8.4-main.765dc60934",
|
|
119
|
+
"@dxos/ui-theme": "0.8.4-main.765dc60934"
|
|
76
120
|
},
|
|
77
121
|
"peerDependencies": {
|
|
78
122
|
"effect": "3.20.0",
|
|
79
123
|
"react": "~19.2.3",
|
|
80
124
|
"react-dom": "~19.2.3",
|
|
81
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
82
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
125
|
+
"@dxos/react-ui": "0.8.4-main.765dc60934",
|
|
126
|
+
"@dxos/ui-theme": "0.8.4-main.765dc60934"
|
|
83
127
|
},
|
|
84
128
|
"publishConfig": {
|
|
85
129
|
"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
|
-
|
|
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.
|
|
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/
|
|
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/
|
|
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'
|
|
21
|
+
const ALLOWED_DISPOSITIONS = ['workspace', 'user-account', 'pin-end'];
|
|
22
22
|
|
|
23
23
|
export default Capability.makeModule(() =>
|
|
24
24
|
Effect.succeed(
|
|
@@ -9,10 +9,9 @@ import { Capability } from '@dxos/app-framework';
|
|
|
9
9
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
10
10
|
import { Node } from '@dxos/plugin-graph';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import { SimpleLayoutState as SimpleLayoutStateCapability } from '#types';
|
|
12
|
+
import { SimpleLayoutCapabilities } from '#types';
|
|
14
13
|
|
|
15
|
-
const defaultState: SimpleLayoutState = {
|
|
14
|
+
const defaultState: SimpleLayoutCapabilities.SimpleLayoutState = {
|
|
16
15
|
dialogOpen: false,
|
|
17
16
|
workspace: Node.RootId,
|
|
18
17
|
previousWorkspace: Node.RootId,
|
|
@@ -23,12 +22,12 @@ const defaultState: SimpleLayoutState = {
|
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
export type SimpleLayoutStateOptions = {
|
|
26
|
-
initialState?: Partial<SimpleLayoutState>;
|
|
25
|
+
initialState?: Partial<SimpleLayoutCapabilities.SimpleLayoutState>;
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
export default Capability.makeModule(({ initialState }: SimpleLayoutStateOptions = {}) =>
|
|
30
29
|
Effect.sync(() => {
|
|
31
|
-
const stateAtom = Atom.make<SimpleLayoutState>({ ...defaultState, ...initialState });
|
|
30
|
+
const stateAtom = Atom.make<SimpleLayoutCapabilities.SimpleLayoutState>({ ...defaultState, ...initialState });
|
|
32
31
|
|
|
33
32
|
const layoutAtom = Atom.make((get): AppCapabilities.Layout => {
|
|
34
33
|
const state = get(stateAtom);
|
|
@@ -45,7 +44,7 @@ export default Capability.makeModule(({ initialState }: SimpleLayoutStateOptions
|
|
|
45
44
|
});
|
|
46
45
|
|
|
47
46
|
return [
|
|
48
|
-
Capability.contributes(
|
|
47
|
+
Capability.contributes(SimpleLayoutCapabilities.State, stateAtom),
|
|
49
48
|
Capability.contributes(AppCapabilities.Layout, layoutAtom),
|
|
50
49
|
];
|
|
51
50
|
}),
|
|
@@ -10,7 +10,7 @@ import { runAndForwardErrors } from '@dxos/effect';
|
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { isTauri } from '@dxos/util';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { SimpleLayoutCapabilities } from '#types';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* URL handler for simple layout that syncs browser URL with layout state.
|
|
@@ -99,19 +99,22 @@ export default Capability.makeModule(
|
|
|
99
99
|
// Sync URL with layout state changes.
|
|
100
100
|
let lastWorkspace: string | undefined;
|
|
101
101
|
let lastActive: string | undefined;
|
|
102
|
-
const unsubscribe = yield* Capabilities.subscribeAtom(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
const unsubscribe = yield* Capabilities.subscribeAtom(
|
|
103
|
+
SimpleLayoutCapabilities.State,
|
|
104
|
+
(state: SimpleLayoutCapabilities.SimpleLayoutState) => {
|
|
105
|
+
const { workspace, active } = state;
|
|
106
|
+
|
|
107
|
+
if (workspace !== lastWorkspace || active !== lastActive) {
|
|
108
|
+
lastWorkspace = workspace;
|
|
109
|
+
lastActive = active;
|
|
110
|
+
|
|
111
|
+
const path = active ? toUrlPath(active) : toUrlPath(workspace);
|
|
112
|
+
if (window.location.pathname !== path) {
|
|
113
|
+
history.pushState(null, '', `${path}${window.location.search}`);
|
|
114
|
+
}
|
|
112
115
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
116
|
+
},
|
|
117
|
+
);
|
|
115
118
|
|
|
116
119
|
return Capability.contributes(Capabilities.Null, null, () =>
|
|
117
120
|
Effect.sync(() => {
|
|
@@ -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 '
|
|
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
|
|
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
|
|
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>
|
|
@@ -100,7 +100,7 @@ const WorkspaceTile: MosaicStackTileComponent<Node.Node> = (props) => {
|
|
|
100
100
|
fullWidth
|
|
101
101
|
tabIndex={-1} // TODO(burdon): Use Mosaic.Focus.
|
|
102
102
|
data-selected={isSelected}
|
|
103
|
-
classNames={mx('dx-focus-ring', isSelected && 'bg-
|
|
103
|
+
classNames={mx('dx-focus-ring', isSelected && 'bg-selected-surface')}
|
|
104
104
|
onClick={handleSelect}
|
|
105
105
|
ref={cardRef}
|
|
106
106
|
>
|
|
@@ -6,5 +6,5 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
// TODO(burdon): Show skeleton: https://github.com/dxos/dxos/issues/8259
|
|
8
8
|
export const Loading = () => {
|
|
9
|
-
return <div
|
|
9
|
+
return <div className='grid place-items-center dx-attention-surface' />;
|
|
10
10
|
};
|
|
@@ -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.
|
|
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.
|
|
75
|
+
</Column.Center>
|
|
76
76
|
</Column.Root>
|
|
77
77
|
</Panel.Content>
|
|
78
78
|
</Panel.Root>
|
|
@@ -56,7 +56,6 @@ const MobileLayoutRoot = forwardRef<HTMLDivElement, MobileLayoutRootProps>(
|
|
|
56
56
|
<MobileLayoutProvider keyboardOpen={keyboardOpen}>
|
|
57
57
|
<div
|
|
58
58
|
{...props}
|
|
59
|
-
role='none'
|
|
60
59
|
style={{
|
|
61
60
|
height: 'calc(100vh - var(--kb-height, 0px))',
|
|
62
61
|
transition: `height ${keyboardOpen ? 0 : transition}ms ease-out`,
|
|
@@ -95,7 +94,6 @@ const MobileLayoutPanel = forwardRef<HTMLDivElement, MobileLayoutPanelProps>(
|
|
|
95
94
|
return (
|
|
96
95
|
<div
|
|
97
96
|
{...props}
|
|
98
|
-
role='none'
|
|
99
97
|
style={{
|
|
100
98
|
paddingTop: safe?.top ? 'env(safe-area-inset-top)' : undefined,
|
|
101
99
|
paddingBottom: safe?.bottom ? `calc((1 - var(--kb-open, 0)) * env(safe-area-inset-bottom))` : undefined,
|
|
@@ -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
|
|
|
@@ -106,7 +102,7 @@ const NavBranchTile: MosaicStackTileComponent<Node.Node> = (props) => {
|
|
|
106
102
|
fullWidth
|
|
107
103
|
tabIndex={-1} // TODO(burdon): Use Mosaic.Focus.
|
|
108
104
|
data-selected={isSelected}
|
|
109
|
-
classNames={mx('dx-focus-ring cursor-pointer', isSelected && 'bg-
|
|
105
|
+
classNames={mx('dx-focus-ring cursor-pointer', isSelected && 'bg-selected-surface')}
|
|
110
106
|
onClick={handleSelect}
|
|
111
107
|
>
|
|
112
108
|
<Card.Toolbar>
|
|
@@ -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
|
|
|
@@ -83,6 +84,7 @@ export const PopoverContent = () => {
|
|
|
83
84
|
[handleClose],
|
|
84
85
|
);
|
|
85
86
|
|
|
87
|
+
/* TODO(thure): Make this a constant and document it. */
|
|
86
88
|
const collisionBoundaries: HTMLElement[] = useMemo(() => {
|
|
87
89
|
const closest = state.popoverAnchor?.closest('[data-popover-collision-boundary]') as HTMLElement | null | undefined;
|
|
88
90
|
return closest ? [closest] : [];
|
|
@@ -99,8 +101,8 @@ export const PopoverContent = () => {
|
|
|
99
101
|
onEscapeKeyDown={handleInteractOutside}
|
|
100
102
|
>
|
|
101
103
|
<Popover.Viewport>
|
|
102
|
-
{state.popoverKind === 'base' && (
|
|
103
|
-
<Surface.Surface
|
|
104
|
+
{state.popoverKind === 'base' && state.popoverContent && 'component' in state.popoverContent && (
|
|
105
|
+
<Surface.Surface type={AppSurface.Popover} data={state.popoverContent} limit={1} />
|
|
104
106
|
)}
|
|
105
107
|
{state.popoverKind === 'card' && (
|
|
106
108
|
<Card.Root border={false} classNames='dx-card-popover'>
|
|
@@ -110,7 +112,9 @@ export const PopoverContent = () => {
|
|
|
110
112
|
{state.popoverTitle ? <Card.Title>{toLocalizedString(state.popoverTitle, t)}</Card.Title> : <span />}
|
|
111
113
|
<Card.CloseIconButton onClick={handleClose} />
|
|
112
114
|
</Card.Toolbar>
|
|
113
|
-
|
|
115
|
+
{state.popoverContent && 'subject' in state.popoverContent && (
|
|
116
|
+
<Surface.Surface type={AppSurface.Card} data={state.popoverContent} limit={1} />
|
|
117
|
+
)}
|
|
114
118
|
</Card.Root>
|
|
115
119
|
)}
|
|
116
120
|
</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 '
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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 '
|
|
14
|
+
import { translations } from '#translations';
|
|
15
|
+
|
|
15
16
|
import { NavBar } from './NavBar';
|
|
16
17
|
|
|
17
18
|
const MAIN_MENU_GROUP_ID = 'navbar-main-menu';
|
|
@@ -9,19 +9,19 @@ import { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
|
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
11
11
|
import { Collection } from '@dxos/echo';
|
|
12
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
13
|
-
import { SearchPlugin } from '@dxos/plugin-search';
|
|
14
|
-
import { SpacePlugin } from '@dxos/plugin-space';
|
|
12
|
+
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
13
|
+
import { SearchPlugin } from '@dxos/plugin-search/testing';
|
|
14
|
+
import { SpacePlugin } from '@dxos/plugin-space/testing';
|
|
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
|
-
|
|
48
|
+
firesAfterActivation: [SimpleLayoutEvents.StateReady, AppActivationEvents.LayoutReady],
|
|
49
49
|
activate: () => State({ initialState: { isPopover } }),
|
|
50
50
|
})),
|
|
51
51
|
Plugin.addModule({
|
|
@@ -33,9 +33,9 @@ export const SimpleLayout = () => {
|
|
|
33
33
|
return (
|
|
34
34
|
<DebugOverlay.Root enabled={false}>
|
|
35
35
|
<PopoverRoot>
|
|
36
|
-
<Mosaic.Root
|
|
36
|
+
<Mosaic.Root>
|
|
37
37
|
<MobileLayout.Root
|
|
38
|
-
classNames='bg-toolbar-surface'
|
|
38
|
+
classNames='dx-container grid relative bg-toolbar-surface'
|
|
39
39
|
onKeyboardOpenChange={(nextKeyboardOpen) => setKeyboardOpen(nextKeyboardOpen)}
|
|
40
40
|
>
|
|
41
41
|
<MobileLayout.Panel safe={{ top: true, bottom: splitterMode === 'top' }}>
|
package/src/hooks/actions.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
|
11
11
|
import { type ActionGraphProps } from '@dxos/react-ui-menu';
|
|
12
12
|
import { byPosition } from '@dxos/util';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { SimpleLayoutCapabilities } from '#types';
|
|
15
15
|
|
|
16
16
|
// TODO(wittjosiah): Factor out to shared location with plugin-deck.
|
|
17
17
|
export const PLANK_COMPANION_TYPE = 'org.dxos.plugin.deck.plank-companion';
|
|
@@ -22,7 +22,9 @@ export type CompanionActionsConfig = {
|
|
|
22
22
|
/** Optional: highlight companion with this variant */
|
|
23
23
|
selectedVariant?: string;
|
|
24
24
|
/** State updater for toggling the drawer. */
|
|
25
|
-
updateState: (
|
|
25
|
+
updateState: (
|
|
26
|
+
fn: (state: SimpleLayoutCapabilities.SimpleLayoutState) => SimpleLayoutCapabilities.SimpleLayoutState,
|
|
27
|
+
) => void;
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -32,7 +34,7 @@ export type CompanionActionsConfig = {
|
|
|
32
34
|
// TODO(burdon): Use builder pattern.
|
|
33
35
|
export const createCompanionActions = (
|
|
34
36
|
graph: AppCapabilities.AppGraph['graph'],
|
|
35
|
-
stateAtom: Atom.Atom<SimpleLayoutState>,
|
|
37
|
+
stateAtom: Atom.Atom<SimpleLayoutCapabilities.SimpleLayoutState>,
|
|
36
38
|
get: (atom: Atom.Atom<any>) => any,
|
|
37
39
|
config: CompanionActionsConfig,
|
|
38
40
|
): Pick<ActionGraphProps, 'nodes' | 'edges'> => {
|