@dxos/app-framework 0.7.4-staging.f7e8224 → 0.7.5-feature-compute.4d9d99a

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 (327) hide show
  1. package/dist/lib/browser/chunk-EGGZVV7Q.mjs +1595 -0
  2. package/dist/lib/browser/chunk-EGGZVV7Q.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +136 -527
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +67 -0
  7. package/dist/lib/browser/testing/index.mjs.map +7 -0
  8. package/dist/lib/node/chunk-UBX6GP2N.cjs +1639 -0
  9. package/dist/lib/node/chunk-UBX6GP2N.cjs.map +7 -0
  10. package/dist/lib/node/index.cjs +141 -551
  11. package/dist/lib/node/index.cjs.map +4 -4
  12. package/dist/lib/node/meta.json +1 -1
  13. package/dist/lib/node/testing/index.cjs +91 -0
  14. package/dist/lib/node/testing/index.cjs.map +7 -0
  15. package/dist/lib/node-esm/chunk-HG5P55WF.mjs +1597 -0
  16. package/dist/lib/node-esm/chunk-HG5P55WF.mjs.map +7 -0
  17. package/dist/lib/node-esm/index.mjs +136 -527
  18. package/dist/lib/node-esm/index.mjs.map +4 -4
  19. package/dist/lib/node-esm/meta.json +1 -1
  20. package/dist/lib/node-esm/testing/index.mjs +68 -0
  21. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  22. package/dist/types/src/App.d.ts +22 -13
  23. package/dist/types/src/App.d.ts.map +1 -1
  24. package/dist/types/src/common/capabilities.d.ts +340 -0
  25. package/dist/types/src/common/capabilities.d.ts.map +1 -0
  26. package/dist/types/src/common/events.d.ts +41 -0
  27. package/dist/types/src/common/events.d.ts.map +1 -0
  28. package/dist/types/src/common/file.d.ts +14 -0
  29. package/dist/types/src/common/file.d.ts.map +1 -0
  30. package/dist/types/src/common/graph.d.ts +21 -0
  31. package/dist/types/src/common/graph.d.ts.map +1 -0
  32. package/dist/types/src/{plugins/common → common}/index.d.ts +3 -1
  33. package/dist/types/src/common/index.d.ts.map +1 -0
  34. package/dist/types/src/common/layout.d.ts +165 -0
  35. package/dist/types/src/common/layout.d.ts.map +1 -0
  36. package/dist/types/src/{plugins/common → common}/navigation.d.ts +77 -32
  37. package/dist/types/src/common/navigation.d.ts.map +1 -0
  38. package/dist/types/src/common/surface.d.ts +68 -0
  39. package/dist/types/src/common/surface.d.ts.map +1 -0
  40. package/dist/types/src/{plugins/common → common}/translations.d.ts +0 -11
  41. package/dist/types/src/common/translations.d.ts.map +1 -0
  42. package/dist/types/src/core/capabilities.d.ts +90 -0
  43. package/dist/types/src/core/capabilities.d.ts.map +1 -0
  44. package/dist/types/src/core/capabilities.test.d.ts +2 -0
  45. package/dist/types/src/core/capabilities.test.d.ts.map +1 -0
  46. package/dist/types/src/core/events.d.ts +58 -0
  47. package/dist/types/src/core/events.d.ts.map +1 -0
  48. package/dist/types/src/core/index.d.ts +5 -0
  49. package/dist/types/src/core/index.d.ts.map +1 -0
  50. package/dist/types/src/core/manager.d.ts +126 -0
  51. package/dist/types/src/core/manager.d.ts.map +1 -0
  52. package/dist/types/src/core/manager.test.d.ts +2 -0
  53. package/dist/types/src/core/manager.test.d.ts.map +1 -0
  54. package/dist/types/src/core/plugin.d.ts +94 -0
  55. package/dist/types/src/core/plugin.d.ts.map +1 -0
  56. package/dist/types/src/helpers.d.ts +10 -0
  57. package/dist/types/src/helpers.d.ts.map +1 -0
  58. package/dist/types/src/helpers.test.d.ts +2 -0
  59. package/dist/types/src/helpers.test.d.ts.map +1 -0
  60. package/dist/types/src/index.d.ts +5 -1
  61. package/dist/types/src/index.d.ts.map +1 -1
  62. package/dist/types/src/playground/debug/Debug.d.ts +6 -0
  63. package/dist/types/src/playground/debug/Debug.d.ts.map +1 -0
  64. package/dist/types/src/playground/debug/index.d.ts +2 -0
  65. package/dist/types/src/playground/debug/index.d.ts.map +1 -0
  66. package/dist/types/src/playground/debug/plugin.d.ts +2 -0
  67. package/dist/types/src/playground/debug/plugin.d.ts.map +1 -0
  68. package/dist/types/src/playground/generator/Main.d.ts +6 -0
  69. package/dist/types/src/playground/generator/Main.d.ts.map +1 -0
  70. package/dist/types/src/playground/generator/Toolbar.d.ts +6 -0
  71. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -0
  72. package/dist/types/src/playground/generator/generator.d.ts +5 -0
  73. package/dist/types/src/playground/generator/generator.d.ts.map +1 -0
  74. package/dist/types/src/playground/generator/index.d.ts +3 -0
  75. package/dist/types/src/playground/generator/index.d.ts.map +1 -0
  76. package/dist/types/src/playground/generator/plugin.d.ts +2 -0
  77. package/dist/types/src/playground/generator/plugin.d.ts.map +1 -0
  78. package/dist/types/src/playground/layout/Layout.d.ts +8 -0
  79. package/dist/types/src/playground/layout/Layout.d.ts.map +1 -0
  80. package/dist/types/src/playground/layout/index.d.ts +2 -0
  81. package/dist/types/src/playground/layout/index.d.ts.map +1 -0
  82. package/dist/types/src/playground/layout/plugin.d.ts +2 -0
  83. package/dist/types/src/playground/layout/plugin.d.ts.map +1 -0
  84. package/dist/types/src/playground/logger/Toolbar.d.ts +6 -0
  85. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -0
  86. package/dist/types/src/playground/logger/index.d.ts +2 -0
  87. package/dist/types/src/playground/logger/index.d.ts.map +1 -0
  88. package/dist/types/src/playground/logger/plugin.d.ts +2 -0
  89. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -0
  90. package/dist/types/src/playground/logger/schema.d.ts +13 -0
  91. package/dist/types/src/playground/logger/schema.d.ts.map +1 -0
  92. package/dist/types/src/playground/playground.stories.d.ts +10 -0
  93. package/dist/types/src/playground/playground.stories.d.ts.map +1 -0
  94. package/dist/types/src/plugin-intent/IntentContext.d.ts +8 -0
  95. package/dist/types/src/plugin-intent/IntentContext.d.ts.map +1 -0
  96. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +2 -0
  97. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -0
  98. package/dist/types/src/plugin-intent/actions.d.ts +23 -0
  99. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -0
  100. package/dist/types/src/plugin-intent/errors.d.ts +16 -0
  101. package/dist/types/src/plugin-intent/errors.d.ts.map +1 -0
  102. package/dist/types/src/plugin-intent/index.d.ts +6 -0
  103. package/dist/types/src/plugin-intent/index.d.ts.map +1 -0
  104. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +106 -0
  105. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -0
  106. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +2 -0
  107. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +1 -0
  108. package/dist/types/src/plugin-intent/intent.d.ts +68 -0
  109. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -0
  110. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +2 -0
  111. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -0
  112. package/dist/types/src/plugin-settings/actions.d.ts +17 -0
  113. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -0
  114. package/dist/types/src/plugin-settings/index.d.ts +3 -0
  115. package/dist/types/src/plugin-settings/index.d.ts.map +1 -0
  116. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -0
  117. package/dist/types/src/react/PluginManagerProvider.d.ts +10 -0
  118. package/dist/types/src/react/PluginManagerProvider.d.ts.map +1 -0
  119. package/dist/types/src/react/Surface.d.ts +12 -0
  120. package/dist/types/src/react/Surface.d.ts.map +1 -0
  121. package/dist/types/src/react/index.d.ts +5 -0
  122. package/dist/types/src/react/index.d.ts.map +1 -0
  123. package/dist/types/src/react/useCapabilities.d.ts +13 -0
  124. package/dist/types/src/react/useCapabilities.d.ts.map +1 -0
  125. package/dist/types/src/testing/index.d.ts +2 -0
  126. package/dist/types/src/testing/index.d.ts.map +1 -0
  127. package/dist/types/src/testing/withPluginManager.d.ts +10 -0
  128. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -0
  129. package/dist/types/src/testing/withPluginManager.stories.d.ts +5 -0
  130. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -0
  131. package/dist/types/tsconfig.tsbuildinfo +1 -0
  132. package/package.json +30 -14
  133. package/project.json +2 -1
  134. package/src/App.tsx +138 -34
  135. package/src/common/capabilities.ts +82 -0
  136. package/src/common/events.ts +63 -0
  137. package/src/common/file.ts +22 -0
  138. package/src/common/graph.ts +30 -0
  139. package/src/{plugins/common → common}/index.ts +3 -1
  140. package/src/common/layout.ts +157 -0
  141. package/src/{plugins/common → common}/navigation.ts +59 -45
  142. package/src/common/surface.ts +81 -0
  143. package/src/common/translations.ts +18 -0
  144. package/src/core/capabilities.test.ts +116 -0
  145. package/src/core/capabilities.ts +213 -0
  146. package/src/core/events.ts +58 -0
  147. package/src/core/index.ts +8 -0
  148. package/src/core/manager.test.ts +567 -0
  149. package/src/core/manager.ts +497 -0
  150. package/src/core/plugin.ts +128 -0
  151. package/src/helpers.test.ts +97 -0
  152. package/src/helpers.ts +45 -0
  153. package/src/index.ts +6 -3
  154. package/src/playground/debug/Debug.tsx +39 -0
  155. package/src/playground/debug/index.ts +5 -0
  156. package/src/playground/debug/plugin.ts +17 -0
  157. package/src/playground/generator/Main.tsx +71 -0
  158. package/src/playground/generator/Toolbar.tsx +46 -0
  159. package/src/playground/generator/generator.ts +23 -0
  160. package/src/playground/generator/index.ts +6 -0
  161. package/src/playground/generator/plugin.ts +18 -0
  162. package/src/playground/layout/Layout.tsx +33 -0
  163. package/src/playground/layout/index.ts +5 -0
  164. package/src/playground/layout/plugin.ts +17 -0
  165. package/src/playground/logger/Toolbar.tsx +28 -0
  166. package/src/playground/logger/index.ts +5 -0
  167. package/src/playground/logger/plugin.ts +33 -0
  168. package/src/playground/logger/schema.ts +12 -0
  169. package/src/playground/playground.stories.tsx +34 -0
  170. package/src/plugin-intent/IntentContext.tsx +34 -0
  171. package/src/plugin-intent/IntentPlugin.tsx +60 -0
  172. package/src/plugin-intent/actions.ts +22 -0
  173. package/src/plugin-intent/errors.ts +39 -0
  174. package/src/plugin-intent/index.ts +9 -0
  175. package/src/plugin-intent/intent-dispatcher.test.ts +280 -0
  176. package/src/plugin-intent/intent-dispatcher.ts +269 -0
  177. package/src/plugin-intent/intent.ts +146 -0
  178. package/src/plugin-settings/SettingsPlugin.ts +29 -0
  179. package/src/plugin-settings/actions.ts +17 -0
  180. package/src/plugin-settings/index.ts +6 -0
  181. package/src/react/PluginManagerProvider.ts +22 -0
  182. package/src/react/Surface.tsx +72 -0
  183. package/src/react/index.ts +8 -0
  184. package/src/react/useCapabilities.ts +40 -0
  185. package/src/testing/index.ts +5 -0
  186. package/src/testing/withPluginManager.stories.tsx +47 -0
  187. package/src/testing/withPluginManager.tsx +67 -0
  188. package/tsconfig.json +51 -2
  189. package/dist/lib/browser/chunk-3E7RY3CE.mjs +0 -72
  190. package/dist/lib/browser/chunk-3E7RY3CE.mjs.map +0 -7
  191. package/dist/lib/browser/chunk-653Y45CL.mjs +0 -41
  192. package/dist/lib/browser/chunk-653Y45CL.mjs.map +0 -7
  193. package/dist/lib/browser/chunk-FRXJ25VI.mjs +0 -214
  194. package/dist/lib/browser/chunk-FRXJ25VI.mjs.map +0 -7
  195. package/dist/lib/browser/chunk-YXM35XRE.mjs +0 -213
  196. package/dist/lib/browser/chunk-YXM35XRE.mjs.map +0 -7
  197. package/dist/lib/browser/plugin-intent-LU4KL2RO.mjs +0 -22
  198. package/dist/lib/browser/plugin-intent-LU4KL2RO.mjs.map +0 -7
  199. package/dist/lib/browser/plugin-settings-OM3G2QFY.mjs +0 -11
  200. package/dist/lib/browser/plugin-settings-OM3G2QFY.mjs.map +0 -7
  201. package/dist/lib/browser/plugin-surface-LECZMKSQ.mjs +0 -24
  202. package/dist/lib/browser/plugin-surface-LECZMKSQ.mjs.map +0 -7
  203. package/dist/lib/node/chunk-JZ2JVKRY.cjs +0 -58
  204. package/dist/lib/node/chunk-JZ2JVKRY.cjs.map +0 -7
  205. package/dist/lib/node/chunk-QBM42OQ6.cjs +0 -97
  206. package/dist/lib/node/chunk-QBM42OQ6.cjs.map +0 -7
  207. package/dist/lib/node/chunk-QSVP5HOW.cjs +0 -238
  208. package/dist/lib/node/chunk-QSVP5HOW.cjs.map +0 -7
  209. package/dist/lib/node/chunk-SOVLKUWI.cjs +0 -236
  210. package/dist/lib/node/chunk-SOVLKUWI.cjs.map +0 -7
  211. package/dist/lib/node/plugin-intent-FVFR2LKB.cjs +0 -43
  212. package/dist/lib/node/plugin-intent-FVFR2LKB.cjs.map +0 -7
  213. package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs +0 -32
  214. package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs.map +0 -7
  215. package/dist/lib/node/plugin-surface-YWDRXQTD.cjs +0 -45
  216. package/dist/lib/node/plugin-surface-YWDRXQTD.cjs.map +0 -7
  217. package/dist/lib/node-esm/chunk-2R4GVK7O.mjs +0 -215
  218. package/dist/lib/node-esm/chunk-2R4GVK7O.mjs.map +0 -7
  219. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs +0 -74
  220. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs.map +0 -7
  221. package/dist/lib/node-esm/chunk-YFMFQBB4.mjs +0 -214
  222. package/dist/lib/node-esm/chunk-YFMFQBB4.mjs.map +0 -7
  223. package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs +0 -43
  224. package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs.map +0 -7
  225. package/dist/lib/node-esm/plugin-intent-V7ER24Y6.mjs +0 -23
  226. package/dist/lib/node-esm/plugin-intent-V7ER24Y6.mjs.map +0 -7
  227. package/dist/lib/node-esm/plugin-settings-37UVWF2V.mjs +0 -12
  228. package/dist/lib/node-esm/plugin-settings-37UVWF2V.mjs.map +0 -7
  229. package/dist/lib/node-esm/plugin-surface-TEU42XQN.mjs +0 -25
  230. package/dist/lib/node-esm/plugin-surface-TEU42XQN.mjs.map +0 -7
  231. package/dist/types/src/plugins/common/file.d.ts +0 -22
  232. package/dist/types/src/plugins/common/file.d.ts.map +0 -1
  233. package/dist/types/src/plugins/common/graph.d.ts +0 -51
  234. package/dist/types/src/plugins/common/graph.d.ts.map +0 -1
  235. package/dist/types/src/plugins/common/index.d.ts.map +0 -1
  236. package/dist/types/src/plugins/common/layout.d.ts +0 -202
  237. package/dist/types/src/plugins/common/layout.d.ts.map +0 -1
  238. package/dist/types/src/plugins/common/metadata.d.ts +0 -16
  239. package/dist/types/src/plugins/common/metadata.d.ts.map +0 -1
  240. package/dist/types/src/plugins/common/navigation.d.ts.map +0 -1
  241. package/dist/types/src/plugins/common/translations.d.ts.map +0 -1
  242. package/dist/types/src/plugins/helpers.d.ts +0 -41
  243. package/dist/types/src/plugins/helpers.d.ts.map +0 -1
  244. package/dist/types/src/plugins/index.d.ts +0 -7
  245. package/dist/types/src/plugins/index.d.ts.map +0 -1
  246. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts +0 -21
  247. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts.map +0 -1
  248. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts +0 -14
  249. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts.map +0 -1
  250. package/dist/types/src/plugins/plugin-host/PluginContext.d.ts +0 -47
  251. package/dist/types/src/plugins/plugin-host/PluginContext.d.ts.map +0 -1
  252. package/dist/types/src/plugins/plugin-host/index.d.ts +0 -4
  253. package/dist/types/src/plugins/plugin-host/index.d.ts.map +0 -1
  254. package/dist/types/src/plugins/plugin-host/plugin.d.ts +0 -98
  255. package/dist/types/src/plugins/plugin-host/plugin.d.ts.map +0 -1
  256. package/dist/types/src/plugins/plugin-host/plugin.test.d.ts +0 -35
  257. package/dist/types/src/plugins/plugin-host/plugin.test.d.ts.map +0 -1
  258. package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts +0 -21
  259. package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts.map +0 -1
  260. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts +0 -8
  261. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts.map +0 -1
  262. package/dist/types/src/plugins/plugin-intent/helpers.d.ts +0 -6
  263. package/dist/types/src/plugins/plugin-intent/helpers.d.ts.map +0 -1
  264. package/dist/types/src/plugins/plugin-intent/index.d.ts +0 -6
  265. package/dist/types/src/plugins/plugin-intent/index.d.ts.map +0 -1
  266. package/dist/types/src/plugins/plugin-intent/intent.d.ts +0 -81
  267. package/dist/types/src/plugins/plugin-intent/intent.d.ts.map +0 -1
  268. package/dist/types/src/plugins/plugin-intent/meta.d.ts +0 -5
  269. package/dist/types/src/plugins/plugin-intent/meta.d.ts.map +0 -1
  270. package/dist/types/src/plugins/plugin-intent/provides.d.ts +0 -20
  271. package/dist/types/src/plugins/plugin-intent/provides.d.ts.map +0 -1
  272. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts +0 -4
  273. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts.map +0 -1
  274. package/dist/types/src/plugins/plugin-settings/index.d.ts +0 -4
  275. package/dist/types/src/plugins/plugin-settings/index.d.ts.map +0 -1
  276. package/dist/types/src/plugins/plugin-settings/meta.d.ts +0 -5
  277. package/dist/types/src/plugins/plugin-settings/meta.d.ts.map +0 -1
  278. package/dist/types/src/plugins/plugin-settings/provides.d.ts +0 -13
  279. package/dist/types/src/plugins/plugin-settings/provides.d.ts.map +0 -1
  280. package/dist/types/src/plugins/plugin-surface/ErrorBoundary.d.ts.map +0 -1
  281. package/dist/types/src/plugins/plugin-surface/Surface.d.ts +0 -62
  282. package/dist/types/src/plugins/plugin-surface/Surface.d.ts.map +0 -1
  283. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts +0 -7
  284. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts.map +0 -1
  285. package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts +0 -39
  286. package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts.map +0 -1
  287. package/dist/types/src/plugins/plugin-surface/helpers.d.ts +0 -21
  288. package/dist/types/src/plugins/plugin-surface/helpers.d.ts.map +0 -1
  289. package/dist/types/src/plugins/plugin-surface/index.d.ts +0 -8
  290. package/dist/types/src/plugins/plugin-surface/index.d.ts.map +0 -1
  291. package/dist/types/src/plugins/plugin-surface/meta.d.ts +0 -5
  292. package/dist/types/src/plugins/plugin-surface/meta.d.ts.map +0 -1
  293. package/dist/types/src/plugins/plugin-surface/provides.d.ts +0 -16
  294. package/dist/types/src/plugins/plugin-surface/provides.d.ts.map +0 -1
  295. package/src/plugins/common/file.ts +0 -36
  296. package/src/plugins/common/graph.ts +0 -70
  297. package/src/plugins/common/layout.ts +0 -155
  298. package/src/plugins/common/metadata.ts +0 -29
  299. package/src/plugins/common/translations.ts +0 -36
  300. package/src/plugins/helpers.ts +0 -92
  301. package/src/plugins/index.ts +0 -11
  302. package/src/plugins/plugin-host/HostPlugin.tsx +0 -96
  303. package/src/plugins/plugin-host/PluginContainer.tsx +0 -120
  304. package/src/plugins/plugin-host/PluginContext.tsx +0 -79
  305. package/src/plugins/plugin-host/index.ts +0 -8
  306. package/src/plugins/plugin-host/plugin.test.ts +0 -158
  307. package/src/plugins/plugin-host/plugin.ts +0 -126
  308. package/src/plugins/plugin-intent/IntentContext.tsx +0 -49
  309. package/src/plugins/plugin-intent/IntentPlugin.tsx +0 -151
  310. package/src/plugins/plugin-intent/helpers.ts +0 -11
  311. package/src/plugins/plugin-intent/index.ts +0 -12
  312. package/src/plugins/plugin-intent/intent.ts +0 -101
  313. package/src/plugins/plugin-intent/meta.ts +0 -9
  314. package/src/plugins/plugin-intent/provides.ts +0 -38
  315. package/src/plugins/plugin-settings/SettingsPlugin.tsx +0 -22
  316. package/src/plugins/plugin-settings/index.ts +0 -9
  317. package/src/plugins/plugin-settings/meta.ts +0 -9
  318. package/src/plugins/plugin-settings/provides.ts +0 -29
  319. package/src/plugins/plugin-surface/Surface.tsx +0 -195
  320. package/src/plugins/plugin-surface/SurfacePlugin.tsx +0 -33
  321. package/src/plugins/plugin-surface/SurfaceRootContext.tsx +0 -60
  322. package/src/plugins/plugin-surface/helpers.ts +0 -22
  323. package/src/plugins/plugin-surface/index.ts +0 -14
  324. package/src/plugins/plugin-surface/meta.ts +0 -9
  325. package/src/plugins/plugin-surface/provides.ts +0 -26
  326. /package/dist/types/src/{plugins/plugin-surface → react}/ErrorBoundary.d.ts +0 -0
  327. /package/src/{plugins/plugin-surface → react}/ErrorBoundary.tsx +0 -0
