@dxos/app-framework 0.7.5-main.9d2a38b → 0.7.5-main.e94eead

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 (205) hide show
  1. package/dist/lib/browser/app-graph-builder-S4MYSHQA.mjs +137 -0
  2. package/dist/lib/browser/app-graph-builder-S4MYSHQA.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-GNLU3GAU.mjs → chunk-BCMEJONP.mjs} +660 -823
  4. package/dist/lib/browser/chunk-BCMEJONP.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-QS4J6O47.mjs +285 -0
  6. package/dist/lib/browser/chunk-QS4J6O47.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-SRZH2PQ2.mjs +32 -0
  8. package/dist/lib/browser/chunk-SRZH2PQ2.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +57 -74
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/intent-dispatcher-GFBH7T2J.mjs +11 -0
  12. package/dist/lib/browser/intent-dispatcher-GFBH7T2J.mjs.map +7 -0
  13. package/dist/lib/browser/intent-resolver-KAFM7CQH.mjs +39 -0
  14. package/dist/lib/browser/intent-resolver-KAFM7CQH.mjs.map +7 -0
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/store-L3VRR7II.mjs +29 -0
  17. package/dist/lib/browser/store-L3VRR7II.mjs.map +7 -0
  18. package/dist/lib/browser/testing/index.mjs +13 -3
  19. package/dist/lib/browser/testing/index.mjs.map +3 -3
  20. package/dist/lib/browser/worker.mjs +77 -0
  21. package/dist/lib/browser/worker.mjs.map +7 -0
  22. package/dist/lib/node/app-graph-builder-VMHWFCTP.cjs +146 -0
  23. package/dist/lib/node/app-graph-builder-VMHWFCTP.cjs.map +7 -0
  24. package/dist/lib/node/chunk-7Y6KJ3OK.cjs +1466 -0
  25. package/dist/lib/node/chunk-7Y6KJ3OK.cjs.map +7 -0
  26. package/dist/lib/node/chunk-B65NJEIJ.cjs +308 -0
  27. package/dist/lib/node/chunk-B65NJEIJ.cjs.map +7 -0
  28. package/dist/lib/node/chunk-VCIHQZSN.cjs +58 -0
  29. package/dist/lib/node/chunk-VCIHQZSN.cjs.map +7 -0
  30. package/dist/lib/node/index.cjs +106 -118
  31. package/dist/lib/node/index.cjs.map +4 -4
  32. package/dist/lib/node/intent-dispatcher-PRCC4KZT.cjs +32 -0
  33. package/dist/lib/node/intent-dispatcher-PRCC4KZT.cjs.map +7 -0
  34. package/dist/lib/node/intent-resolver-OZDKCHPW.cjs +46 -0
  35. package/dist/lib/node/intent-resolver-OZDKCHPW.cjs.map +7 -0
  36. package/dist/lib/node/meta.json +1 -1
  37. package/dist/lib/node/store-BVUKNVKL.cjs +44 -0
  38. package/dist/lib/node/store-BVUKNVKL.cjs.map +7 -0
  39. package/dist/lib/node/testing/index.cjs +18 -8
  40. package/dist/lib/node/testing/index.cjs.map +3 -3
  41. package/dist/lib/node/worker.cjs +99 -0
  42. package/dist/lib/node/worker.cjs.map +7 -0
  43. package/dist/lib/node-esm/app-graph-builder-XHI5IIXQ.mjs +138 -0
  44. package/dist/lib/node-esm/app-graph-builder-XHI5IIXQ.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-CBT75GCX.mjs +34 -0
  46. package/dist/lib/node-esm/chunk-CBT75GCX.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-JDAHZRYQ.mjs +286 -0
  48. package/dist/lib/node-esm/chunk-JDAHZRYQ.mjs.map +7 -0
  49. package/dist/lib/node-esm/{chunk-KPMTPXQI.mjs → chunk-TVIR2PHY.mjs} +660 -823
  50. package/dist/lib/node-esm/chunk-TVIR2PHY.mjs.map +7 -0
  51. package/dist/lib/node-esm/index.mjs +57 -74
  52. package/dist/lib/node-esm/index.mjs.map +4 -4
  53. package/dist/lib/node-esm/intent-dispatcher-LGACN32C.mjs +12 -0
  54. package/dist/lib/node-esm/intent-dispatcher-LGACN32C.mjs.map +7 -0
  55. package/dist/lib/node-esm/intent-resolver-RBNG76ZX.mjs +40 -0
  56. package/dist/lib/node-esm/intent-resolver-RBNG76ZX.mjs.map +7 -0
  57. package/dist/lib/node-esm/meta.json +1 -1
  58. package/dist/lib/node-esm/store-PHTOEREN.mjs +30 -0
  59. package/dist/lib/node-esm/store-PHTOEREN.mjs.map +7 -0
  60. package/dist/lib/node-esm/testing/index.mjs +13 -3
  61. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  62. package/dist/lib/node-esm/worker.mjs +78 -0
  63. package/dist/lib/node-esm/worker.mjs.map +7 -0
  64. package/dist/types/src/App.d.ts +2 -2
  65. package/dist/types/src/App.d.ts.map +1 -1
  66. package/dist/types/src/common/capabilities.d.ts +88 -124
  67. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  68. package/dist/types/src/common/events.d.ts +22 -11
  69. package/dist/types/src/common/events.d.ts.map +1 -1
  70. package/dist/types/src/common/file.d.ts +1 -1
  71. package/dist/types/src/common/file.d.ts.map +1 -1
  72. package/dist/types/src/common/graph.d.ts +2 -2
  73. package/dist/types/src/common/graph.d.ts.map +1 -1
  74. package/dist/types/src/common/index.d.ts +0 -1
  75. package/dist/types/src/common/index.d.ts.map +1 -1
  76. package/dist/types/src/common/layout.d.ts +218 -121
  77. package/dist/types/src/common/layout.d.ts.map +1 -1
  78. package/dist/types/src/common/surface.d.ts +3 -3
  79. package/dist/types/src/common/surface.d.ts.map +1 -1
  80. package/dist/types/src/common/translations.d.ts +7 -7
  81. package/dist/types/src/common/translations.d.ts.map +1 -1
  82. package/dist/types/src/core/capabilities.d.ts +6 -2
  83. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  84. package/dist/types/src/core/manager.d.ts +2 -9
  85. package/dist/types/src/core/manager.d.ts.map +1 -1
  86. package/dist/types/src/core/plugin.d.ts +5 -2
  87. package/dist/types/src/core/plugin.d.ts.map +1 -1
  88. package/dist/types/src/playground/debug/Debug.d.ts +2 -3
  89. package/dist/types/src/playground/debug/Debug.d.ts.map +1 -1
  90. package/dist/types/src/playground/debug/plugin.d.ts +1 -1
  91. package/dist/types/src/playground/debug/plugin.d.ts.map +1 -1
  92. package/dist/types/src/playground/generator/Main.d.ts +2 -3
  93. package/dist/types/src/playground/generator/Main.d.ts.map +1 -1
  94. package/dist/types/src/playground/generator/Toolbar.d.ts +2 -3
  95. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
  96. package/dist/types/src/playground/generator/generator.d.ts +5 -3
  97. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  98. package/dist/types/src/playground/generator/plugin.d.ts +1 -1
  99. package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
  100. package/dist/types/src/playground/layout/Layout.d.ts +2 -2
  101. package/dist/types/src/playground/layout/Layout.d.ts.map +1 -1
  102. package/dist/types/src/playground/layout/plugin.d.ts +1 -1
  103. package/dist/types/src/playground/layout/plugin.d.ts.map +1 -1
  104. package/dist/types/src/playground/logger/Toolbar.d.ts +2 -3
  105. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
  106. package/dist/types/src/playground/logger/plugin.d.ts +1 -1
  107. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
  108. package/dist/types/src/playground/logger/schema.d.ts +1 -1
  109. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  110. package/dist/types/src/playground/playground.stories.d.ts +2 -3
  111. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  112. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +1 -1
  113. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
  114. package/dist/types/src/plugin-intent/actions.d.ts +1 -1
  115. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  116. package/dist/types/src/plugin-intent/index.d.ts +0 -1
  117. package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
  118. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +27 -20
  119. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  120. package/dist/types/src/plugin-intent/intent.d.ts +3 -3
  121. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  122. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +1 -1
  123. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
  124. package/dist/types/src/plugin-settings/actions.d.ts +11 -1
  125. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  126. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +197 -0
  127. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -0
  128. package/dist/types/src/plugin-settings/intent-resolver.d.ts +4 -0
  129. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -0
  130. package/dist/types/src/plugin-settings/store.d.ts +5 -0
  131. package/dist/types/src/plugin-settings/store.d.ts.map +1 -0
  132. package/dist/types/src/plugin-settings/translations.d.ts +11 -0
  133. package/dist/types/src/plugin-settings/translations.d.ts.map +1 -0
  134. package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
  135. package/dist/types/src/{plugin-intent → react}/IntentContext.d.ts +1 -1
  136. package/dist/types/src/react/IntentContext.d.ts.map +1 -0
  137. package/dist/types/src/react/Surface.d.ts.map +1 -1
  138. package/dist/types/src/react/Surface.stories.d.ts +15 -0
  139. package/dist/types/src/react/Surface.stories.d.ts.map +1 -0
  140. package/dist/types/src/react/common.d.ts +13 -0
  141. package/dist/types/src/react/common.d.ts.map +1 -0
  142. package/dist/types/src/react/index.d.ts +2 -0
  143. package/dist/types/src/react/index.d.ts.map +1 -1
  144. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  145. package/dist/types/src/react/useIntentResolver.d.ts +3 -0
  146. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -0
  147. package/dist/types/src/testing/withPluginManager.d.ts +6 -4
  148. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  149. package/dist/types/src/worker.d.ts +4 -0
  150. package/dist/types/src/worker.d.ts.map +1 -0
  151. package/package.json +29 -21
  152. package/project.json +4 -3
  153. package/src/App.tsx +17 -15
  154. package/src/common/capabilities.ts +30 -11
  155. package/src/common/events.ts +16 -2
  156. package/src/common/file.ts +1 -1
  157. package/src/common/graph.ts +2 -2
  158. package/src/common/index.ts +0 -1
  159. package/src/common/layout.ts +207 -126
  160. package/src/common/surface.ts +2 -2
  161. package/src/common/translations.ts +7 -8
  162. package/src/core/capabilities.ts +16 -7
  163. package/src/core/manager.test.ts +22 -73
  164. package/src/core/manager.ts +105 -91
  165. package/src/core/plugin.ts +6 -3
  166. package/src/playground/debug/plugin.ts +1 -1
  167. package/src/playground/generator/Toolbar.tsx +11 -11
  168. package/src/playground/generator/generator.ts +25 -0
  169. package/src/playground/generator/plugin.ts +6 -1
  170. package/src/playground/layout/plugin.ts +1 -1
  171. package/src/playground/logger/Toolbar.tsx +2 -1
  172. package/src/playground/logger/plugin.ts +7 -4
  173. package/src/playground/logger/schema.ts +1 -1
  174. package/src/plugin-intent/IntentPlugin.tsx +3 -43
  175. package/src/plugin-intent/actions.ts +1 -1
  176. package/src/plugin-intent/errors.ts +1 -1
  177. package/src/plugin-intent/index.ts +0 -1
  178. package/src/plugin-intent/intent-dispatcher.test.ts +48 -29
  179. package/src/plugin-intent/intent-dispatcher.ts +81 -42
  180. package/src/plugin-intent/intent.ts +5 -5
  181. package/src/plugin-settings/SettingsPlugin.ts +19 -13
  182. package/src/plugin-settings/actions.ts +11 -1
  183. package/src/plugin-settings/app-graph-builder.ts +122 -0
  184. package/src/plugin-settings/intent-resolver.ts +34 -0
  185. package/src/plugin-settings/store.ts +30 -0
  186. package/src/plugin-settings/translations.ts +17 -0
  187. package/src/{plugin-intent → react}/IntentContext.tsx +2 -2
  188. package/src/react/Surface.stories.tsx +96 -0
  189. package/src/react/Surface.tsx +11 -8
  190. package/src/react/common.ts +12 -0
  191. package/src/react/index.ts +2 -0
  192. package/src/react/useCapabilities.ts +1 -0
  193. package/src/react/useIntentResolver.ts +22 -0
  194. package/src/testing/withPluginManager.tsx +28 -4
  195. package/src/worker.ts +11 -0
  196. package/tsconfig.json +7 -13
  197. package/dist/lib/browser/chunk-GNLU3GAU.mjs.map +0 -7
  198. package/dist/lib/node/chunk-FBA4BB3J.cjs +0 -1639
  199. package/dist/lib/node/chunk-FBA4BB3J.cjs.map +0 -7
  200. package/dist/lib/node-esm/chunk-KPMTPXQI.mjs.map +0 -7
  201. package/dist/types/src/common/navigation.d.ts +0 -241
  202. package/dist/types/src/common/navigation.d.ts.map +0 -1
  203. package/dist/types/src/plugin-intent/IntentContext.d.ts.map +0 -1
  204. package/src/common/navigation.ts +0 -199
  205. /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -1,64 +1,106 @@
