@dxos/app-framework 0.7.5-main.9d26e3a → 0.7.5-main.e9bb01b

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 (382) hide show
  1. package/dist/lib/browser/app-graph-builder-F7VZ6LRN.mjs +137 -0
  2. package/dist/lib/browser/app-graph-builder-F7VZ6LRN.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-ATRNTMSS.mjs +1399 -0
  4. package/dist/lib/browser/chunk-ATRNTMSS.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-LDJ3T4V3.mjs +32 -0
  6. package/dist/lib/browser/chunk-LDJ3T4V3.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-WS6SU6HI.mjs +285 -0
  8. package/dist/lib/browser/chunk-WS6SU6HI.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +119 -642
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/intent-dispatcher-E6J7E5Y5.mjs +11 -0
  12. package/dist/lib/browser/intent-resolver-XLE4L3LS.mjs +38 -0
  13. package/dist/lib/browser/intent-resolver-XLE4L3LS.mjs.map +7 -0
  14. package/dist/lib/browser/meta.json +1 -1
  15. package/dist/lib/browser/store-QU2IKFAI.mjs +19 -0
  16. package/dist/lib/browser/store-QU2IKFAI.mjs.map +7 -0
  17. package/dist/lib/browser/testing/index.mjs +74 -0
  18. package/dist/lib/browser/testing/index.mjs.map +7 -0
  19. package/dist/lib/browser/worker.mjs +77 -0
  20. package/dist/lib/node/app-graph-builder-JGBADFF7.cjs +146 -0
  21. package/dist/lib/node/app-graph-builder-JGBADFF7.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-FCMHRU3M.cjs → chunk-QLVQ6PND.cjs} +23 -35
  23. package/dist/lib/node/chunk-QLVQ6PND.cjs.map +7 -0
  24. package/dist/lib/node/chunk-WKC6YMEQ.cjs +1433 -0
  25. package/dist/lib/node/chunk-WKC6YMEQ.cjs.map +7 -0
  26. package/dist/lib/node/chunk-WRWRZKZU.cjs +308 -0
  27. package/dist/lib/node/chunk-WRWRZKZU.cjs.map +7 -0
  28. package/dist/lib/node/index.cjs +125 -665
  29. package/dist/lib/node/index.cjs.map +4 -4
  30. package/dist/lib/node/{plugin-settings-W6UHMH5M.cjs → intent-dispatcher-CFBKDZQR.cjs} +10 -14
  31. package/dist/lib/node/intent-dispatcher-CFBKDZQR.cjs.map +7 -0
  32. package/dist/lib/node/intent-resolver-3TKCXP4S.cjs +45 -0
  33. package/dist/lib/node/intent-resolver-3TKCXP4S.cjs.map +7 -0
  34. package/dist/lib/node/meta.json +1 -1
  35. package/dist/lib/node/store-4QMUUU2A.cjs +34 -0
  36. package/dist/lib/node/store-4QMUUU2A.cjs.map +7 -0
  37. package/dist/lib/node/testing/index.cjs +98 -0
  38. package/dist/lib/node/testing/index.cjs.map +7 -0
  39. package/dist/lib/node/worker.cjs +99 -0
  40. package/dist/lib/node/worker.cjs.map +7 -0
  41. package/dist/lib/node-esm/app-graph-builder-2QEX57NX.mjs +138 -0
  42. package/dist/lib/node-esm/app-graph-builder-2QEX57NX.mjs.map +7 -0
  43. package/dist/lib/node-esm/chunk-44J2VZBB.mjs +1401 -0
  44. package/dist/lib/node-esm/chunk-44J2VZBB.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-CNJYZNSL.mjs +34 -0
  46. package/dist/lib/node-esm/chunk-CNJYZNSL.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-HTLXL32I.mjs +286 -0
  48. package/dist/lib/node-esm/chunk-HTLXL32I.mjs.map +7 -0
  49. package/dist/lib/node-esm/index.mjs +119 -642
  50. package/dist/lib/node-esm/index.mjs.map +4 -4
  51. package/dist/lib/node-esm/intent-dispatcher-LDQGDZ62.mjs +12 -0
  52. package/dist/lib/node-esm/intent-resolver-7VJWN67U.mjs +39 -0
  53. package/dist/lib/node-esm/intent-resolver-7VJWN67U.mjs.map +7 -0
  54. package/dist/lib/node-esm/meta.json +1 -1
  55. package/dist/lib/node-esm/store-VWDAYUQY.mjs +20 -0
  56. package/dist/lib/node-esm/store-VWDAYUQY.mjs.map +7 -0
  57. package/dist/lib/node-esm/testing/index.mjs +75 -0
  58. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  59. package/dist/lib/node-esm/worker.mjs +78 -0
  60. package/dist/types/src/App.d.ts +22 -13
  61. package/dist/types/src/App.d.ts.map +1 -1
  62. package/dist/types/src/common/capabilities.d.ts +293 -0
  63. package/dist/types/src/common/capabilities.d.ts.map +1 -0
  64. package/dist/types/src/common/events.d.ts +48 -0
  65. package/dist/types/src/common/events.d.ts.map +1 -0
  66. package/dist/types/src/common/file.d.ts +14 -0
  67. package/dist/types/src/common/file.d.ts.map +1 -0
  68. package/dist/types/src/common/graph.d.ts +21 -0
  69. package/dist/types/src/common/graph.d.ts.map +1 -0
  70. package/dist/types/src/common/index.d.ts +8 -0
  71. package/dist/types/src/common/index.d.ts.map +1 -0
  72. package/dist/types/src/common/layout.d.ts +248 -0
  73. package/dist/types/src/common/layout.d.ts.map +1 -0
  74. package/dist/types/src/{plugins/plugin-surface/SurfaceContext.d.ts → common/surface.d.ts} +12 -29
  75. package/dist/types/src/common/surface.d.ts.map +1 -0
  76. package/dist/types/src/common/translations.d.ts +11 -0
  77. package/dist/types/src/common/translations.d.ts.map +1 -0
  78. package/dist/types/src/core/capabilities.d.ts +94 -0
  79. package/dist/types/src/core/capabilities.d.ts.map +1 -0
  80. package/dist/types/src/core/capabilities.test.d.ts +2 -0
  81. package/dist/types/src/core/capabilities.test.d.ts.map +1 -0
  82. package/dist/types/src/core/events.d.ts +58 -0
  83. package/dist/types/src/core/events.d.ts.map +1 -0
  84. package/dist/types/src/core/index.d.ts +5 -0
  85. package/dist/types/src/core/index.d.ts.map +1 -0
  86. package/dist/types/src/core/manager.d.ts +119 -0
  87. package/dist/types/src/core/manager.d.ts.map +1 -0
  88. package/dist/types/src/core/manager.test.d.ts +2 -0
  89. package/dist/types/src/core/manager.test.d.ts.map +1 -0
  90. package/dist/types/src/core/plugin.d.ts +97 -0
  91. package/dist/types/src/core/plugin.d.ts.map +1 -0
  92. package/dist/types/src/helpers.d.ts +10 -0
  93. package/dist/types/src/helpers.d.ts.map +1 -0
  94. package/dist/types/src/helpers.test.d.ts +2 -0
  95. package/dist/types/src/helpers.test.d.ts.map +1 -0
  96. package/dist/types/src/index.d.ts +5 -1
  97. package/dist/types/src/index.d.ts.map +1 -1
  98. package/dist/types/src/playground/debug/Debug.d.ts +6 -0
  99. package/dist/types/src/playground/debug/Debug.d.ts.map +1 -0
  100. package/dist/types/src/playground/debug/index.d.ts +2 -0
  101. package/dist/types/src/playground/debug/index.d.ts.map +1 -0
  102. package/dist/types/src/playground/debug/plugin.d.ts +2 -0
  103. package/dist/types/src/playground/debug/plugin.d.ts.map +1 -0
  104. package/dist/types/src/playground/generator/Main.d.ts +6 -0
  105. package/dist/types/src/playground/generator/Main.d.ts.map +1 -0
  106. package/dist/types/src/playground/generator/Toolbar.d.ts +6 -0
  107. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -0
  108. package/dist/types/src/playground/generator/generator.d.ts +7 -0
  109. package/dist/types/src/playground/generator/generator.d.ts.map +1 -0
  110. package/dist/types/src/playground/generator/index.d.ts +3 -0
  111. package/dist/types/src/playground/generator/index.d.ts.map +1 -0
  112. package/dist/types/src/playground/generator/plugin.d.ts +2 -0
  113. package/dist/types/src/playground/generator/plugin.d.ts.map +1 -0
  114. package/dist/types/src/playground/layout/Layout.d.ts +8 -0
  115. package/dist/types/src/playground/layout/Layout.d.ts.map +1 -0
  116. package/dist/types/src/playground/layout/index.d.ts +2 -0
  117. package/dist/types/src/playground/layout/index.d.ts.map +1 -0
  118. package/dist/types/src/playground/layout/plugin.d.ts +2 -0
  119. package/dist/types/src/playground/layout/plugin.d.ts.map +1 -0
  120. package/dist/types/src/playground/logger/Toolbar.d.ts +6 -0
  121. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -0
  122. package/dist/types/src/playground/logger/index.d.ts +2 -0
  123. package/dist/types/src/playground/logger/index.d.ts.map +1 -0
  124. package/dist/types/src/playground/logger/plugin.d.ts +2 -0
  125. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -0
  126. package/dist/types/src/playground/logger/schema.d.ts +13 -0
  127. package/dist/types/src/playground/logger/schema.d.ts.map +1 -0
  128. package/dist/types/src/playground/playground.stories.d.ts +10 -0
  129. package/dist/types/src/playground/playground.stories.d.ts.map +1 -0
  130. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +2 -0
  131. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -0
  132. package/dist/types/src/plugin-intent/actions.d.ts +23 -0
  133. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -0
  134. package/dist/types/src/plugin-intent/errors.d.ts +16 -0
  135. package/dist/types/src/plugin-intent/errors.d.ts.map +1 -0
  136. package/dist/types/src/plugin-intent/index.d.ts +5 -0
  137. package/dist/types/src/plugin-intent/index.d.ts.map +1 -0
  138. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +113 -0
  139. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -0
  140. package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +1 -0
  141. package/dist/types/src/{plugins/plugin-intent → plugin-intent}/intent.d.ts +8 -28
  142. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -0
  143. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +2 -0
  144. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -0
  145. package/dist/types/src/plugin-settings/actions.d.ts +27 -0
  146. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -0
  147. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +197 -0
  148. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -0
  149. package/dist/types/src/plugin-settings/index.d.ts +3 -0
  150. package/dist/types/src/plugin-settings/index.d.ts.map +1 -0
  151. package/dist/types/src/plugin-settings/intent-resolver.d.ts +4 -0
  152. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -0
  153. package/dist/types/src/plugin-settings/store.d.ts +5 -0
  154. package/dist/types/src/plugin-settings/store.d.ts.map +1 -0
  155. package/dist/types/src/plugin-settings/translations.d.ts +11 -0
  156. package/dist/types/src/plugin-settings/translations.d.ts.map +1 -0
  157. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -0
  158. package/dist/types/src/{plugins/plugin-intent → react}/IntentContext.d.ts +2 -2
  159. package/dist/types/src/react/IntentContext.d.ts.map +1 -0
  160. package/dist/types/src/react/PluginManagerProvider.d.ts +10 -0
  161. package/dist/types/src/react/PluginManagerProvider.d.ts.map +1 -0
  162. package/dist/types/src/react/Surface.d.ts +12 -0
  163. package/dist/types/src/react/Surface.d.ts.map +1 -0
  164. package/dist/types/src/react/Surface.stories.d.ts +16 -0
  165. package/dist/types/src/react/Surface.stories.d.ts.map +1 -0
  166. package/dist/types/src/react/common.d.ts +12 -0
  167. package/dist/types/src/react/common.d.ts.map +1 -0
  168. package/dist/types/src/react/index.d.ts +7 -0
  169. package/dist/types/src/react/index.d.ts.map +1 -0
  170. package/dist/types/src/react/useCapabilities.d.ts +13 -0
  171. package/dist/types/src/react/useCapabilities.d.ts.map +1 -0
  172. package/dist/types/src/react/useIntentResolver.d.ts +3 -0
  173. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -0
  174. package/dist/types/src/testing/index.d.ts +2 -0
  175. package/dist/types/src/testing/index.d.ts.map +1 -0
  176. package/dist/types/src/testing/withPluginManager.d.ts +10 -0
  177. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -0
  178. package/dist/types/src/testing/withPluginManager.stories.d.ts +5 -0
  179. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -0
  180. package/dist/types/src/worker.d.ts +4 -0
  181. package/dist/types/src/worker.d.ts.map +1 -0
  182. package/dist/types/tsconfig.tsbuildinfo +1 -1
  183. package/package.json +37 -18
  184. package/project.json +4 -3
  185. package/src/App.tsx +139 -34
  186. package/src/common/capabilities.ts +91 -0
  187. package/src/common/events.ts +72 -0
  188. package/src/common/file.ts +22 -0
  189. package/src/common/graph.ts +30 -0
  190. package/src/{plugins/common → common}/index.ts +3 -2
  191. package/src/common/layout.ts +225 -0
  192. package/src/{plugins/plugin-surface/SurfaceContext.ts → common/surface.ts} +6 -37
  193. package/src/common/translations.ts +17 -0
  194. package/src/core/capabilities.test.ts +116 -0
  195. package/src/core/capabilities.ts +222 -0
  196. package/src/core/events.ts +58 -0
  197. package/src/core/index.ts +8 -0
  198. package/src/core/manager.test.ts +516 -0
  199. package/src/core/manager.ts +511 -0
  200. package/src/core/plugin.ts +131 -0
  201. package/src/helpers.test.ts +97 -0
  202. package/src/helpers.ts +45 -0
  203. package/src/index.ts +6 -3
  204. package/src/playground/debug/Debug.tsx +39 -0
  205. package/src/playground/debug/index.ts +5 -0
  206. package/src/playground/debug/plugin.ts +17 -0
  207. package/src/playground/generator/Main.tsx +71 -0
  208. package/src/playground/generator/Toolbar.tsx +46 -0
  209. package/src/playground/generator/generator.ts +48 -0
  210. package/src/playground/generator/index.ts +6 -0
  211. package/src/playground/generator/plugin.ts +23 -0
  212. package/src/playground/layout/Layout.tsx +33 -0
  213. package/src/playground/layout/index.ts +5 -0
  214. package/src/playground/layout/plugin.ts +17 -0
  215. package/src/playground/logger/Toolbar.tsx +29 -0
  216. package/src/playground/logger/index.ts +5 -0
  217. package/src/playground/logger/plugin.ts +36 -0
  218. package/src/playground/logger/schema.ts +12 -0
  219. package/src/playground/playground.stories.tsx +34 -0
  220. package/src/plugin-intent/IntentPlugin.tsx +20 -0
  221. package/src/plugin-intent/actions.ts +22 -0
  222. package/src/plugin-intent/errors.ts +39 -0
  223. package/src/plugin-intent/index.ts +8 -0
  224. package/src/{plugins/plugin-intent → plugin-intent}/intent-dispatcher.test.ts +83 -63
  225. package/src/{plugins/plugin-intent → plugin-intent}/intent-dispatcher.ts +114 -95
  226. package/src/{plugins/plugin-intent → plugin-intent}/intent.ts +10 -26
  227. package/src/plugin-settings/SettingsPlugin.ts +35 -0
  228. package/src/plugin-settings/actions.ts +27 -0
  229. package/src/plugin-settings/app-graph-builder.ts +122 -0
  230. package/src/plugin-settings/index.ts +6 -0
  231. package/src/plugin-settings/intent-resolver.ts +28 -0
  232. package/src/plugin-settings/store.ts +20 -0
  233. package/src/plugin-settings/translations.ts +17 -0
  234. package/src/{plugins/plugin-intent → react}/IntentContext.tsx +13 -5
  235. package/src/react/PluginManagerProvider.ts +22 -0
  236. package/src/react/Surface.stories.tsx +96 -0
  237. package/src/react/Surface.tsx +75 -0
  238. package/src/react/common.ts +12 -0
  239. package/src/react/index.ts +10 -0
  240. package/src/react/useCapabilities.ts +39 -0
  241. package/src/react/useIntentResolver.ts +22 -0
  242. package/src/testing/index.ts +5 -0
  243. package/src/testing/withPluginManager.stories.tsx +47 -0
  244. package/src/testing/withPluginManager.tsx +75 -0
  245. package/src/worker.ts +11 -0
  246. package/tsconfig.json +16 -4
  247. package/dist/lib/browser/chunk-3E7RY3CE.mjs +0 -72
  248. package/dist/lib/browser/chunk-3E7RY3CE.mjs.map +0 -7
  249. package/dist/lib/browser/chunk-QG25ZU2N.mjs +0 -320
  250. package/dist/lib/browser/chunk-QG25ZU2N.mjs.map +0 -7
  251. package/dist/lib/browser/chunk-SPDTXTOV.mjs +0 -163
  252. package/dist/lib/browser/chunk-SPDTXTOV.mjs.map +0 -7
  253. package/dist/lib/browser/chunk-WBOXEHBE.mjs +0 -51
  254. package/dist/lib/browser/chunk-WBOXEHBE.mjs.map +0 -7
  255. package/dist/lib/browser/plugin-intent-T7Y3MJ5C.mjs +0 -32
  256. package/dist/lib/browser/plugin-settings-5U2L2NRU.mjs +0 -15
  257. package/dist/lib/browser/plugin-surface-OKPF3EQI.mjs +0 -24
  258. package/dist/lib/node/chunk-BW3RNEVI.cjs +0 -185
  259. package/dist/lib/node/chunk-BW3RNEVI.cjs.map +0 -7
  260. package/dist/lib/node/chunk-FCMHRU3M.cjs.map +0 -7
  261. package/dist/lib/node/chunk-QBM42OQ6.cjs +0 -97
  262. package/dist/lib/node/chunk-QBM42OQ6.cjs.map +0 -7
  263. package/dist/lib/node/chunk-VWHAALIN.cjs +0 -344
  264. package/dist/lib/node/chunk-VWHAALIN.cjs.map +0 -7
  265. package/dist/lib/node/plugin-intent-F3TQZIUR.cjs +0 -53
  266. package/dist/lib/node/plugin-intent-F3TQZIUR.cjs.map +0 -7
  267. package/dist/lib/node/plugin-settings-W6UHMH5M.cjs.map +0 -7
  268. package/dist/lib/node/plugin-surface-CCSIONYW.cjs +0 -45
  269. package/dist/lib/node/plugin-surface-CCSIONYW.cjs.map +0 -7
  270. package/dist/lib/node-esm/chunk-3T5UIJY3.mjs +0 -53
  271. package/dist/lib/node-esm/chunk-3T5UIJY3.mjs.map +0 -7
  272. package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs +0 -164
  273. package/dist/lib/node-esm/chunk-4GX7V5ZE.mjs.map +0 -7
  274. package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs +0 -321
  275. package/dist/lib/node-esm/chunk-CFOUYXQ6.mjs.map +0 -7
  276. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs +0 -74
  277. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs.map +0 -7
  278. package/dist/lib/node-esm/plugin-intent-W2HQC6LC.mjs +0 -33
  279. package/dist/lib/node-esm/plugin-settings-H5RHNFVC.mjs +0 -16
  280. package/dist/lib/node-esm/plugin-settings-H5RHNFVC.mjs.map +0 -7
  281. package/dist/lib/node-esm/plugin-surface-V3YET3UL.mjs +0 -25
  282. package/dist/lib/node-esm/plugin-surface-V3YET3UL.mjs.map +0 -7
  283. package/dist/types/src/plugins/common/file.d.ts +0 -22
  284. package/dist/types/src/plugins/common/file.d.ts.map +0 -1
  285. package/dist/types/src/plugins/common/graph.d.ts +0 -51
  286. package/dist/types/src/plugins/common/graph.d.ts.map +0 -1
  287. package/dist/types/src/plugins/common/index.d.ts +0 -7
  288. package/dist/types/src/plugins/common/index.d.ts.map +0 -1
  289. package/dist/types/src/plugins/common/layout.d.ts +0 -176
  290. package/dist/types/src/plugins/common/layout.d.ts.map +0 -1
  291. package/dist/types/src/plugins/common/metadata.d.ts +0 -16
  292. package/dist/types/src/plugins/common/metadata.d.ts.map +0 -1
  293. package/dist/types/src/plugins/common/navigation.d.ts +0 -243
  294. package/dist/types/src/plugins/common/navigation.d.ts.map +0 -1
  295. package/dist/types/src/plugins/common/translations.d.ts +0 -22
  296. package/dist/types/src/plugins/common/translations.d.ts.map +0 -1
  297. package/dist/types/src/plugins/helpers.d.ts +0 -41
  298. package/dist/types/src/plugins/helpers.d.ts.map +0 -1
  299. package/dist/types/src/plugins/index.d.ts +0 -7
  300. package/dist/types/src/plugins/index.d.ts.map +0 -1
  301. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts +0 -16
  302. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts.map +0 -1
  303. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts +0 -14
  304. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts.map +0 -1
  305. package/dist/types/src/plugins/plugin-host/PluginContext.d.ts +0 -47
  306. package/dist/types/src/plugins/plugin-host/PluginContext.d.ts.map +0 -1
  307. package/dist/types/src/plugins/plugin-host/index.d.ts +0 -6
  308. package/dist/types/src/plugins/plugin-host/index.d.ts.map +0 -1
  309. package/dist/types/src/plugins/plugin-host/plugin.d.ts +0 -104
  310. package/dist/types/src/plugins/plugin-host/plugin.d.ts.map +0 -1
  311. package/dist/types/src/plugins/plugin-host/plugin.test.d.ts +0 -35
  312. package/dist/types/src/plugins/plugin-host/plugin.test.d.ts.map +0 -1
  313. package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts.map +0 -1
  314. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts +0 -8
  315. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts.map +0 -1
  316. package/dist/types/src/plugins/plugin-intent/index.d.ts +0 -7
  317. package/dist/types/src/plugins/plugin-intent/index.d.ts.map +0 -1
  318. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.d.ts +0 -107
  319. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.d.ts.map +0 -1
  320. package/dist/types/src/plugins/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
  321. package/dist/types/src/plugins/plugin-intent/intent.d.ts.map +0 -1
  322. package/dist/types/src/plugins/plugin-intent/meta.d.ts +0 -6
  323. package/dist/types/src/plugins/plugin-intent/meta.d.ts.map +0 -1
  324. package/dist/types/src/plugins/plugin-intent/provides.d.ts +0 -16
  325. package/dist/types/src/plugins/plugin-intent/provides.d.ts.map +0 -1
  326. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts +0 -4
  327. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts.map +0 -1
  328. package/dist/types/src/plugins/plugin-settings/index.d.ts +0 -4
  329. package/dist/types/src/plugins/plugin-settings/index.d.ts.map +0 -1
  330. package/dist/types/src/plugins/plugin-settings/meta.d.ts +0 -5
  331. package/dist/types/src/plugins/plugin-settings/meta.d.ts.map +0 -1
  332. package/dist/types/src/plugins/plugin-settings/provides.d.ts +0 -26
  333. package/dist/types/src/plugins/plugin-settings/provides.d.ts.map +0 -1
  334. package/dist/types/src/plugins/plugin-surface/ErrorBoundary.d.ts.map +0 -1
  335. package/dist/types/src/plugins/plugin-surface/Surface.d.ts +0 -7
  336. package/dist/types/src/plugins/plugin-surface/Surface.d.ts.map +0 -1
  337. package/dist/types/src/plugins/plugin-surface/SurfaceContext.d.ts.map +0 -1
  338. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts +0 -7
  339. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts.map +0 -1
  340. package/dist/types/src/plugins/plugin-surface/helpers.d.ts +0 -21
  341. package/dist/types/src/plugins/plugin-surface/helpers.d.ts.map +0 -1
  342. package/dist/types/src/plugins/plugin-surface/index.d.ts +0 -8
  343. package/dist/types/src/plugins/plugin-surface/index.d.ts.map +0 -1
  344. package/dist/types/src/plugins/plugin-surface/meta.d.ts +0 -5
  345. package/dist/types/src/plugins/plugin-surface/meta.d.ts.map +0 -1
  346. package/dist/types/src/plugins/plugin-surface/provides.d.ts +0 -17
  347. package/dist/types/src/plugins/plugin-surface/provides.d.ts.map +0 -1
  348. package/src/plugins/common/file.ts +0 -36
  349. package/src/plugins/common/graph.ts +0 -70
  350. package/src/plugins/common/layout.ts +0 -173
  351. package/src/plugins/common/metadata.ts +0 -29
  352. package/src/plugins/common/navigation.ts +0 -214
  353. package/src/plugins/common/translations.ts +0 -36
  354. package/src/plugins/helpers.ts +0 -92
  355. package/src/plugins/index.ts +0 -11
  356. package/src/plugins/plugin-host/HostPlugin.tsx +0 -88
  357. package/src/plugins/plugin-host/PluginContainer.tsx +0 -120
  358. package/src/plugins/plugin-host/PluginContext.tsx +0 -79
  359. package/src/plugins/plugin-host/index.ts +0 -12
  360. package/src/plugins/plugin-host/plugin.test.ts +0 -158
  361. package/src/plugins/plugin-host/plugin.ts +0 -133
  362. package/src/plugins/plugin-intent/IntentPlugin.tsx +0 -75
  363. package/src/plugins/plugin-intent/index.ts +0 -13
  364. package/src/plugins/plugin-intent/meta.ts +0 -11
  365. package/src/plugins/plugin-intent/provides.ts +0 -26
  366. package/src/plugins/plugin-settings/SettingsPlugin.tsx +0 -22
  367. package/src/plugins/plugin-settings/index.ts +0 -9
  368. package/src/plugins/plugin-settings/meta.ts +0 -9
  369. package/src/plugins/plugin-settings/provides.ts +0 -34
  370. package/src/plugins/plugin-surface/Surface.tsx +0 -62
  371. package/src/plugins/plugin-surface/SurfacePlugin.tsx +0 -45
  372. package/src/plugins/plugin-surface/helpers.ts +0 -22
  373. package/src/plugins/plugin-surface/index.ts +0 -14
  374. package/src/plugins/plugin-surface/meta.ts +0 -9
  375. package/src/plugins/plugin-surface/provides.ts +0 -27
  376. /package/dist/lib/browser/{plugin-intent-T7Y3MJ5C.mjs.map → intent-dispatcher-E6J7E5Y5.mjs.map} +0 -0
  377. /package/dist/lib/browser/{plugin-settings-5U2L2NRU.mjs.map → worker.mjs.map} +0 -0
  378. /package/dist/lib/{browser/plugin-surface-OKPF3EQI.mjs.map → node-esm/intent-dispatcher-LDQGDZ62.mjs.map} +0 -0
  379. /package/dist/lib/node-esm/{plugin-intent-W2HQC6LC.mjs.map → worker.mjs.map} +0 -0
  380. /package/dist/types/src/{plugins/plugin-intent → plugin-intent}/intent-dispatcher.test.d.ts +0 -0
  381. /package/dist/types/src/{plugins/plugin-surface → react}/ErrorBoundary.d.ts +0 -0
  382. /package/src/{plugins/plugin-surface → react}/ErrorBoundary.tsx +0 -0