@@ -0,0 +1,340 @@
1
+ import { type FC, type PropsWithChildren } from 'react';
2
+ import { type GraphBuilder } from '@dxos/app-graph';
3
+ import { type Space } from '@dxos/client-protocol';
4
+ import { type S } from '@dxos/echo-schema';
5
+ import { type RootSettingsStore } from '@dxos/local-storage';
6
+ import { type DeepReadonly } from '@dxos/util';
7
+ import { type FileInfo } from './file';
8
+ import { type NodeSerializer } from './graph';
9
+ import { type LayoutParts } from './navigation';
10
+ import { type SurfaceDefinition } from './surface';
11
+ import { type PluginManager } from '../core';
12
+ import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
13
+ export declare namespace Capabilities {
14
+ const PluginManager: import("../core").InterfaceDef<PluginManager>;
15
+ const Null: import("../core").InterfaceDef<null>;
16
+ type ReactContext = Readonly<{
17
+ id: string;
18
+ dependsOn?: string[];
19
+ context: FC<PropsWithChildren>;
20
+ }>;
21
+ const ReactContext: import("../core").InterfaceDef<Readonly<{
22
+ id: string;
23
+ dependsOn?: string[];
24
+ context: FC<PropsWithChildren>;
25
+ }>>;
26
+ type ReactRoot = Readonly<{
27
+ id: string;
28
+ root: FC<PropsWithChildren>;
29
+ }>;
30
+ const ReactRoot: import("../core").InterfaceDef<Readonly<{
31
+ id: string;
32
+ root: FC<PropsWithChildren>;
33
+ }>>;
34
+ type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];
35
+ const ReactSurface: import("../core").InterfaceDef<ReactSurface>;
36
+ type IntentResolver = AnyIntentResolver | readonly AnyIntentResolver[];
37
+ const IntentResolver: import("../core").InterfaceDef<IntentResolver>;
38
+ const IntentDispatcher: import("../core").InterfaceDef<IntentContext>;
39
+ const Layout: import("../core").InterfaceDef<Readonly<{
40
+ layoutMode: "deck" | "solo" | "fullscreen";
41
+ sidebarOpen: boolean;
42
+ complementarySidebarOpen: boolean;
43
+ complementarySidebarContent?: any;
44
+ dialogOpen: boolean;
45
+ dialogContent?: any;
46
+ dialogBlockAlign?: "center" | "start" | undefined;
47
+ dialogType?: "default" | "alert" | undefined;
48
+ popoverOpen: boolean;
49
+ popoverContent?: any;
50
+ popoverAnchorId?: string | undefined;
51
+ toasts: {
52
+ readonly title?: string | [string, {
53
+ ns: string;
54
+ count?: number | undefined;
55
+ }] | undefined;
56
+ readonly id: string;
57
+ readonly description?: string | [string, {
58
+ ns: string;
59
+ count?: number | undefined;
60
+ }] | undefined;
61
+ readonly icon?: string | undefined;
62
+ readonly duration?: number | undefined;
63
+ readonly closeLabel?: string | [string, {
64
+ ns: string;
65
+ count?: number | undefined;
66
+ }] | undefined;
67
+ readonly actionLabel?: string | [string, {
68
+ ns: string;
69
+ count?: number | undefined;
70
+ }] | undefined;
71
+ readonly actionAlt?: string | [string, {
72
+ ns: string;
73
+ count?: number | undefined;
74
+ }] | undefined;
75
+ readonly onAction?: any;
76
+ }[];
77
+ scrollIntoView?: string | undefined;
78
+ }>>;
79
+ const MutableLayout: import("../core").InterfaceDef<{
80
+ layoutMode: "deck" | "solo" | "fullscreen";
81
+ sidebarOpen: boolean;
82
+ complementarySidebarOpen: boolean;
83
+ complementarySidebarContent?: any;
84
+ dialogOpen: boolean;
85
+ dialogContent?: any;
86
+ dialogBlockAlign?: "center" | "start" | undefined;
87
+ dialogType?: "default" | "alert" | undefined;
88
+ popoverOpen: boolean;
89
+ popoverContent?: any;
90
+ popoverAnchorId?: string | undefined;
91
+ toasts: {
92
+ readonly title?: string | [string, {
93
+ ns: string;
94
+ count?: number | undefined;
95
+ }] | undefined;
96
+ readonly id: string;
97
+ readonly description?: string | [string, {
98
+ ns: string;
99
+ count?: number | undefined;
100
+ }] | undefined;
101
+ readonly icon?: string | undefined;
102
+ readonly duration?: number | undefined;
103
+ readonly closeLabel?: string | [string, {
104
+ ns: string;
105
+ count?: number | undefined;
106
+ }] | undefined;
107
+ readonly actionLabel?: string | [string, {
108
+ ns: string;
109
+ count?: number | undefined;
110
+ }] | undefined;
111
+ readonly actionAlt?: string | [string, {
112
+ ns: string;
113
+ count?: number | undefined;
114
+ }] | undefined;
115
+ readonly onAction?: any;
116
+ }[];
117
+ scrollIntoView?: string | undefined;
118
+ }>;
119
+ type MutableLocation = {
120
+ active: LayoutParts;
121
+ closed: string[];
122
+ };
123
+ type Location = DeepReadonly<MutableLocation>;
124
+ const Location: import("../core").InterfaceDef<DeepReadonly<MutableLocation>>;
125
+ const MutableLocation: import("../core").InterfaceDef<MutableLocation>;
126
+ const Translations: import("../core").InterfaceDef<readonly Record<string, Record<string, string | Record<string, any>>>[]>;
127
+ const AppGraph: import("../core").InterfaceDef<Readonly<Pick<GraphBuilder, "graph" | "explore">>>;
128
+ const AppGraphBuilder: import("../core").InterfaceDef<Readonly<{
129
+ id: string;
130
+ disposition: import("@dxos/util").Disposition;
131
+ resolver?: import("@dxos/app-graph").ResolverExtension;
132
+ connector?: import("@dxos/app-graph").ConnectorExtension;
133
+ relation?: import("@dxos/app-graph").Relation;
134
+ type?: string;
135
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
136
+ }> | Readonly<{
137
+ id: string;
138
+ disposition: import("@dxos/util").Disposition;
139
+ resolver?: import("@dxos/app-graph").ResolverExtension;
140
+ connector?: import("@dxos/app-graph").ConnectorExtension;
141
+ relation?: import("@dxos/app-graph").Relation;
142
+ type?: string;
143
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
144
+ }>[] | (Readonly<{
145
+ id: string;
146
+ disposition: import("@dxos/util").Disposition;
147
+ resolver?: import("@dxos/app-graph").ResolverExtension;
148
+ connector?: import("@dxos/app-graph").ConnectorExtension;
149
+ relation?: import("@dxos/app-graph").Relation;
150
+ type?: string;
151
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
152
+ }> | Readonly<{
153
+ id: string;
154
+ disposition: import("@dxos/util").Disposition;
155
+ resolver?: import("@dxos/app-graph").ResolverExtension;
156
+ connector?: import("@dxos/app-graph").ConnectorExtension;
157
+ relation?: import("@dxos/app-graph").Relation;
158
+ type?: string;
159
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
160
+ }>[] | (Readonly<{
161
+ id: string;
162
+ disposition: import("@dxos/util").Disposition;
163
+ resolver?: import("@dxos/app-graph").ResolverExtension;
164
+ connector?: import("@dxos/app-graph").ConnectorExtension;
165
+ relation?: import("@dxos/app-graph").Relation;
166
+ type?: string;
167
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
168
+ }> | Readonly<{
169
+ id: string;
170
+ disposition: import("@dxos/util").Disposition;
171
+ resolver?: import("@dxos/app-graph").ResolverExtension;
172
+ connector?: import("@dxos/app-graph").ConnectorExtension;
173
+ relation?: import("@dxos/app-graph").Relation;
174
+ type?: string;
175
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
176
+ }>[] | (Readonly<{
177
+ id: string;
178
+ disposition: import("@dxos/util").Disposition;
179
+ resolver?: import("@dxos/app-graph").ResolverExtension;
180
+ connector?: import("@dxos/app-graph").ConnectorExtension;
181
+ relation?: import("@dxos/app-graph").Relation;
182
+ type?: string;
183
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
184
+ }> | Readonly<{
185
+ id: string;
186
+ disposition: import("@dxos/util").Disposition;
187
+ resolver?: import("@dxos/app-graph").ResolverExtension;
188
+ connector?: import("@dxos/app-graph").ConnectorExtension;
189
+ relation?: import("@dxos/app-graph").Relation;
190
+ type?: string;
191
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
192
+ }>[] | (Readonly<{
193
+ id: string;
194
+ disposition: import("@dxos/util").Disposition;
195
+ resolver?: import("@dxos/app-graph").ResolverExtension;
196
+ connector?: import("@dxos/app-graph").ConnectorExtension;
197
+ relation?: import("@dxos/app-graph").Relation;
198
+ type?: string;
199
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
200
+ }> | Readonly<{
201
+ id: string;
202
+ disposition: import("@dxos/util").Disposition;
203
+ resolver?: import("@dxos/app-graph").ResolverExtension;
204
+ connector?: import("@dxos/app-graph").ConnectorExtension;
205
+ relation?: import("@dxos/app-graph").Relation;
206
+ type?: string;
207
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
208
+ }>[] | (Readonly<{
209
+ id: string;
210
+ disposition: import("@dxos/util").Disposition;
211
+ resolver?: import("@dxos/app-graph").ResolverExtension;
212
+ connector?: import("@dxos/app-graph").ConnectorExtension;
213
+ relation?: import("@dxos/app-graph").Relation;
214
+ type?: string;
215
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
216
+ }> | Readonly<{
217
+ id: string;
218
+ disposition: import("@dxos/util").Disposition;
219
+ resolver?: import("@dxos/app-graph").ResolverExtension;
220
+ connector?: import("@dxos/app-graph").ConnectorExtension;
221
+ relation?: import("@dxos/app-graph").Relation;
222
+ type?: string;
223
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
224
+ }>[] | (Readonly<{
225
+ id: string;
226
+ disposition: import("@dxos/util").Disposition;
227
+ resolver?: import("@dxos/app-graph").ResolverExtension;
228
+ connector?: import("@dxos/app-graph").ConnectorExtension;
229
+ relation?: import("@dxos/app-graph").Relation;
230
+ type?: string;
231
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
232
+ }> | Readonly<{
233
+ id: string;
234
+ disposition: import("@dxos/util").Disposition;
235
+ resolver?: import("@dxos/app-graph").ResolverExtension;
236
+ connector?: import("@dxos/app-graph").ConnectorExtension;
237
+ relation?: import("@dxos/app-graph").Relation;
238
+ type?: string;
239
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
240
+ }>[] | (Readonly<{
241
+ id: string;
242
+ disposition: import("@dxos/util").Disposition;
243
+ resolver?: import("@dxos/app-graph").ResolverExtension;
244
+ connector?: import("@dxos/app-graph").ConnectorExtension;
245
+ relation?: import("@dxos/app-graph").Relation;
246
+ type?: string;
247
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
248
+ }> | Readonly<{
249
+ id: string;
250
+ disposition: import("@dxos/util").Disposition;
251
+ resolver?: import("@dxos/app-graph").ResolverExtension;
252
+ connector?: import("@dxos/app-graph").ConnectorExtension;
253
+ relation?: import("@dxos/app-graph").Relation;
254
+ type?: string;
255
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
256
+ }>[] | (Readonly<{
257
+ id: string;
258
+ disposition: import("@dxos/util").Disposition;
259
+ resolver?: import("@dxos/app-graph").ResolverExtension;
260
+ connector?: import("@dxos/app-graph").ConnectorExtension;
261
+ relation?: import("@dxos/app-graph").Relation;
262
+ type?: string;
263
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
264
+ }> | Readonly<{
265
+ id: string;
266
+ disposition: import("@dxos/util").Disposition;
267
+ resolver?: import("@dxos/app-graph").ResolverExtension;
268
+ connector?: import("@dxos/app-graph").ConnectorExtension;
269
+ relation?: import("@dxos/app-graph").Relation;
270
+ type?: string;
271
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
272
+ }>[] | (Readonly<{
273
+ id: string;
274
+ disposition: import("@dxos/util").Disposition;
275
+ resolver?: import("@dxos/app-graph").ResolverExtension;
276
+ connector?: import("@dxos/app-graph").ConnectorExtension;
277
+ relation?: import("@dxos/app-graph").Relation;
278
+ type?: string;
279
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
280
+ }> | Readonly<{
281
+ id: string;
282
+ disposition: import("@dxos/util").Disposition;
283
+ resolver?: import("@dxos/app-graph").ResolverExtension;
284
+ connector?: import("@dxos/app-graph").ConnectorExtension;
285
+ relation?: import("@dxos/app-graph").Relation;
286
+ type?: string;
287
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
288
+ }>[] | (Readonly<{
289
+ id: string;
290
+ disposition: import("@dxos/util").Disposition;
291
+ resolver?: import("@dxos/app-graph").ResolverExtension;
292
+ connector?: import("@dxos/app-graph").ConnectorExtension;
293
+ relation?: import("@dxos/app-graph").Relation;
294
+ type?: string;
295
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
296
+ }> | Readonly<{
297
+ id: string;
298
+ disposition: import("@dxos/util").Disposition;
299
+ resolver?: import("@dxos/app-graph").ResolverExtension;
300
+ connector?: import("@dxos/app-graph").ConnectorExtension;
301
+ relation?: import("@dxos/app-graph").Relation;
302
+ type?: string;
303
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
304
+ }>[] | (Readonly<{
305
+ id: string;
306
+ disposition: import("@dxos/util").Disposition;
307
+ resolver?: import("@dxos/app-graph").ResolverExtension;
308
+ connector?: import("@dxos/app-graph").ConnectorExtension;
309
+ relation?: import("@dxos/app-graph").Relation;
310
+ type?: string;
311
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
312
+ }> | Readonly<{
313
+ id: string;
314
+ disposition: import("@dxos/util").Disposition;
315
+ resolver?: import("@dxos/app-graph").ResolverExtension;
316
+ connector?: import("@dxos/app-graph").ConnectorExtension;
317
+ relation?: import("@dxos/app-graph").Relation;
318
+ type?: string;
319
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
320
+ }>[] | /*elided*/ any)[])[])[])[])[])[])[])[])[])[])[]>;
321
+ const AppGraphSerializer: import("../core").InterfaceDef<NodeSerializer[]>;
322
+ const SettingsStore: import("../core").InterfaceDef<RootSettingsStore>;
323
+ type Settings = {
324
+ schema: S.Schema.All;
325
+ prefix: string;
326
+ value?: Record<string, any>;
327
+ };
328
+ const Settings: import("../core").InterfaceDef<Settings>;
329
+ type Metadata = Readonly<{
330
+ id: string;
331
+ metadata: Record<string, any>;
332
+ }>;
333
+ const Metadata: import("../core").InterfaceDef<Readonly<{
334
+ id: string;
335
+ metadata: Record<string, any>;
336
+ }>>;
337
+ type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
338
+ const FileUploader: import("../core").InterfaceDef<FileUploader>;
339
+ }
340
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/common/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E,yBAAiB,YAAY,CAAC;IACrB,MAAM,aAAa,+CAAsF,CAAC;IAE1G,MAAM,IAAI,sCAAmE,CAAC;IAErF,KAAY,YAAY,GAAG,QAAQ,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAA;KAAE,CAAC,CAAC;IACnG,MAAM,YAAY;YADiB,MAAM;oBAAc,MAAM,EAAE;iBAAW,EAAE,CAAC,iBAAiB,CAAC;OACO,CAAC;IAE9G,KAAY,SAAS,GAAG,QAAQ,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAA;KAAE,CAAC,CAAC;IACvE,MAAM,SAAS;YADiB,MAAM;cAAQ,EAAE,CAAC,iBAAiB,CAAC;OAC0B,CAAC;IAErG,KAAY,YAAY,GAAG,iBAAiB,GAAG,SAAS,iBAAiB,EAAE,CAAC;IACrE,MAAM,YAAY,8CAAgF,CAAC;IAE1G,KAAY,cAAc,GAAG,iBAAiB,GAAG,SAAS,iBAAiB,EAAE,CAAC;IACvE,MAAM,cAAc,gDAAwF,CAAC;IAE7G,MAAM,gBAAgB,+CAE5B,CAAC;IAEK,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAiF,CAAC;IAC9F,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAuE,CAAC;IAElG,KAAY,eAAe,GAAG;QAAE,MAAM,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACxE,KAAY,QAAQ,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;IAC9C,MAAM,QAAQ,+DAA2E,CAAC;IAC1F,MAAM,eAAe,iDAAkF,CAAC;IAExG,MAAM,YAAY,yGAA2F,CAAC;IAE9G,MAAM,QAAQ,mFAEpB,CAAC;IAEK,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2DAE3B,CAAC;IAEK,MAAM,kBAAkB,kDAE9B,CAAC;IAEK,MAAM,aAAa,mDAA0F,CAAC;IAKrH,KAAY,QAAQ,GAAG;QACrB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC7B,CAAC;IACK,MAAM,QAAQ,0CAA2E,CAAC;IAEjG,KAAY,QAAQ,GAAG,QAAQ,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAC,CAAC;IACxE,MAAM,QAAQ;YADiB,MAAM;kBAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;OACqB,CAAC;IAEjG,KAAY,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IAChF,MAAM,YAAY,8CAAoF,CAAC;CAC/G"}
@@ -0,0 +1,41 @@
1
+ export declare namespace Events {
2
+ /**
3
+ * Fired when the app is started.
4
+ */
5
+ const Startup: import("../core").ActivationEvent;
6
+ /**
7
+ * Fired before the intent dispatcher is activated.
8
+ */
9
+ const SetupIntents: import("../core").ActivationEvent;
10
+ /**
11
+ * Fired before the settings store is activated.
12
+ */
13
+ const SetupSettings: import("../core").ActivationEvent;
14
+ /**
15
+ * Fired before the graph is created.
16
+ */
17
+ const SetupAppGraph: import("../core").ActivationEvent;
18
+ /**
19
+ * Fired before the translations provider is created.
20
+ */
21
+ const SetupTranslations: import("../core").ActivationEvent;
22
+ /**
23
+ * Fired after the intent dispatcher is ready.
24
+ */
25
+ const DispatcherReady: import("../core").ActivationEvent;
26
+ /**
27
+ * Fired after the settings store is ready.
28
+ */
29
+ const SettingsReady: import("../core").ActivationEvent;
30
+ /**
31
+ * Fired when the graph is ready.
32
+ */
33
+ const AppGraphReady: import("../core").ActivationEvent;
34
+ /**
35
+ * Fired when plugin state is ready.
36
+ */
37
+ const createStateEvent: (specifier: string) => import("../core").ActivationEvent;
38
+ const LayoutReady: import("../core").ActivationEvent;
39
+ const LocationReady: import("../core").ActivationEvent;
40
+ }
41
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/common/events.ts"],"names":[],"mappings":"AAOA,yBAAiB,MAAM,CAAC;IACtB;;OAEG;IACI,MAAM,OAAO,mCAAsD,CAAC;IAM3E;;OAEG;IACI,MAAM,YAAY,mCAA4D,CAAC;IAEtF;;OAEG;IACI,MAAM,aAAa,mCAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,aAAa,mCAA0D,CAAC;IAErF;;OAEG;IACI,MAAM,iBAAiB,mCAAiE,CAAC;IAMhG;;OAEG;IACI,MAAM,eAAe,mCAA+D,CAAC;IAE5F;;OAEG;IACI,MAAM,aAAa,mCAA6D,CAAC;IAExF;;OAEG;IACI,MAAM,aAAa,mCAA0D,CAAC;IAErF;;OAEG;IACI,MAAM,gBAAgB,cAAe,MAAM,sCAAiE,CAAC;IAC7G,MAAM,WAAW,mCAAmD,CAAC;IACrE,MAAM,aAAa,mCAAqD,CAAC;CACjF"}
@@ -0,0 +1,14 @@
1
+ import { S } from '@dxos/echo-schema';
2
+ export declare const defaultFileTypes: {
3
+ images: string[];
4
+ media: string[];
5
+ text: string[];
6
+ };
7
+ export declare const FileInfoSchema: S.Struct<{
8
+ name: typeof S.String;
9
+ type: typeof S.String;
10
+ url: S.optional<typeof S.String>;
11
+ cid: S.optional<typeof S.String>;
12
+ }>;
13
+ export type FileInfo = S.Schema.Type<typeof FileInfoSchema>;
14
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/common/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAItC,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Node } from '@dxos/app-graph';
2
+ import { type MaybePromise } from '@dxos/util';
3
+ export type SerializedNode = {
4
+ name: string;
5
+ data: string;
6
+ type?: string;
7
+ };
8
+ export type NodeSerializer<T = any> = {
9
+ inputType: string;
10
+ outputType: string;
11
+ disposition?: 'hoist' | 'fallback';
12
+ /**
13
+ * Takes a node and serializes it into a format that can be stored.
14
+ */
15
+ serialize: (node: Node<T>) => MaybePromise<SerializedNode>;
16
+ /**
17
+ * Takes a serialized node and deserializes it into the application.
18
+ */
19
+ deserialize: (data: SerializedNode, ancestors: unknown[]) => MaybePromise<T>;
20
+ };
21
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../src/common/graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAEnC;;OAEG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,cAAc,CAAC,CAAC;IAE3D;;OAEG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC;CAC9E,CAAC"}
@@ -1,7 +1,9 @@
1
+ export * from './capabilities';
2
+ export * from './events';
1
3
  export * from './file';