1
- import { S } from '@dxos/echo-schema';
2
- export declare const Toast: S.Struct<{
3
- id: typeof S.String;
4
- title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
5
- ns: typeof S.String;
6
- count: S.optional<typeof S.Number>;
7
- }>>]>>]>>;
8
- description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
9
- ns: typeof S.String;
10
- count: S.optional<typeof S.Number>;
11
- }>>]>>]>>;
12
- icon: S.optional<typeof S.String>;
13
- duration: S.optional<typeof S.Number>;
14
- closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
15
- ns: typeof S.String;
16
- count: S.optional<typeof S.Number>;
17
- }>>]>>]>>;
18
- actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
19
- ns: typeof S.String;
20
- count: S.optional<typeof S.Number>;
21
- }>>]>>]>>;
22
- actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
23
- ns: typeof S.String;
24
- count: S.optional<typeof S.Number>;
25
- }>>]>>]>>;
26
- onAction: S.optional<typeof S.Any>;
27
- }>;
28
- export type Toast = S.Schema.Type<typeof Toast>;
1
+ import { Schema as S } from '@effect/schema';
2
+ export declare const LAYOUT_PLUGIN = "dxos.org/plugin/layout";
3
+ export declare const LAYOUT_ACTION = "dxos.org/plugin/layout/action";
29
4
  /**
30
- * Basic state provided by a layout plugin.
31
- *
32
- * Layout provides the state of global UI landmarks, such as the sidebar, dialog, and popover.
33
- * Generally only one dialog or popover should be open at a time, a layout plugin should manage this.
34
- * For other landmarks, such as toasts, rendering them in the layout prevents them from unmounting when navigating.
5
+ * Expected payload for layout actions.
35
6
  */
