@dxos/plugin-deck 0.7.5-main.9d2a38b → 0.7.5-main.ff8607b
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-67VRUD5K.mjs → app-graph-builder-CI6ZFMNL.mjs} +57 -31
- package/dist/lib/browser/app-graph-builder-CI6ZFMNL.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs → check-app-scheme-S3EYUPMF.mjs} +3 -3
- package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs.map → check-app-scheme-S3EYUPMF.mjs.map} +2 -2
- package/dist/lib/browser/chunk-M2L53AIH.mjs +126 -0
- package/dist/lib/browser/chunk-M2L53AIH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JQJ5UWVB.mjs → chunk-N7TEPFVR.mjs} +3 -2
- package/dist/lib/browser/{chunk-JQJ5UWVB.mjs.map → chunk-N7TEPFVR.mjs.map} +3 -3
- package/dist/lib/browser/chunk-NYZJCVAU.mjs +22 -0
- package/dist/lib/browser/chunk-NYZJCVAU.mjs.map +7 -0
- package/dist/lib/browser/chunk-WXNLVMK2.mjs +1119 -0
- package/dist/lib/browser/chunk-WXNLVMK2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5VFDMW5M.mjs → chunk-YQ2GWTDU.mjs} +2 -2
- package/dist/lib/browser/chunk-YQ2GWTDU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +32 -78
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-CSXFDKTC.mjs +494 -0
- package/dist/lib/browser/intent-resolver-CSXFDKTC.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-UL7ZDRVZ.mjs → react-root-ECDQZYQT.mjs} +10 -14
- package/dist/lib/browser/react-root-ECDQZYQT.mjs.map +7 -0
- package/dist/lib/browser/react-surface-4WIQZW2S.mjs +38 -0
- package/dist/lib/browser/react-surface-4WIQZW2S.mjs.map +7 -0
- package/dist/lib/browser/{settings-FNWW6WIJ.mjs → settings-WACNLCPB.mjs} +6 -7
- package/dist/lib/browser/settings-WACNLCPB.mjs.map +7 -0
- package/dist/lib/browser/state-VPOYUKK6.mjs +117 -0
- package/dist/lib/browser/state-VPOYUKK6.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +16 -4
- package/dist/lib/browser/url-handler-HLF42IHP.mjs +70 -0
- package/dist/lib/browser/url-handler-HLF42IHP.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/{layout/app-graph-builder.d.ts → app-graph-builder.d.ts} +22 -22
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +132 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +187 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/set-active.d.ts +9 -0
- package/dist/types/src/capabilities/set-active.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +76 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +1 -4
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +3 -3
- package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Plank.d.ts +8 -6
- package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankControls.d.ts +2 -2
- package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/PlankError.d.ts +4 -3
- package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +5 -3
- package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +2 -2
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/fragments.d.ts +2 -0
- package/dist/types/src/components/fragments.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useMainSize.d.ts +2 -2
- package/dist/types/src/layout.d.ts +5 -19
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -3
- package/dist/types/src/types.d.ts +107 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +2 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts +2 -0
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -0
- package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/DeckPlugin.ts +12 -58
- package/src/capabilities/{layout/app-graph-builder.ts → app-graph-builder.ts} +36 -28
- package/src/capabilities/capabilities.ts +4 -3
- package/src/capabilities/{navigation/check-app-scheme.ts → check-app-scheme.ts} +2 -2
- package/src/capabilities/index.ts +11 -3
- package/src/capabilities/intent-resolver.ts +350 -0
- package/src/capabilities/{layout/react-root.tsx → react-root.tsx} +7 -11
- package/src/capabilities/react-surface.tsx +31 -0
- package/src/capabilities/set-active.ts +43 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
- package/src/capabilities/state.ts +102 -0
- package/src/capabilities/url-handler.ts +63 -0
- package/src/components/DeckLayout/ActiveNode.tsx +2 -3
- package/src/components/DeckLayout/ComplementarySidebar.tsx +118 -67
- package/src/components/DeckLayout/ContentEmpty.tsx +7 -10
- package/src/components/DeckLayout/DeckLayout.tsx +103 -61
- package/src/components/DeckLayout/Fullscreen.tsx +2 -3
- package/src/components/DeckLayout/NodePlankHeading.tsx +57 -65
- package/src/components/DeckLayout/Plank.tsx +32 -41
- package/src/components/DeckLayout/PlankControls.tsx +11 -10
- package/src/components/DeckLayout/PlankError.tsx +6 -5
- package/src/components/DeckLayout/Sidebar.tsx +17 -20
- package/src/components/DeckLayout/SidebarButton.tsx +25 -31
- package/src/components/DeckLayout/StatusBar.tsx +5 -11
- package/src/components/DeckLayout/Toast.tsx +2 -2
- package/src/components/LayoutSettings.tsx +8 -8
- package/src/components/fragments.ts +8 -0
- package/src/components/index.ts +0 -2
- package/src/hooks/useMainSize.ts +3 -3
- package/src/layout.ts +43 -212
- package/src/meta.ts +1 -0
- package/src/translations.ts +8 -8
- package/src/types.ts +88 -2
- package/src/util/index.ts +2 -1
- package/src/util/layoutAppliesTopbar.ts +7 -0
- package/src/util/useHoistStatusbar.ts +17 -8
- package/dist/lib/browser/app-graph-builder-67VRUD5K.mjs.map +0 -7
- package/dist/lib/browser/chunk-2M4PXYNB.mjs +0 -1052
- package/dist/lib/browser/chunk-2M4PXYNB.mjs.map +0 -7
- package/dist/lib/browser/chunk-2PJNBVCY.mjs +0 -39
- package/dist/lib/browser/chunk-2PJNBVCY.mjs.map +0 -7
- package/dist/lib/browser/chunk-4C2AFTET.mjs +0 -186
- package/dist/lib/browser/chunk-4C2AFTET.mjs.map +0 -7
- package/dist/lib/browser/chunk-5VFDMW5M.mjs.map +0 -7
- package/dist/lib/browser/chunk-KY5WXIXY.mjs +0 -44
- package/dist/lib/browser/chunk-KY5WXIXY.mjs.map +0 -7
- package/dist/lib/browser/deck-PLCSKPGL.mjs +0 -26
- package/dist/lib/browser/deck-PLCSKPGL.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs +0 -152
- package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs +0 -249
- package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs.map +0 -7
- package/dist/lib/browser/location-QHRBQBQN.mjs +0 -35
- package/dist/lib/browser/location-QHRBQBQN.mjs.map +0 -7
- package/dist/lib/browser/react-context-3BDW7W2N.mjs +0 -32
- package/dist/lib/browser/react-context-3BDW7W2N.mjs.map +0 -7
- package/dist/lib/browser/react-root-UL7ZDRVZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VPNOGGNN.mjs +0 -28
- package/dist/lib/browser/react-surface-VPNOGGNN.mjs.map +0 -7
- package/dist/lib/browser/settings-FNWW6WIJ.mjs.map +0 -7
- package/dist/lib/browser/state-7I5BD7SE.mjs +0 -34
- package/dist/lib/browser/state-7I5BD7SE.mjs.map +0 -7
- package/dist/lib/browser/url-handler-Z5B7LD3N.mjs +0 -76
- package/dist/lib/browser/url-handler-Z5B7LD3N.mjs.map +0 -7
- package/dist/types/src/capabilities/layout/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/deck.d.ts +0 -4
- package/dist/types/src/capabilities/layout/deck.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/index.d.ts +0 -229
- package/dist/types/src/capabilities/layout/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/react-context.d.ts +0 -8
- package/dist/types/src/capabilities/layout/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/layout/state.d.ts +0 -42
- package/dist/types/src/capabilities/layout/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/check-app-scheme.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/index.d.ts +0 -5
- package/dist/types/src/capabilities/navigation/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/navigation/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/location.d.ts +0 -4
- package/dist/types/src/capabilities/navigation/location.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/set-location.d.ts +0 -10
- package/dist/types/src/capabilities/navigation/set-location.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation/url-handler.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/components/DeckContext.d.ts +0 -11
- package/dist/types/src/components/DeckContext.d.ts.map +0 -1
- package/dist/types/src/components/LayoutContext.d.ts +0 -5
- package/dist/types/src/components/LayoutContext.d.ts.map +0 -1
- package/dist/types/src/layout.test.d.ts +0 -2
- package/dist/types/src/layout.test.d.ts.map +0 -1
- package/dist/types/src/util/layout-parts.d.ts +0 -7
- package/dist/types/src/util/layout-parts.d.ts.map +0 -1
- package/src/capabilities/layout/deck.ts +0 -25
- package/src/capabilities/layout/index.ts +0 -12
- package/src/capabilities/layout/intent-resolver.ts +0 -128
- package/src/capabilities/layout/react-context.tsx +0 -26
- package/src/capabilities/layout/state.ts +0 -32
- package/src/capabilities/navigation/index.ts +0 -10
- package/src/capabilities/navigation/intent-resolver.ts +0 -216
- package/src/capabilities/navigation/location.ts +0 -28
- package/src/capabilities/navigation/set-location.ts +0 -38
- package/src/capabilities/navigation/url-handler.ts +0 -67
- package/src/capabilities/settings/index.ts +0 -8
- package/src/capabilities/settings/react-surface.tsx +0 -23
- package/src/components/DeckContext.ts +0 -19
- package/src/components/LayoutContext.ts +0 -12
- package/src/layout.test.ts +0 -380
- package/src/util/layout-parts.ts +0 -12
- /package/dist/types/src/capabilities/{navigation/check-app-scheme.d.ts → check-app-scheme.d.ts} +0 -0
- /package/dist/types/src/capabilities/{layout/intent-resolver.d.ts → intent-resolver.d.ts} +0 -0
- /package/dist/types/src/capabilities/{layout/react-root.d.ts → react-root.d.ts} +0 -0
- /package/dist/types/src/capabilities/{settings/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +0 -0
- /package/dist/types/src/capabilities/{navigation/url-handler.d.ts → url-handler.d.ts} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'en-US': {
|
|
3
3
|
"dxos.org/plugin/deck": {
|
|
4
|
+
'plugin name': string;
|
|
4
5
|
'main header label': string;
|
|
5
6
|
'open navigation sidebar label': string;
|
|
6
|
-
'
|
|
7
|
+
'collapse navigation sidebar label': string;
|
|
7
8
|
'open complementary sidebar label': string;
|
|
8
9
|
'close complementary sidebar label': string;
|
|
9
10
|
'plugin error message': string;
|
|
@@ -12,7 +13,6 @@ declare const _default: {
|
|
|
12
13
|
'toggle fullscreen label': string;
|
|
13
14
|
'settings show hints label': string;
|
|
14
15
|
'settings native redirect label': string;
|
|
15
|
-
'settings custom slots': string;
|
|
16
16
|
'settings new plank position start label': string;
|
|
17
17
|
'settings new plank position end label': string;
|
|
18
18
|
'select new plank positioning placeholder': string;
|
|
@@ -41,7 +41,7 @@ declare const _default: {
|
|
|
41
41
|
'select overscroll placeholder': string;
|
|
42
42
|
'settings overscroll centering label': string;
|
|
43
43
|
'settings overscroll none label': string;
|
|
44
|
-
'settings
|
|
44
|
+
'settings enable ide-style statusbar label': string;
|
|
45
45
|
'close current label': string;
|
|
46
46
|
'close others label': string;
|
|
47
47
|
'close all label': string;
|
|
@@ -11,15 +11,119 @@ export type Panel = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const DeckSettingsSchema: S.mutable<S.Struct<{
|
|
13
13
|
showHints: typeof S.Boolean;
|
|
14
|
-
customSlots: typeof S.Boolean;
|
|
15
|
-
flatDeck: typeof S.Boolean;
|
|
16
14
|
enableNativeRedirect: typeof S.Boolean;
|
|
15
|
+
enableIdeStyleStatusbar: typeof S.Boolean;
|
|
17
16
|
newPlankPositioning: S.Literal<["start", "end"]>;
|
|
18
17
|
overscroll: S.Literal<["none", "centering"]>;
|
|
19
18
|
}>>;
|
|
20
19
|
export type DeckSettingsProps = S.Schema.Type<typeof DeckSettingsSchema>;
|
|
20
|
+
declare const LayoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
|
|
21
|
+
export declare const isLayoutMode: (value: any) => value is LayoutMode;
|
|
22
|
+
export type LayoutMode = S.Schema.Type<typeof LayoutMode>;
|
|
23
|
+
export declare const PlankSizing: S.Record$<typeof S.String, typeof S.Number>;
|
|
24
|
+
export type PlankSizing = S.Schema.Type<typeof PlankSizing>;
|
|
25
|
+
export declare const Deck: S.Struct<{
|
|
26
|
+
initialized: S.SchemaClass<boolean, boolean, never>;
|
|
27
|
+
active: S.mutable<S.Array$<typeof S.String>>;
|
|
28
|
+
inactive: S.mutable<S.Array$<typeof S.String>>;
|
|
29
|
+
solo: S.optional<typeof S.String>;
|
|
30
|
+
fullscreen: typeof S.Boolean;
|
|
31
|
+
plankSizing: S.mutable<S.Record$<typeof S.String, typeof S.Number>>;
|
|
32
|
+
}>;
|
|
33
|
+
export type Deck = S.Schema.Type<typeof Deck>;
|
|
34
|
+
export declare const DeckState: S.mutable<S.Struct<{
|
|
35
|
+
sidebarState: S.Literal<["closed", "collapsed", "expanded"]>;
|
|
36
|
+
complementarySidebarState: S.Literal<["closed", "collapsed", "expanded"]>;
|
|
37
|
+
complementarySidebarPanel: S.optional<typeof S.String>;
|
|
38
|
+
dialogOpen: typeof S.Boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Data to be passed to the dialog Surface.
|
|
41
|
+
*/
|
|
42
|
+
dialogContent: S.optional<typeof S.Any>;
|
|
43
|
+
dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
|
|
44
|
+
dialogType: S.optional<S.Literal<["default", "alert"]>>;
|
|
45
|
+
popoverOpen: typeof S.Boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Data to be passed to the popover Surface.
|
|
48
|
+
*/
|
|
49
|
+
popoverContent: S.optional<typeof S.Any>;
|
|
50
|
+
popoverAnchorId: S.optional<typeof S.String>;
|
|
51
|
+
toasts: S.mutable<S.Array$<S.Struct<{
|
|
52
|
+
id: S.SchemaClass<string, string, never>;
|
|
53
|
+
title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
54
|
+
ns: typeof S.String;
|
|
55
|
+
count: S.optional<typeof S.Number>;
|
|
56
|
+
}>>]>>]>>;
|
|
57
|
+
description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
58
|
+
ns: typeof S.String;
|
|
59
|
+
count: S.optional<typeof S.Number>;
|
|
60
|
+
}>>]>>]>>;
|
|
61
|
+
icon: S.optional<S.SchemaClass<string, string, never>>;
|
|
62
|
+
duration: S.optional<S.SchemaClass<number, number, never>>;
|
|
63
|
+
closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
64
|
+
ns: typeof S.String;
|
|
65
|
+
count: S.optional<typeof S.Number>;
|
|
66
|
+
}>>]>>]>>;
|
|
67
|
+
actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
68
|
+
ns: typeof S.String;
|
|
69
|
+
count: S.optional<typeof S.Number>;
|
|
70
|
+
}>>]>>]>>;
|
|
71
|
+
actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
72
|
+
ns: typeof S.String;
|
|
73
|
+
count: S.optional<typeof S.Number>;
|
|
74
|
+
}>>]>>]>>;
|
|
75
|
+
onAction: S.optional<S.SchemaClass<any, any, never>>;
|
|
76
|
+
}>>>;
|
|
77
|
+
currentUndoId: S.optional<typeof S.String>;
|
|
78
|
+
activeDeck: typeof S.String;
|
|
79
|
+
decks: S.mutable<S.Record$<typeof S.String, S.mutable<S.Struct<{
|
|
80
|
+
initialized: S.SchemaClass<boolean, boolean, never>;
|
|
81
|
+
active: S.mutable<S.Array$<typeof S.String>>;
|
|
82
|
+
inactive: S.mutable<S.Array$<typeof S.String>>;
|
|
83
|
+
solo: S.optional<typeof S.String>;
|
|
84
|
+
fullscreen: typeof S.Boolean;
|
|
85
|
+
plankSizing: S.mutable<S.Record$<typeof S.String, typeof S.Number>>;
|
|
86
|
+
}>>>>;
|
|
87
|
+
previousMode: S.mutable<S.Record$<typeof S.String, S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>>>;
|
|
88
|
+
deck: S.mutable<S.Struct<{
|
|
89
|
+
initialized: S.SchemaClass<boolean, boolean, never>;
|
|
90
|
+
active: S.mutable<S.Array$<typeof S.String>>;
|
|
91
|
+
inactive: S.mutable<S.Array$<typeof S.String>>;
|
|
92
|
+
solo: S.optional<typeof S.String>;
|
|
93
|
+
fullscreen: typeof S.Boolean;
|
|
94
|
+
plankSizing: S.mutable<S.Record$<typeof S.String, typeof S.Number>>;
|
|
95
|
+
}>>;
|
|
96
|
+
/**
|
|
97
|
+
* The identifier of a component to scroll into view when it is mounted.
|
|
98
|
+
*/
|
|
99
|
+
scrollIntoView: S.optional<typeof S.String>;
|
|
100
|
+
}>>;
|
|
101
|
+
export type DeckState = S.Schema.Type<typeof DeckState>;
|
|
102
|
+
export declare const getMode: (deck: Deck) => LayoutMode;
|
|
103
|
+
export declare const SLUG_PATH_SEPARATOR = "~";
|
|
21
104
|
export declare const DECK_ACTION: string;
|
|
22
105
|
export declare namespace DeckAction {
|
|
106
|
+
const PartAdjustmentSchema: S.Union<[S.Literal<["close"]>, S.Literal<["solo"]>, S.Literal<["increment-start"]>, S.Literal<["increment-end"]>]>;
|
|
107
|
+
export type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;
|
|
108
|
+
export const Adjustment: S.mutable<S.Struct<{
|
|
109
|
+
id: typeof S.String;
|
|
110
|
+
type: S.Union<[S.Literal<["close"]>, S.Literal<["solo"]>, S.Literal<["increment-start"]>, S.Literal<["increment-end"]>]>;
|
|
111
|
+
}>>;
|
|
112
|
+
export type Adjustment = S.Schema.Type<typeof Adjustment>;
|
|
113
|
+
const Adjust_base: S.TaggedClass<Adjust, `${string}/adjust`, {
|
|
114
|
+
readonly _tag: S.tag<`${string}/adjust`>;
|
|
115
|
+
} & {
|
|
116
|
+
input: S.mutable<S.Struct<{
|
|
117
|
+
id: typeof S.String;
|
|
118
|
+
type: S.Union<[S.Literal<["close"]>, S.Literal<["solo"]>, S.Literal<["increment-start"]>, S.Literal<["increment-end"]>]>;
|
|
119
|
+
}>>;
|
|
120
|
+
output: typeof S.Void;
|
|
121
|
+
}>;
|
|
122
|
+
/**
|
|
123
|
+
* An atomic transaction to apply to the deck, describing which element to move to which location.
|
|
124
|
+
*/
|
|
125
|
+
export class Adjust extends Adjust_base {
|
|
126
|
+
}
|
|
23
127
|
const UpdatePlankSize_base: S.TaggedClass<UpdatePlankSize, `${string}/update-plank-size`, {
|
|
24
128
|
readonly _tag: S.tag<`${string}/update-plank-size`>;
|
|
25
129
|
} & {
|
|
@@ -33,4 +137,5 @@ export declare namespace DeckAction {
|
|
|
33
137
|
}
|
|
34
138
|
export {};
|
|
35
139
|
}
|
|
140
|
+
export {};
|
|
36
141
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layoutAppliesTopbar.d.ts","sourceRoot":"","sources":["../../../../src/util/layoutAppliesTopbar.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,eAAgB,MAAM,YAErD,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":"AAWA,eAAO,MAAM,iBAAiB,eAAgB,MAAM,YAYnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-deck",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.ff8607b",
|
|
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",
|
|
@@ -30,33 +30,33 @@
|
|
|
30
30
|
"src"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@fluentui/react-tabster": "
|
|
33
|
+
"@fluentui/react-tabster": "9.23.3",
|
|
34
34
|
"@preact/signals-core": "^1.6.0",
|
|
35
35
|
"effect": "^3.12.1",
|
|
36
36
|
"immer": "^10.1.1",
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/echo-signals": "0.7.5-main.
|
|
42
|
-
"@dxos/invariant": "0.7.5-main.
|
|
43
|
-
"@dxos/keyboard": "0.7.5-main.
|
|
44
|
-
"@dxos/local-storage": "0.7.5-main.
|
|
45
|
-
"@dxos/live-object": "0.7.5-main.
|
|
46
|
-
"@dxos/log": "0.7.5-main.
|
|
47
|
-
"@dxos/plugin-attention": "0.7.5-main.
|
|
48
|
-
"@dxos/plugin-client": "0.7.5-main.
|
|
49
|
-
"@dxos/plugin-graph": "0.7.5-main.
|
|
50
|
-
"@dxos/plugin-observability": "0.7.5-main.
|
|
51
|
-
"@dxos/plugin-theme": "0.7.5-main.
|
|
52
|
-
"@dxos/react-client": "0.7.5-main.
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/react-ui-
|
|
55
|
-
"@dxos/react-ui-
|
|
56
|
-
"@dxos/react-ui-
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/react-ui-
|
|
37
|
+
"@dxos/app-framework": "0.7.5-main.ff8607b",
|
|
38
|
+
"@dxos/async": "0.7.5-main.ff8607b",
|
|
39
|
+
"@dxos/echo-schema": "0.7.5-main.ff8607b",
|
|
40
|
+
"@dxos/debug": "0.7.5-main.ff8607b",
|
|
41
|
+
"@dxos/echo-signals": "0.7.5-main.ff8607b",
|
|
42
|
+
"@dxos/invariant": "0.7.5-main.ff8607b",
|
|
43
|
+
"@dxos/keyboard": "0.7.5-main.ff8607b",
|
|
44
|
+
"@dxos/local-storage": "0.7.5-main.ff8607b",
|
|
45
|
+
"@dxos/live-object": "0.7.5-main.ff8607b",
|
|
46
|
+
"@dxos/log": "0.7.5-main.ff8607b",
|
|
47
|
+
"@dxos/plugin-attention": "0.7.5-main.ff8607b",
|
|
48
|
+
"@dxos/plugin-client": "0.7.5-main.ff8607b",
|
|
49
|
+
"@dxos/plugin-graph": "0.7.5-main.ff8607b",
|
|
50
|
+
"@dxos/plugin-observability": "0.7.5-main.ff8607b",
|
|
51
|
+
"@dxos/plugin-theme": "0.7.5-main.ff8607b",
|
|
52
|
+
"@dxos/react-client": "0.7.5-main.ff8607b",
|
|
53
|
+
"@dxos/react-ui-form": "0.7.5-main.ff8607b",
|
|
54
|
+
"@dxos/react-ui-attention": "0.7.5-main.ff8607b",
|
|
55
|
+
"@dxos/react-ui-mosaic": "0.7.5-main.ff8607b",
|
|
56
|
+
"@dxos/react-ui-stack": "0.7.5-main.ff8607b",
|
|
57
|
+
"@dxos/react-ui-tabs": "0.7.5-main.ff8607b",
|
|
58
|
+
"@dxos/util": "0.7.5-main.ff8607b",
|
|
59
|
+
"@dxos/react-ui-text-tooltip": "0.7.5-main.ff8607b"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -65,16 +65,16 @@
|
|
|
65
65
|
"react": "~18.2.0",
|
|
66
66
|
"react-dom": "~18.2.0",
|
|
67
67
|
"vite": "5.4.7",
|
|
68
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
69
|
-
"@dxos/react-ui
|
|
70
|
-
"@dxos/storybook-utils": "0.7.5-main.
|
|
68
|
+
"@dxos/react-ui-theme": "0.7.5-main.ff8607b",
|
|
69
|
+
"@dxos/react-ui": "0.7.5-main.ff8607b",
|
|
70
|
+
"@dxos/storybook-utils": "0.7.5-main.ff8607b"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@phosphor-icons/react": "^2.0.5",
|
|
74
74
|
"react": "~18.2.0",
|
|
75
75
|
"react-dom": "~18.2.0",
|
|
76
|
-
"@dxos/react-ui
|
|
77
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
76
|
+
"@dxos/react-ui": "0.7.5-main.ff8607b",
|
|
77
|
+
"@dxos/react-ui-theme": "0.7.5-main.ff8607b"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
package/src/DeckPlugin.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { setAutoFreeze } from 'immer';
|
|
6
6
|
|
|
7
7
|
import { allOf, Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';
|
|
8
|
-
import { AttentionEvents } from '@dxos/plugin-attention';
|
|
9
8
|
import { translations as stackTranslations } from '@dxos/react-ui-stack';
|
|
10
9
|
|
|
11
10
|
import {
|
|
@@ -13,10 +12,6 @@ import {
|
|
|
13
12
|
CheckAppScheme,
|
|
14
13
|
DeckState,
|
|
15
14
|
LayoutIntentResolver,
|
|
16
|
-
LayoutState,
|
|
17
|
-
LocationState,
|
|
18
|
-
NavigationIntentResolver,
|
|
19
|
-
ReactContext,
|
|
20
15
|
ReactRoot,
|
|
21
16
|
DeckSettings,
|
|
22
17
|
ReactSurface,
|
|
@@ -33,35 +28,20 @@ setAutoFreeze(false);
|
|
|
33
28
|
|
|
34
29
|
export const DeckPlugin = () =>
|
|
35
30
|
definePlugin(meta, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
defineModule({
|
|
32
|
+
id: `${meta.id}/module/check-app-scheme`,
|
|
33
|
+
activatesOn: Events.SettingsReady,
|
|
34
|
+
activate: CheckAppScheme,
|
|
35
|
+
}),
|
|
40
36
|
defineModule({
|
|
41
37
|
id: `${meta.id}/module/settings`,
|
|
42
38
|
activatesOn: Events.SetupSettings,
|
|
43
39
|
activate: DeckSettings,
|
|
44
40
|
}),
|
|
45
|
-
defineModule({
|
|
46
|
-
id: `${meta.id}/module/react-surface`,
|
|
47
|
-
activatesOn: Events.Startup,
|
|
48
|
-
activate: ReactSurface,
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
//
|
|
52
|
-
// Layout
|
|
53
|
-
//
|
|
54
|
-
|
|
55
41
|
defineModule({
|
|
56
42
|
id: `${meta.id}/module/layout`,
|
|
57
43
|
activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
|
|
58
|
-
activatesAfter: [Events.LayoutReady],
|
|
59
|
-
activate: LayoutState,
|
|
60
|
-
}),
|
|
61
|
-
defineModule({
|
|
62
|
-
id: `${meta.id}/module/deck`,
|
|
63
|
-
activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
|
|
64
|
-
activatesAfter: [DeckEvents.StateReady],
|
|
44
|
+
activatesAfter: [Events.LayoutReady, DeckEvents.StateReady],
|
|
65
45
|
activate: DeckState,
|
|
66
46
|
}),
|
|
67
47
|
defineModule({
|
|
@@ -69,16 +49,16 @@ export const DeckPlugin = () =>
|
|
|
69
49
|
activatesOn: Events.SetupTranslations,
|
|
70
50
|
activate: () => contributes(Capabilities.Translations, [...translations, ...stackTranslations]),
|
|
71
51
|
}),
|
|
72
|
-
defineModule({
|
|
73
|
-
id: `${meta.id}/module/react-context`,
|
|
74
|
-
activatesOn: Events.Startup,
|
|
75
|
-
activate: ReactContext,
|
|
76
|
-
}),
|
|
77
52
|
defineModule({
|
|
78
53
|
id: `${meta.id}/module/react-root`,
|
|
79
54
|
activatesOn: Events.Startup,
|
|
80
55
|
activate: ReactRoot,
|
|
81
56
|
}),
|
|
57
|
+
defineModule({
|
|
58
|
+
id: `${meta.id}/module/react-surface`,
|
|
59
|
+
activatesOn: Events.SetupSurfaces,
|
|
60
|
+
activate: ReactSurface,
|
|
61
|
+
}),
|
|
82
62
|
defineModule({
|
|
83
63
|
id: `${meta.id}/module/layout-intent-resolver`,
|
|
84
64
|
activatesOn: Events.SetupIntents,
|
|
@@ -89,35 +69,9 @@ export const DeckPlugin = () =>
|
|
|
89
69
|
activatesOn: Events.SetupAppGraph,
|
|
90
70
|
activate: AppGraphBuilder,
|
|
91
71
|
}),
|
|
92
|
-
|
|
93
|
-
//
|
|
94
|
-
// Navigation
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
defineModule({
|
|
98
|
-
id: `${meta.id}/module/location`,
|
|
99
|
-
activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
|
|
100
|
-
activatesAfter: [Events.LocationReady],
|
|
101
|
-
activate: LocationState,
|
|
102
|
-
}),
|
|
103
|
-
defineModule({
|
|
104
|
-
id: `${meta.id}/module/check-app-scheme`,
|
|
105
|
-
activatesOn: Events.SettingsReady,
|
|
106
|
-
activate: CheckAppScheme,
|
|
107
|
-
}),
|
|
108
72
|
defineModule({
|
|
109
73
|
id: `${meta.id}/module/url`,
|
|
110
|
-
activatesOn: allOf(
|
|
111
|
-
Events.DispatcherReady,
|
|
112
|
-
Events.LayoutReady,
|
|
113
|
-
Events.LocationReady,
|
|
114
|
-
AttentionEvents.AttentionReady,
|
|
115
|
-
),
|
|
74
|
+
activatesOn: allOf(Events.DispatcherReady, DeckEvents.StateReady),
|
|
116
75
|
activate: UrlHandler,
|
|
117
76
|
}),
|
|
118
|
-
defineModule({
|
|
119
|
-
id: `${meta.id}/module/navigation-intent-resolver`,
|
|
120
|
-
activatesOn: Events.SetupIntents,
|
|
121
|
-
activate: NavigationIntentResolver,
|
|
122
|
-
}),
|
|
123
77
|
]);
|
|
@@ -2,19 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
Capabilities,
|
|
7
|
-
contributes,
|
|
8
|
-
createIntent,
|
|
9
|
-
LayoutAction,
|
|
10
|
-
NavigationAction,
|
|
11
|
-
openIds,
|
|
12
|
-
type PluginsContext,
|
|
13
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';
|
|
14
6
|
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
15
7
|
import { createExtension, type Node, ROOT_ID } from '@dxos/plugin-graph';
|
|
16
8
|
|
|
17
|
-
import {
|
|
9
|
+
import { DeckCapabilities } from './capabilities';
|
|
10
|
+
import { DECK_PLUGIN } from '../meta';
|
|
18
11
|
|
|
19
12
|
export default (context: PluginsContext) =>
|
|
20
13
|
contributes(
|
|
@@ -23,13 +16,15 @@ export default (context: PluginsContext) =>
|
|
|
23
16
|
id: DECK_PLUGIN,
|
|
24
17
|
filter: (node): node is Node<null> => node.id === ROOT_ID,
|
|
25
18
|
actions: () => {
|
|
19
|
+
const state = context.requestCapability(DeckCapabilities.MutableDeckState);
|
|
20
|
+
|
|
26
21
|
// NOTE(Zan): This is currently disabled.
|
|
27
22
|
// TODO(Zan): Fullscreen needs to know the active node and provide that to the layout part.
|
|
28
23
|
const _fullscreen = {
|
|
29
|
-
id: `${LayoutAction.
|
|
24
|
+
id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,
|
|
30
25
|
data: async () => {
|
|
31
26
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
32
|
-
await dispatch(createIntent(LayoutAction.SetLayoutMode, {
|
|
27
|
+
await dispatch(createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }));
|
|
33
28
|
},
|
|
34
29
|
properties: {
|
|
35
30
|
label: ['toggle fullscreen label', { ns: DECK_PLUGIN }],
|
|
@@ -42,13 +37,15 @@ export default (context: PluginsContext) =>
|
|
|
42
37
|
};
|
|
43
38
|
|
|
44
39
|
const closeCurrent = {
|
|
45
|
-
id: `${
|
|
40
|
+
id: `${LayoutAction.Close._tag}/current`,
|
|
46
41
|
data: async () => {
|
|
47
42
|
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
48
43
|
const attended = attention.current.at(-1);
|
|
49
44
|
if (attended) {
|
|
50
45
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
51
|
-
await dispatch(
|
|
46
|
+
await dispatch(
|
|
47
|
+
createIntent(LayoutAction.Close, { part: 'main', subject: [attended], options: { state: false } }),
|
|
48
|
+
);
|
|
52
49
|
}
|
|
53
50
|
},
|
|
54
51
|
properties: {
|
|
@@ -58,18 +55,13 @@ export default (context: PluginsContext) =>
|
|
|
58
55
|
};
|
|
59
56
|
|
|
60
57
|
const closeOthers = {
|
|
61
|
-
id: `${
|
|
58
|
+
id: `${LayoutAction.Close._tag}/others`,
|
|
62
59
|
data: async () => {
|
|
63
60
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
64
|
-
const location = context.requestCapability(Capabilities.Location);
|
|
65
61
|
const attention = context.requestCapability(AttentionCapabilities.Attention);
|
|
66
62
|
const attended = attention.current.at(-1);
|
|
67
|
-
const ids =
|
|
68
|
-
await dispatch(
|
|
69
|
-
createIntent(NavigationAction.Close, {
|
|
70
|
-
activeParts: { main: ids },
|
|
71
|
-
}),
|
|
72
|
-
);
|
|
63
|
+
const ids = state.deck.active.filter((id) => id !== attended) ?? [];
|
|
64
|
+
await dispatch(createIntent(LayoutAction.Close, { part: 'main', subject: ids, options: { state: false } }));
|
|
73
65
|
},
|
|
74
66
|
properties: {
|
|
75
67
|
label: ['close others label', { ns: DECK_PLUGIN }],
|
|
@@ -78,13 +70,14 @@ export default (context: PluginsContext) =>
|
|
|
78
70
|
};
|
|
79
71
|
|
|
80
72
|
const closeAll = {
|
|
81
|
-
id: `${
|
|
73
|
+
id: `${LayoutAction.Close._tag}/all`,
|
|
82
74
|
data: async () => {
|
|
83
75
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
84
|
-
const location = context.requestCapability(Capabilities.Location);
|
|
85
76
|
await dispatch(
|
|
86
|
-
createIntent(
|
|
87
|
-
|
|
77
|
+
createIntent(LayoutAction.Close, {
|
|
78
|
+
part: 'main',
|
|
79
|
+
subject: state.deck.active,
|
|
80
|
+
options: { state: false },
|
|
88
81
|
}),
|
|
89
82
|
);
|
|
90
83
|
},
|
|
@@ -94,8 +87,23 @@ export default (context: PluginsContext) =>
|
|
|
94
87
|
},
|
|
95
88
|
};
|
|
96
89
|
|
|
97
|
-
const
|
|
98
|
-
|
|
90
|
+
const toggleSidebar = {
|
|
91
|
+
id: `${LayoutAction.UpdateSidebar._tag}/nav`,
|
|
92
|
+
data: async () => {
|
|
93
|
+
state.sidebarState = state.sidebarState === 'expanded' ? 'collapsed' : 'expanded';
|
|
94
|
+
},
|
|
95
|
+
properties: {
|
|
96
|
+
label: [
|
|
97
|
+
state.sidebarState === 'expanded' ? 'collapse navigation sidebar label' : 'open navigation sidebar label',
|
|
98
|
+
{ ns: DECK_PLUGIN },
|
|
99
|
+
],
|
|
100
|
+
icon: 'ph--sidebar--regular',
|
|
101
|
+
disposition: 'pin-end',
|
|
102
|
+
l0Breakpoint: 'lg',
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
return !state.deck.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar];
|
|
99
107
|
},
|
|
100
108
|
}),
|
|
101
109
|
);
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
import { defineCapability, type Label } from '@dxos/app-framework';
|
|
6
6
|
import { type DeepReadonly } from '@dxos/util';
|
|
7
7
|
|
|
8
|
-
import { type DeckContextType } from '../components';
|
|
9
8
|
import { DECK_PLUGIN } from '../meta';
|
|
9
|
+
import { type DeckState } from '../types';
|
|
10
10
|
|
|
11
11
|
export namespace DeckCapabilities {
|
|
12
|
-
export const DeckState = defineCapability<DeepReadonly<
|
|
13
|
-
export const MutableDeckState = defineCapability<
|
|
12
|
+
export const DeckState = defineCapability<DeepReadonly<DeckState>>(`${DECK_PLUGIN}/capability/state`);
|
|
13
|
+
export const MutableDeckState = defineCapability<DeckState>(`${DECK_PLUGIN}/capability/state`);
|
|
14
|
+
|
|
14
15
|
export const ComplementaryPanel = defineCapability<{ id: string; label: Label; icon: string }>(
|
|
15
16
|
`${DECK_PLUGIN}/capability/complementary-panel`,
|
|
16
17
|
);
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
|
|
9
9
|
|
|
10
|
-
import { DECK_PLUGIN } from '
|
|
11
|
-
import { type DeckSettingsProps } from '
|
|
10
|
+
import { DECK_PLUGIN } from '../meta';
|
|
11
|
+
import { type DeckSettingsProps } from '../types';
|
|
12
12
|
|
|
13
13
|
const isSocket = !!(globalThis as any).__args;
|
|
14
14
|
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { lazy } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
|
+
export const CheckAppScheme = lazy(() => import('./check-app-scheme'));
|
|
9
|
+
export const LayoutIntentResolver = lazy(() => import('./intent-resolver'));
|
|
10
|
+
export const ReactRoot = lazy(() => import('./react-root'));
|
|
11
|
+
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
12
|
+
export const DeckSettings = lazy(() => import('./settings'));
|
|
13
|
+
export const DeckState = lazy(() => import('./state'));
|
|
14
|
+
export const UrlHandler = lazy(() => import('./url-handler'));
|
|
15
|
+
|
|
5
16
|
export * from './capabilities';
|
|
6
|
-
export * from './layout';
|
|
7
|
-
export * from './navigation';
|
|
8
|
-
export * from './settings';
|