@dxos/plugin-deck 0.8.2-main.fbd8ed0 → 0.8.2-staging.42af850
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-R7COZ4A6.mjs → app-graph-builder-M5BT34YG.mjs} +2 -2
- package/dist/lib/browser/{chunk-OF5RIATN.mjs → chunk-FX44YX3G.mjs} +3 -3
- package/dist/lib/browser/chunk-JE2ARGEB.mjs +1487 -0
- package/dist/lib/browser/chunk-JE2ARGEB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XMCG42ID.mjs → chunk-KLN73CM3.mjs} +2 -2
- package/dist/lib/browser/{chunk-XMCG42ID.mjs.map → chunk-KLN73CM3.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-3O2UZVBA.mjs → chunk-SLQNOATN.mjs} +27 -21
- package/dist/lib/browser/{chunk-3O2UZVBA.mjs.map → chunk-SLQNOATN.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-JAYQ5BTF.mjs → chunk-YN5OZEGS.mjs} +8 -3
- package/dist/lib/browser/chunk-YN5OZEGS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -6
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/{intent-resolver-MAKOS57L.mjs → intent-resolver-3GAC57UA.mjs} +10 -8
- package/dist/lib/browser/intent-resolver-3GAC57UA.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-DGQVIHXP.mjs → react-root-ISFFOJZX.mjs} +6 -6
- package/dist/lib/browser/{react-surface-PXBXIOPU.mjs → react-surface-A63RQB5N.mjs} +6 -6
- package/dist/lib/browser/{settings-UBWJF7J7.mjs → settings-X7GDEXU3.mjs} +2 -2
- package/dist/lib/browser/state-VJ6E3ADY.mjs +10 -0
- package/dist/lib/browser/{tools-IVPIPTVA.mjs → tools-N57NQ2LH.mjs} +24 -14
- package/dist/lib/browser/tools-N57NQ2LH.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/lib/browser/{url-handler-JSYGSVSB.mjs → url-handler-BUGI6XRE.mjs} +3 -3
- package/dist/types/src/capabilities/capabilities.d.ts +10 -2
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -1
- 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/state.d.ts +5 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts +1 -1
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +0 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +3 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +32 -30
- package/src/capabilities/intent-resolver.ts +7 -3
- package/src/capabilities/tools.ts +11 -9
- package/src/components/DeckLayout/Dialog.tsx +2 -2
- package/src/components/Plank/Plank.tsx +1 -1
- package/src/components/Plank/PlankHeading.tsx +5 -3
- package/src/components/Sidebar/ComplementarySidebar.tsx +3 -3
- package/src/components/Sidebar/SidebarButton.tsx +1 -5
- package/src/hooks/useNodeActionExpander.ts +1 -1
- package/src/translations.ts +0 -1
- package/src/types.ts +3 -1
- package/dist/lib/browser/chunk-JAYQ5BTF.mjs.map +0 -7
- package/dist/lib/browser/chunk-KIGMELV2.mjs +0 -1319
- package/dist/lib/browser/chunk-KIGMELV2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MAKOS57L.mjs.map +0 -7
- package/dist/lib/browser/state-4WFB4SDO.mjs +0 -10
- package/dist/lib/browser/tools-IVPIPTVA.mjs.map +0 -7
- /package/dist/lib/browser/{app-graph-builder-R7COZ4A6.mjs.map → app-graph-builder-M5BT34YG.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-OF5RIATN.mjs.map → chunk-FX44YX3G.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-DGQVIHXP.mjs.map → react-root-ISFFOJZX.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-PXBXIOPU.mjs.map → react-surface-A63RQB5N.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-UBWJF7J7.mjs.map → settings-X7GDEXU3.mjs.map} +0 -0
- /package/dist/lib/browser/{state-4WFB4SDO.mjs.map → state-VJ6E3ADY.mjs.map} +0 -0
- /package/dist/lib/browser/{url-handler-JSYGSVSB.mjs.map → url-handler-BUGI6XRE.mjs.map} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeckAction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YN5OZEGS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
meta
|
|
6
6
|
} from "./chunk-NSATFAEE.mjs";
|
|
7
7
|
|
|
8
8
|
// packages/plugins/plugin-deck/src/capabilities/tools.ts
|
|
9
9
|
import { Schema } from "effect";
|
|
10
|
+
import { createTool, ToolResult } from "@dxos/ai";
|
|
10
11
|
import { contributes, createIntent, Capabilities, LayoutAction } from "@dxos/app-framework";
|
|
11
|
-
import { defineTool, ToolResult } from "@dxos/artifact";
|
|
12
12
|
import { invariant } from "@dxos/invariant";
|
|
13
13
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-deck/src/capabilities/tools.ts";
|
|
14
14
|
var tools_default = () => contributes(Capabilities.Tools, [
|
|
15
|
-
|
|
15
|
+
createTool(meta.id, {
|
|
16
16
|
name: "show",
|
|
17
17
|
description: `
|
|
18
18
|
Show an item as a companion to an existing plank. This will make the item appear alongside the primary content.
|
|
@@ -26,27 +26,37 @@ var tools_default = () => contributes(Capabilities.Tools, [
|
|
|
26
26
|
})
|
|
27
27
|
}),
|
|
28
28
|
execute: async ({ id }, { extensions }) => {
|
|
29
|
-
invariant(extensions
|
|
29
|
+
invariant(extensions, void 0, {
|
|
30
30
|
F: __dxlog_file,
|
|
31
31
|
L: 45,
|
|
32
32
|
S: void 0,
|
|
33
33
|
A: [
|
|
34
|
-
"extensions
|
|
34
|
+
"extensions",
|
|
35
|
+
""
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
const { pivotId, dispatch, part } = extensions;
|
|
39
|
+
invariant(pivotId, "No pivot ID", {
|
|
40
|
+
F: __dxlog_file,
|
|
41
|
+
L: 47,
|
|
42
|
+
S: void 0,
|
|
43
|
+
A: [
|
|
44
|
+
"pivotId",
|
|
35
45
|
"'No pivot ID'"
|
|
36
46
|
]
|
|
37
47
|
});
|
|
38
|
-
invariant(
|
|
48
|
+
invariant(dispatch, "No intent dispatcher", {
|
|
39
49
|
F: __dxlog_file,
|
|
40
|
-
L:
|
|
50
|
+
L: 48,
|
|
41
51
|
S: void 0,
|
|
42
52
|
A: [
|
|
43
|
-
"
|
|
53
|
+
"dispatch",
|
|
44
54
|
"'No intent dispatcher'"
|
|
45
55
|
]
|
|
46
56
|
});
|
|
47
|
-
if (
|
|
48
|
-
const { data, error } = await
|
|
49
|
-
primary:
|
|
57
|
+
if (part === "deck") {
|
|
58
|
+
const { data, error } = await dispatch(createIntent(DeckAction.ChangeCompanion, {
|
|
59
|
+
primary: pivotId,
|
|
50
60
|
companion: id
|
|
51
61
|
}));
|
|
52
62
|
if (error) {
|
|
@@ -54,13 +64,13 @@ var tools_default = () => contributes(Capabilities.Tools, [
|
|
|
54
64
|
}
|
|
55
65
|
return ToolResult.Success(data);
|
|
56
66
|
} else {
|
|
57
|
-
const { data, error } = await
|
|
67
|
+
const { data, error } = await dispatch(createIntent(LayoutAction.Open, {
|
|
58
68
|
subject: [
|
|
59
69
|
id
|
|
60
70
|
],
|
|
61
71
|
part: "main",
|
|
62
72
|
options: {
|
|
63
|
-
pivotId
|
|
73
|
+
pivotId,
|
|
64
74
|
positioning: "end"
|
|
65
75
|
}
|
|
66
76
|
}));
|
|
@@ -75,4 +85,4 @@ var tools_default = () => contributes(Capabilities.Tools, [
|
|
|
75
85
|
export {
|
|
76
86
|
tools_default as default
|
|
77
87
|
};
|
|
78
|
-
//# sourceMappingURL=tools-
|
|
88
|
+
//# sourceMappingURL=tools-N57NQ2LH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/tools.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { createTool, ToolResult } from '@dxos/ai';\nimport {\n contributes,\n createIntent,\n Capabilities,\n LayoutAction,\n type PromiseIntentDispatcher,\n} from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\n\nimport { meta } from '../meta';\nimport { DeckAction } from '../types';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n dispatch?: PromiseIntentDispatcher;\n pivotId?: string;\n part?: 'deck' | 'dialog';\n }\n}\n\nexport default () =>\n contributes(Capabilities.Tools, [\n createTool(meta.id, {\n name: 'show',\n description: `\n Show an item as a companion to an existing plank. This will make the item appear alongside the primary content.\n When supplying IDs, they must be fully qualified like space:object.\n `,\n caption: 'Showing item...',\n // TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.\n schema: Schema.Struct({\n id: Schema.String.annotations({\n description: 'The ID of the item to show.',\n }),\n }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions);\n const { pivotId, dispatch, part } = extensions;\n invariant(pivotId, 'No pivot ID');\n invariant(dispatch, 'No intent dispatcher');\n\n if (part === 'deck') {\n const { data, error } = await dispatch(\n createIntent(DeckAction.ChangeCompanion, {\n primary: pivotId,\n companion: id,\n }),\n );\n if (error) {\n return ToolResult.Error(error.message);\n }\n\n return ToolResult.Success(data);\n } else {\n const { data, error } = await dispatch(\n createIntent(LayoutAction.Open, {\n subject: [id],\n part: 'main',\n options: {\n pivotId,\n positioning: 'end',\n },\n }),\n );\n if (error) {\n return ToolResult.Error(error.message);\n }\n\n return ToolResult.Success(data);\n }\n },\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,YAAYC,kBAAkB;AACvC,SACEC,aACAC,cACAC,cACAC,oBAEK;AACP,SAASC,iBAAiB;;AAc1B,IAAA,gBAAe,MACbC,YAAYC,aAAaC,OAAO;EAC9BC,WAAWC,KAAKC,IAAI;IAClBC,MAAM;IACNC,aAAa;;;;IAIbC,SAAS;;IAETC,QAAQC,OAAOC,OAAO;MACpBN,IAAIK,OAAOE,OAAOC,YAAY;QAC5BN,aAAa;MACf,CAAA;IACF,CAAA;IACAO,SAAS,OAAO,EAAET,GAAE,GAAI,EAAEU,WAAU,MAAE;AACpCC,gBAAUD,YAAAA,QAAAA;;;;;;;;;AACV,YAAM,EAAEE,SAASC,UAAUC,KAAI,IAAKJ;AACpCC,gBAAUC,SAAS,eAAA;;;;;;;;;AACnBD,gBAAUE,UAAU,wBAAA;;;;;;;;;AAEpB,UAAIC,SAAS,QAAQ;AACnB,cAAM,EAAEC,MAAMC,MAAK,IAAK,MAAMH,SAC5BI,aAAaC,WAAWC,iBAAiB;UACvCC,SAASR;UACTS,WAAWrB;QACb,CAAA,CAAA;AAEF,YAAIgB,OAAO;AACT,iBAAOM,WAAWC,MAAMP,MAAMQ,OAAO;QACvC;AAEA,eAAOF,WAAWG,QAAQV,IAAAA;MAC5B,OAAO;AACL,cAAM,EAAEA,MAAMC,MAAK,IAAK,MAAMH,SAC5BI,aAAaS,aAAaC,MAAM;UAC9BC,SAAS;YAAC5B;;UACVc,MAAM;UACNe,SAAS;YACPjB;YACAkB,aAAa;UACf;QACF,CAAA,CAAA;AAEF,YAAId,OAAO;AACT,iBAAOM,WAAWC,MAAMP,MAAMQ,OAAO;QACvC;AAEA,eAAOF,WAAWG,QAAQV,IAAAA;MAC5B;IACF;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["Schema", "createTool", "ToolResult", "contributes", "createIntent", "Capabilities", "LayoutAction", "invariant", "contributes", "Capabilities", "Tools", "createTool", "meta", "id", "name", "description", "caption", "schema", "Schema", "Struct", "String", "annotations", "execute", "extensions", "invariant", "pivotId", "dispatch", "part", "data", "error", "createIntent", "DeckAction", "ChangeCompanion", "primary", "companion", "ToolResult", "Error", "message", "Success", "LayoutAction", "Open", "subject", "options", "positioning"]
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeckCapabilities
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KLN73CM3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultDeck
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YN5OZEGS.mjs";
|
|
7
7
|
import "./chunk-NSATFAEE.mjs";
|
|
8
8
|
|
|
9
9
|
// packages/plugins/plugin-deck/src/capabilities/url-handler.ts
|
|
@@ -67,4 +67,4 @@ var url_handler_default = async (context) => {
|
|
|
67
67
|
export {
|
|
68
68
|
url_handler_default as default
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=url-handler-
|
|
70
|
+
//# sourceMappingURL=url-handler-BUGI6XRE.mjs.map
|
|
@@ -21,8 +21,12 @@ export declare namespace DeckCapabilities {
|
|
|
21
21
|
complementarySidebarState: "closed" | "collapsed" | "expanded";
|
|
22
22
|
complementarySidebarPanel?: string | undefined;
|
|
23
23
|
dialogOpen: boolean;
|
|
24
|
-
dialogBlockAlign?: "start" | "end" | "center" | undefined;
|
|
25
24
|
dialogType?: "default" | "alert" | undefined;
|
|
25
|
+
dialogBlockAlign?: "start" | "end" | "center" | undefined;
|
|
26
|
+
dialogOverlayClasses?: string | undefined;
|
|
27
|
+
dialogOverlayStyle?: {
|
|
28
|
+
readonly [x: string]: any;
|
|
29
|
+
} | undefined;
|
|
26
30
|
dialogContent?: any;
|
|
27
31
|
popoverOpen: boolean;
|
|
28
32
|
popoverSide?: "top" | "right" | "bottom" | "left" | undefined;
|
|
@@ -102,8 +106,12 @@ export declare namespace DeckCapabilities {
|
|
|
102
106
|
complementarySidebarState: "closed" | "collapsed" | "expanded";
|
|
103
107
|
complementarySidebarPanel?: string | undefined;
|
|
104
108
|
dialogOpen: boolean;
|
|
105
|
-
dialogBlockAlign?: "start" | "end" | "center" | undefined;
|
|
106
109
|
dialogType?: "default" | "alert" | undefined;
|
|
110
|
+
dialogBlockAlign?: "start" | "end" | "center" | undefined;
|
|
111
|
+
dialogOverlayClasses?: string | undefined;
|
|
112
|
+
dialogOverlayStyle?: {
|
|
113
|
+
readonly [x: string]: any;
|
|
114
|
+
} | undefined;
|
|
107
115
|
dialogContent?: any;
|
|
108
116
|
popoverOpen: boolean;
|
|
109
117
|
popoverSide?: "top" | "right" | "bottom" | "left" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqF,CAAC;IACrG,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAuE,CAAC;CACtG"}
|
|
@@ -8,7 +8,7 @@ export declare const ReactRoot: (props?: unknown) => Promise<() => Promise<impor
|
|
|
8
8
|
root: import("react").FC<import("react").PropsWithChildren>;
|
|
9
9
|
}>> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
10
10
|
export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
11
|
-
export declare const Tools: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/
|
|
11
|
+
export declare const Tools: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/ai").ExecutableTool[]> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
12
12
|
export declare const UrlHandler: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<null> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
13
13
|
export * from './capabilities';
|
|
14
14
|
export * from './state';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,oOAA4C,CAAC;AACzE,eAAO,MAAM,cAAc,6LAA2C,CAAC;AACvE,eAAO,MAAM,YAAY,4LAAmC,CAAC;AAC7D,eAAO,MAAM,SAAS,gJAAgC,CAAC;AACvD,eAAO,MAAM,oBAAoB,kPAA0C,CAAC;AAC5E,eAAO,MAAM,SAAS;;;qDAAqC,CAAC;AAC5D,eAAO,MAAM,YAAY,gMAAwC,CAAC;AAClE,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,oOAA4C,CAAC;AACzE,eAAO,MAAM,cAAc,6LAA2C,CAAC;AACvE,eAAO,MAAM,YAAY,4LAAmC,CAAC;AAC7D,eAAO,MAAM,SAAS,gJAAgC,CAAC;AACvD,eAAO,MAAM,oBAAoB,kPAA0C,CAAC;AAC5E,eAAO,MAAM,SAAS;;;qDAAqC,CAAC;AAC5D,eAAO,MAAM,YAAY,gMAAwC,CAAC;AAClE,eAAO,MAAM,KAAK,4KAAgC,CAAC;AACnD,eAAO,MAAM,UAAU,6LAAsC,CAAC;AAE9D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAKZ,KAAK,aAAa,EAGnB,MAAM,qBAAqB,CAAC;yBAwBb,SAAS,aAAa;AAAtC,
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAKZ,KAAK,aAAa,EAGnB,MAAM,qBAAqB,CAAC;yBAwBb,SAAS,aAAa;AAAtC,wBA2aK"}
|
|
@@ -19,8 +19,12 @@ declare const DeckStateFactory: () => (import("@dxos/app-framework").Capability<
|
|
|
19
19
|
complementarySidebarState: "closed" | "collapsed" | "expanded";
|
|
20
20
|
complementarySidebarPanel?: string | undefined;
|
|
21
21
|
dialogOpen: boolean;
|
|
22
|
-
dialogBlockAlign?: "start" | "end" | "center" | undefined;
|
|
23
22
|
dialogType?: "default" | "alert" | undefined;
|
|
23
|
+
dialogBlockAlign?: "start" | "end" | "center" | undefined;
|
|
24
|
+
dialogOverlayClasses?: string | undefined;
|
|
25
|
+
dialogOverlayStyle?: {
|
|
26
|
+
readonly [x: string]: any;
|
|
27
|
+
} | undefined;
|
|
24
28
|
dialogContent?: any;
|
|
25
29
|
popoverOpen: boolean;
|
|
26
30
|
popoverSide?: "top" | "right" | "bottom" | "left" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AA+BA,QAAA,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AA+BA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -6,6 +6,6 @@ declare global {
|
|
|
6
6
|
part?: 'deck' | 'dialog';
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/
|
|
9
|
+
declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/ai").ExecutableTool[]>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/tools.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAO7B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,CAAC,EAAE,uBAAuB,CAAC;QACnC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;KAC1B;CACF;;AAED,wBAoDK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlankHeading.d.ts","sourceRoot":"","sources":["../../../../../src/components/Plank/PlankHeading.tsx"],"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Y,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IACtC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,YAAY,sLAepB,iBAAiB,uBA4KrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/SidebarButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SidebarButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/SidebarButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAMxG,eAAO,MAAM,mBAAmB,GAAI,0BAGjC,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,sBAgBnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,yBAc9B,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,gCAI9C,eAAe,CAAC;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,sBAgCvD,CAAC"}
|
|
@@ -27,7 +27,6 @@ declare const _default: {
|
|
|
27
27
|
'plank heading fallback label': string;
|
|
28
28
|
'actions menu label': string;
|
|
29
29
|
'settings deck label': string;
|
|
30
|
-
'reload required message': string;
|
|
31
30
|
'pending heading': string;
|
|
32
31
|
'insert plank label': string;
|
|
33
32
|
'resize label': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBA2DE"}
|
|
@@ -42,8 +42,10 @@ export declare const DeckPluginState: Schema.mutable<Schema.Struct<{
|
|
|
42
42
|
complementarySidebarState: Schema.Literal<["closed", "collapsed", "expanded"]>;
|
|
43
43
|
complementarySidebarPanel: Schema.optional<typeof Schema.String>;
|
|
44
44
|
dialogOpen: typeof Schema.Boolean;
|
|
45
|
-
dialogBlockAlign: Schema.optional<Schema.Literal<["start", "center", "end"]>>;
|
|
46
45
|
dialogType: Schema.optional<Schema.Literal<["default", "alert"]>>;
|
|
46
|
+
dialogBlockAlign: Schema.optional<Schema.Literal<["start", "center", "end"]>>;
|
|
47
|
+
dialogOverlayClasses: Schema.optional<typeof Schema.String>;
|
|
48
|
+
dialogOverlayStyle: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
47
49
|
/** Data to be passed to the dialog Surface. */
|
|
48
50
|
dialogContent: Schema.optional<typeof Schema.Any>;
|
|
49
51
|
popoverOpen: typeof Schema.Boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QA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2
|
"name": "@dxos/plugin-deck",
|
|
3
|
-
"version": "0.8.2-
|
|
3
|
+
"version": "0.8.2-staging.42af850",
|
|
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",
|
|
@@ -32,33 +32,35 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@fluentui/react-tabster": "^9.24.2",
|
|
35
|
-
"@preact/
|
|
35
|
+
"@preact-signals/safe-react": "^0.9.0",
|
|
36
|
+
"@preact/signals-core": "^1.9.0",
|
|
36
37
|
"@radix-ui/react-context": "1.1.1",
|
|
37
38
|
"effect": "3.14.21",
|
|
38
39
|
"immer": "^10.1.1",
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/async": "0.8.2-
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/echo
|
|
45
|
-
"@dxos/echo-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/invariant": "0.8.2-
|
|
48
|
-
"@dxos/live-object": "0.8.2-
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/plugin-
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/local-storage": "0.8.2-
|
|
53
|
-
"@dxos/plugin-
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/react-
|
|
57
|
-
"@dxos/react-ui-
|
|
58
|
-
"@dxos/react-ui-
|
|
59
|
-
"@dxos/react-ui-
|
|
60
|
-
"@dxos/react-ui-
|
|
61
|
-
"@dxos/
|
|
40
|
+
"@dxos/ai": "0.8.2-staging.42af850",
|
|
41
|
+
"@dxos/async": "0.8.2-staging.42af850",
|
|
42
|
+
"@dxos/debug": "0.8.2-staging.42af850",
|
|
43
|
+
"@dxos/artifact": "0.8.2-staging.42af850",
|
|
44
|
+
"@dxos/app-framework": "0.8.2-staging.42af850",
|
|
45
|
+
"@dxos/echo": "0.8.2-staging.42af850",
|
|
46
|
+
"@dxos/echo-schema": "0.8.2-staging.42af850",
|
|
47
|
+
"@dxos/echo-signals": "0.8.2-staging.42af850",
|
|
48
|
+
"@dxos/invariant": "0.8.2-staging.42af850",
|
|
49
|
+
"@dxos/live-object": "0.8.2-staging.42af850",
|
|
50
|
+
"@dxos/keyboard": "0.8.2-staging.42af850",
|
|
51
|
+
"@dxos/plugin-attention": "0.8.2-staging.42af850",
|
|
52
|
+
"@dxos/log": "0.8.2-staging.42af850",
|
|
53
|
+
"@dxos/local-storage": "0.8.2-staging.42af850",
|
|
54
|
+
"@dxos/plugin-graph": "0.8.2-staging.42af850",
|
|
55
|
+
"@dxos/plugin-observability": "0.8.2-staging.42af850",
|
|
56
|
+
"@dxos/plugin-theme": "0.8.2-staging.42af850",
|
|
57
|
+
"@dxos/react-client": "0.8.2-staging.42af850",
|
|
58
|
+
"@dxos/react-ui-form": "0.8.2-staging.42af850",
|
|
59
|
+
"@dxos/react-ui-tabs": "0.8.2-staging.42af850",
|
|
60
|
+
"@dxos/react-ui-stack": "0.8.2-staging.42af850",
|
|
61
|
+
"@dxos/react-ui-attention": "0.8.2-staging.42af850",
|
|
62
|
+
"@dxos/react-ui-text-tooltip": "0.8.2-staging.42af850",
|
|
63
|
+
"@dxos/util": "0.8.2-staging.42af850"
|
|
62
64
|
},
|
|
63
65
|
"devDependencies": {
|
|
64
66
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -69,9 +71,9 @@
|
|
|
69
71
|
"react": "~18.2.0",
|
|
70
72
|
"react-dom": "~18.2.0",
|
|
71
73
|
"vite": "5.4.7",
|
|
72
|
-
"@dxos/react-ui": "0.8.2-
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
74
|
+
"@dxos/react-ui": "0.8.2-staging.42af850",
|
|
75
|
+
"@dxos/react-ui-theme": "0.8.2-staging.42af850",
|
|
76
|
+
"@dxos/storybook-utils": "0.8.2-staging.42af850"
|
|
75
77
|
},
|
|
76
78
|
"peerDependencies": {
|
|
77
79
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -80,8 +82,8 @@
|
|
|
80
82
|
"effect": "^3.13.3",
|
|
81
83
|
"react": "~18.2.0",
|
|
82
84
|
"react-dom": "~18.2.0",
|
|
83
|
-
"@dxos/react-ui": "0.8.2-
|
|
84
|
-
"@dxos/react-ui-theme": "0.8.2-
|
|
85
|
+
"@dxos/react-ui": "0.8.2-staging.42af850",
|
|
86
|
+
"@dxos/react-ui-theme": "0.8.2-staging.42af850"
|
|
85
87
|
},
|
|
86
88
|
"publishConfig": {
|
|
87
89
|
"access": "public"
|
|
@@ -107,9 +107,11 @@ export default (context: PluginContext) =>
|
|
|
107
107
|
resolve: ({ subject, options }) => {
|
|
108
108
|
const layout = context.getCapability(DeckCapabilities.MutableDeckState);
|
|
109
109
|
layout.dialogOpen = options.state ?? Boolean(subject);
|
|
110
|
-
layout.dialogContent = subject ? { component: subject, props: options.props } : null;
|
|
111
|
-
layout.dialogBlockAlign = options.blockAlign ?? 'center';
|
|
112
110
|
layout.dialogType = options.type ?? 'default';
|
|
111
|
+
layout.dialogBlockAlign = options.blockAlign ?? 'center';
|
|
112
|
+
layout.dialogOverlayClasses = options.overlayClasses;
|
|
113
|
+
layout.dialogOverlayStyle = options.overlayStyle;
|
|
114
|
+
layout.dialogContent = subject ? { component: subject, props: options.props } : null;
|
|
113
115
|
},
|
|
114
116
|
}),
|
|
115
117
|
createResolver({
|
|
@@ -225,7 +227,9 @@ export default (context: PluginContext) =>
|
|
|
225
227
|
intents: [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: first })],
|
|
226
228
|
};
|
|
227
229
|
} else {
|
|
228
|
-
const [item] = graph
|
|
230
|
+
const [item] = graph
|
|
231
|
+
.getConnections(subject)
|
|
232
|
+
.filter((node) => !isActionLike(node) && node.properties.disposition !== 'hidden');
|
|
229
233
|
if (item) {
|
|
230
234
|
return {
|
|
231
235
|
intents: [createIntent(LayoutAction.Open, { part: 'main', subject: [item.id] })],
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
|
|
7
|
+
import { createTool, ToolResult } from '@dxos/ai';
|
|
7
8
|
import {
|
|
8
9
|
contributes,
|
|
9
10
|
createIntent,
|
|
@@ -11,7 +12,6 @@ import {
|
|
|
11
12
|
LayoutAction,
|
|
12
13
|
type PromiseIntentDispatcher,
|
|
13
14
|
} from '@dxos/app-framework';
|
|
14
|
-
import { defineTool, ToolResult } from '@dxos/artifact';
|
|
15
15
|
import { invariant } from '@dxos/invariant';
|
|
16
16
|
|
|
17
17
|
import { meta } from '../meta';
|
|
@@ -28,7 +28,7 @@ declare global {
|
|
|
28
28
|
|
|
29
29
|
export default () =>
|
|
30
30
|
contributes(Capabilities.Tools, [
|
|
31
|
-
|
|
31
|
+
createTool(meta.id, {
|
|
32
32
|
name: 'show',
|
|
33
33
|
description: `
|
|
34
34
|
Show an item as a companion to an existing plank. This will make the item appear alongside the primary content.
|
|
@@ -42,13 +42,15 @@ export default () =>
|
|
|
42
42
|
}),
|
|
43
43
|
}),
|
|
44
44
|
execute: async ({ id }, { extensions }) => {
|
|
45
|
-
invariant(extensions
|
|
46
|
-
|
|
45
|
+
invariant(extensions);
|
|
46
|
+
const { pivotId, dispatch, part } = extensions;
|
|
47
|
+
invariant(pivotId, 'No pivot ID');
|
|
48
|
+
invariant(dispatch, 'No intent dispatcher');
|
|
47
49
|
|
|
48
|
-
if (
|
|
49
|
-
const { data, error } = await
|
|
50
|
+
if (part === 'deck') {
|
|
51
|
+
const { data, error } = await dispatch(
|
|
50
52
|
createIntent(DeckAction.ChangeCompanion, {
|
|
51
|
-
primary:
|
|
53
|
+
primary: pivotId,
|
|
52
54
|
companion: id,
|
|
53
55
|
}),
|
|
54
56
|
);
|
|
@@ -58,12 +60,12 @@ export default () =>
|
|
|
58
60
|
|
|
59
61
|
return ToolResult.Success(data);
|
|
60
62
|
} else {
|
|
61
|
-
const { data, error } = await
|
|
63
|
+
const { data, error } = await dispatch(
|
|
62
64
|
createIntent(LayoutAction.Open, {
|
|
63
65
|
subject: [id],
|
|
64
66
|
part: 'main',
|
|
65
67
|
options: {
|
|
66
|
-
pivotId
|
|
68
|
+
pivotId,
|
|
67
69
|
positioning: 'end',
|
|
68
70
|
},
|
|
69
71
|
}),
|
|
@@ -12,7 +12,7 @@ import { PlankContentError } from '../Plank';
|
|
|
12
12
|
|
|
13
13
|
export const Dialog = () => {
|
|
14
14
|
const context = useCapability(DeckCapabilities.MutableDeckState);
|
|
15
|
-
const { dialogType, dialogBlockAlign,
|
|
15
|
+
const { dialogOpen, dialogType, dialogBlockAlign, dialogOverlayClasses, dialogOverlayStyle, dialogContent } = context;
|
|
16
16
|
const Root = dialogType === 'alert' ? AlertDialog.Root : NaturalDialog.Root;
|
|
17
17
|
const Overlay = dialogType === 'alert' ? AlertDialog.Overlay : NaturalDialog.Overlay;
|
|
18
18
|
|
|
@@ -27,7 +27,7 @@ export const Dialog = () => {
|
|
|
27
27
|
// TODO(burdon): Placeholder creates a suspense boundary; replace with defaults.
|
|
28
28
|
<Surface role='dialog' data={dialogContent} limit={1} fallback={PlankContentError} placeholder={<div />} />
|
|
29
29
|
) : (
|
|
30
|
-
<Overlay blockAlign={dialogBlockAlign}>
|
|
30
|
+
<Overlay blockAlign={dialogBlockAlign} classNames={dialogOverlayClasses} style={dialogOverlayStyle}>
|
|
31
31
|
<Surface role='dialog' data={dialogContent} limit={1} fallback={PlankContentError} />
|
|
32
32
|
</Overlay>
|
|
33
33
|
)}
|
|
@@ -203,7 +203,7 @@ const PlankComponent = memo(
|
|
|
203
203
|
|
|
204
204
|
const Root = part.startsWith('solo') ? 'article' : StackItem.Root;
|
|
205
205
|
const className = mx(
|
|
206
|
-
'attention-surface relative',
|
|
206
|
+
'attention-surface relative dx-focus-ring-inset-over-all',
|
|
207
207
|
isSolo && mainIntrinsicSize,
|
|
208
208
|
isSolo && railGridHorizontal,
|
|
209
209
|
isSolo && 'absolute inset-0',
|
|
@@ -66,7 +66,9 @@ export const PlankHeading = memo(
|
|
|
66
66
|
useEffect(() => {
|
|
67
67
|
const frame = requestAnimationFrame(() => {
|
|
68
68
|
// Load actions for the node.
|
|
69
|
-
|
|
69
|
+
if (node) {
|
|
70
|
+
void graph.expand(node.id);
|
|
71
|
+
}
|
|
70
72
|
});
|
|
71
73
|
|
|
72
74
|
return () => cancelAnimationFrame(frame);
|
|
@@ -148,13 +150,13 @@ export const PlankHeading = memo(
|
|
|
148
150
|
return (
|
|
149
151
|
<StackItem.Heading
|
|
150
152
|
classNames={[
|
|
151
|
-
'plb-1 border-be border-
|
|
153
|
+
'plb-1 border-be border-subduedSeparator items-stretch gap-1 sticky inline-start-12 app-drag min-is-0 contain-layout',
|
|
152
154
|
part === 'solo' ? soloInlinePadding : 'pli-1',
|
|
153
155
|
...(layoutMode === 'solo--fullscreen'
|
|
154
156
|
? [
|
|
155
157
|
hoverableControls,
|
|
156
158
|
hoverableFocusedWithinControls,
|
|
157
|
-
'[&>*]:transition-opacity [&>*]:opacity-[--controls-opacity] bg-transparent border-transparent transition-[background-color,border-color] hover-hover:hover:bg-headerSurface focus-within:bg-headerSurface hover-hover:hover:border-
|
|
159
|
+
'[&>*]:transition-opacity [&>*]:opacity-[--controls-opacity] bg-transparent border-transparent transition-[background-color,border-color] hover-hover:hover:bg-headerSurface focus-within:bg-headerSurface hover-hover:hover:border-subduedSeparator focus-within:border-subduedSeparator',
|
|
158
160
|
]
|
|
159
161
|
: []),
|
|
160
162
|
]}
|
|
@@ -90,7 +90,7 @@ export const ComplementarySidebar = ({ current }: ComplementarySidebarProps) =>
|
|
|
90
90
|
<Tabs.Root orientation='vertical' verticalVariant='stateless' value={internalValue} classNames='contents'>
|
|
91
91
|
<div
|
|
92
92
|
role='none'
|
|
93
|
-
className='absolute z-[1] inset-block-0 inline-end-0 !is-[--r0-size] pbs-[env(safe-area-inset-top)] pbe-[env(safe-area-inset-bottom)] border-is border-
|
|
93
|
+
className='absolute z-[1] inset-block-0 inline-end-0 !is-[--r0-size] pbs-[env(safe-area-inset-top)] pbe-[env(safe-area-inset-bottom)] border-is border-subduedSeparator grid grid-cols-1 grid-rows-[1fr_min-content] bg-baseSurface contain-layout app-drag'
|
|
94
94
|
>
|
|
95
95
|
<Tabs.Tablist classNames='grid grid-cols-1 auto-rows-[--rail-action] p-1 gap-1 !overflow-y-auto'>
|
|
96
96
|
{companions.map((companion) => (
|
|
@@ -169,7 +169,7 @@ const ComplementarySidebarPanel = ({ companion, activeId, data, hoistStatusbar }
|
|
|
169
169
|
|
|
170
170
|
return (
|
|
171
171
|
<>
|
|
172
|
-
<h2 className='flex items-center pli-2 border-
|
|
172
|
+
<h2 className='flex items-center pli-2 border-subduedSeparator border-be font-medium'>
|
|
173
173
|
{toLocalizedString(companion.properties.label, t)}
|
|
174
174
|
</h2>
|
|
175
175
|
<Wrapper>
|
|
@@ -183,7 +183,7 @@ const ComplementarySidebarPanel = ({ companion, activeId, data, hoistStatusbar }
|
|
|
183
183
|
{!hoistStatusbar && (
|
|
184
184
|
<div
|
|
185
185
|
role='contentinfo'
|
|
186
|
-
className='flex flex-wrap justify-center items-center border-bs border-
|
|
186
|
+
className='flex flex-wrap justify-center items-center border-bs border-subduedSeparator pbs-1 pbe-[max(env(safe-area-inset-bottom),0.25rem)]'
|
|
187
187
|
>
|
|
188
188
|
<Surface role='status-bar--r1-footer' limit={1} />
|
|
189
189
|
</div>
|
|
@@ -8,8 +8,7 @@ import { createIntent, LayoutAction, useCapability, useIntentDispatcher } from '
|
|
|
8
8
|
import { IconButton, type IconButtonProps, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
10
|
import { DeckCapabilities } from '../../capabilities';
|
|
11
|
-
import { useDeckCompanions } from '../../hooks';
|
|
12
|
-
import { getCompanionId } from '../../hooks/useDeckCompanions';
|
|
11
|
+
import { useDeckCompanions, getCompanionId } from '../../hooks';
|
|
13
12
|
import { DECK_PLUGIN } from '../../meta';
|
|
14
13
|
|
|
15
14
|
export const ToggleSidebarButton = ({
|
|
@@ -73,11 +72,8 @@ export const ToggleComplementarySidebarButton = ({
|
|
|
73
72
|
}
|
|
74
73
|
}, [layoutContext, current, companions, dispatch]);
|
|
75
74
|
|
|
76
|
-
// TODO(thure): This should have a tooltip but is suppressed because focus is getting set on this twice when the app
|
|
77
|
-
// first mounts, causing even `suppressNextTooltip` not to have the intended effect.
|
|
78
75
|
return (
|
|
79
76
|
<IconButton
|
|
80
|
-
noTooltip
|
|
81
77
|
iconOnly
|
|
82
78
|
onClick={handleClick}
|
|
83
79
|
variant='ghost'
|
|
@@ -11,7 +11,7 @@ export const useNodeActionExpander = (node?: Node) => {
|
|
|
11
11
|
if (node) {
|
|
12
12
|
const frame = requestAnimationFrame(() => {
|
|
13
13
|
const graph = getGraph(node);
|
|
14
|
-
graph.expand(node.id);
|
|
14
|
+
void graph.expand(node.id);
|
|
15
15
|
});
|
|
16
16
|
return () => cancelAnimationFrame(frame);
|
|
17
17
|
}
|
package/src/translations.ts
CHANGED
|
@@ -35,7 +35,6 @@ export default [
|
|
|
35
35
|
'plank heading fallback label': 'Untitled',
|
|
36
36
|
'actions menu label': 'Options',
|
|
37
37
|
'settings deck label': 'Disable deck',
|
|
38
|
-
'reload required message': 'Reload required.',
|
|
39
38
|
'pending heading': 'Loading…',
|
|
40
39
|
'insert plank label': 'Open',
|
|
41
40
|
'resize label': 'Drag to resize',
|
package/src/types.ts
CHANGED
|
@@ -82,8 +82,10 @@ export const DeckPluginState = Schema.Struct({
|
|
|
82
82
|
complementarySidebarPanel: Schema.optional(Schema.String),
|
|
83
83
|
|
|
84
84
|
dialogOpen: Schema.Boolean,
|
|
85
|
-
dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),
|
|
86
85
|
dialogType: Schema.optional(Schema.Literal('default', 'alert')),
|
|
86
|
+
dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),
|
|
87
|
+
dialogOverlayClasses: Schema.optional(Schema.String),
|
|
88
|
+
dialogOverlayStyle: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
87
89
|
/** Data to be passed to the dialog Surface. */
|
|
88
90
|
dialogContent: Schema.optional(Schema.Any),
|
|
89
91
|
|