36
- declare const LayoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
37
- export declare const isLayoutMode: (value: any) => value is LayoutMode;
38
- export type LayoutMode = S.Schema.Type<typeof LayoutMode>;
39
- export declare const Layout: S.mutable<S.Struct<{
40
- layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
41
- sidebarOpen: typeof S.Boolean;
42
- complementarySidebarOpen: typeof S.Boolean;
43
- /**
44
- * @deprecated Data to be passed to the complementary sidebar Surface.
45
- */
46
- complementarySidebarContent: S.optional<typeof S.Any>;
47
- dialogOpen: typeof S.Boolean;
48
- /**
49
- * Data to be passed to the dialog Surface.
50
- */
51
- dialogContent: S.optional<typeof S.Any>;
52
- dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
53
- dialogType: S.optional<S.Literal<["default", "alert"]>>;
54
- popoverOpen: typeof S.Boolean;
7
+ export declare namespace LayoutAction {
8
+ export const UPDATE_LAYOUT = "dxos.org/plugin/layout/action/update-layout";
9
+ const UpdateLayout_base: S.TaggedClass<UpdateLayout, "dxos.org/plugin/layout/action/update-layout", {
10
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
11
+ } & {
12
+ input: S.Struct<{
13
+ part: S.SchemaClass<string, string, never>;
14
+ subject: S.optional<S.SchemaClass<any, any, never>>;
15
+ options: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
16
+ }>;
17
+ output: typeof S.Void;
18
+ }>;
55
19
  /**
56
- * Data to be passed to the popover Surface.
20
+ * Generic layout action.
57
21
  */
58
- popoverContent: S.optional<typeof S.Any>;
59
- popoverAnchorId: S.optional<typeof S.String>;
60
- toasts: S.mutable<S.Array$<S.Struct<{
61
- id: typeof S.String;
22
+ export class UpdateLayout extends UpdateLayout_base {
23
+ }
24
+ const SetLayoutMode_base: S.TaggedClass<SetLayoutMode, "dxos.org/plugin/layout/action/update-layout", {
25
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
26
+ } & {
27
+ input: S.Struct<{
28
+ part: S.Literal<["mode"]>;
29
+ subject: S.optional<S.SchemaClass<string, string, never>>;
30
+ options: S.Union<[S.Struct<{
31
+ mode: S.SchemaClass<string, string, never>;
32
+ }>, S.Struct<{
33
+ revert: S.SchemaClass<boolean, boolean, never>;
34
+ }>]>;
35
+ }>;
36
+ output: typeof S.Void;
37
+ }>;
38
+ export class SetLayoutMode extends SetLayoutMode_base {
39
+ }
40
+ const UpdateSidebar_base: S.TaggedClass<UpdateSidebar, "dxos.org/plugin/layout/action/update-layout", {
41
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
42
+ } & {
43
+ input: S.Struct<{
44
+ part: S.Literal<["sidebar"]>;
45
+ subject: S.optional<S.SchemaClass<string, string, never>>;
46
+ options: S.optional<S.Struct<{
47
+ state: S.Literal<["closed", "collapsed", "expanded"]>;
48
+ }>>;
49
+ }>;
50
+ output: typeof S.Void;
51
+ }>;
52
+ export class UpdateSidebar extends UpdateSidebar_base {
53
+ }
54
+ const UpdateComplementary_base: S.TaggedClass<UpdateComplementary, "dxos.org/plugin/layout/action/update-layout", {
55
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
56
+ } & {
57
+ input: S.Struct<{
58
+ part: S.Literal<["complementary"]>;
59
+ subject: S.optional<S.SchemaClass<string, string, never>>;
60
+ options: S.optional<S.Struct<{
61
+ state: S.Literal<["closed", "collapsed", "expanded"]>;
62
+ }>>;
63
+ }>;
64
+ output: typeof S.Void;
65
+ }>;
66
+ export class UpdateComplementary extends UpdateComplementary_base {
67
+ }
68
+ const UpdateDialog_base: S.TaggedClass<UpdateDialog, "dxos.org/plugin/layout/action/update-layout", {
69
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
70
+ } & {
71
+ input: S.Struct<{
72
+ part: S.Literal<["dialog"]>;
73
+ subject: S.optional<S.SchemaClass<string, string, never>>;
74
+ options: S.Struct<{
75
+ state: S.optional<S.SchemaClass<boolean, boolean, never>>;
76
+ blockAlign: S.optional<S.Literal<["start", "center", "end"]>>;
77
+ type: S.optional<S.Literal<["default", "alert"]>>;
78
+ props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
79
+ }>;
80
+ }>;
81
+ output: typeof S.Void;
82
+ }>;
83
+ export class UpdateDialog extends UpdateDialog_base {
84
+ }
85
+ const UpdatePopover_base: S.TaggedClass<UpdatePopover, "dxos.org/plugin/layout/action/update-layout", {
86
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
87
+ } & {
88
+ input: S.Struct<{
89
+ part: S.Literal<["popover"]>;
90
+ subject: S.optional<S.SchemaClass<string, string, never>>;
91
+ options: S.Struct<{
92
+ anchorId: S.SchemaClass<string, string, never>;
93
+ side: S.optional<S.Literal<["top", "right", "bottom", "left"]>>;
94
+ state: S.optional<S.SchemaClass<boolean, boolean, never>>;
95
+ props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
96
+ }>;
97
+ }>;
98
+ output: typeof S.Void;
99
+ }>;
100
+ export class UpdatePopover extends UpdatePopover_base {
101
+ }
102
+ export const Toast: S.Struct<{
103
+ id: S.SchemaClass<string, string, never>;
62
104
  title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
63
105
  ns: typeof S.String;
64
106
  count: S.optional<typeof S.Number>;
@@ -67,8 +109,8 @@ export declare const Layout: S.mutable<S.Struct<{
67
109
  ns: typeof S.String;
68
110
  count: S.optional<typeof S.Number>;
69
111
  }>>]>>]>>;
70
- icon: S.optional<typeof S.String>;
71
- duration: S.optional<typeof S.Number>;
112
+ icon: S.optional<S.SchemaClass<string, string, never>>;
113
+ duration: S.optional<S.SchemaClass<number, number, never>>;
72
114
  closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
73
115
  ns: typeof S.String;
74
116
  count: S.optional<typeof S.Number>;
@@ -81,85 +123,140 @@ export declare const Layout: S.mutable<S.Struct<{
81
123
  ns: typeof S.String;
82
124
  count: S.optional<typeof S.Number>;
83
125
  }>>]>>]>>;
