@dxos/app-framework 0.7.4 → 0.7.5-labs.5f04cf6

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-22MGDQXD.mjs +1621 -0
  2. package/dist/lib/browser/chunk-22MGDQXD.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-7PNEFY2G.cjs +1665 -0
  9. package/dist/lib/node/chunk-7PNEFY2G.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-ZFOOPWBG.mjs +1623 -0
  16. package/dist/lib/node-esm/chunk-ZFOOPWBG.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 +343 -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 +31 -14
  133. package/project.json +2 -1
  134. package/src/App.tsx +138 -34
  135. package/src/common/capabilities.ts +88 -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 +69 -50
  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 +54 -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,343 @@
1
+ import { type FC, type PropsWithChildren } from 'react';
2
+ import { type GraphBuilder } from '@dxos/app-graph';
3
+ import { type ArtifactDefinition, type Tool } from '@dxos/artifact';
4
+ import { type Space } from '@dxos/client-protocol';
5
+ import { type S } from '@dxos/echo-schema';
6
+ import { type RootSettingsStore } from '@dxos/local-storage';
7
+ import { type DeepReadonly } from '@dxos/util';
8
+ import { type FileInfo } from './file';
9
+ import { type NodeSerializer } from './graph';
10
+ import { type LayoutParts } from './navigation';
11
+ import { type SurfaceDefinition } from './surface';
12
+ import { type PluginManager } from '../core';
13
+ import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
14
+ export declare namespace Capabilities {
15
+ const PluginManager: import("../core").InterfaceDef<PluginManager>;
16
+ const Null: import("../core").InterfaceDef<null>;
17
+ type ReactContext = Readonly<{
18
+ id: string;
19
+ dependsOn?: string[];
20
+ context: FC<PropsWithChildren>;
21
+ }>;
22
+ const ReactContext: import("../core").InterfaceDef<Readonly<{
23
+ id: string;
24
+ dependsOn?: string[];
25
+ context: FC<PropsWithChildren>;
26
+ }>>;
27
+ type ReactRoot = Readonly<{
28
+ id: string;
29
+ root: FC<PropsWithChildren>;
30
+ }>;
31
+ const ReactRoot: import("../core").InterfaceDef<Readonly<{
32
+ id: string;
33
+ root: FC<PropsWithChildren>;
34
+ }>>;
35
+ type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];
36
+ const ReactSurface: import("../core").InterfaceDef<ReactSurface>;
37
+ type IntentResolver = AnyIntentResolver | readonly AnyIntentResolver[];
38
+ const IntentResolver: import("../core").InterfaceDef<IntentResolver>;
39
+ const IntentDispatcher: import("../core").InterfaceDef<IntentContext>;
40
+ const Layout: import("../core").InterfaceDef<Readonly<{
41
+ layoutMode: "deck" | "solo" | "fullscreen";
42
+ sidebarOpen: boolean;
43
+ complementarySidebarOpen: boolean;
44
+ complementarySidebarContent?: any;
45
+ dialogOpen: boolean;
46
+ dialogContent?: any;
47
+ dialogBlockAlign?: "center" | "start" | undefined;
48
+ dialogType?: "default" | "alert" | undefined;
49
+ popoverOpen: boolean;
50
+ popoverContent?: any;
51
+ popoverAnchorId?: string | undefined;
52
+ toasts: {
53
+ readonly title?: string | [string, {
54
+ ns: string;
55
+ count?: number | undefined;
56
+ }] | undefined;
57
+ readonly id: string;
58
+ readonly description?: string | [string, {
59
+ ns: string;
60
+ count?: number | undefined;
61
+ }] | undefined;
62
+ readonly icon?: string | undefined;
63
+ readonly duration?: number | undefined;
64
+ readonly closeLabel?: string | [string, {
65
+ ns: string;
66
+ count?: number | undefined;
67
+ }] | undefined;
68
+ readonly actionLabel?: string | [string, {
69
+ ns: string;
70
+ count?: number | undefined;
71
+ }] | undefined;
72
+ readonly actionAlt?: string | [string, {
73
+ ns: string;
74
+ count?: number | undefined;
75
+ }] | undefined;
76
+ readonly onAction?: any;
77
+ }[];
78
+ scrollIntoView?: string | undefined;
79
+ }>>;
80
+ const MutableLayout: import("../core").InterfaceDef<{
81
+ layoutMode: "deck" | "solo" | "fullscreen";
82
+ sidebarOpen: boolean;
83
+ complementarySidebarOpen: boolean;
84
+ complementarySidebarContent?: any;
85
+ dialogOpen: boolean;
86
+ dialogContent?: any;
87
+ dialogBlockAlign?: "center" | "start" | undefined;
88
+ dialogType?: "default" | "alert" | undefined;
89
+ popoverOpen: boolean;
90
+ popoverContent?: any;
91
+ popoverAnchorId?: string | undefined;
92
+ toasts: {
93
+ readonly title?: string | [string, {
94
+ ns: string;
95
+ count?: number | undefined;
96
+ }] | undefined;
97
+ readonly id: string;
98
+ readonly description?: string | [string, {
99
+ ns: string;
100
+ count?: number | undefined;
101
+ }] | undefined;
102
+ readonly icon?: string | undefined;
103
+ readonly duration?: number | undefined;
104
+ readonly closeLabel?: string | [string, {
105
+ ns: string;
106
+ count?: number | undefined;
107
+ }] | undefined;
108
+ readonly actionLabel?: string | [string, {
109
+ ns: string;
110
+ count?: number | undefined;
111
+ }] | undefined;
112
+ readonly actionAlt?: string | [string, {
113
+ ns: string;
114
+ count?: number | undefined;
115
+ }] | undefined;
116
+ readonly onAction?: any;
117
+ }[];
118
+ scrollIntoView?: string | undefined;
119
+ }>;
120
+ type MutableLocation = {
121
+ active: LayoutParts;
122
+ closed: string[];
123
+ };
124
+ type Location = DeepReadonly<MutableLocation>;
125
+ const Location: import("../core").InterfaceDef<DeepReadonly<MutableLocation>>;
126
+ const MutableLocation: import("../core").InterfaceDef<MutableLocation>;
127
+ const Translations: import("../core").InterfaceDef<readonly Record<string, Record<string, string | Record<string, any>>>[]>;
128
+ const AppGraph: import("../core").InterfaceDef<Readonly<Pick<GraphBuilder, "graph" | "explore">>>;
129
+ const AppGraphBuilder: import("../core").InterfaceDef<Readonly<{
130
+ id: string;
131
+ disposition: import("@dxos/util").Disposition;
132
+ resolver?: import("@dxos/app-graph").ResolverExtension;
133
+ connector?: import("@dxos/app-graph").ConnectorExtension;
134
+ relation?: import("@dxos/app-graph").Relation;
135
+ type?: string;
136
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
137
+ }> | Readonly<{
138
+ id: string;
139
+ disposition: import("@dxos/util").Disposition;
140
+ resolver?: import("@dxos/app-graph").ResolverExtension;
141
+ connector?: import("@dxos/app-graph").ConnectorExtension;
142
+ relation?: import("@dxos/app-graph").Relation;
143
+ type?: string;
144
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
145
+ }>[] | (Readonly<{
146
+ id: string;
147
+ disposition: import("@dxos/util").Disposition;
148
+ resolver?: import("@dxos/app-graph").ResolverExtension;
149
+ connector?: import("@dxos/app-graph").ConnectorExtension;
150
+ relation?: import("@dxos/app-graph").Relation;
151
+ type?: string;
152
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
153
+ }> | Readonly<{
154
+ id: string;
155
+ disposition: import("@dxos/util").Disposition;
156
+ resolver?: import("@dxos/app-graph").ResolverExtension;
157
+ connector?: import("@dxos/app-graph").ConnectorExtension;
158
+ relation?: import("@dxos/app-graph").Relation;
159
+ type?: string;
160
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
161
+ }>[] | (Readonly<{
162
+ id: string;
163
+ disposition: import("@dxos/util").Disposition;
164
+ resolver?: import("@dxos/app-graph").ResolverExtension;
165
+ connector?: import("@dxos/app-graph").ConnectorExtension;
166
+ relation?: import("@dxos/app-graph").Relation;
167
+ type?: string;
168
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
169
+ }> | Readonly<{
170
+ id: string;
171
+ disposition: import("@dxos/util").Disposition;
172
+ resolver?: import("@dxos/app-graph").ResolverExtension;
173
+ connector?: import("@dxos/app-graph").ConnectorExtension;
174
+ relation?: import("@dxos/app-graph").Relation;
175
+ type?: string;
176
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
177
+ }>[] | (Readonly<{
178
+ id: string;
179
+ disposition: import("@dxos/util").Disposition;
180
+ resolver?: import("@dxos/app-graph").ResolverExtension;
181
+ connector?: import("@dxos/app-graph").ConnectorExtension;
182
+ relation?: import("@dxos/app-graph").Relation;
183
+ type?: string;
184
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
185
+ }> | Readonly<{
186
+ id: string;
187
+ disposition: import("@dxos/util").Disposition;
188
+ resolver?: import("@dxos/app-graph").ResolverExtension;
189
+ connector?: import("@dxos/app-graph").ConnectorExtension;
190
+ relation?: import("@dxos/app-graph").Relation;
191
+ type?: string;
192
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
193
+ }>[] | (Readonly<{
194
+ id: string;
195
+ disposition: import("@dxos/util").Disposition;
196
+ resolver?: import("@dxos/app-graph").ResolverExtension;
197
+ connector?: import("@dxos/app-graph").ConnectorExtension;
198
+ relation?: import("@dxos/app-graph").Relation;
199
+ type?: string;
200
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
201
+ }> | Readonly<{
202
+ id: string;
203
+ disposition: import("@dxos/util").Disposition;
204
+ resolver?: import("@dxos/app-graph").ResolverExtension;
205
+ connector?: import("@dxos/app-graph").ConnectorExtension;
206
+ relation?: import("@dxos/app-graph").Relation;
207
+ type?: string;
208
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
209
+ }>[] | (Readonly<{
210
+ id: string;
211
+ disposition: import("@dxos/util").Disposition;
212
+ resolver?: import("@dxos/app-graph").ResolverExtension;
213
+ connector?: import("@dxos/app-graph").ConnectorExtension;
214
+ relation?: import("@dxos/app-graph").Relation;
215
+ type?: string;
216
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
217
+ }> | Readonly<{
218
+ id: string;
219
+ disposition: import("@dxos/util").Disposition;
220
+ resolver?: import("@dxos/app-graph").ResolverExtension;
221
+ connector?: import("@dxos/app-graph").ConnectorExtension;
222
+ relation?: import("@dxos/app-graph").Relation;
223
+ type?: string;
224
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
225
+ }>[] | (Readonly<{
226
+ id: string;
227
+ disposition: import("@dxos/util").Disposition;
228
+ resolver?: import("@dxos/app-graph").ResolverExtension;
229
+ connector?: import("@dxos/app-graph").ConnectorExtension;
230
+ relation?: import("@dxos/app-graph").Relation;
231
+ type?: string;
232
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
233
+ }> | Readonly<{
234
+ id: string;
235
+ disposition: import("@dxos/util").Disposition;
236
+ resolver?: import("@dxos/app-graph").ResolverExtension;
237
+ connector?: import("@dxos/app-graph").ConnectorExtension;
238
+ relation?: import("@dxos/app-graph").Relation;
239
+ type?: string;
240
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
241
+ }>[] | (Readonly<{
242
+ id: string;
243
+ disposition: import("@dxos/util").Disposition;
244
+ resolver?: import("@dxos/app-graph").ResolverExtension;
245
+ connector?: import("@dxos/app-graph").ConnectorExtension;
246
+ relation?: import("@dxos/app-graph").Relation;
247
+ type?: string;
248
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
249
+ }> | Readonly<{
250
+ id: string;
251
+ disposition: import("@dxos/util").Disposition;
252
+ resolver?: import("@dxos/app-graph").ResolverExtension;
253
+ connector?: import("@dxos/app-graph").ConnectorExtension;
254
+ relation?: import("@dxos/app-graph").Relation;
255
+ type?: string;
256
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
257
+ }>[] | (Readonly<{
258
+ id: string;
259
+ disposition: import("@dxos/util").Disposition;
260
+ resolver?: import("@dxos/app-graph").ResolverExtension;
261
+ connector?: import("@dxos/app-graph").ConnectorExtension;
262
+ relation?: import("@dxos/app-graph").Relation;
263
+ type?: string;
264
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
265
+ }> | Readonly<{
266
+ id: string;
267
+ disposition: import("@dxos/util").Disposition;
268
+ resolver?: import("@dxos/app-graph").ResolverExtension;
269
+ connector?: import("@dxos/app-graph").ConnectorExtension;
270
+ relation?: import("@dxos/app-graph").Relation;
271
+ type?: string;
272
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
273
+ }>[] | (Readonly<{
274
+ id: string;
275
+ disposition: import("@dxos/util").Disposition;
276
+ resolver?: import("@dxos/app-graph").ResolverExtension;
277
+ connector?: import("@dxos/app-graph").ConnectorExtension;
278
+ relation?: import("@dxos/app-graph").Relation;
279
+ type?: string;
280
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
281
+ }> | Readonly<{
282
+ id: string;
283
+ disposition: import("@dxos/util").Disposition;
284
+ resolver?: import("@dxos/app-graph").ResolverExtension;
285
+ connector?: import("@dxos/app-graph").ConnectorExtension;
286
+ relation?: import("@dxos/app-graph").Relation;
287
+ type?: string;
288
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
289
+ }>[] | (Readonly<{
290
+ id: string;
291
+ disposition: import("@dxos/util").Disposition;
292
+ resolver?: import("@dxos/app-graph").ResolverExtension;
293
+ connector?: import("@dxos/app-graph").ConnectorExtension;
294
+ relation?: import("@dxos/app-graph").Relation;
295
+ type?: string;
296
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
297
+ }> | Readonly<{
298
+ id: string;
299
+ disposition: import("@dxos/util").Disposition;
300
+ resolver?: import("@dxos/app-graph").ResolverExtension;
301
+ connector?: import("@dxos/app-graph").ConnectorExtension;
302
+ relation?: import("@dxos/app-graph").Relation;
303
+ type?: string;
304
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
305
+ }>[] | (Readonly<{
306
+ id: string;
307
+ disposition: import("@dxos/util").Disposition;
308
+ resolver?: import("@dxos/app-graph").ResolverExtension;
309
+ connector?: import("@dxos/app-graph").ConnectorExtension;
310
+ relation?: import("@dxos/app-graph").Relation;
311
+ type?: string;
312
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
313
+ }> | Readonly<{
314
+ id: string;
315
+ disposition: import("@dxos/util").Disposition;
316
+ resolver?: import("@dxos/app-graph").ResolverExtension;
317
+ connector?: import("@dxos/app-graph").ConnectorExtension;
318
+ relation?: import("@dxos/app-graph").Relation;
319
+ type?: string;
320
+ filter?: (node: import("@dxos/app-graph").Node) => boolean;
321
+ }>[] | /*elided*/ any)[])[])[])[])[])[])[])[])[])[])[]>;
322
+ const AppGraphSerializer: import("../core").InterfaceDef<NodeSerializer[]>;
323
+ const SettingsStore: import("../core").InterfaceDef<RootSettingsStore>;
324
+ type Settings = {
325
+ schema: S.Schema.All;
326
+ prefix: string;
327
+ value?: Record<string, any>;
328
+ };
329
+ const Settings: import("../core").InterfaceDef<Settings>;
330
+ type Metadata = Readonly<{
331
+ id: string;
332
+ metadata: Record<string, any>;
333
+ }>;
334
+ const Metadata: import("../core").InterfaceDef<Readonly<{
335
+ id: string;
336
+ metadata: Record<string, any>;
337
+ }>>;
338
+ const Tools: import("../core").InterfaceDef<Tool[]>;
339
+ const ArtifactDefinition: import("../core").InterfaceDef<ArtifactDefinition>;
340
+ type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
341
+ const FileUploader: import("../core").InterfaceDef<FileUploader>;
342
+ }
343
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/common/capabilities.ts"],"names":[],"mappings":"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"}
@@ -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"}