@dxos/plugin-deck 0.7.5-labs.c0e040f → 0.7.5-labs.d199c0f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{app-graph-builder-CI6ZFMNL.mjs → app-graph-builder-IYHAGFA3.mjs} +6 -2
- package/dist/lib/browser/{app-graph-builder-CI6ZFMNL.mjs.map → app-graph-builder-IYHAGFA3.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-YQ2GWTDU.mjs → chunk-22AQ5IVX.mjs} +1 -1
- package/dist/lib/browser/{chunk-YQ2GWTDU.mjs.map → chunk-22AQ5IVX.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-PTLNGUND.mjs → chunk-FT33W5CI.mjs} +3 -1
- package/dist/lib/browser/chunk-FT33W5CI.mjs.map +7 -0
- package/dist/lib/browser/chunk-G2X3ZDCE.mjs +24 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs +97 -0
- package/dist/lib/browser/chunk-KANJBSIX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-23KS5L3I.mjs → chunk-O4RFYYQ6.mjs} +114 -124
- package/dist/lib/browser/chunk-O4RFYYQ6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +13 -6
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-WAYXVAFN.mjs → intent-resolver-ZD67BRUI.mjs} +37 -46
- package/dist/lib/browser/intent-resolver-ZD67BRUI.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-YATKEIAZ.mjs → react-root-6ILKHD5J.mjs} +7 -8
- package/dist/lib/browser/react-root-6ILKHD5J.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-SS2BX6FS.mjs → react-surface-O75FKXAI.mjs} +6 -5
- package/dist/lib/browser/{react-surface-SS2BX6FS.mjs.map → react-surface-O75FKXAI.mjs.map} +1 -1
- package/dist/lib/browser/{settings-CRQTVMN3.mjs → settings-H35U6NHE.mjs} +2 -2
- package/dist/lib/browser/{state-YEQA3IIB.mjs → state-U4SHOPJW.mjs} +16 -4
- package/dist/lib/browser/state-U4SHOPJW.mjs.map +7 -0
- package/dist/lib/browser/{tools-5LDJNU56.mjs → tools-64LXGLYR.mjs} +12 -4
- package/dist/lib/browser/tools-64LXGLYR.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/browser/{url-handler-HLF42IHP.mjs → url-handler-MVHTKUYA.mjs} +8 -6
- package/dist/lib/browser/{url-handler-HLF42IHP.mjs.map → url-handler-MVHTKUYA.mjs.map} +3 -3
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +110 -110
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +6 -6
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +111 -111
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Banner.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts +1 -4
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -4
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fallback.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Plank.d.ts +1 -1
- package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankError.d.ts +2 -3
- package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankLoading.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/PlankLoading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +3 -4
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Topbar.d.ts +1 -2
- package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +1 -1
- package/dist/types/src/components/LayoutSettings.d.ts +1 -2
- package/dist/types/src/components/LayoutSettings.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -0
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +10 -0
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts.map +1 -0
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
- package/package.json +30 -29
- package/src/DeckPlugin.ts +8 -4
- package/src/capabilities/app-graph-builder.ts +4 -0
- package/src/capabilities/capabilities.ts +3 -6
- package/src/capabilities/intent-resolver.ts +21 -3
- package/src/capabilities/react-root.tsx +1 -3
- package/src/capabilities/state.ts +7 -1
- package/src/capabilities/tools.ts +8 -3
- package/src/capabilities/url-handler.ts +7 -5
- package/src/components/DeckLayout/ComplementarySidebar.tsx +107 -50
- package/src/components/DeckLayout/DeckLayout.tsx +28 -23
- package/src/components/DeckLayout/Plank.tsx +4 -3
- package/src/components/DeckLayout/PlankControls.tsx +1 -1
- package/src/events.ts +1 -0
- package/src/layout.ts +1 -1
- package/src/types.ts +15 -2
- package/src/util/index.ts +1 -0
- package/src/util/useHoistStatusbar.ts +4 -8
- package/dist/lib/browser/chunk-23KS5L3I.mjs.map +0 -7
- package/dist/lib/browser/chunk-4URQJVGI.mjs +0 -24
- package/dist/lib/browser/chunk-PTLNGUND.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-WAYXVAFN.mjs.map +0 -7
- package/dist/lib/browser/react-root-YATKEIAZ.mjs.map +0 -7
- package/dist/lib/browser/state-YEQA3IIB.mjs.map +0 -7
- package/dist/lib/browser/tools-5LDJNU56.mjs.map +0 -7
- package/dist/types/src/capabilities/set-active.d.ts.map +0 -1
- /package/dist/lib/browser/{chunk-4URQJVGI.mjs.map → chunk-G2X3ZDCE.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-CRQTVMN3.mjs.map → settings-H35U6NHE.mjs.map} +0 -0
- /package/dist/types/src/{capabilities → util}/set-active.d.ts +0 -0
- /package/src/{capabilities → util}/set-active.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/StatusBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/StatusBar.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS,kBAAmB;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,4CAY/D,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type LayoutAction } from '@dxos/app-framework';
|
|
3
2
|
import { type ToastRootProps } from '@dxos/react-ui';
|
|
4
|
-
export declare const Toast: ({ id, title, description, icon, duration, actionLabel, actionAlt, closeLabel, onAction, onOpenChange, }: LayoutAction.Toast & Pick<ToastRootProps, "onOpenChange">) =>
|
|
3
|
+
export declare const Toast: ({ id, title, description, icon, duration, actionLabel, actionAlt, closeLabel, onAction, onOpenChange, }: LayoutAction.Toast & Pick<ToastRootProps, "onOpenChange">) => import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Toast.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Toast.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,KAAK,4GAWf,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,4CA8B3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Topbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Topbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Topbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Topbar.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,+CAElB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type DeckSettingsProps } from '../types';
|
|
3
2
|
export declare const LayoutSettings: ({ settings }: {
|
|
4
3
|
settings: DeckSettingsProps;
|
|
5
|
-
}) =>
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
//# sourceMappingURL=LayoutSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/LayoutSettings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/LayoutSettings.tsx"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,iBAAiB,EAGvB,MAAM,UAAU,CAAC;AAIlB,eAAO,MAAM,cAAc,iBAAkB;IAAE,QAAQ,EAAE,iBAAiB,CAAA;CAAE,4CA8D3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/events.ts"],"names":[],"mappings":"AAQA,yBAAiB,UAAU,CAAC;IACnB,MAAM,UAAU,+CAAwD,CAAC;CACjF"}
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/events.ts"],"names":[],"mappings":"AAQA,yBAAiB,UAAU,CAAC;IACnB,MAAM,wBAAwB,+CAAuE,CAAC;IACtG,MAAM,UAAU,+CAAwD,CAAC;CACjF"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
+
import { type Node } from '@dxos/plugin-graph';
|
|
2
3
|
import { type Label } from '@dxos/react-ui';
|
|
4
|
+
import { type Position } from '@dxos/util';
|
|
3
5
|
export declare const NewPlankPositions: readonly ["start", "end"];
|
|
4
6
|
export type NewPlankPositioning = (typeof NewPlankPositions)[number];
|
|
5
7
|
export declare const OverscrollOptions: readonly ["none", "centering"];
|
|
@@ -8,6 +10,12 @@ export type Panel = {
|
|
|
8
10
|
id: string;
|
|
9
11
|
label: Label;
|
|
10
12
|
icon: string;
|
|
13
|
+
position?: Position;
|
|
14
|
+
/**
|
|
15
|
+
* If true, the panel will now be wrapped in a scroll area.
|
|
16
|
+
*/
|
|
17
|
+
fixed?: boolean;
|
|
18
|
+
filter?: (node: Node) => boolean;
|
|
11
19
|
};
|
|
12
20
|
export declare const DeckSettingsSchema: S.mutable<S.Struct<{
|
|
13
21
|
showHints: typeof S.Boolean;
|
|
@@ -43,6 +51,7 @@ export declare const DeckState: S.mutable<S.Struct<{
|
|
|
43
51
|
dialogBlockAlign: S.optional<S.Literal<["start", "center", "end"]>>;
|
|
44
52
|
dialogType: S.optional<S.Literal<["default", "alert"]>>;
|
|
45
53
|
popoverOpen: typeof S.Boolean;
|
|
54
|
+
popoverSide: S.optional<S.Literal<["top", "right", "bottom", "left"]>>;
|
|
46
55
|
/**
|
|
47
56
|
* Data to be passed to the popover Surface.
|
|
48
57
|
*/
|
|
@@ -76,6 +85,7 @@ export declare const DeckState: S.mutable<S.Struct<{
|
|
|
76
85
|
}>>>;
|
|
77
86
|
currentUndoId: S.optional<typeof S.String>;
|
|
78
87
|
activeDeck: typeof S.String;
|
|
88
|
+
previousDeck: typeof S.String;
|
|
79
89
|
decks: S.mutable<S.Record$<typeof S.String, S.mutable<S.Struct<{
|
|
80
90
|
initialized: S.SchemaClass<boolean, boolean, never>;
|
|
81
91
|
active: S.mutable<S.Array$<typeof S.String>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE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MAAM;;mBAAwC,EAAG,QAAQ,CAAC,EAAE,KAAK,SAAQ,EAAG,MAAM,EAAC,EAAG,OAAO,CAAC,EAAE,KAAK,SAAQ,EAAG,MAAM,EAAC,EAAG,OAAO,CAAC,EAAE,MAAM;uBAAyB,EAAG,MAAM;mBAAoB,EAAG,QAAQ,QAAO,EAAG,MAAM;;kBAAuC,EAAG,QAAQ,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;IAjD55B;;OAEG;;GAGN,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC;AAExD,eAAO,MAAM,OAAO,SAAU,IAAI,KAAG,UAMpC,CAAC;AAGF,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,WAAW,QAA0B,CAAC;AAEnD,yBAAiB,UAAU,CAAC;IAC1B,MAAM,oBAAoB,oHAKzB,CAAC;IACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACxE,MAAM,CAAC,MAAM,UAAU;;;OAAoE,CAAC;IAC5F,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;;;;;;;;;;IAE1D;;OAEG;IACH,MAAM,OAAO,MAAO,SAAQ,WAG1B;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,eAAgB,SAAQ,oBAMnC;KAAG;;CACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-active.d.ts","sourceRoot":"","sources":["../../../../src/util/set-active.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,SAAS,+BAAgC,gBAAgB,uBA8BrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHoistStatusbar.d.ts","sourceRoot":"","sources":["../../../../src/util/useHoistStatusbar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useHoistStatusbar.d.ts","sourceRoot":"","sources":["../../../../src/util/useHoistStatusbar.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,iBAAiB,eAAgB,MAAM,YAOnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-deck",
|
|
3
|
-
"version": "0.7.5-labs.
|
|
3
|
+
"version": "0.7.5-labs.d199c0f",
|
|
4
4
|
"description": "DXOS Surface plugin for the main application layout.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
9
|
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -34,29 +35,29 @@
|
|
|
34
35
|
"@preact/signals-core": "^1.6.0",
|
|
35
36
|
"effect": "^3.12.3",
|
|
36
37
|
"immer": "^10.1.1",
|
|
37
|
-
"@dxos/app-framework": "0.7.5-labs.
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/invariant": "0.7.5-labs.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/plugin-
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/plugin-
|
|
51
|
-
"@dxos/plugin-observability": "0.7.5-labs.
|
|
52
|
-
"@dxos/plugin-theme": "0.7.5-labs.
|
|
53
|
-
"@dxos/react-client": "0.7.5-labs.
|
|
54
|
-
"@dxos/react-ui-
|
|
55
|
-
"@dxos/react-ui-
|
|
56
|
-
"@dxos/react-ui-stack": "0.7.5-labs.
|
|
57
|
-
"@dxos/react-ui-
|
|
58
|
-
"@dxos/react-ui-
|
|
59
|
-
"@dxos/util": "0.7.5-labs.
|
|
38
|
+
"@dxos/app-framework": "0.7.5-labs.d199c0f",
|
|
39
|
+
"@dxos/async": "0.7.5-labs.d199c0f",
|
|
40
|
+
"@dxos/artifact": "0.7.5-labs.d199c0f",
|
|
41
|
+
"@dxos/echo-schema": "0.7.5-labs.d199c0f",
|
|
42
|
+
"@dxos/debug": "0.7.5-labs.d199c0f",
|
|
43
|
+
"@dxos/echo-signals": "0.7.5-labs.d199c0f",
|
|
44
|
+
"@dxos/invariant": "0.7.5-labs.d199c0f",
|
|
45
|
+
"@dxos/keyboard": "0.7.5-labs.d199c0f",
|
|
46
|
+
"@dxos/live-object": "0.7.5-labs.d199c0f",
|
|
47
|
+
"@dxos/local-storage": "0.7.5-labs.d199c0f",
|
|
48
|
+
"@dxos/log": "0.7.5-labs.d199c0f",
|
|
49
|
+
"@dxos/plugin-attention": "0.7.5-labs.d199c0f",
|
|
50
|
+
"@dxos/plugin-client": "0.7.5-labs.d199c0f",
|
|
51
|
+
"@dxos/plugin-graph": "0.7.5-labs.d199c0f",
|
|
52
|
+
"@dxos/plugin-observability": "0.7.5-labs.d199c0f",
|
|
53
|
+
"@dxos/plugin-theme": "0.7.5-labs.d199c0f",
|
|
54
|
+
"@dxos/react-client": "0.7.5-labs.d199c0f",
|
|
55
|
+
"@dxos/react-ui-form": "0.7.5-labs.d199c0f",
|
|
56
|
+
"@dxos/react-ui-attention": "0.7.5-labs.d199c0f",
|
|
57
|
+
"@dxos/react-ui-stack": "0.7.5-labs.d199c0f",
|
|
58
|
+
"@dxos/react-ui-tabs": "0.7.5-labs.d199c0f",
|
|
59
|
+
"@dxos/react-ui-text-tooltip": "0.7.5-labs.d199c0f",
|
|
60
|
+
"@dxos/util": "0.7.5-labs.d199c0f"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -65,16 +66,16 @@
|
|
|
65
66
|
"react": "~18.2.0",
|
|
66
67
|
"react-dom": "~18.2.0",
|
|
67
68
|
"vite": "5.4.7",
|
|
68
|
-
"@dxos/react-ui
|
|
69
|
-
"@dxos/react-ui": "0.7.5-labs.
|
|
70
|
-
"@dxos/storybook-utils": "0.7.5-labs.
|
|
69
|
+
"@dxos/react-ui": "0.7.5-labs.d199c0f",
|
|
70
|
+
"@dxos/react-ui-theme": "0.7.5-labs.d199c0f",
|
|
71
|
+
"@dxos/storybook-utils": "0.7.5-labs.d199c0f"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
74
|
"@phosphor-icons/react": "^2.0.5",
|
|
74
75
|
"react": "~18.2.0",
|
|
75
76
|
"react-dom": "~18.2.0",
|
|
76
|
-
"@dxos/react-ui
|
|
77
|
-
"@dxos/react-ui": "0.7.5-labs.
|
|
77
|
+
"@dxos/react-ui": "0.7.5-labs.d199c0f",
|
|
78
|
+
"@dxos/react-ui-theme": "0.7.5-labs.d199c0f"
|
|
78
79
|
},
|
|
79
80
|
"publishConfig": {
|
|
80
81
|
"access": "public"
|
package/src/DeckPlugin.ts
CHANGED
|
@@ -41,7 +41,10 @@ export const DeckPlugin = () =>
|
|
|
41
41
|
}),
|
|
42
42
|
defineModule({
|
|
43
43
|
id: `${meta.id}/module/layout`,
|
|
44
|
-
|
|
44
|
+
// TODO(wittjosiah): Does not integrate with settings store.
|
|
45
|
+
// Should this be a different event?
|
|
46
|
+
// Should settings store be renamed to be more generic?
|
|
47
|
+
activatesOn: oneOf(Events.SetupSettings, Events.SetupAppGraph),
|
|
45
48
|
activatesAfter: [Events.LayoutReady, DeckEvents.StateReady],
|
|
46
49
|
activate: DeckState,
|
|
47
50
|
}),
|
|
@@ -53,16 +56,17 @@ export const DeckPlugin = () =>
|
|
|
53
56
|
defineModule({
|
|
54
57
|
id: `${meta.id}/module/react-root`,
|
|
55
58
|
activatesOn: Events.Startup,
|
|
59
|
+
activatesBefore: [DeckEvents.SetupComplementaryPanels],
|
|
56
60
|
activate: ReactRoot,
|
|
57
61
|
}),
|
|
58
62
|
defineModule({
|
|
59
63
|
id: `${meta.id}/module/react-surface`,
|
|
60
|
-
activatesOn: Events.
|
|
64
|
+
activatesOn: Events.SetupReactSurface,
|
|
61
65
|
activate: ReactSurface,
|
|
62
66
|
}),
|
|
63
67
|
defineModule({
|
|
64
68
|
id: `${meta.id}/module/layout-intent-resolver`,
|
|
65
|
-
activatesOn: Events.
|
|
69
|
+
activatesOn: Events.SetupIntentResolver,
|
|
66
70
|
activate: LayoutIntentResolver,
|
|
67
71
|
}),
|
|
68
72
|
defineModule({
|
|
@@ -72,7 +76,7 @@ export const DeckPlugin = () =>
|
|
|
72
76
|
}),
|
|
73
77
|
defineModule({
|
|
74
78
|
id: `${meta.id}/module/tools`,
|
|
75
|
-
activatesOn: Events.
|
|
79
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
76
80
|
activate: Tools,
|
|
77
81
|
}),
|
|
78
82
|
defineModule({
|
|
@@ -2,17 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { defineCapability
|
|
5
|
+
import { defineCapability } from '@dxos/app-framework';
|
|
6
6
|
import { type DeepReadonly } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
import { DECK_PLUGIN } from '../meta';
|
|
9
|
-
import { type DeckState } from '../types';
|
|
9
|
+
import { type DeckState, type Panel } from '../types';
|
|
10
10
|
|
|
11
11
|
export namespace DeckCapabilities {
|
|
12
12
|
export const DeckState = defineCapability<DeepReadonly<DeckState>>(`${DECK_PLUGIN}/capability/state`);
|
|
13
13
|
export const MutableDeckState = defineCapability<DeckState>(`${DECK_PLUGIN}/capability/state`);
|
|
14
|
-
|
|
15
|
-
export const ComplementaryPanel = defineCapability<{ id: string; label: Label; icon: string }>(
|
|
16
|
-
`${DECK_PLUGIN}/capability/complementary-panel`,
|
|
17
|
-
);
|
|
14
|
+
export const ComplementaryPanel = defineCapability<Panel>(`${DECK_PLUGIN}/capability/complementary-panel`);
|
|
18
15
|
}
|
|
@@ -23,10 +23,10 @@ import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
|
23
23
|
import { isNonNullable } from '@dxos/util';
|
|
24
24
|
|
|
25
25
|
import { DeckCapabilities } from './capabilities';
|
|
26
|
-
import { setActive } from './set-active';
|
|
27
26
|
import { closeEntry, incrementPlank, openEntry } from '../layout';
|
|
28
27
|
import { DECK_PLUGIN } from '../meta';
|
|
29
28
|
import { DeckAction, type LayoutMode, type DeckSettingsProps, isLayoutMode, getMode } from '../types';
|
|
29
|
+
import { setActive } from '../util';
|
|
30
30
|
|
|
31
31
|
export default (context: PluginsContext) =>
|
|
32
32
|
contributes(Capabilities.IntentResolver, [
|
|
@@ -113,6 +113,7 @@ export default (context: PluginsContext) =>
|
|
|
113
113
|
layout.popoverOpen = options.state ?? Boolean(subject);
|
|
114
114
|
layout.popoverContent = subject ? { component: subject, props: options.props } : null;
|
|
115
115
|
layout.popoverAnchorId = options.anchorId;
|
|
116
|
+
layout.popoverSide = options.side;
|
|
116
117
|
},
|
|
117
118
|
}),
|
|
118
119
|
createResolver({
|
|
@@ -193,13 +194,18 @@ export default (context: PluginsContext) =>
|
|
|
193
194
|
resolve: ({ subject }) => {
|
|
194
195
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
195
196
|
batch(() => {
|
|
197
|
+
// TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
|
|
198
|
+
// Ideally this should be worked into the data model in a generic way.
|
|
199
|
+
if (!state.activeDeck.startsWith('!')) {
|
|
200
|
+
state.previousDeck = state.activeDeck;
|
|
201
|
+
}
|
|
196
202
|
state.activeDeck = subject;
|
|
197
203
|
if (!state.decks[subject]) {
|
|
198
204
|
state.decks[subject] = { initialized: false, active: [], inactive: [], fullscreen: false, plankSizing: {} };
|
|
199
205
|
}
|
|
200
206
|
});
|
|
201
207
|
|
|
202
|
-
const first = state.
|
|
208
|
+
const first = state.deck.solo ? state.deck.solo : state.deck.active[0];
|
|
203
209
|
if (first) {
|
|
204
210
|
return {
|
|
205
211
|
intents: [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: first })],
|
|
@@ -207,6 +213,17 @@ export default (context: PluginsContext) =>
|
|
|
207
213
|
}
|
|
208
214
|
},
|
|
209
215
|
}),
|
|
216
|
+
createResolver({
|
|
217
|
+
intent: LayoutAction.UpdateLayout,
|
|
218
|
+
filter: (data): data is S.Schema.Type<typeof LayoutAction.RevertWorkspace.fields.input> =>
|
|
219
|
+
S.is(LayoutAction.RevertWorkspace.fields.input)(data),
|
|
220
|
+
resolve: () => {
|
|
221
|
+
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
222
|
+
return {
|
|
223
|
+
intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: state.previousDeck })],
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
}),
|
|
210
227
|
createResolver({
|
|
211
228
|
intent: LayoutAction.UpdateLayout,
|
|
212
229
|
filter: (data): data is S.Schema.Type<typeof LayoutAction.Open.fields.input> =>
|
|
@@ -267,7 +284,8 @@ export default (context: PluginsContext) =>
|
|
|
267
284
|
resolve: ({ subject }) => {
|
|
268
285
|
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
269
286
|
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
270
|
-
const
|
|
287
|
+
const active = state.deck.solo ? [state.deck.solo] : state.deck.active;
|
|
288
|
+
const next = subject.reduce((acc, id) => closeEntry(acc, id), active);
|
|
271
289
|
const toAttend = setActive({ next, state, attention });
|
|
272
290
|
return {
|
|
273
291
|
intents: toAttend ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: toAttend })] : [],
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes,
|
|
7
|
+
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
9
|
import { DeckCapabilities } from './capabilities';
|
|
10
10
|
import { DeckLayout } from '../components';
|
|
@@ -17,7 +17,6 @@ export default () =>
|
|
|
17
17
|
root: () => {
|
|
18
18
|
const layout = useCapability(DeckCapabilities.MutableDeckState);
|
|
19
19
|
const settings = useCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(DECK_PLUGIN)!.value;
|
|
20
|
-
const panels = useCapabilities(DeckCapabilities.ComplementaryPanel);
|
|
21
20
|
|
|
22
21
|
const handleDismissToast = useCallback(
|
|
23
22
|
(id: string) => {
|
|
@@ -40,7 +39,6 @@ export default () =>
|
|
|
40
39
|
<DeckLayout
|
|
41
40
|
showHints={settings.showHints}
|
|
42
41
|
overscroll={settings.overscroll}
|
|
43
|
-
panels={panels}
|
|
44
42
|
onDismissToast={handleDismissToast}
|
|
45
43
|
/>
|
|
46
44
|
);
|
|
@@ -46,6 +46,7 @@ export default () => {
|
|
|
46
46
|
toasts: [],
|
|
47
47
|
currentUndoId: undefined,
|
|
48
48
|
activeDeck: 'default',
|
|
49
|
+
previousDeck: 'default',
|
|
49
50
|
decks: {
|
|
50
51
|
default: {
|
|
51
52
|
initialized: false,
|
|
@@ -68,8 +69,10 @@ export default () => {
|
|
|
68
69
|
state
|
|
69
70
|
.prop({ key: 'sidebarState', type: LocalStorageStore.enum<SidebarState>() })
|
|
70
71
|
.prop({ key: 'complementarySidebarState', type: LocalStorageStore.enum<SidebarState>() })
|
|
72
|
+
.prop({ key: 'complementarySidebarPanel', type: LocalStorageStore.string({ allowUndefined: true }) })
|
|
71
73
|
.prop({ key: 'decks', type: LocalStorageStore.json<Record<string, Deck>>() })
|
|
72
|
-
.prop({ key: 'activeDeck', type: LocalStorageStore.string() })
|
|
74
|
+
.prop({ key: 'activeDeck', type: LocalStorageStore.string() })
|
|
75
|
+
.prop({ key: 'previousDeck', type: LocalStorageStore.string() });
|
|
73
76
|
|
|
74
77
|
const layout = create<Capabilities.Layout>({
|
|
75
78
|
get mode() {
|
|
@@ -84,6 +87,9 @@ export default () => {
|
|
|
84
87
|
get complementarySidebarOpen() {
|
|
85
88
|
return state.values.complementarySidebarState === 'expanded';
|
|
86
89
|
},
|
|
90
|
+
get workspace() {
|
|
91
|
+
return state.values.activeDeck;
|
|
92
|
+
},
|
|
87
93
|
get active() {
|
|
88
94
|
return state.values.deck.solo ? [state.values.deck.solo] : state.values.deck.active;
|
|
89
95
|
},
|
|
@@ -13,6 +13,8 @@ import { defineTool, ToolResult } from '@dxos/artifact';
|
|
|
13
13
|
import { S } from '@dxos/echo-schema';
|
|
14
14
|
import { invariant } from '@dxos/invariant';
|
|
15
15
|
|
|
16
|
+
import { meta } from '../meta';
|
|
17
|
+
|
|
16
18
|
// TODO(burdon): Factor out.
|
|
17
19
|
declare global {
|
|
18
20
|
interface ToolContextExtensions {
|
|
@@ -23,11 +25,14 @@ declare global {
|
|
|
23
25
|
|
|
24
26
|
export default () =>
|
|
25
27
|
contributes(Capabilities.Tools, [
|
|
26
|
-
defineTool({
|
|
28
|
+
defineTool(meta.id, {
|
|
27
29
|
name: 'show',
|
|
28
30
|
// TODO(ZaymonFC): We should update the prompt to teach the LLM the difference between object ids and fully qualified ids.
|
|
29
|
-
description:
|
|
30
|
-
|
|
31
|
+
description: `
|
|
32
|
+
Show an item in the app. Use this tool to open an artifact.
|
|
33
|
+
When supplying IDs to show, they must be fully qualified like space:object.
|
|
34
|
+
`,
|
|
35
|
+
caption: 'Showing item...',
|
|
31
36
|
// TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.
|
|
32
37
|
schema: S.Struct({
|
|
33
38
|
id: S.String.annotations({
|
|
@@ -31,15 +31,15 @@ export default async (context: PluginsContext) => {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const [_, nextDeck, nextSolo] = pathname.split('/');
|
|
34
|
-
if (nextDeck) {
|
|
34
|
+
if (nextDeck && nextDeck !== state.activeDeck) {
|
|
35
35
|
await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: nextDeck }));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
if (nextSolo) {
|
|
38
|
+
if (nextSolo && nextSolo !== state.deck.solo) {
|
|
39
39
|
await dispatch(
|
|
40
40
|
createIntent(LayoutAction.SetLayoutMode, { part: 'mode', subject: nextSolo, options: { mode: 'solo' } }),
|
|
41
41
|
);
|
|
42
|
-
} else {
|
|
42
|
+
} else if (!nextSolo && state.deck.solo) {
|
|
43
43
|
await dispatch(createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'deck' } }));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -51,8 +51,10 @@ export default async (context: PluginsContext) => {
|
|
|
51
51
|
() => ({ solo: state.deck.solo, activeDeck: state.activeDeck }),
|
|
52
52
|
({ solo, activeDeck }) => {
|
|
53
53
|
const path = solo ? `/${activeDeck}/${solo}` : `/${activeDeck}`;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
if (window.location.pathname !== path) {
|
|
55
|
+
// TODO(thure): In some browsers, this only preserves the most recent state change, even though this is not `history.replace`…
|
|
56
|
+
history.pushState(null, '', `${path}${window.location.search}`);
|
|
57
|
+
}
|
|
56
58
|
},
|
|
57
59
|
);
|
|
58
60
|
|