84
- onAction: S.optional<typeof S.Any>;
85
- }>>>;
86
- /**
87
- * The identifier of a component to scroll into view when it is mounted.
88
- */
89
- scrollIntoView: S.optional<typeof S.String>;
90
- }>>;
91
- export type Layout = S.Schema.Type<typeof Layout>;
92
- export declare const LAYOUT_PLUGIN = "dxos.org/plugin/layout";
93
- export declare const LAYOUT_ACTION = "dxos.org/plugin/layout/action";
94
- /**
95
- * Expected payload for layout actions.
96
- */
97
- export declare namespace LayoutAction {
98
- const SetLayout_base: S.TaggedClass<SetLayout, "dxos.org/plugin/layout/action/set-layout", {
99
- readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout">;
126
+ onAction: S.optional<S.SchemaClass<any, any, never>>;
127
+ }>;
128
+ export interface Toast extends Omit<S.Schema.Type<typeof Toast>, 'onAction'> {
129
+ onAction?: () => void;
130
+ }
131
+ const AddToast_base: S.TaggedClass<AddToast, "dxos.org/plugin/layout/action/update-layout", {
132
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
100
133
  } & {
101
134
  input: S.Struct<{
102
- /**
103
- * Element to set the state of.
104
- */
105
- element: S.Literal<["fullscreen", "sidebar", "complementary", "dialog", "popover", "toast"]>;
106
- /**
107
- * Whether the element is on or off.
108
- *
109
- * If omitted, the element's state will be toggled or set based on other provided data.
110
- * For example, if `component` is provided, the state will be set to `true`.
111
- */
112
- state: S.optional<typeof S.Boolean>;
113
- /**
114
- * Component to render in the dialog or popover.
115
- */
116
- component: S.optional<typeof S.String>;
117
- /**
118
- * Data to be passed to the dialog or popover Surface.
119
- */
120
- subject: S.optional<typeof S.Any>;
121
- /**
122
- * Anchor ID for the popover.
123
- */
124
- anchorId: S.optional<typeof S.String>;
125
- /**
126
- * Block alignment for the dialog.
127
- */
128
- dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
129
- /**
130
- * Type of dialog.
131
- */
132
- dialogType: S.optional<S.Literal<["default", "alert"]>>;
135
+ part: S.Literal<["toast"]>;
136
+ subject: S.Struct<{
137
+ id: S.SchemaClass<string, string, never>;
138
+ title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
139
+ ns: typeof S.String;
140
+ count: S.optional<typeof S.Number>;
141
+ }>>]>>]>>;
142
+ description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
143
+ ns: typeof S.String;
144
+ count: S.optional<typeof S.Number>;
145
+ }>>]>>]>>;
146
+ icon: S.optional<S.SchemaClass<string, string, never>>;
147
+ duration: S.optional<S.SchemaClass<number, number, never>>;
148
+ closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
149
+ ns: typeof S.String;
150
+ count: S.optional<typeof S.Number>;
151
+ }>>]>>]>>;
152
+ actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
153
+ ns: typeof S.String;
154
+ count: S.optional<typeof S.Number>;
155
+ }>>]>>]>>;
156
+ actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
157
+ ns: typeof S.String;
158
+ count: S.optional<typeof S.Number>;
159
+ }>>]>>]>>;
160
+ onAction: S.optional<S.SchemaClass<any, any, never>>;
161
+ }>;
133
162
  }>;