@@ -0,0 +1,248 @@
1
+ import { Schema as S } from '@effect/schema';
2
+ export declare const LAYOUT_PLUGIN = "dxos.org/plugin/layout";
3
+ export declare const LAYOUT_ACTION = "dxos.org/plugin/layout/action";
4
+ /**
5
+ * Expected payload for layout actions.
6
+ */
7
+ export declare namespace LayoutAction {
8
+ export const UPDATE_LAYOUT = "dxos.org/plugin/layout/action/update-layout";
9
+ const UpdateLayout_base: S.TaggedClass<UpdateLayout, "dxos.org/plugin/layout/action/update-layout", {
10
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
11
+ } & {
12
+ input: S.Struct<{
13
+ part: S.SchemaClass<string, string, never>;
14
+ subject: S.optional<S.SchemaClass<any, any, never>>;
15
+ options: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
16
+ }>;
17
+ output: typeof S.Void;
18
+ }>;
19
+ /**
20
+ * Generic layout action.
21
+ */
22
+ export class UpdateLayout extends UpdateLayout_base {
23
+ }
24
+ const SetLayoutMode_base: S.TaggedClass<SetLayoutMode, "dxos.org/plugin/layout/action/update-layout", {
25
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
26
+ } & {
27
+ input: S.Struct<{
28
+ part: S.Literal<["mode"]>;
29
+ subject: S.optional<S.SchemaClass<string, string, never>>;
30
+ options: S.Union<[S.Struct<{
31
+ mode: S.SchemaClass<string, string, never>;
32
+ }>, S.Struct<{
33
+ revert: S.SchemaClass<boolean, boolean, never>;
34
+ }>]>;
35
+ }>;
36
+ output: typeof S.Void;
37
+ }>;
38
+ export class SetLayoutMode extends SetLayoutMode_base {
39
+ }
40
+ const UpdateSidebar_base: S.TaggedClass<UpdateSidebar, "dxos.org/plugin/layout/action/update-layout", {
41
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
42
+ } & {
43
+ input: S.Struct<{
44
+ part: S.Literal<["sidebar"]>;
45
+ subject: S.optional<S.SchemaClass<string, string, never>>;
46
+ options: S.optional<S.Struct<{
47
+ state: S.Literal<["closed", "collapsed", "expanded"]>;
48
+ }>>;
49
+ }>;
50
+ output: typeof S.Void;
51
+ }>;
52
+ export class UpdateSidebar extends UpdateSidebar_base {
53
+ }
54
+ const UpdateComplementary_base: S.TaggedClass<UpdateComplementary, "dxos.org/plugin/layout/action/update-layout", {
55
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
56
+ } & {
57
+ input: S.Struct<{
58
+ part: S.Literal<["complementary"]>;
59
+ subject: S.optional<S.SchemaClass<string, string, never>>;
60
+ options: S.optional<S.Struct<{
61
+ state: S.Literal<["closed", "collapsed", "expanded"]>;
62
+ }>>;
63
+ }>;
64
+ output: typeof S.Void;
65
+ }>;
66
+ export class UpdateComplementary extends UpdateComplementary_base {
67
+ }
68
+ const UpdateDialog_base: S.TaggedClass<UpdateDialog, "dxos.org/plugin/layout/action/update-layout", {
69
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
70
+ } & {
71
+ input: S.Struct<{
72
+ part: S.Literal<["dialog"]>;
73
+ subject: S.optional<S.SchemaClass<string, string, never>>;
74
+ options: S.Struct<{
75
+ state: S.optional<S.SchemaClass<boolean, boolean, never>>;
76
+ blockAlign: S.optional<S.Literal<["start", "center"]>>;
77
+ type: S.optional<S.Literal<["default", "alert"]>>;
78
+ props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
79
+ }>;
80
+ }>;
81
+ output: typeof S.Void;
82
+ }>;
83
+ export class UpdateDialog extends UpdateDialog_base {
84
+ }
85
+ const UpdatePopover_base: S.TaggedClass<UpdatePopover, "dxos.org/plugin/layout/action/update-layout", {
86
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
87
+ } & {
88
+ input: S.Struct<{
89
+ part: S.Literal<["popover"]>;
90
+ subject: S.optional<S.SchemaClass<string, string, never>>;
91
+ options: S.Struct<{
92
+ anchorId: S.SchemaClass<string, string, never>;
93
+ state: S.optional<S.SchemaClass<boolean, boolean, never>>;
94
+ props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
95
+ }>;
96
+ }>;
97
+ output: typeof S.Void;
98
+ }>;
99
+ export class UpdatePopover extends UpdatePopover_base {
100
+ }
101
+ export const Toast: S.Struct<{
102
+ id: S.SchemaClass<string, string, never>;
103
+ title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
104
+ ns: typeof S.String;
105
+ count: S.optional<typeof S.Number>;
106
+ }>>]>>]>>;
107
+ description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
108
+ ns: typeof S.String;
109
+ count: S.optional<typeof S.Number>;
110
+ }>>]>>]>>;
111
+ icon: S.optional<S.SchemaClass<string, string, never>>;
112
+ duration: S.optional<S.SchemaClass<number, number, never>>;
113
+ closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
114
+ ns: typeof S.String;
115
+ count: S.optional<typeof S.Number>;
116
+ }>>]>>]>>;
117
+ actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
118
+ ns: typeof S.String;
119
+ count: S.optional<typeof S.Number>;
120
+ }>>]>>]>>;
121
+ actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
122
+ ns: typeof S.String;
123
+ count: S.optional<typeof S.Number>;
124
+ }>>]>>]>>;
125
+ onAction: S.optional<S.SchemaClass<any, any, never>>;
126
+ }>;
127
+ export interface Toast extends Omit<S.Schema.Type<typeof Toast>, 'onAction'> {
128
+ onAction?: () => void;
129
+ }
130
+ const AddToast_base: S.TaggedClass<AddToast, "dxos.org/plugin/layout/action/update-layout", {
131
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
132
+ } & {
133
+ input: S.Struct<{
134
+ part: S.Literal<["toast"]>;
135
+ subject: S.Struct<{
136
+ id: S.SchemaClass<string, string, never>;
137
+ title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
138
+ ns: typeof S.String;
139
+ count: S.optional<typeof S.Number>;
140
+ }>>]>>]>>;
141
+ description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
142
+ ns: typeof S.String;
143
+ count: S.optional<typeof S.Number>;
144
+ }>>]>>]>>;
145
+ icon: S.optional<S.SchemaClass<string, string, never>>;
146
+ duration: S.optional<S.SchemaClass<number, number, never>>;
147
+ closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
148
+ ns: typeof S.String;
149
+ count: S.optional<typeof S.Number>;
150
+ }>>]>>]>>;
151
+ actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
152
+ ns: typeof S.String;
153
+ count: S.optional<typeof S.Number>;
154
+ }>>]>>]>>;
155
+ actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
156
+ ns: typeof S.String;
157
+ count: S.optional<typeof S.Number>;
158
+ }>>]>>]>>;
159
+ onAction: S.optional<S.SchemaClass<any, any, never>>;
160
+ }>;
161
+ }>;
162
+ output: typeof S.Void;
163
+ }>;
164
+ export class AddToast extends AddToast_base {
165
+ }
166
+ const SwitchWorkspace_base: S.TaggedClass<SwitchWorkspace, "dxos.org/plugin/layout/action/update-layout", {
167
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
168
+ } & {
169
+ input: S.Struct<{
170
+ part: S.Literal<["workspace"]>;
171
+ subject: S.SchemaClass<string, string, never>;
172
+ }>;
173
+ output: typeof S.Void;
174
+ }>;
175
+ export class SwitchWorkspace extends SwitchWorkspace_base {
176
+ }
177
+ const Open_base: S.TaggedClass<Open, "dxos.org/plugin/layout/action/update-layout", {
178
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
179
+ } & {
180
+ input: S.Struct<{
181
+ part: S.Literal<["main"]>;
182
+ subject: S.Array$<S.SchemaClass<string, string, never>>;
183
+ options: S.optional<S.Struct<{
184
+ state: S.optional<S.Literal<[true]>>;
185
+ key: S.optional<S.SchemaClass<string, string, never>>;
186
+ scrollIntoView: S.optional<S.SchemaClass<boolean, boolean, never>>;
187
+ pivotId: S.optional<S.SchemaClass<string, string, never>>;
188
+ positioning: S.optional<S.Union<[S.Literal<["start"]>, S.Literal<["end"]>]>>;
189
+ }>>;
190
+ }>;
191
+ output: typeof S.Void;
192
+ }>;
193
+ export class Open extends Open_base {
194
+ }
195
+ const Set_base: S.TaggedClass<Set, "dxos.org/plugin/layout/action/update-layout", {
196
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
197
+ } & {
198
+ input: S.Struct<{
199
+ part: S.Literal<["main"]>;
200
+ subject: S.Array$<S.SchemaClass<string, string, never>>;
201
+ options: S.Struct<{
202
+ override: S.Literal<[true]>;
203
+ }>;
204
+ }>;
205
+ output: typeof S.Void;
206
+ }>;
207
+ export class Set extends Set_base {
208
+ }
209
+ const Close_base: S.TaggedClass<Close, "dxos.org/plugin/layout/action/update-layout", {
210
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
211
+ } & {
212
+ input: S.Struct<{
213
+ part: S.Literal<["main"]>;
214
+ subject: S.Array$<S.SchemaClass<string, string, never>>;
215
+ options: S.Struct<{
216
+ state: S.Literal<[false]>;
217
+ }>;
218
+ }>;
219
+ output: typeof S.Void;
220
+ }>;
221
+ export class Close extends Close_base {
222
+ }
223
+ const ScrollIntoView_base: S.TaggedClass<ScrollIntoView, "dxos.org/plugin/layout/action/update-layout", {
224
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
225
+ } & {
226
+ input: S.Struct<{
227
+ part: S.Literal<["current"]>;
228
+ subject: S.optional<S.SchemaClass<string, string, never>>;
229
+ options: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
230
+ }>;
231
+ output: typeof S.Void;
232
+ }>;
233
+ export class ScrollIntoView extends ScrollIntoView_base {
234
+ }
235
+ const Expose_base: S.TaggedClass<Expose, "dxos.org/plugin/layout/action/update-layout", {
236
+ readonly _tag: S.tag<"dxos.org/plugin/layout/action/update-layout">;
237
+ } & {
238
+ input: S.Struct<{
239
+ part: S.Literal<["navigation"]>;
240
+ subject: S.SchemaClass<string, string, never>;
241
+ }>;
242
+ output: typeof S.Void;
243
+ }>;
244
+ export class Expose extends Expose_base {
245
+ }
246
+ export {};
247
+ }
248
+ //# 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,MAAM,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC;AAI7C,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC;AAEvD;;GAEG;AACH,yBAAiB,YAAY,CAAC;IAC5B,MAAM,CAAC,MAAM,aAAa,gDAAmC,CAAC;;;;;;;;;;;IAE9D;;OAEG;IACH,MAAM,OAAO,YAAa,SAAQ,iBAWhC;KAAG;;;;;;;;;;;;;;;IAYL,MAAM,OAAO,aAAc,SAAQ,kBAUjC;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,aAAc,SAAQ,kBAajC;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,mBAAoB,SAAQ,wBAevC;KAAG;;;;;;;;;;;;;;;;IAEL,MAAM,OAAO,YAAa,SAAQ,iBAkBhC;KAAG;;;;;;;;;;;;;;;IAEL,MAAM,OAAO,aAAc,SAAQ,kBAejC;KAAG;IAEL,MAAM,CAAC,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;MAYhB,CAAC;IAEH,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,EAAE,UAAU,CAAC;QAC1E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;KACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAED,MAAM,OAAO,QAAS,SAAQ,aAM5B;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,eAAgB,SAAQ,oBAMnC;KAAG;;;;;;;;;;;;;;;;;IAEL,MAAM,OAAO,IAAK,SAAQ,SAsBxB;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,GAAI,SAAQ,QASvB;KAAG;;;;;;;;;;;;;IAEL,MAAM,OAAO,KAAM,SAAQ,UASzB;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAWlC;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,MAAO,SAAQ,WAM1B;KAAG;;CACN"}
@@ -1,6 +1,6 @@
1
1
  import { type JSX, type ForwardedRef, type PropsWithChildren, type ReactNode } from 'react';
