@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.
Files changed (128) hide show
  1. package/dist/lib/browser/chunk-QG25ZU2N.mjs +320 -0
  2. package/dist/lib/browser/chunk-QG25ZU2N.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-SPDTXTOV.mjs +163 -0
  4. package/dist/lib/browser/chunk-SPDTXTOV.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-653Y45CL.mjs → chunk-WBOXEHBE.mjs} +12 -2
  6. package/dist/lib/browser/chunk-WBOXEHBE.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +224 -109
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/{plugin-intent-LU4KL2RO.mjs → plugin-intent-T7Y3MJ5C.mjs} +14 -4
  11. package/dist/lib/browser/{plugin-settings-OM3G2QFY.mjs → plugin-settings-5U2L2NRU.mjs} +6 -2
  12. package/dist/lib/browser/{plugin-surface-LECZMKSQ.mjs → plugin-surface-OKPF3EQI.mjs} +4 -4
  13. package/dist/lib/node/{chunk-SOVLKUWI.cjs → chunk-BW3RNEVI.cjs} +51 -102
  14. package/dist/lib/node/chunk-BW3RNEVI.cjs.map +7 -0
  15. package/dist/lib/node/{chunk-JZ2JVKRY.cjs → chunk-FCMHRU3M.cjs} +17 -5
  16. package/dist/lib/node/chunk-FCMHRU3M.cjs.map +7 -0
  17. package/dist/lib/node/chunk-VWHAALIN.cjs +344 -0
  18. package/dist/lib/node/chunk-VWHAALIN.cjs.map +7 -0
  19. package/dist/lib/node/index.cjs +232 -114
  20. package/dist/lib/node/index.cjs.map +4 -4
  21. package/dist/lib/node/meta.json +1 -1
  22. package/dist/lib/node/plugin-intent-F3TQZIUR.cjs +53 -0
  23. package/dist/lib/node/plugin-intent-F3TQZIUR.cjs.map +7 -0
  24. package/dist/lib/node/{plugin-settings-OZ6IKAE5.cjs → plugin-settings-W6UHMH5M.cjs} +12 -8
  25. package/dist/lib/node/plugin-settings-W6UHMH5M.cjs.map +7 -0
  26. package/dist/lib/node/{plugin-surface-YWDRXQTD.cjs → plugin-surface-CCSIONYW.cjs} +15 -15
  27. package/dist/lib/node/plugin-surface-CCSIONYW.cjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-YNU7FTGJ.mjs → chunk-3T5UIJY3.mjs} +12 -2
  29. package/dist/lib/node-esm/chunk-3T5UIJY3.mjs.map +7 -0
  30. package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs +164 -0
  31. package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs.map +7 -0
  32. package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs +321 -0
  33. package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs.map +7 -0
  34. package/dist/lib/node-esm/index.mjs +224 -109
  35. package/dist/lib/node-esm/index.mjs.map +4 -4
  36. package/dist/lib/node-esm/meta.json +1 -1
  37. package/dist/lib/node-esm/{plugin-intent-V7ER24Y6.mjs → plugin-intent-W2HQC6LC.mjs} +14 -4
  38. package/dist/lib/node-esm/{plugin-settings-37UVWF2V.mjs → plugin-settings-H5RHNFVC.mjs} +6 -2
  39. package/dist/lib/node-esm/{plugin-surface-TEU42XQN.mjs → plugin-surface-V3YET3UL.mjs} +4 -4
  40. package/dist/types/src/plugins/common/layout.d.ts +145 -171
  41. package/dist/types/src/plugins/common/layout.d.ts.map +1 -1
  42. package/dist/types/src/plugins/common/navigation.d.ts +77 -30
  43. package/dist/types/src/plugins/common/navigation.d.ts.map +1 -1
  44. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts +2 -7
  45. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts.map +1 -1
  46. package/dist/types/src/plugins/plugin-host/index.d.ts +2 -0
  47. package/dist/types/src/plugins/plugin-host/index.d.ts.map +1 -1
  48. package/dist/types/src/plugins/plugin-host/plugin.d.ts +7 -1
  49. package/dist/types/src/plugins/plugin-host/plugin.d.ts.map +1 -1
  50. package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts +7 -20
  51. package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts.map +1 -1
  52. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts.map +1 -1
  53. package/dist/types/src/plugins/plugin-intent/index.d.ts +1 -0
  54. package/dist/types/src/plugins/plugin-intent/index.d.ts.map +1 -1
  55. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.d.ts +107 -0
  56. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.d.ts.map +1 -0
  57. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.test.d.ts +2 -0
  58. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.test.d.ts.map +1 -0
  59. package/dist/types/src/plugins/plugin-intent/intent.d.ts +65 -58
  60. package/dist/types/src/plugins/plugin-intent/intent.d.ts.map +1 -1
  61. package/dist/types/src/plugins/plugin-intent/meta.d.ts +1 -0
  62. package/dist/types/src/plugins/plugin-intent/meta.d.ts.map +1 -1
  63. package/dist/types/src/plugins/plugin-intent/provides.d.ts +6 -10
  64. package/dist/types/src/plugins/plugin-intent/provides.d.ts.map +1 -1
  65. package/dist/types/src/plugins/plugin-settings/provides.d.ts +15 -2
  66. package/dist/types/src/plugins/plugin-settings/provides.d.ts.map +1 -1
  67. package/dist/types/src/plugins/plugin-surface/Surface.d.ts +2 -57
  68. package/dist/types/src/plugins/plugin-surface/Surface.d.ts.map +1 -1
  69. package/dist/types/src/plugins/plugin-surface/SurfaceContext.d.ts +85 -0
  70. package/dist/types/src/plugins/plugin-surface/SurfaceContext.d.ts.map +1 -0
  71. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts.map +1 -1
  72. package/dist/types/src/plugins/plugin-surface/index.d.ts +1 -1
  73. package/dist/types/src/plugins/plugin-surface/index.d.ts.map +1 -1
  74. package/dist/types/src/plugins/plugin-surface/provides.d.ts +5 -4
  75. package/dist/types/src/plugins/plugin-surface/provides.d.ts.map +1 -1
  76. package/dist/types/tsconfig.tsbuildinfo +1 -0
  77. package/package.json +14 -12
  78. package/src/plugins/common/layout.ts +125 -107
  79. package/src/plugins/common/navigation.ts +59 -30
  80. package/src/plugins/plugin-host/HostPlugin.tsx +2 -10
  81. package/src/plugins/plugin-host/PluginContainer.tsx +1 -1
  82. package/src/plugins/plugin-host/index.ts +4 -0
  83. package/src/plugins/plugin-host/plugin.ts +8 -1
  84. package/src/plugins/plugin-intent/IntentContext.tsx +13 -36
  85. package/src/plugins/plugin-intent/IntentPlugin.tsx +44 -120
  86. package/src/plugins/plugin-intent/index.ts +1 -0
  87. package/src/plugins/plugin-intent/intent-dispatcher.test.ts +279 -0
  88. package/src/plugins/plugin-intent/intent-dispatcher.ts +285 -0
  89. package/src/plugins/plugin-intent/intent.ts +126 -65
  90. package/src/plugins/plugin-intent/meta.ts +3 -1
  91. package/src/plugins/plugin-intent/provides.ts +8 -20
  92. package/src/plugins/plugin-settings/provides.ts +10 -5
  93. package/src/plugins/plugin-surface/Surface.tsx +25 -158
  94. package/src/plugins/plugin-surface/SurfaceContext.ts +112 -0
  95. package/src/plugins/plugin-surface/SurfacePlugin.tsx +19 -7
  96. package/src/plugins/plugin-surface/index.ts +1 -1
  97. package/src/plugins/plugin-surface/provides.ts +8 -7
  98. package/tsconfig.json +38 -1
  99. package/dist/lib/browser/chunk-653Y45CL.mjs.map +0 -7
  100. package/dist/lib/browser/chunk-FRXJ25VI.mjs +0 -214
  101. package/dist/lib/browser/chunk-FRXJ25VI.mjs.map +0 -7
  102. package/dist/lib/browser/chunk-YXM35XRE.mjs +0 -213
  103. package/dist/lib/browser/chunk-YXM35XRE.mjs.map +0 -7
  104. package/dist/lib/node/chunk-JZ2JVKRY.cjs.map +0 -7
  105. package/dist/lib/node/chunk-QSVP5HOW.cjs +0 -238
  106. package/dist/lib/node/chunk-QSVP5HOW.cjs.map +0 -7
  107. package/dist/lib/node/chunk-SOVLKUWI.cjs.map +0 -7
  108. package/dist/lib/node/plugin-intent-FVFR2LKB.cjs +0 -43
  109. package/dist/lib/node/plugin-intent-FVFR2LKB.cjs.map +0 -7
  110. package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs.map +0 -7
  111. package/dist/lib/node/plugin-surface-YWDRXQTD.cjs.map +0 -7
  112. package/dist/lib/node-esm/chunk-2R4GVK7O.mjs +0 -215
  113. package/dist/lib/node-esm/chunk-2R4GVK7O.mjs.map +0 -7
  114. package/dist/lib/node-esm/chunk-YFMFQBB4.mjs +0 -214
  115. package/dist/lib/node-esm/chunk-YFMFQBB4.mjs.map +0 -7
  116. package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs.map +0 -7
  117. package/dist/types/src/plugins/plugin-intent/helpers.d.ts +0 -6
  118. package/dist/types/src/plugins/plugin-intent/helpers.d.ts.map +0 -1
  119. package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts +0 -39
  120. package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts.map +0 -1
  121. package/src/plugins/plugin-intent/helpers.ts +0 -11
  122. package/src/plugins/plugin-surface/SurfaceRootContext.tsx +0 -60
  123. /package/dist/lib/browser/{plugin-intent-LU4KL2RO.mjs.map → plugin-intent-T7Y3MJ5C.mjs.map} +0 -0
  124. /package/dist/lib/browser/{plugin-settings-OM3G2QFY.mjs.map → plugin-settings-5U2L2NRU.mjs.map} +0 -0
  125. /package/dist/lib/browser/{plugin-surface-LECZMKSQ.mjs.map → plugin-surface-OKPF3EQI.mjs.map} +0 -0
  126. /package/dist/lib/node-esm/{plugin-intent-V7ER24Y6.mjs.map → plugin-intent-W2HQC6LC.mjs.map} +0 -0
  127. /package/dist/lib/node-esm/{plugin-settings-37UVWF2V.mjs.map → plugin-settings-H5RHNFVC.mjs.map} +0 -0
  128. /package/dist/lib/node-esm/{plugin-surface-TEU42XQN.mjs.map → plugin-surface-V3YET3UL.mjs.map} +0 -0