2
4
  export * from './graph';
3
5
  export * from './layout';
4
- export * from './metadata';
5
6
  export * from './navigation';
7
+ export * from './surface';
6
8
  export * from './translations';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,165 @@
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>;
29
+ /**
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.
35
+ */
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;
55
+ /**
56
+ * Data to be passed to the popover Surface.
57
+ */
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;
62
+ title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
63
+ ns: typeof S.String;
64
+ count: S.optional<typeof S.Number>;
65
+ }>>]>>]>>;
66
+ description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
67
+ ns: typeof S.String;
68
+ count: S.optional<typeof S.Number>;
69
+ }>>]>>]>>;
70
+ icon: S.optional<typeof S.String>;
71
+ duration: S.optional<typeof S.Number>;
72
+ closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
73
+ ns: typeof S.String;
74
+ count: S.optional<typeof S.Number>;
75
+ }>>]>>]>>;
76
+ actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
77
+ ns: typeof S.String;
78
+ count: S.optional<typeof S.Number>;
79
+ }>>]>>]>>;
80
+ actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
81
+ ns: typeof S.String;
82
+ count: S.optional<typeof S.Number>;
83
+ }>>]>>]>>;
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">;
100
+ } & {
101
+ 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"]>>;
133
+ }>;
134
+ output: typeof S.Void;
135
+ }>;
136
+ export class SetLayout extends SetLayout_base {
137
+ }
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">;
140
+ } & {
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
+ }>]>;
146
+ output: typeof S.Void;
147
+ }>;
148
+ export class SetLayoutMode extends SetLayoutMode_base {
149
+ }
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">;
152
+ } & {
153
+ input: S.Struct<{
154
+ id: S.optional<typeof S.String>;
155
+ cursor: S.optional<typeof S.String>;
156
+ ref: S.optional<typeof S.String>;
157
+ }>;
158
+ output: typeof S.Void;
159
+ }>;
160
+ export class ScrollIntoView extends ScrollIntoView_base {
161
+ }
162
+ export {};
163
+ }
164
+ export {};
165
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +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,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"}