@dxos/app-framework 0.7.4 → 0.7.5-main.9cb18ac
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/chunk-QG25ZU2N.mjs +320 -0
- package/dist/lib/browser/chunk-QG25ZU2N.mjs.map +7 -0
- package/dist/lib/browser/chunk-SPDTXTOV.mjs +163 -0
- package/dist/lib/browser/chunk-SPDTXTOV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-653Y45CL.mjs → chunk-WBOXEHBE.mjs} +12 -2
- package/dist/lib/browser/chunk-WBOXEHBE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +224 -109
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{plugin-intent-LU4KL2RO.mjs → plugin-intent-T7Y3MJ5C.mjs} +14 -4
- package/dist/lib/browser/{plugin-settings-OM3G2QFY.mjs → plugin-settings-5U2L2NRU.mjs} +6 -2
- package/dist/lib/browser/{plugin-surface-LECZMKSQ.mjs → plugin-surface-OKPF3EQI.mjs} +4 -4
- package/dist/lib/node/{chunk-SOVLKUWI.cjs → chunk-BW3RNEVI.cjs} +51 -102
- package/dist/lib/node/chunk-BW3RNEVI.cjs.map +7 -0
- package/dist/lib/node/{chunk-JZ2JVKRY.cjs → chunk-FCMHRU3M.cjs} +17 -5
- package/dist/lib/node/chunk-FCMHRU3M.cjs.map +7 -0
- package/dist/lib/node/chunk-VWHAALIN.cjs +344 -0
- package/dist/lib/node/chunk-VWHAALIN.cjs.map +7 -0
- package/dist/lib/node/index.cjs +232 -114
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/plugin-intent-F3TQZIUR.cjs +53 -0
- package/dist/lib/node/plugin-intent-F3TQZIUR.cjs.map +7 -0
- package/dist/lib/node/{plugin-settings-OZ6IKAE5.cjs → plugin-settings-W6UHMH5M.cjs} +12 -8
- package/dist/lib/node/plugin-settings-W6UHMH5M.cjs.map +7 -0
- package/dist/lib/node/{plugin-surface-YWDRXQTD.cjs → plugin-surface-CCSIONYW.cjs} +15 -15
- package/dist/lib/node/plugin-surface-CCSIONYW.cjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YNU7FTGJ.mjs → chunk-3T5UIJY3.mjs} +12 -2
- package/dist/lib/node-esm/chunk-3T5UIJY3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs +164 -0
- package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs +321 -0
- package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +224 -109
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{plugin-intent-V7ER24Y6.mjs → plugin-intent-W2HQC6LC.mjs} +14 -4
- package/dist/lib/node-esm/{plugin-settings-37UVWF2V.mjs → plugin-settings-H5RHNFVC.mjs} +6 -2
- package/dist/lib/node-esm/{plugin-surface-TEU42XQN.mjs → plugin-surface-V3YET3UL.mjs} +4 -4
- package/dist/types/src/plugins/common/layout.d.ts +145 -171
- package/dist/types/src/plugins/common/layout.d.ts.map +1 -1
- package/dist/types/src/plugins/common/navigation.d.ts +77 -30
- package/dist/types/src/plugins/common/navigation.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts +2 -7
- package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-host/index.d.ts +2 -0
- package/dist/types/src/plugins/plugin-host/index.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-host/plugin.d.ts +7 -1
- package/dist/types/src/plugins/plugin-host/plugin.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts +7 -20
- package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-intent/index.d.ts +1 -0
- package/dist/types/src/plugins/plugin-intent/index.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-intent/intent-dispatcher.d.ts +107 -0
- package/dist/types/src/plugins/plugin-intent/intent-dispatcher.d.ts.map +1 -0
- package/dist/types/src/plugins/plugin-intent/intent-dispatcher.test.d.ts +2 -0
- package/dist/types/src/plugins/plugin-intent/intent-dispatcher.test.d.ts.map +1 -0
- package/dist/types/src/plugins/plugin-intent/intent.d.ts +65 -58
- package/dist/types/src/plugins/plugin-intent/intent.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-intent/meta.d.ts +1 -0
- package/dist/types/src/plugins/plugin-intent/meta.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-intent/provides.d.ts +6 -10
- package/dist/types/src/plugins/plugin-intent/provides.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-settings/provides.d.ts +15 -2
- package/dist/types/src/plugins/plugin-settings/provides.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-surface/Surface.d.ts +2 -57
- package/dist/types/src/plugins/plugin-surface/Surface.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-surface/SurfaceContext.d.ts +85 -0
- package/dist/types/src/plugins/plugin-surface/SurfaceContext.d.ts.map +1 -0
- package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-surface/index.d.ts +1 -1
- package/dist/types/src/plugins/plugin-surface/index.d.ts.map +1 -1
- package/dist/types/src/plugins/plugin-surface/provides.d.ts +5 -4
- package/dist/types/src/plugins/plugin-surface/provides.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +14 -12
- package/src/plugins/common/layout.ts +125 -107
- package/src/plugins/common/navigation.ts +59 -30
- package/src/plugins/plugin-host/HostPlugin.tsx +2 -10
- package/src/plugins/plugin-host/PluginContainer.tsx +1 -1
- package/src/plugins/plugin-host/index.ts +4 -0
- package/src/plugins/plugin-host/plugin.ts +8 -1
- package/src/plugins/plugin-intent/IntentContext.tsx +13 -36
- package/src/plugins/plugin-intent/IntentPlugin.tsx +44 -120
- package/src/plugins/plugin-intent/index.ts +1 -0
- package/src/plugins/plugin-intent/intent-dispatcher.test.ts +279 -0
- package/src/plugins/plugin-intent/intent-dispatcher.ts +285 -0
- package/src/plugins/plugin-intent/intent.ts +126 -65
- package/src/plugins/plugin-intent/meta.ts +3 -1
- package/src/plugins/plugin-intent/provides.ts +8 -20
- package/src/plugins/plugin-settings/provides.ts +10 -5
- package/src/plugins/plugin-surface/Surface.tsx +25 -158
- package/src/plugins/plugin-surface/SurfaceContext.ts +112 -0
- package/src/plugins/plugin-surface/SurfacePlugin.tsx +19 -7
- package/src/plugins/plugin-surface/index.ts +1 -1
- package/src/plugins/plugin-surface/provides.ts +8 -7
- package/tsconfig.json +38 -1
- package/dist/lib/browser/chunk-653Y45CL.mjs.map +0 -7
- package/dist/lib/browser/chunk-FRXJ25VI.mjs +0 -214
- package/dist/lib/browser/chunk-FRXJ25VI.mjs.map +0 -7
- package/dist/lib/browser/chunk-YXM35XRE.mjs +0 -213
- package/dist/lib/browser/chunk-YXM35XRE.mjs.map +0 -7
- package/dist/lib/node/chunk-JZ2JVKRY.cjs.map +0 -7
- package/dist/lib/node/chunk-QSVP5HOW.cjs +0 -238
- package/dist/lib/node/chunk-QSVP5HOW.cjs.map +0 -7
- package/dist/lib/node/chunk-SOVLKUWI.cjs.map +0 -7
- package/dist/lib/node/plugin-intent-FVFR2LKB.cjs +0 -43
- package/dist/lib/node/plugin-intent-FVFR2LKB.cjs.map +0 -7
- package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs.map +0 -7
- package/dist/lib/node/plugin-surface-YWDRXQTD.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-2R4GVK7O.mjs +0 -215
- package/dist/lib/node-esm/chunk-2R4GVK7O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YFMFQBB4.mjs +0 -214
- package/dist/lib/node-esm/chunk-YFMFQBB4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs.map +0 -7
- package/dist/types/src/plugins/plugin-intent/helpers.d.ts +0 -6
- package/dist/types/src/plugins/plugin-intent/helpers.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts +0 -39
- package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts.map +0 -1
- package/src/plugins/plugin-intent/helpers.ts +0 -11
- package/src/plugins/plugin-surface/SurfaceRootContext.tsx +0 -60
- /package/dist/lib/browser/{plugin-intent-LU4KL2RO.mjs.map → plugin-intent-T7Y3MJ5C.mjs.map} +0 -0
- /package/dist/lib/browser/{plugin-settings-OM3G2QFY.mjs.map → plugin-settings-5U2L2NRU.mjs.map} +0 -0
- /package/dist/lib/browser/{plugin-surface-LECZMKSQ.mjs.map → plugin-surface-OKPF3EQI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{plugin-intent-V7ER24Y6.mjs.map → plugin-intent-W2HQC6LC.mjs.map} +0 -0
- /package/dist/lib/node-esm/{plugin-settings-37UVWF2V.mjs.map → plugin-settings-H5RHNFVC.mjs.map} +0 -0
- /package/dist/lib/node-esm/{plugin-surface-TEU42XQN.mjs.map → plugin-surface-V3YET3UL.mjs.map} +0 -0
|
@@ -1,38 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
2
|
import { type Plugin } from '../plugin-host';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
icon?: any;
|
|
29
|
-
duration?: number | undefined;
|
|
30
|
-
closeLabel?: string | undefined;
|
|
31
|
-
actionLabel?: string | undefined;
|
|
32
|
-
actionAlt?: string | undefined;
|
|
33
|
-
onAction?: ((...args: unknown[]) => unknown) | undefined;
|
|
3
|
+
export declare const Toast: S.Struct<{
|
|
4
|
+
id: typeof S.String;
|
|
5
|
+
title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
6
|
+
ns: typeof S.String;
|
|
7
|
+
count: S.optional<typeof S.Number>;
|
|
8
|
+
}>>]>>]>>;
|
|
9
|
+
description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
10
|
+
ns: typeof S.String;
|
|
11
|
+
count: S.optional<typeof S.Number>;
|
|
12
|
+
}>>]>>]>>;
|
|
13
|
+
icon: S.optional<typeof S.String>;
|
|
14
|
+
duration: S.optional<typeof S.Number>;
|
|
15
|
+
closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
16
|
+
ns: typeof S.String;
|
|
17
|
+
count: S.optional<typeof S.Number>;
|
|
18
|
+
}>>]>>]>>;
|
|
19
|
+
actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
20
|
+
ns: typeof S.String;
|
|
21
|
+
count: S.optional<typeof S.Number>;
|
|
22
|
+
}>>]>>]>>;
|
|
23
|
+
actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
24
|
+
ns: typeof S.String;
|
|
25
|
+
count: S.optional<typeof S.Number>;
|
|
26
|
+
}>>]>>]>>;
|
|
27
|
+
onAction: S.optional<typeof S.Any>;
|
|
34
28
|
}>;
|
|
35
|
-
export type Toast =
|
|
29
|
+
export type Toast = S.Schema.Type<typeof Toast>;
|
|
36
30
|
/**
|
|
37
31
|
* Basic state provided by a layout plugin.
|
|
38
32
|
*
|
|
@@ -40,106 +34,62 @@ export type Toast = z.infer<typeof Toast>;
|
|
|
40
34
|
* Generally only one dialog or popover should be open at a time, a layout plugin should manage this.
|
|
41
35
|
* For other landmarks, such as toasts, rendering them in the layout prevents them from unmounting when navigating.
|
|
42
36
|
*/
|
|
43
|
-
declare const LayoutMode:
|
|
37
|
+
declare const LayoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
|
|
44
38
|
export declare const isLayoutMode: (value: any) => value is LayoutMode;
|
|
45
|
-
export type LayoutMode =
|
|
46
|
-
export declare const Layout:
|
|
47
|
-
layoutMode:
|
|
48
|
-
sidebarOpen:
|
|
49
|
-
complementarySidebarOpen:
|
|
39
|
+
export type LayoutMode = S.Schema.Type<typeof LayoutMode>;
|
|
40
|
+
export declare const Layout: S.mutable<S.Struct<{
|
|
41
|
+
layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
|
|
42
|
+
sidebarOpen: typeof S.Boolean;
|
|
43
|
+
complementarySidebarOpen: typeof S.Boolean;
|
|
50
44
|
/**
|
|
51
|
-
* @deprecated
|
|
45
|
+
* @deprecated Data to be passed to the complementary sidebar Surface.
|
|
52
46
|
*/
|
|
53
|
-
complementarySidebarContent:
|
|
54
|
-
dialogOpen:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
toasts: {
|
|
100
|
-
id: string;
|
|
101
|
-
title?: string | undefined;
|
|
102
|
-
description?: string | undefined;
|
|
103
|
-
icon?: any;
|
|
104
|
-
duration?: number | undefined;
|
|
105
|
-
closeLabel?: string | undefined;
|
|
106
|
-
actionLabel?: string | undefined;
|
|
107
|
-
actionAlt?: string | undefined;
|
|
108
|
-
onAction?: ((...args: unknown[]) => unknown) | undefined;
|
|
109
|
-
}[];
|
|
110
|
-
complementarySidebarContent?: any;
|
|
111
|
-
dialogContent?: any;
|
|
112
|
-
dialogBlockAlign?: "center" | "start" | undefined;
|
|
113
|
-
dialogType?: "default" | "alert" | undefined;
|
|
114
|
-
popoverContent?: any;
|
|
115
|
-
popoverAnchorId?: string | undefined;
|
|
116
|
-
scrollIntoView?: string | undefined;
|
|
117
|
-
}, {
|
|
118
|
-
layoutMode: "deck" | "solo" | "fullscreen";
|
|
119
|
-
sidebarOpen: boolean;
|
|
120
|
-
complementarySidebarOpen: boolean;
|
|
121
|
-
dialogOpen: boolean;
|
|
122
|
-
popoverOpen: boolean;
|
|
123
|
-
toasts: {
|
|
124
|
-
id: string;
|
|
125
|
-
title?: string | undefined;
|
|
126
|
-
description?: string | undefined;
|
|
127
|
-
icon?: any;
|
|
128
|
-
duration?: number | undefined;
|
|
129
|
-
closeLabel?: string | undefined;
|
|
130
|
-
actionLabel?: string | undefined;
|
|
131
|
-
actionAlt?: string | undefined;
|
|
132
|
-
onAction?: ((...args: unknown[]) => unknown) | undefined;
|
|
133
|
-
}[];
|
|
134
|
-
complementarySidebarContent?: any;
|
|
135
|
-
dialogContent?: any;
|
|
136
|
-
dialogBlockAlign?: "center" | "start" | undefined;
|
|
137
|
-
dialogType?: "default" | "alert" | undefined;
|
|
138
|
-
popoverContent?: any;
|
|
139
|
-
popoverAnchorId?: string | undefined;
|
|
140
|
-
scrollIntoView?: string | undefined;
|
|
141
|
-
}>;
|
|
142
|
-
export type Layout = z.infer<typeof Layout>;
|
|
47
|
+
complementarySidebarContent: S.optional<typeof S.Any>;
|
|
48
|
+
dialogOpen: typeof S.Boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Data to be passed to the dialog Surface.
|
|
51
|
+
*/
|
|
52
|
+
dialogContent: S.optional<typeof S.Any>;
|
|
53
|
+
dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
|
|
54
|
+
dialogType: S.optional<S.Literal<["default", "alert"]>>;
|
|
55
|
+
popoverOpen: typeof S.Boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Data to be passed to the popover Surface.
|
|
58
|
+
*/
|
|
59
|
+
popoverContent: S.optional<typeof S.Any>;
|
|
60
|
+
popoverAnchorId: S.optional<typeof S.String>;
|
|
61
|
+
toasts: S.mutable<S.Array$<S.Struct<{
|
|
62
|
+
id: typeof S.String;
|
|
63
|
+
title: 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
|
+
description: 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
|
+
icon: S.optional<typeof S.String>;
|
|
72
|
+
duration: S.optional<typeof S.Number>;
|
|
73
|
+
closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
74
|
+
ns: typeof S.String;
|
|
75
|
+
count: S.optional<typeof S.Number>;
|
|
76
|
+
}>>]>>]>>;
|
|
77
|
+
actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
78
|
+
ns: typeof S.String;
|
|
79
|
+
count: S.optional<typeof S.Number>;
|
|
80
|
+
}>>]>>]>>;
|
|
81
|
+
actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
|
|
82
|
+
ns: typeof S.String;
|
|
83
|
+
count: S.optional<typeof S.Number>;
|
|
84
|
+
}>>]>>]>>;
|
|
85
|
+
onAction: S.optional<typeof S.Any>;
|
|
86
|
+
}>>>;
|
|
87
|
+
/**
|
|
88
|
+
* The identifier of a component to scroll into view when it is mounted.
|
|
89
|
+
*/
|
|
90
|
+
scrollIntoView: S.optional<typeof S.String>;
|
|
91
|
+
}>>;
|
|
92
|
+
export type Layout = S.Schema.Type<typeof Layout>;
|
|
143
93
|
/**
|
|
144
94
|
* Provides for a plugin that can manage the app layout.
|
|
145
95
|
*/
|
|
@@ -150,53 +100,77 @@ export type LayoutProvides = {
|
|
|
150
100
|
* Type guard for layout plugins.
|
|
151
101
|
*/
|
|
152
102
|
export declare const parseLayoutPlugin: (plugin: Plugin) => Plugin<LayoutProvides> | undefined;
|
|
153
|
-
export declare
|
|
154
|
-
|
|
155
|
-
SET_LAYOUT_MODE = "dxos.org/plugin/layout/action/set-layout-mode",
|
|
156
|
-
SCROLL_INTO_VIEW = "dxos.org/plugin/layout/action/scroll-into-view",
|
|
157
|
-
UPDATE_PLANK_SIZE = "dxos.org/plugin/layout/action/update-plank-size"
|
|
158
|
-
}
|
|
103
|
+
export declare const LAYOUT_PLUGIN = "dxos.org/plugin/layout";
|
|
104
|
+
export declare const LAYOUT_ACTION = "dxos.org/plugin/layout/action";
|
|
159
105
|
/**
|
|
160
106
|
* Expected payload for layout actions.
|
|
161
107
|
*/
|
|
162
108
|
export declare namespace LayoutAction {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
109
|
+
const SetLayout_base: S.TaggedClass<SetLayout, "dxos.org/plugin/layout/action/set-layout", {
|
|
110
|
+
readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout">;
|
|
111
|
+
} & {
|
|
112
|
+
input: S.Struct<{
|
|
113
|
+
/**
|
|
114
|
+
* Element to set the state of.
|
|
115
|
+
*/
|
|
116
|
+
element: S.Literal<["fullscreen", "sidebar", "complementary", "dialog", "popover", "toast"]>;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the element is on or off.
|
|
119
|
+
*
|
|
120
|
+
* If omitted, the element's state will be toggled or set based on other provided data.
|
|
121
|
+
* For example, if `component` is provided, the state will be set to `true`.
|
|
122
|
+
*/
|
|
123
|
+
state: S.optional<typeof S.Boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Component to render in the dialog or popover.
|
|
126
|
+
*/
|
|
127
|
+
component: S.optional<typeof S.String>;
|
|
128
|
+
/**
|
|
129
|
+
* Data to be passed to the dialog or popover Surface.
|
|
130
|
+
*/
|
|
131
|
+
subject: S.optional<typeof S.Any>;
|
|
132
|
+
/**
|
|
133
|
+
* Anchor ID for the popover.
|
|
134
|
+
*/
|
|
135
|
+
anchorId: S.optional<typeof S.String>;
|
|
136
|
+
/**
|
|
137
|
+
* Block alignment for the dialog.
|
|
138
|
+
*/
|
|
139
|
+
dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
|
|
140
|
+
/**
|
|
141
|
+
* Type of dialog.
|
|
142
|
+
*/
|
|
143
|
+
dialogType: S.optional<S.Literal<["default", "alert"]>>;
|
|
144
|
+
}>;
|
|
145
|
+
output: typeof S.Void;
|
|
146
|
+
}>;
|
|
147
|
+
export class SetLayout extends SetLayout_base {
|
|
148
|
+
}
|
|
149
|
+
const SetLayoutMode_base: S.TaggedClass<SetLayoutMode, "dxos.org/plugin/layout/action/set-layout-mode", {
|
|
150
|
+
readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout-mode">;
|
|
151
|
+
} & {
|
|
152
|
+
input: S.Union<[S.Struct<{
|
|
153
|
+
layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
|
|
154
|
+
}>, S.Struct<{
|
|
155
|
+
revert: S.Literal<[true]>;
|
|
156
|
+
}>]>;
|
|
157
|
+
output: typeof S.Void;
|
|
166
158
|
}>;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
state?: boolean;
|
|
179
|
-
/**
|
|
180
|
-
* Component to render in the dialog or popover.
|
|
181
|
-
*/
|
|
182
|
-
component?: string;
|
|
183
|
-
/**
|
|
184
|
-
* Data to be passed to the dialog or popover Surface.
|
|
185
|
-
*/
|
|
186
|
-
subject?: any;
|
|
187
|
-
/**
|
|
188
|
-
* Anchor ID for the popover.
|
|
189
|
-
*/
|
|
190
|
-
anchorId?: string;
|
|
191
|
-
/**
|
|
192
|
-
* Block alignment for the dialog.
|
|
193
|
-
*/
|
|
194
|
-
dialogBlockAlign?: 'start' | 'center';
|
|
195
|
-
/**
|
|
196
|
-
* Type of dialog.
|
|
197
|
-
*/
|
|
198
|
-
dialogType?: 'default' | 'alert';
|
|
159
|
+
export class SetLayoutMode extends SetLayoutMode_base {
|
|
160
|
+
}
|
|
161
|
+
const ScrollIntoView_base: S.TaggedClass<ScrollIntoView, "dxos.org/plugin/layout/action/scroll-into-view", {
|
|
162
|
+
readonly _tag: S.tag<"dxos.org/plugin/layout/action/scroll-into-view">;
|
|
163
|
+
} & {
|
|
164
|
+
input: S.Struct<{
|
|
165
|
+
id: S.optional<typeof S.String>;
|
|
166
|
+
cursor: S.optional<typeof S.String>;
|
|
167
|
+
ref: S.optional<typeof S.String>;
|
|
168
|
+
}>;
|
|
169
|
+
output: typeof S.Void;
|
|
199
170
|
}>;
|
|
171
|
+
export class ScrollIntoView extends ScrollIntoView_base {
|
|
172
|
+
}
|
|
173
|
+
export {};
|
|
200
174
|
}
|
|
201
175
|
export {};
|
|
202
176
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAO7C,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;EAWhB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC;AAEhD;;;;;;GAMG;AAEH,QAAA,MAAM,UAAU,gFAAyE,CAAC;AAC1F,eAAO,MAAM,YAAY,UAAW,GAAG,KAAG,KAAK,IAAI,UAAqC,CAAC;AACzF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE1D,eAAO,MAAM,MAAM;;;;IAMf;;OAEG;;;IAIH;;OAEG;;;;;IAOH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMH;;OAEG;;GAGN,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,WAAY,MAAM,uCAG/C,CAAC;AAMF,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC;AAEvD;;GAEG;AACH,yBAAiB,YAAY,CAAC;;;;;YAGxB;;eAEG;;YAGH;;;;;eAKG;;YAGH;;eAEG;;YAGH;;eAEG;;YAGH;;eAEG;;YAKH;;eAEG;;YAGH;;eAEG;;;;;IAvCP,MAAM,OAAO,SAAU,SAAQ,cA2C7B;KAAG;;;;;;;;;;;IAIL,MAAM,OAAO,aAAc,SAAQ,kBAUjC;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAQlC;KAAG;;CACN"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Schema as S } from '@effect/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
2
|
import { type Plugin } from '../plugin-host';
|
|
4
|
-
import { type IntentData } from '../plugin-intent';
|
|
5
3
|
export declare const SLUG_LIST_SEPARATOR = "+";
|
|
6
4
|
export declare const SLUG_ENTRY_SEPARATOR = "_";
|
|
7
5
|
export declare const SLUG_KEY_VALUE_SEPARATOR = "-";
|
|
@@ -63,19 +61,19 @@ declare const LayoutCoordinateSchema: S.mutable<S.Struct<{
|
|
|
63
61
|
entryId: typeof S.String;
|
|
64
62
|
}>>;
|
|
65
63
|
export type LayoutCoordinate = S.Schema.Type<typeof LayoutCoordinateSchema>;
|
|
66
|
-
declare const PartAdjustmentSchema: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["solo"]>]>;
|
|
64
|
+
declare const PartAdjustmentSchema: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["pin-start"]>, S.Literal<["pin-end"]>, S.Literal<["close"]>, S.Literal<["solo"]>]>;
|
|
67
65
|
export type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;
|
|
68
66
|
declare const LayoutAdjustmentSchema: S.mutable<S.Struct<{
|
|
69
67
|
layoutCoordinate: S.mutable<S.Struct<{
|
|
70
68
|
part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
71
69
|
entryId: typeof S.String;
|
|
72
70
|
}>>;
|
|
73
|
-
type: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["solo"]>]>;
|
|
71
|
+
type: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["pin-start"]>, S.Literal<["pin-end"]>, S.Literal<["close"]>, S.Literal<["solo"]>]>;
|
|
74
72
|
}>>;
|
|
75
73
|
export type LayoutAdjustment = S.Schema.Type<typeof LayoutAdjustmentSchema>;
|
|
76
74
|
/** @deprecated */
|
|
77
|
-
export declare const ActiveParts:
|
|
78
|
-
export type ActiveParts =
|
|
75
|
+
export declare const ActiveParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
76
|
+
export type ActiveParts = S.Schema.Type<typeof ActiveParts>;
|
|
79
77
|
export type LayoutContainerProps<T> = T & {
|
|
80
78
|
role?: string;
|
|
81
79
|
coordinate?: LayoutCoordinate;
|
|
@@ -146,51 +144,100 @@ export declare const openIds: (layout: LayoutParts, parts?: LayoutPart[]) => str
|
|
|
146
144
|
export declare const firstIdInPart: (layout: LayoutParts | undefined, part: LayoutPart) => string | undefined;
|
|
147
145
|
export declare const indexInPart: (layout: LayoutParts | undefined, layoutCoordinate: LayoutCoordinate | undefined) => number | undefined;
|
|
148
146
|
export declare const partLength: (layout: LayoutParts | undefined, part: LayoutPart | undefined) => number;
|
|
149
|
-
export declare
|
|
150
|
-
|
|
151
|
-
ADD_TO_ACTIVE = "dxos.org/plugin/navigation/action/add-to-active",
|
|
152
|
-
SET = "dxos.org/plugin/navigation/action/set",
|
|
153
|
-
ADJUST = "dxos.org/plugin/navigation/action/adjust",
|
|
154
|
-
CLOSE = "dxos.org/plugin/navigation/action/close",
|
|
155
|
-
EXPOSE = "dxos.org/plugin/navigation/action/expose"
|
|
156
|
-
}
|
|
147
|
+
export declare const NAVIGATION_PLUGIN = "dxos.org/plugin/navigation";
|
|
148
|
+
export declare const NAVIGATION_ACTION = "dxos.org/plugin/navigation/action";
|
|
157
149
|
/**
|
|
158
150
|
* Expected payload for navigation actions.
|
|
159
151
|
*/
|
|
160
152
|
export declare namespace NavigationAction {
|
|
153
|
+
const Open_base: S.TaggedClass<Open, "dxos.org/plugin/navigation/action/open", {
|
|
154
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/open">;
|
|
155
|
+
} & {
|
|
156
|
+
input: S.Struct<{
|
|
157
|
+
activeParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
158
|
+
noToggle: S.optional<typeof S.Boolean>;
|
|
159
|
+
}>;
|
|
160
|
+
output: S.Struct<{
|
|
161
|
+
open: S.Array$<typeof S.String>;
|
|
162
|
+
}>;
|
|
163
|
+
}>;
|
|
161
164
|
/**
|
|
162
165
|
* An additive overlay to apply to `location.active` (i.e. the result is a union of previous active and the argument)
|
|
163
166
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
167
|
+
export class Open extends Open_base {
|
|
168
|
+
}
|
|
169
|
+
const AddToActive_base: S.TaggedClass<AddToActive, "dxos.org/plugin/navigation/action/add-to-active", {
|
|
170
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/add-to-active">;
|
|
171
|
+
} & {
|
|
172
|
+
input: S.Struct<{
|
|
173
|
+
id: typeof S.String;
|
|
174
|
+
part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
175
|
+
scrollIntoView: S.optional<typeof S.Boolean>;
|
|
176
|
+
pivotId: S.optional<typeof S.String>;
|
|
177
|
+
positioning: S.optional<S.Literal<["start", "end"]>>;
|
|
178
|
+
}>;
|
|
179
|
+
output: typeof S.Void;
|
|
166
180
|
}>;
|
|
167
181
|
/**
|
|
168
182
|
* Payload for adding an item to the active items.
|
|
169
183
|
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
184
|
+
export class AddToActive extends AddToActive_base {
|
|
185
|
+
}
|
|
186
|
+
const Set_base: S.TaggedClass<Set, "dxos.org/plugin/navigation/action/set", {
|
|
187
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/set">;
|
|
188
|
+
} & {
|
|
189
|
+
input: S.Struct<{
|
|
190
|
+
activeParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
191
|
+
}>;
|
|
192
|
+
output: typeof S.Void;
|
|
176
193
|
}>;
|
|
177
194
|
/**
|
|
178
|
-
*
|
|
195
|
+
* The active parts to directly set, to be used when working with URLs or restoring a specific state.
|
|
179
196
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
197
|
+
export class Set extends Set_base {
|
|
198
|
+
}
|
|
199
|
+
const Close_base: S.TaggedClass<Close, "dxos.org/plugin/navigation/action/close", {
|
|
200
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/close">;
|
|
201
|
+
} & {
|
|
202
|
+
input: S.Struct<{
|
|
203
|
+
activeParts: S.Record$<typeof S.String, S.Union<[typeof S.String, S.mutable<S.Array$<typeof S.String>>]>>;
|
|
204
|
+
noToggle: S.optional<typeof S.Boolean>;
|
|
205
|
+
}>;
|
|
206
|
+
output: typeof S.Void;
|
|
183
207
|
}>;
|
|
184
208
|
/**
|
|
185
|
-
*
|
|
209
|
+
* A subtractive overlay to apply to `location.active` (i.e. the result is a subtraction from the previous active of the argument)
|
|
186
210
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
211
|
+
export class Close extends Close_base {
|
|
212
|
+
}
|
|
213
|
+
const Adjust_base: S.TaggedClass<Adjust, "dxos.org/plugin/navigation/action/adjust", {
|
|
214
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/adjust">;
|
|
215
|
+
} & {
|
|
216
|
+
input: S.mutable<S.Struct<{
|
|
217
|
+
layoutCoordinate: S.mutable<S.Struct<{
|
|
218
|
+
part: S.Union<[S.Literal<["sidebar"]>, S.Literal<["main"]>, S.Literal<["solo"]>, S.Literal<["complementary"]>, S.Literal<["fullScreen"]>]>;
|
|
219
|
+
entryId: typeof S.String;
|
|
220
|
+
}>>;
|
|
221
|
+
type: S.Union<[S.Literal<["increment-start"]>, S.Literal<["increment-end"]>, S.Literal<["pin-start"]>, S.Literal<["pin-end"]>, S.Literal<["close"]>, S.Literal<["solo"]>]>;
|
|
222
|
+
}>>;
|
|
223
|
+
output: typeof S.Void;
|
|
189
224
|
}>;
|
|
190
225
|
/**
|
|
191
226
|
* An atomic transaction to apply to `location.active`, describing which element to (attempt to) move to which location.
|
|
192
227
|
*/
|
|
193
|
-
|
|
228
|
+
export class Adjust extends Adjust_base {
|
|
229
|
+
}
|
|
230
|
+
const Expose_base: S.TaggedClass<Expose, "dxos.org/plugin/navigation/action/expose", {
|
|
231
|
+
readonly _tag: S.tag<"dxos.org/plugin/navigation/action/expose">;
|
|
232
|
+
} & {
|
|
233
|
+
input: S.Struct<{
|
|
234
|
+
id: typeof S.String;
|
|
235
|
+
}>;
|
|
236
|
+
output: typeof S.Void;
|
|
237
|
+
}>;
|
|
238
|
+
export class Expose extends Expose_base {
|
|
239
|
+
}
|
|
240
|
+
export {};
|
|
194
241
|
}
|
|
195
242
|
export {};
|
|
196
243
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/navigation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC;
|
|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CAAgC,CAAC;AAE/D;;GAEG;AAEH,yBAAiB,gBAAgB,CAAC;;;;;;;;;;;;IAChC;;OAEG;IACH,MAAM,OAAO,IAAK,SAAQ,SAQxB;KAAG;;;;;;;;;;;;;IAEL;;OAEG;IACH,MAAM,OAAO,WAAY,SAAQ,gBAS/B;KAAG;;;;;;;;;IAEL;;OAEG;IACH,MAAM,OAAO,GAAI,SAAQ,QAKvB;KAAG;;;;;;;;;;IAEL;;OAEG;IACH,MAAM,OAAO,KAAM,SAAQ,UAMzB;KAAG;;;;;;;;;;;;;IAEL;;OAEG;IACH,MAAM,OAAO,MAAO,SAAQ,WAG1B;KAAG;;;;;;;;;IAGL,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;;CACN"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
import { type Plugin, type PluginDefinition, type PluginMeta } from './plugin';
|
|
2
|
+
import { type PluginDefinition, type PluginMeta } from './plugin';
|
|
4
3
|
import { ErrorBoundary } from '../plugin-surface';
|
|
5
4
|
export type HostPluginParams = {
|
|
6
5
|
plugins: Record<string, () => Promise<PluginDefinition>>;
|
|
@@ -10,12 +9,8 @@ export type HostPluginParams = {
|
|
|
10
9
|
fallback?: ErrorBoundary['props']['fallback'];
|
|
11
10
|
placeholder?: ReactNode;
|
|
12
11
|
};
|
|
13
|
-
export type HostPluginProvides = {
|
|
14
|
-
plugins: PluginContext;
|
|
15
|
-
};
|
|
16
|
-
export declare const parsePluginHost: (plugin: Plugin) => Plugin<HostPluginProvides> | undefined;
|
|
17
12
|
/**
|
|
18
13
|
* Bootstraps an application by initializing plugins and rendering root components.
|
|
19
14
|
*/
|
|
20
|
-
export declare const HostPlugin: ({ plugins, meta, core, defaults, fallback, placeholder, }: HostPluginParams) => PluginDefinition
|
|
15
|
+
export declare const HostPlugin: ({ plugins, meta, core, defaults, fallback, placeholder, }: HostPluginParams) => PluginDefinition;
|
|
21
16
|
//# sourceMappingURL=HostPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/plugin-host/HostPlugin.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"HostPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/plugin-host/HostPlugin.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM9C,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEzD,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAC9C,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,UAAU,8DAOpB,gBAAgB,KAAG,gBAuCrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/plugin-host/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/plugin-host/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAEhC,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Application context to be provided to plugin callbacks.
|
|
4
|
+
*/
|
|
5
|
+
export type HostContext = {
|
|
6
|
+
plugins: Plugin[];
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* Capabilities provided by a plugin.
|
|
4
10
|
* The base surface capabilities are always included.
|
|
@@ -81,7 +87,7 @@ export type PluginDefinition<TProvides = {}, TInitializeProvides = {}> = Omit<Pl
|
|
|
81
87
|
*
|
|
82
88
|
* @param plugins All plugins which successfully initialized.
|
|
83
89
|
*/
|
|
84
|
-
ready?: (
|
|
90
|
+
ready?: (context: HostContext) => Promise<void>;
|
|
85
91
|
/**
|
|
86
92
|
* Called when the plugin is unloaded.
|
|
87
93
|
* This is the place to do any cleanup required by the plugin.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/plugin-host/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,SAAS,IAAI,SAAS,GAAG;IAClD;;OAEG;IACH,OAAO,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC;IAKhC,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IAEH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAA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