2
- import { type GuardedType, type MakeOptional } from '@dxos/util';
3
- import { type ErrorBoundary } from './ErrorBoundary';
2
+ import { type GuardedType, type MakeOptional, type Position } from '@dxos/util';
3
+ import { type ErrorBoundary } from '../react';
4
4
  /**
5
5
  * SurfaceProps are the props that are passed to the Surface component.
6
6
  */
@@ -47,39 +47,22 @@ type SurfaceComponentProps<T extends Record<string, any> = Record<string, unknow
47
47
  * React component used to render a surface once is has matched.
48
48
  */
49
49
  export type SurfaceComponent<T extends Record<string, any> = Record<string, unknown>> = (props: SurfaceComponentProps<T>, forwardedRef: ForwardedRef<HTMLElement>) => JSX.Element | null;
50
- /**
51
- * Determines the priority of the surface when multiple components are resolved.
52
- *
53
- * - `static` - The component is rendered in the order it was resolved.
54
- * - `hoist` - The component is rendered before `static` components.
55
- * - `fallback` - The component is rendered after `static` components.
56
- */
57
- export type SurfaceDisposition = 'static' | 'hoist' | 'fallback';
58
50
  /**
59
51
  * Definition of when a SurfaceComponent should be rendered.
60
52
  */