@@ -1,38 +1,32 @@
1
- import { z } from 'zod';
1
+ import { S } from '@dxos/echo-schema';
2
2
  import { type Plugin } from '../plugin-host';
3
- import { type IntentData } from '../plugin-intent';
4
- export declare const Toast: z.ZodObject<{
5
- id: z.ZodString;
6
- title: z.ZodOptional<z.ZodString>;
7
- description: z.ZodOptional<z.ZodString>;
8
- icon: z.ZodOptional<z.ZodAny>;
9
- duration: z.ZodOptional<z.ZodNumber>;
10
- closeLabel: z.ZodOptional<z.ZodString>;
11
- actionLabel: z.ZodOptional<z.ZodString>;
12
- actionAlt: z.ZodOptional<z.ZodString>;
13
- onAction: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
14
- }, "strip", z.ZodTypeAny, {
15
- id: string;
16
- title?: string | undefined;
17
- description?: string | undefined;
18
- icon?: any;
19
- duration?: number | undefined;
20
- closeLabel?: string | undefined;
21
- actionLabel?: string | undefined;
22
- actionAlt?: string | undefined;
23
- onAction?: ((...args: unknown[]) => unknown) | undefined;
24
- }, {
25
- id: string;
26
- title?: string | undefined;
27
- description?: string | undefined;
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 = z.infer<typeof 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: z.ZodUnion<[z.ZodLiteral<"deck">, z.ZodLiteral<"solo">, z.ZodLiteral<"fullscreen">]>;
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 = z.infer<typeof LayoutMode>;
46
- export declare const Layout: z.ZodObject<{
47
- layoutMode: z.ZodUnion<[z.ZodLiteral<"deck">, z.ZodLiteral<"solo">, z.ZodLiteral<"fullscreen">]>;
48
- sidebarOpen: z.ZodBoolean;
49
- complementarySidebarOpen: z.ZodBoolean;
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: z.ZodOptional<z.ZodAny>;
54
- dialogOpen: z.ZodBoolean;
55
- dialogContent: z.ZodOptional<z.ZodAny>;
56
- dialogBlockAlign: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"start">, z.ZodLiteral<"center">]>>;
57
- dialogType: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"default">, z.ZodLiteral<"alert">]>>;
58
- popoverOpen: z.ZodBoolean;
59
- popoverContent: z.ZodOptional<z.ZodAny>;
60
- popoverAnchorId: z.ZodOptional<z.ZodString>;
61
- toasts: z.ZodArray<z.ZodObject<{
62
- id: z.ZodString;
63
- title: z.ZodOptional<z.ZodString>;
64
- description: z.ZodOptional<z.ZodString>;
65
- icon: z.ZodOptional<z.ZodAny>;
66
- duration: z.ZodOptional<z.ZodNumber>;
67
- closeLabel: z.ZodOptional<z.ZodString>;
68
- actionLabel: z.ZodOptional<z.ZodString>;
69
- actionAlt: z.ZodOptional<z.ZodString>;
70
- onAction: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
71
- }, "strip", z.ZodTypeAny, {
72
- id: string;
73
- title?: string | undefined;
74
- description?: string | undefined;
75
- icon?: any;
76
- duration?: number | undefined;
77
- closeLabel?: string | undefined;
78
- actionLabel?: string | undefined;
79
- actionAlt?: string | undefined;
80
- onAction?: ((...args: unknown[]) => unknown) | undefined;
81
- }, {
82
- id: string;
83
- title?: string | undefined;
84
- description?: string | undefined;
85
- icon?: any;
86
- duration?: number | undefined;
87
- closeLabel?: string | undefined;
88
- actionLabel?: string | undefined;
89
- actionAlt?: string | undefined;
90
- onAction?: ((...args: unknown[]) => unknown) | undefined;
91
- }>, "many">;
92
- scrollIntoView: z.ZodOptional<z.ZodString>;
93
- }, "strip", z.ZodTypeAny, {
94
- layoutMode: "deck" | "solo" | "fullscreen";
95
- sidebarOpen: boolean;
96
- complementarySidebarOpen: boolean;
97
- dialogOpen: boolean;
98
- popoverOpen: boolean;
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 enum LayoutAction {
154
- SET_LAYOUT = "dxos.org/plugin/layout/action/set-layout",
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
- type SetLayoutMode = IntentData<{
164
- layoutMode?: LayoutMode;
165
- revert?: boolean;
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
- type SetLayout = IntentData<{
168
- /**
169
- * Element to set the state of.
170
- */
171
- element: 'fullscreen' | 'sidebar' | 'complementary' | 'dialog' | 'popover' | 'toast';
172
- /**
173
- * Whether the element is on or off.
174
- *
175
- * If omitted, the element's state will be toggled or set based on other provided data.
176
- * For example, if `component` is provided, the state will be set to `true`.
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,KAAK,CAAC;AAExB,OAAO,E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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: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
78
- export type ActiveParts = z.infer<typeof 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 enum NavigationAction {
150
- OPEN = "dxos.org/plugin/navigation/action/open",
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
- type Open = IntentData<{
165
- activeParts: ActiveParts;
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
- type AddToActive = IntentData<{
171
- part: LayoutPart;
172
- id: string;
173
- scrollIntoView?: boolean;
174
- pivotId?: string;
175
- positioning?: 'start' | 'end';
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
- * A subtractive overlay to apply to `location.active` (i.e. the result is a subtraction from the previous active of the argument)
195
+ * The active parts to directly set, to be used when working with URLs or restoring a specific state.
179
196
  */
180
- type Close = IntentData<{
181
- activeParts: ActiveParts;
182
- noToggle?: boolean;
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
- * The active parts to directly set, to be used when working with URLs or restoring a specific state.
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
- type Set = IntentData<{
188
- activeParts: ActiveParts;
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
- type Adjust = IntentData<LayoutAdjustment>;
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;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,QAAA,MAAM,iBAAiB;;;GAAoE,CAAC;AAC5F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAIlE,QAAA,MAAM,gBAAgB,sIAMrB,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,QAAA,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CAAC;AAMF,eAAO,MAAM,iBAAiB,+BAA+B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,sCAAgC,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 PluginContext } from './PluginContext';
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<HostPluginProvides>;
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;AAK9C,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC/E,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;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,aAAa,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,eAAe,WAAY,MAAM,2CACwD,CAAC;AAIvG;;GAEG;AACH,eAAO,MAAM,UAAU,8DAOpB,gBAAgB,KAAG,gBAAgB,CAAC,kBAAkB,CAwCxD,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,4 +1,6 @@
1
+ import { HostPlugin } from './HostPlugin';
1
2
  export * from './plugin';
2
3
  export * from './HostPlugin';
3
4
  export * from './PluginContext';
5
+ export default HostPlugin;
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -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?: (plugins: Plugin[]) => Promise<void>;
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,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,MAAM,CAAC,SAAS,GAAG,EAAE,IAAI;IACnC,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,SAAS,GAAG,EAAE,EAAE,mBA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