134
163
  output: typeof S.Void;
135
164
  }>;
136
- export class SetLayout extends SetLayout_base {
165
+ export class AddToast extends AddToast_base {
137
166
  }
138
- const SetLayoutMode_base: S.TaggedClass<SetLayoutMode, "dxos.org/plugin/layout/action/set-layout-mode", {
139
- readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout-mode">;
167
+ const SwitchWorkspace_base: S.TaggedClass<SwitchWorkspace, "dxos.org/plugin/layout/action/update-layout", {
168
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
140
169
  } & {
141
- input: S.Union<[S.Struct<{
142
- layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
143
- }>, S.Struct<{
144
- revert: S.Literal<[true]>;
145
- }>]>;
170
+ input: S.Struct<{
171
+ part: S.Literal<["workspace"]>;
172
+ subject: S.SchemaClass<string, string, never>;
173
+ }>;
146
174
  output: typeof S.Void;
147
175
  }>;
148
- export class SetLayoutMode extends SetLayoutMode_base {
176
+ export class SwitchWorkspace extends SwitchWorkspace_base {
177
+ }
178
+ const RevertWorkspace_base: S.TaggedClass<RevertWorkspace, "dxos.org/plugin/layout/action/update-layout", {
179
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
180
+ } & {
181
+ input: S.Struct<{
182
+ part: S.Literal<["workspace"]>;
183
+ options: S.Struct<{
184
+ revert: S.Literal<[true]>;
185
+ }>;
186
+ }>;
187
+ output: typeof S.Void;
188
+ }>;
189
+ export class RevertWorkspace extends RevertWorkspace_base {
190
+ }
191
+ const Open_base: S.TaggedClass<Open, "dxos.org/plugin/layout/action/update-layout", {
192
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
193
+ } & {
194
+ input: S.Struct<{
195
+ part: S.Literal<["main"]>;
196
+ subject: S.Array$<S.SchemaClass<string, string, never>>;
197
+ options: S.optional<S.Struct<{
198
+ state: S.optional<S.Literal<[true]>>;
199
+ key: S.optional<S.SchemaClass<string, string, never>>;
200
+ scrollIntoView: S.optional<S.SchemaClass<boolean, boolean, never>>;
201
+ pivotId: S.optional<S.SchemaClass<string, string, never>>;
202
+ positioning: S.optional<S.Union<[S.Literal<["start"]>, S.Literal<["end"]>]>>;
203
+ }>>;
204
+ }>;
205
+ output: typeof S.Void;
206
+ }>;
207
+ export class Open extends Open_base {
208
+ }
209
+ const Set_base: S.TaggedClass<Set, "dxos.org/plugin/layout/action/update-layout", {
210
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
211
+ } & {
212
+ input: S.Struct<{
213
+ part: S.Literal<["main"]>;
214
+ subject: S.Array$<S.SchemaClass<string, string, never>>;
215
+ options: S.Struct<{
216
+ override: S.Literal<[true]>;
217
+ }>;
218
+ }>;
219
+ output: typeof S.Void;
220
+ }>;
221
+ export class Set extends Set_base {
222
+ }
223
+ const Close_base: S.TaggedClass<Close, "dxos.org/plugin/layout/action/update-layout", {
224
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
225
+ } & {
226
+ input: S.Struct<{
227
+ part: S.Literal<["main"]>;
228
+ subject: S.Array$<S.SchemaClass<string, string, never>>;
229
+ options: S.Struct<{
230
+ state: S.Literal<[false]>;
231
+ }>;
232
+ }>;
233
+ output: typeof S.Void;
234
+ }>;
235
+ export class Close extends Close_base {
149
236
  }
150
- const ScrollIntoView_base: S.TaggedClass<ScrollIntoView, "dxos.org/plugin/layout/action/scroll-into-view", {
151
- readonly _tag: S.tag<"dxos.org/plugin/layout/action/scroll-into-view">;
237
+ const ScrollIntoView_base: S.TaggedClass<ScrollIntoView, "dxos.org/plugin/layout/action/update-layout", {
238
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
152
239
  } & {
153
240
  input: S.Struct<{
154
- id: S.optional<typeof S.String>;
155
- cursor: S.optional<typeof S.String>;
156
- ref: S.optional<typeof S.String>;
241
+ part: S.Literal<["current"]>;
242
+ subject: S.optional<S.SchemaClass<string, string, never>>;
243
+ options: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
157
244
  }>;
158
245
  output: typeof S.Void;
159
246
  }>;
160
247
  export class ScrollIntoView extends ScrollIntoView_base {
161
248
  }
249
+ const Expose_base: S.TaggedClass<Expose, "dxos.org/plugin/layout/action/update-layout", {
250
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
251
+ } & {
252
+ input: S.Struct<{
253
+ part: S.Literal<["navigation"]>;
254
+ subject: S.SchemaClass<string, string, never>;
255
+ }>;
256
+ output: typeof S.Void;
257
+ }>;
258
+ export class Expose extends Expose_base {
259
+ }
162
260
  export {};
163
261
  }
164
- export {};
165
262
  //# sourceMappingURL=layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAQtC,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;AAMlD,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AAO,KAAK,CAAC,EAAE,UAAU,CAAC;QAC1E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;KACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAED,MAAM,OAAO,QAAS,SAAQ,aAM5B;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,eAAgB,SAAQ,oBAMnC;KAAG;;;;;;;;;;;;IAEL,MAAM,OAAO,eAAgB,SAAQ,oBAQnC;KAAG;;;;;;;;;;;;;;;;;IAEL,MAAM,OAAO,IAAK,SAAQ,SAsBxB;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,GAAI,SAAQ,QASvB;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,KAAM,SAAQ,UASzB;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAWlC;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAM1B;KAAG;;CACN"}
@@ -1,5 +1,5 @@
1
1
  import { type JSX, type ForwardedRef, type PropsWithChildren, type ReactNode } from 'react';
2
- import { type GuardedType, type MakeOptional, type Disposition } from '@dxos/util';
2
+ import { type GuardedType, type MakeOptional, type Position } from '@dxos/util';
3
3
  import { type ErrorBoundary } from '../react';
4
4
  /**
5
5
  * SurfaceProps are the props that are passed to the Surface component.
@@ -53,14 +53,14 @@ export type SurfaceComponent<T extends Record<string, any> = Record<string, unkn
53
53
  export type SurfaceDefinition<T extends Record<string, any> = any> = Readonly<{
54
54
  id: string;
55
55
  role: string | string[];
56
- disposition?: Disposition;
56
+ position?: Position;
57
57
  filter?: (data: Record<string, unknown>) => data is T;
58
58
  component: SurfaceComponent<GuardedType<SurfaceDefinition<T>['filter']>>;
59
59
  }>;
60
60
  export declare const createSurface: <T extends Record<string, any> = any>(definition: SurfaceDefinition<T>) => Readonly<{
61
61
  id: string;
62
62
  role: string | string[];
63
- disposition?: Disposition;
63
+ position?: Position;
64
64
  filter?: ((data: Record<string, unknown>) => data is T) | undefined;
65
65
  component: SurfaceComponent<T>;
66
66
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../../src/common/surface.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC;IACpG;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAE9C;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC,GACA,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG;IACjD;;;OAGG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAGJ,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC/E;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;IAER;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,C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AAM,GAAG,OAAO,CAAA;CAAE,CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CACtF,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAC/B,YAAY,EAAE,YAAY,CAAC,WAAW,CAAC,KACpC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,IAAI,QAAQ,CAAC;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;IACtD,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;CAC1E,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,iBAAiB,CAAC,CAAC,CAAC;QAP7F,MAAM;UACJ,MAAM,GAAG,MAAM,EAAE;eACZ,QAAQ;qBACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK;;EAI2D,CAAC"}
@@ -1,11 +1,11 @@
1
- import { z } from 'zod';
2
- export declare const ResourceKey: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>;
3
- export type ResourceKey = z.infer<typeof ResourceKey>;
4
- export declare const ResourceLanguage: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
5
- export type ResourceLanguage = z.infer<typeof ResourceLanguage>;
1
+ import { Schema as S } from '@effect/schema';
2
+ export declare const ResourceKey: S.Union<[typeof S.String, S.Record$<typeof S.String, typeof S.Any>]>;
3
+ export type ResourceKey = S.Schema.Type<typeof ResourceKey>;
4
+ export declare const ResourceLanguage: S.Record$<typeof S.String, S.Union<[typeof S.String, S.Record$<typeof S.String, typeof S.Any>]>>;
5
+ export type ResourceLanguage = S.Schema.Type<typeof ResourceLanguage>;
6
6
  /**
7
7
  * A resource is a collection of translations for a language.
8
8
  */
9
- export declare const Resource: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
10
- export type Resource = z.infer<typeof Resource>;
9
+ export declare const Resource: S.Record$<typeof S.String, S.Record$<typeof S.String, S.Union<[typeof S.String, S.Record$<typeof S.String, typeof S.Any>]>>>;
10
+ export type Resource = S.Schema.Type<typeof Resource>;
11
11
  //# sourceMappingURL=translations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/common/translations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW,+DAA2C,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB,yFAAwB,CAAC;AACtD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,QAAQ,mHAA6B,CAAC;AACnD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/common/translations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,WAAW,sEAA+D,CAAC;AACxF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAE5D,eAAO,MAAM,gBAAgB,kGAAkD,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,QAAQ,8HAAuD,CAAC;AAC7E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -42,13 +42,17 @@ type PluginsContextOptions = {
42
42
  * Helper to define the implementation of a capability.
43
43
  */
44
44
  export declare const contributes: <T>(interfaceDef: Capability<T>["interface"], implementation: Capability<T>["implementation"], deactivate?: Capability<T>["deactivate"]) => Capability<T>;
45
- type LazyCapability<T, U> = () => Promise<{
45
+ type LoadCapability<T, U> = () => Promise<{
46
46
  default: (props: T) => MaybePromise<Capability<U>>;
47
47
  }>;
48
+ type LoadCapabilities<T> = () => Promise<{
49
+ default: (props: T) => MaybePromise<AnyCapability[]>;
50
+ }>;
51
+ type LazyCapability<T, U> = (props?: T) => Promise<() => Promise<Capability<U> | AnyCapability[]>>;
48
52
  /**
49
53
  * Helper to define a lazily loaded implementation of a capability.
50
54
  */
51
- export declare const lazy: <T, U>(c: LazyCapability<T, U>) => (props?: T) => Promise<Capability<U>>;
55
+ export declare const lazy: <T, U>(c: LoadCapability<T, U> | LoadCapabilities<T>) => LazyCapability<T, U>;
52
56
  /**
53
57
  * Context which is passed to plugins, allowing them to interact with each other.
54
58
  */
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/core/capabilities.ts"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E,KAAK,EAAE,EAAE,qBAAqB;IAkDtD;;;;OAIG;IACH,mBAAmB,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EACpC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAC7B,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,UAAU,IAAI,CAAC,GAC5D,CAAC,EAAE;IAaN;;;;;OAKG;IACH,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAClC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAC7B,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,UAAU,IAAI,CAAC,GAC5D,CAAC;IAMJ;;;OAGG;IACG,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EACxC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAC7B,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,UAAU,IAAI,CAAC,GAC1C,OAAO,CAAC,CAAC,CAAC;CAYd"}
@@ -51,12 +51,6 @@ export declare class PluginManager {
51
51
  * @reactive
52
52
  */
53
53
  get active(): ReactiveObject<readonly string[]>;
54
- /**
55
- * Ids of modules which are pending removal.
56
- *
57
- * @reactive
58
- */
59
- get pendingRemoval(): ReactiveObject<readonly string[]>;
60
54
  /**
61
55
  * Ids of events which have been fired.
62
56
  *
@@ -78,7 +72,7 @@ export declare class PluginManager {
78
72
  * Enables a plugin.
79
73
  * @param id The id of the plugin.
80
74
  */
81
- enable(id: string): boolean;
75
+ enable(id: string): Promise<boolean>;
82
76
  /**
83
77
  * Removes a plugin from the manager.
84
78
  * @param id The id of the plugin.
@@ -88,7 +82,7 @@ export declare class PluginManager {
88
82
  * Disables a plugin.
89
83
  * @param id The id of the plugin.
90
84
  */
91
- disable(id: string): boolean;
85
+ disable(id: string): Promise<boolean>;
92
86
  /**
93
87
  * Activates plugins based on the activation event.
94
88
  * @param event The activation event.
@@ -117,7 +111,6 @@ export declare class PluginManager {
117
111
  private _getActiveModulesByEvent;
118
112
  private _getInactiveModulesByEvent;
119
113
  private _setPendingResetByModule;
120
- private _activate;
121
114
  private _activateModule;
122
115
  private _deactivate;
123
116
  private _deactivateModule;
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/core/manager.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAsB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,KAAK,eAAe,EAAgC,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAO1D,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,YAAY,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAkBF,qBAAa,aAAa;IACxB,QAAQ,CAAC,UAAU;eAAsB,MAAM;eAAS,YAAY,GAAG,WAAW,GAAG,OAAO;gBAAU,GAAG;OAAM;IAE/G,QAAQ,CAAC,OAAO,iBAGb;IAEH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAuC;IACrE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsC;gBAExD,EACV,YAAY,EACZ,OAAY,EACZ,IAA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AIxC;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxD,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,0BAA0B;IAIlC,OAAO,CAAC,wBAAwB;IAsFhC,OAAO,CAAC,eAAe;IAwCvB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,iBAAiB;IAkCzB,OAAO,CAAC,MAAM;CAiBf"}
@@ -1,4 +1,3 @@
1
- import { type Effect } from 'effect';
2
1
  import { type MaybePromise } from '@dxos/util';
3
2
  import { type AnyCapability, type PluginsContext } from './capabilities';
4
3
  import { type ActivationEvent, type ActivationEvents } from './events';
@@ -26,7 +25,7 @@ interface PluginModuleInterface {
26
25
  * @param context The plugin context.
27
26
  * @returns The capabilities of the module.
28
27
  */
29
- activate: (context: PluginsContext) => MaybePromise<AnyCapability | AnyCapability[]> | Effect.Effect<AnyCapability | AnyCapability[], Error>;
28
+ activate: (context: PluginsContext) => MaybePromise<AnyCapability | AnyCapability[]> | Promise<() => Promise<AnyCapability | AnyCapability[]>>;
30
29
  }
31
30
  /**
32
31
  * A unit of containment of modular functionality that can be provided to an application.
@@ -69,6 +68,10 @@ export type PluginMeta = {
69
68
  * URL of source code.
70
69
  */
71
70
  source?: string;
71
+ /**
72
+ * URL of screenshot.
73
+ */
74
+ screenshots?: string[];
72
75
  /**
73
76
  * Tags to help categorize the plugin.
74
77
  */
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC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.Element;
4
- declare const _default: () => import("../../core").Capability<Capabilities.ReactSurface>;
2
+ export declare const Debug: () => import("react/jsx-runtime").JSX.Element;
3
+ declare const _default: () => import("../..").Capability<Capabilities.ReactSurface>;
5
4
  export default _default;
6
5
  //# sourceMappingURL=Debug.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Debug.d.ts","sourceRoot":"","sources":["../../../../../src/playground/debug/Debug.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAiB,MAAM,cAAc,CAAC;AAI3D,eAAO,MAAM,KAAK,yBAgBjB,CAAC;;AAEF,wBAQI"}
1
+ {"version":3,"file":"Debug.d.ts","sourceRoot":"","sources":["../../../../../src/playground/debug/Debug.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAiB,MAAM,cAAc,CAAC;AAI3D,eAAO,MAAM,KAAK,+CAgBjB,CAAC;;AAEF,wBAQI"}
@@ -1,2 +1,2 @@
1
- export declare const DebugPlugin: () => import("../../core").Plugin;
1
+ export declare const DebugPlugin: () => import("../..").Plugin;
2
2
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../src/playground/debug/plugin.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,mCAOpB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../src/playground/debug/plugin.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,8BAOpB,CAAC"}
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import { Capabilities } from '../../common';
3
- export declare const Main: () => React.JSX.Element;
4
- declare const _default: () => import("../../core").Capability<Capabilities.ReactSurface>;
2
+ export declare const Main: () => import("react/jsx-runtime").JSX.Element;
3
+ declare const _default: () => import("../..").Capability<Capabilities.ReactSurface>;
5
4
  export default _default;
6
5
  //# sourceMappingURL=Main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/playground/generator/Main.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAiC5C,eAAO,MAAM,IAAI,yBAsBhB,CAAC;;AAEF,wBAKK"}
1
+ {"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/playground/generator/Main.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAiC5C,eAAO,MAAM,IAAI,+CAsBhB,CAAC;;AAEF,wBAKK"}