61
- export type SurfaceDefinition<T extends Record<string, any> = any> = {
53
+ export type SurfaceDefinition<T extends Record<string, any> = any> = Readonly<{
62
54
  id: string;
63
55
  role: string | string[];
64
- disposition?: SurfaceDisposition;
56
+ position?: Position;
65
57
  filter?: (data: Record<string, unknown>) => data is T;
66
58
  component: SurfaceComponent<GuardedType<SurfaceDefinition<T>['filter']>>;
67
- };
68
- export declare const createSurface: <T extends Record<string, any> = any>(definition: SurfaceDefinition<T>) => SurfaceDefinition<T>;
69
- /**
70
- * Surface debug info.
71
- * NOTE: Short-term measure to track perf issues.
72
- */
73
- export type DebugInfo = {
59
+ }>;
60
+ export declare const createSurface: <T extends Record<string, any> = any>(definition: SurfaceDefinition<T>) => Readonly<{
74
61
  id: string;
75
- created: number;
76
- renderCount: number;
77
- } & Pick<SurfaceProps, 'role'>;
78
- export type SurfaceContextValue = {
79
- surfaces: Record<string, SurfaceDefinition>;
80
- debugInfo?: Map<string, DebugInfo>;
81
- };
82
- export declare const useSurfaceRoot: () => SurfaceContextValue;
83
- export declare const SurfaceProvider: import("react").Provider<SurfaceContextValue | undefined>;
62
+ role: string | string[];
63
+ position?: Position;
64
+ filter?: ((data: Record<string, unknown>) => data is T) | undefined;
65
+ component: SurfaceComponent<T>;
66
+ }>;
84
67
  export {};
85
- //# sourceMappingURL=SurfaceContext.d.ts.map
68
+ //# sourceMappingURL=surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../../src/common/surface.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC;IACpG;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAE9C;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC,GACA,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG;IACjD;;;OAGG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAGJ,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC/E;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;IAER;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,qBAAqB,CAAC,CAAC,SAAS,M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ema';
2
+ export declare const ResourceKey: S.Union<[typeof S.String, S.Record$<typeof S.String, typeof S.Any>]>;
3
+ export type ResourceKey = S.Schema.Type<typeof ResourceKey>;
4
+ export declare const ResourceLanguage: S.Record$<typeof S.String, S.Union<[typeof S.String, S.Record$<typeof S.String, typeof S.Any>]>>;
5
+ export type ResourceLanguage = S.Schema.Type<typeof ResourceLanguage>;
6
+ /**
7
+ * A resource is a collection of translations for a language.
8
+ */
9
+ export declare const Resource: S.Record$<typeof S.String, S.Record$<typeof S.String, S.Union<[typeof S.String, S.Record$<typeof S.String, typeof S.Any>]>>>;
10
+ export type Resource = S.Schema.Type<typeof Resource>;
11
+ //# sourceMappingURL=translations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/common/translations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,WAAW,sEAA+D,CAAC;AACxF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAE5D,eAAO,MAAM,gBAAgB,kGAAkD,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,QAAQ,8HAAuD,CAAC;AAC7E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Interface definition for a capability.
3
+ */
4
+ import { type Effect } from 'effect';
5
+ import { type MaybePromise } from '@dxos/util';
6
+ import { type ActivationEvent } from './events';
7
+ declare const InterfaceDefTypeId: unique symbol;
8
+ /**
9
+ * The interface definition of a capability.
10
+ */
11
+ export type InterfaceDef<T> = {
12
+ [InterfaceDefTypeId]: T;
13
+ identifier: string;
14
+ };
15
+ /**
16
+ * Helper to define the interface of a capability.
17
+ */
18
+ export declare const defineCapability: <T>(identifier: string) => InterfaceDef<T>;
19
+ /**
20
+ * Functionality contributed to the application by a plugin module.
21
+ */
22
+ export type Capability<T> = {
23
+ /**
24
+ * The interface definition of the capability.
25
+ */
26
+ interface: InterfaceDef<T>;
27
+ /**
28
+ * The implementation of the capability.
29
+ */
30
+ implementation: T;
31
+ /**
32
+ * Called when the capability is deactivated.
33
+ */
34
+ deactivate?: () => MaybePromise<void> | Effect.Effect<void, Error>;
35
+ };
36
+ export type AnyCapability = Capability<any>;
37
+ type PluginsContextOptions = {
38
+ activate: (event: ActivationEvent) => MaybePromise<boolean>;
39
+ reset: (event: ActivationEvent) => MaybePromise<boolean>;
40
+ };
41
+ /**
42
+ * Helper to define the implementation of a capability.
43
+ */
44
+ export declare const contributes: <T>(interfaceDef: Capability<T>["interface"], implementation: Capability<T>["implementation"], deactivate?: Capability<T>["deactivate"]) => Capability<T>;
45
+ type LoadCapability<T, U> = () => Promise<{
46
+ default: (props: T) => MaybePromise<Capability<U>>;
47
+ }>;
48
+ type LoadCapabilities<T> = () => Promise<{
49
+ default: (props: T) => MaybePromise<AnyCapability[]>;
50
+ }>;
51
+ type LazyCapability<T, U> = (props?: T) => Promise<() => Promise<Capability<U> | AnyCapability[]>>;
52
+ /**
53
+ * Helper to define a lazily loaded implementation of a capability.
54
+ */
55
+ export declare const lazy: <T, U>(c: LoadCapability<T, U> | LoadCapabilities<T>) => LazyCapability<T, U>;
56
+ /**
57
+ * Context which is passed to plugins, allowing them to interact with each other.
58
+ */
59
+ export declare class PluginsContext {
60
+ private readonly _definedCapabilities;
61
+ /**
62
+ * Activates plugins based on the activation event.
63
+ * @param event The activation event.
64
+ * @returns Whether the activation was successful.
65
+ */
66
+ readonly activate: PluginsContextOptions['activate'];
67
+ /**
68
+ * Re-activates the modules that were activated by the event.
69
+ * @param event The activation event.
70
+ * @returns Whether the reset was successful.
71
+ */
72
+ readonly reset: PluginsContextOptions['reset'];
73
+ constructor({ activate, reset }: PluginsContextOptions);
74
+ /**
75
+ * Requests capabilities from the plugin context.
76
+ * @returns An array of capabilities.
77
+ * @reactive
78
+ */
79
+ requestCapabilities<T, U extends T = T>(interfaceDef: InterfaceDef<T>, filter?: (capability: T, moduleId: string) => capability is U): U[];
80
+ /**
81
+ * Requests a single capability from the plugin context.
82
+ * @returns The capability.
83
+ * @throws If no capability is found.
84
+ * @reactive
85
+ */
86
+ requestCapability<T, U extends T = T>(interfaceDef: InterfaceDef<T>, filter?: (capability: T, moduleId: string) => capability is U): U;
87
+ /**
88
+ * Waits for a capability to be contributed.
89
+ * @returns The capability.
90
+ */
91
+ waitForCapability<T, U extends T = T>(interfaceDef: InterfaceDef<T>, filter?: (capability: T) => capability is U): Promise<U>;
92
+ }
93
+ export {};
94
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/core/capabilities.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMrC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,QAAA,MAAM,kBAAkB,EAAE,OAAO,MAAyC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC5B,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,cAAc,MAAM,KAC3B,YAAY,CAAC,CAAC,CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IAC1B;;OAEG;IACH,SAAS,EAAE,YA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-0,0 +1 @@
1
+ {"version":3,"file":"capabilities.test.d.ts","sourceRoot":"","sources":["../../../../src/core/capabilities.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * An event which activates a plugin module.
3
+ */
4
+ export type ActivationEvent = {
5
+ id: string;
6
+ specifier?: string;
7
+ };
8
+ /**
9
+ * An activation event that can be a single event, or a combination of events.
10
+ */
11
+ export type ActivationEvents = ActivationEvent | {
12
+ type: 'one-of';
13
+ events: ActivationEvent[];
14
+ } | {
15
+ type: 'all-of';
16
+ events: ActivationEvent[];
17
+ };
18
+ /**
19
+ * Helper to define an activation event.
20
+ */
21
+ export declare const defineEvent: (id: string, specifier?: string) => ActivationEvent;
22
+ /**
23
+ * Helper to create an activation event key.
24
+ */
25
+ export declare const eventKey: (event: ActivationEvent) => string;
26
+ /**
27
+ * Helper to create an activation event that triggers when any of the given events are activated.
28
+ */
29
+ export declare const oneOf: (...events: ActivationEvent[]) => {
30
+ type: "one-of";
31
+ events: ActivationEvent[];
32
+ };
33
+ /**
34
+ * Helper to create an activation event that triggers when all of the given events are activated.
35
+ */
36
+ export declare const allOf: (...events: ActivationEvent[]) => {
37
+ type: "all-of";
38
+ events: ActivationEvent[];
39
+ };
40
+ /**
41
+ * Helper to check if an activation event is a one-of event.
42
+ */
43
+ export declare const isOneOf: (events: ActivationEvents) => events is {
44
+ type: "one-of";
45
+ events: ActivationEvent[];
46
+ };
47
+ /**
48
+ * Helper to check if an activation event is an all-of event.
49
+ */
50
+ export declare const isAllOf: (events: ActivationEvents) => events is {
51
+ type: "all-of";
52
+ events: ActivationEvent[];
53
+ };
54
+ /**
55
+ * Helper to get the events from an activation event.
56
+ */
57
+ export declare const getEvents: (events: ActivationEvents) => ActivationEvent[];
58
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/core/events.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,eAAe,EAAE,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,WAAW,OAAQ,MAAM,cAAc,MAAM,KAC5B,eAC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,UAAW,eAAe,WAAoE,CAAC;AAEpH;;GAEG;AACH,eAAO,MAAM,KAAK,cAAe,eAAe,EAAE;;;CAA0C,CAAC;AAE7F;;GAEG;AACH,eAAO,MAAM,KAAK,cAAe,eAAe,EAAE;;;CAA0C,CAAC;AAE7F;;GAEG;AACH,eAAO,MAAM,OAAO,WAAY,gBAAgB,KAAG,MAAM,IAAI;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1D,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,OAAO,WAAY,gBAAgB,KAAG,MAAM,IAAI;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1D,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,SAAS,WAAY,gBAAgB,sBAAkD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './capabilities';
2
+ export * from './events';
3
+ export * from './manager';
4
+ export * from './plugin';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,119 @@
1
+ import { Event } from '@dxos/async';
2
+ import { type ReactiveObject } from '@dxos/live-object';
3
+ import { type MaybePromise } from '@dxos/util';
4
+ import { PluginsContext } from './capabilities';
5
+ import { type ActivationEvent } from './events';
6
+ import { type PluginModule, type Plugin } from './plugin';
7
+ export type PluginManagerOptions = {
8
+ pluginLoader: (id: string) => MaybePromise<Plugin>;
9
+ plugins?: Plugin[];
10
+ core?: string[];
11
+ enabled?: string[];
12
+ };
13
+ export declare class PluginManager {
14
+ readonly activation: Event<{
15
+ event: string;
16
+ state: "activating" | "activated" | "error";
17
+ error?: any;
18
+ }>;
19
+ readonly context: PluginsContext;
20
+ private readonly _state;
21
+ private readonly _pluginLoader;
22
+ private readonly _capabilities;
23
+ constructor({ pluginLoader, plugins, core, enabled, }: PluginManagerOptions);
24
+ /**
25
+ * Plugins that are currently registered.
26
+ *
27
+ * @reactive
28
+ */
29
+ get plugins(): ReactiveObject<readonly Plugin[]>;
30
+ /**
31
+ * Ids of plugins that are core and cannot be removed.
32
+ *
33
+ * @reactive
34
+ */
35
+ get core(): ReactiveObject<readonly string[]>;
36
+ /**
37
+ * Ids of plugins that are currently enabled.
38
+ *
39
+ * @reactive
40
+ */
41
+ get enabled(): ReactiveObject<readonly string[]>;
42
+ /**
43
+ * Modules of plugins which are currently enabled.
44
+ *
45
+ * @reactive
46
+ */
47
+ get modules(): ReactiveObject<readonly PluginModule[]>;
48
+ /**
49
+ * Ids of modules which are currently active.
50
+ *
51
+ * @reactive
52
+ */
53
+ get active(): ReactiveObject<readonly string[]>;
54
+ /**
55
+ * Ids of events which have been fired.
56
+ *
57
+ * @reactive
58
+ */
59
+ get eventsFired(): ReactiveObject<readonly string[]>;
60
+ /**
61
+ * Ids of modules which are pending reset.
62
+ *
63
+ * @reactive
64
+ */
65
+ get pendingReset(): ReactiveObject<readonly string[]>;
66
+ /**
67
+ * Adds a plugin to the manager via the plugin loader.
68
+ * @param id The id of the plugin.
69
+ */
70
+ add(id: string): Promise<boolean>;
71
+ /**
72
+ * Enables a plugin.
73
+ * @param id The id of the plugin.
74
+ */
75
+ enable(id: string): Promise<boolean>;
76
+ /**
77
+ * Removes a plugin from the manager.
78
+ * @param id The id of the plugin.
79
+ */
80
+ remove(id: string): boolean;
81
+ /**
82
+ * Disables a plugin.
83
+ * @param id The id of the plugin.
84
+ */
85
+ disable(id: string): Promise<boolean>;
86
+ /**
87
+ * Activates plugins based on the activation event.
88
+ * @param event The activation event.
89
+ * @returns Whether the activation was successful.
90
+ */
91
+ activate(event: ActivationEvent | string): Promise<boolean>;
92
+ /**
93
+ * Deactivates all of the modules for a plugin.
94
+ * @param id The id of the plugin.
95
+ * @returns Whether the deactivation was successful.
96
+ */
97
+ deactivate(id: string): Promise<boolean>;
98
+ /**
99
+ * Re-activates the modules that were activated by the event.
100
+ * @param event The activation event.
101
+ * @returns Whether the reset was successful.
102
+ */
103
+ reset(event: ActivationEvent | string): Promise<boolean>;
104
+ private _addPlugin;
105
+ private _removePlugin;
106
+ private _addModule;
107
+ private _removeModule;
108
+ private _getPlugin;
109
+ private _getActiveModules;
110
+ private _getInactiveModules;
111
+ private _getActiveModulesByEvent;
112
+ private _getInactiveModulesByEvent;
113
+ private _setPendingResetByModule;
114
+ private _activateModule;
115
+ private _deactivate;
116
+ private _deactivateModule;
117
+ private _reset;
118
+ }
119
+ //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/core/manager.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAsB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,KAAK,eAAe,EA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,CAAC,SAAS,MAAM,EAAE,CAAC,CAEpD;IAED;;;OAGG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IASvC;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA6BpC;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAa3B;;;OAGG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA0BrC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3D;;;;OAIG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxD,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,0BAA0B;IAIlC,OAAO,CAAC,wBAAwB;IAsFhC,OAAO,CAAC,eAAe;IAwCvB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,iBAAiB;IAkCzB,OAAO,CAAC,MAAM;CAiBf"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=manager.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.test.d.ts","sourceRoot":"","sources":["../../../../src/core/manager.test.ts"],"names":[],"mappings":""}