@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
@@ -1,74 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // packages/sdk/app-framework/src/plugins/helpers.ts
4
- import { Context } from "@dxos/context";
5
- import { raise } from "@dxos/debug";
6
- import { invariant } from "@dxos/invariant";
7
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugins/helpers.ts";
8
- var findPlugin = (plugins, id) => {
9
- return plugins.find((plugin) => plugin.meta.id === id || typeof plugin.meta.shortId === "string" && plugin.meta.shortId === id);
10
- };
11
- var getPlugin = (plugins, id) => {
12
- return findPlugin(plugins, id) ?? raise(new Error(`Plugin not found: ${id}`));
13
- };
14
- var filterPlugins = (plugins, predicate) => plugins.map((plugin) => predicate(plugin)).filter((plugin) => !!plugin);
15
- var resolvePlugin = (plugins, predicate) => filterPlugins(plugins, predicate)[0];
16
- var PluginContext = class {
17
- constructor() {
18
- // TODO(burdon): Use Resource (@dima)?
19
- this.ctx = new Context(void 0, {
20
- F: __dxlog_file,
21
- L: 50
22
- });
23
- }
24
- init(plugins) {
25
- this._plugins = plugins;
26
- }
27
- getPlugin(id) {
28
- invariant(this._plugins, void 0, {
29
- F: __dxlog_file,
30
- L: 59,
31
- S: this,
32
- A: [
33
- "this._plugins",
34
- ""
35
- ]
36
- });
37
- return getPlugin(this._plugins, id);
38
- }
39
- resolvePlugin(resolver, required = false) {
40
- invariant(this._plugins, "context not initialized", {
41
- F: __dxlog_file,
42
- L: 65,
43
- S: this,
44
- A: [
45
- "this._plugins",
46
- "'context not initialized'"
47
- ]
48
- });
49
- const plugin = resolvePlugin(this._plugins, resolver);
50
- if (required && !plugin) {
51
- throw new Error("Plugin not found.");
52
- }
53
- return plugin;
54
- }
55
- onDispose(cb) {
56
- this.ctx.onDispose(cb);
57
- }
58
- dispose() {
59
- void this.ctx.dispose();
60
- }
61
- };
62
- var definePlugin = (cb) => {
63
- const context = new PluginContext();
64
- return () => cb(context);
65
- };
66
-
67
- export {
68
- findPlugin,
69
- getPlugin,
70
- filterPlugins,
71
- resolvePlugin,
72
- definePlugin
73
- };
74
- //# sourceMappingURL=chunk-EYCTSFEJ.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/plugins/helpers.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Context, type DisposeCallback } from '@dxos/context';\nimport { raise } from '@dxos/debug';\nimport { invariant } from '@dxos/invariant';\n\nimport { type Plugin, type PluginDefinition } from './plugin-host';\n\n/**\n * Resolvers allow different instances of plugins to provide a particular capability.\n */\nexport type PluginResolver<T> = (plugin: Plugin) => Plugin<T> | undefined;\n\n/**\n * Find a plugin by ID.\n */\nexport const findPlugin = <T>(plugins: Plugin[], id: string): Plugin<T> | undefined => {\n return plugins.find(\n (plugin) => plugin.meta.id === id || (typeof plugin.meta.shortId === 'string' && plugin.meta.shortId === id),\n ) as Plugin<T>;\n};\n\n/**\n * Find a plugin by ID, or raise an error if not found.\n */\nexport const getPlugin = <T>(plugins: Plugin[], id: string): Plugin<T> => {\n return findPlugin(plugins, id) ?? raise(new Error(`Plugin not found: ${id}`));\n};\n\n/**\n * Filter a list of plugins to only those that match a predicate.\n */\nexport const filterPlugins = <T>(plugins: Plugin[], predicate: PluginResolver<T>): Plugin<T>[] =>\n plugins.map((plugin) => predicate(plugin)).filter((plugin): plugin is Plugin<T> => !!plugin);\n\n/**\n * Resolves a plugin by predicate.\n *\n * @example\n * import { parseIntentPlugin, resolvePlugin } from '@dxos/app-framework';\n * const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);\n */\nexport const resolvePlugin = <T>(plugins: Plugin[], predicate: PluginResolver<T>): Plugin<T> | undefined =>\n filterPlugins(plugins, predicate)[0];\n\nclass PluginContext {\n // TODO(burdon): Use Resource (@dima)?\n public readonly ctx = new Context();\n\n private _plugins?: Plugin[];\n\n init(plugins: Plugin[]) {\n this._plugins = plugins;\n }\n\n getPlugin<T>(id: string): Plugin<T> {\n invariant(this._plugins);\n return getPlugin(this._plugins, id);\n }\n\n resolvePlugin<T>(resolver: PluginResolver<T>): Plugin<T>;\n resolvePlugin<T>(resolver: PluginResolver<T>, required = false): Plugin<T> | undefined {\n invariant(this._plugins, 'context not initialized');\n const plugin = resolvePlugin(this._plugins, resolver);\n if (required && !plugin) {\n // TODO(burdon): Resolver should have a name.\n throw new Error('Plugin not found.');\n }\n\n return plugin;\n }\n\n onDispose(cb: DisposeCallback) {\n this.ctx.onDispose(cb);\n }\n\n dispose() {\n void this.ctx.dispose();\n }\n}\n\n/**\n * Plugin helper with dependency injection and life-cycle support.\n */\nexport const definePlugin = <Provides>(\n cb: (context: PluginContext) => PluginDefinition<Provides>,\n): (() => PluginDefinition<Provides>) => {\n const context = new PluginContext();\n return () => cb(context);\n};\n"],
5
- "mappings": ";;;AAIA,SAASA,eAAqC;AAC9C,SAASC,aAAa;AACtB,SAASC,iBAAiB;;AAYnB,IAAMC,aAAa,CAAIC,SAAmBC,OAAAA;AAC/C,SAAOD,QAAQE,KACb,CAACC,WAAWA,OAAOC,KAAKH,OAAOA,MAAO,OAAOE,OAAOC,KAAKC,YAAY,YAAYF,OAAOC,KAAKC,YAAYJ,EAAAA;AAE7G;AAKO,IAAMK,YAAY,CAAIN,SAAmBC,OAAAA;AAC9C,SAAOF,WAAWC,SAASC,EAAAA,KAAOJ,MAAM,IAAIU,MAAM,qBAAqBN,EAAAA,EAAI,CAAA;AAC7E;AAKO,IAAMO,gBAAgB,CAAIR,SAAmBS,cAClDT,QAAQU,IAAI,CAACP,WAAWM,UAAUN,MAAAA,CAAAA,EAASQ,OAAO,CAACR,WAAgC,CAAC,CAACA,MAAAA;AAShF,IAAMS,gBAAgB,CAAIZ,SAAmBS,cAClDD,cAAcR,SAASS,SAAAA,EAAW,CAAA;AAEpC,IAAMI,gBAAN,MAAMA;EAAN;AAEkBC;eAAM,IAAIlB,QAAAA,QAAAA;;;;;EAI1BmB,KAAKf,SAAmB;AACtB,SAAKgB,WAAWhB;EAClB;EAEAM,UAAaL,IAAuB;AAClCH,cAAU,KAAKkB,UAAQ,QAAA;;;;;;;;;AACvB,WAAOV,UAAU,KAAKU,UAAUf,EAAAA;EAClC;EAGAW,cAAiBK,UAA6BC,WAAW,OAA8B;AACrFpB,cAAU,KAAKkB,UAAU,2BAAA;;;;;;;;;AACzB,UAAMb,SAASS,cAAc,KAAKI,UAAUC,QAAAA;AAC5C,QAAIC,YAAY,CAACf,QAAQ;AAEvB,YAAM,IAAII,MAAM,mBAAA;IAClB;AAEA,WAAOJ;EACT;EAEAgB,UAAUC,IAAqB;AAC7B,SAAKN,IAAIK,UAAUC,EAAAA;EACrB;EAEAC,UAAU;AACR,SAAK,KAAKP,IAAIO,QAAO;EACvB;AACF;AAKO,IAAMC,eAAe,CAC1BF,OAAAA;AAEA,QAAMG,UAAU,IAAIV,cAAAA;AACpB,SAAO,MAAMO,GAAGG,OAAAA;AAClB;",
6
- "names": ["Context", "raise", "invariant", "findPlugin", "plugins", "id", "find", "plugin", "meta", "shortId", "getPlugin", "Error", "filterPlugins", "predicate", "map", "filter", "resolvePlugin", "PluginContext", "ctx", "init", "_plugins", "resolver", "required", "onDispose", "cb", "dispose", "definePlugin", "context"]
7
- }
@@ -1,33 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- INTENT_ACTION,
4
- IntentAction,
5
- IntentProvider,
6
- Label,
7
- chain,
8
- createDispatcher,
9
- createIntent,
10
- createResolver,
11
- parseIntentPlugin,
12
- parseIntentResolverPlugin,
13
- plugin_intent_default,
14
- useIntentDispatcher,
15
- useIntentResolver
16
- } from "./chunk-CFOUYXQ6.mjs";
17
- import "./chunk-EYCTSFEJ.mjs";
18
- export {
19
- INTENT_ACTION,
20
- IntentAction,
21
- IntentProvider,
22
- Label,
23
- chain,
24
- createDispatcher,
25
- createIntent,
26
- createResolver,
27
- plugin_intent_default as default,
28
- parseIntentPlugin,
29
- parseIntentResolverPlugin,
30
- useIntentDispatcher,
31
- useIntentResolver
32
- };
33
- //# sourceMappingURL=plugin-intent-W2HQC6LC.mjs.map
@@ -1,16 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- SETTINGS_ACTION,
4
- SETTINGS_PLUGIN,
5
- SettingsAction,
6
- parseSettingsPlugin,
7
- plugin_settings_default
8
- } from "./chunk-3T5UIJY3.mjs";
9
- export {
10
- SETTINGS_ACTION,
11
- SETTINGS_PLUGIN,
12
- SettingsAction,
13
- plugin_settings_default as default,
14
- parseSettingsPlugin
15
- };
16
- //# sourceMappingURL=plugin-settings-H5RHNFVC.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,25 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- ErrorBoundary,
4
- Surface,
5
- SurfaceProvider,
6
- createSurface,
7
- isObject,
8
- parseRootSurfacePlugin,
9
- parseSurfacePlugin,
10
- plugin_surface_default,
11
- useSurfaceRoot
12
- } from "./chunk-4GX7V5ZE.mjs";
13
- import "./chunk-EYCTSFEJ.mjs";
14
- export {
15
- ErrorBoundary,
16
- Surface,
17
- SurfaceProvider,
18
- createSurface,
19
- plugin_surface_default as default,
20
- isObject,
21
- parseRootSurfacePlugin,
22
- parseSurfacePlugin,
23
- useSurfaceRoot
24
- };
25
- //# sourceMappingURL=plugin-surface-V3YET3UL.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,22 +0,0 @@
1
- import { type Space } from '@dxos/client-protocol';
2
- import { type Plugin } from '../plugin-host';
3
- export declare const defaultFileTypes: {
4
- images: string[];
5
- media: string[];
6
- text: string[];
7
- };
8
- export type FileInfo = {
9
- url?: string;
10
- cid?: string;
11
- };
12
- export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
13
- /**
14
- * Generic interface provided by file plugins (e.g., IPFS, WNFS).
15
- */
16
- export type FileManagerProvides = {
17
- file: {
18
- upload?: FileUploader;
19
- };
20
- };
21
- export declare const parseFileManagerPlugin: (plugin: Plugin) => Plugin<FileManagerProvides> | undefined;
22
- //# sourceMappingURL=file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI7C,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;AAEvF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,YAAY,CAAC;KACvB,CAAC;CACH,CAAC;AAGF,eAAO,MAAM,sBAAsB,WAAY,MAAM,4CAEpD,CAAC"}
@@ -1,51 +0,0 @@
1
- import type { Graph, GraphBuilder, Node } from '@dxos/app-graph';
2
- import { type MaybePromise } from '@dxos/util';
3
- import type { Plugin } from '../plugin-host';
4
- export type SerializedNode = {
5
- name: string;
6
- data: string;
7
- type?: string;
8
- };
9
- export type NodeSerializer<T = any> = {
10
- inputType: string;
11
- outputType: string;
12
- disposition?: 'hoist' | 'fallback';
13
- /**
14
- * Takes a node and serializes it into a format that can be stored.
15
- */
16
- serialize: (node: Node<T>) => MaybePromise<SerializedNode>;
17
- /**
18
- * Takes a serialized node and deserializes it into the application.
19
- */
20
- deserialize: (data: SerializedNode, ancestors: unknown[]) => MaybePromise<T>;
21
- };
22
- /**
23
- * Provides for a plugin that exposes the application graph.
24
- */
25
- export type GraphProvides = {
26
- graph: Graph;
27
- explore: GraphBuilder['explore'];
28
- };
29
- export type GraphBuilderProvides = {
30
- graph: {
31
- builder: (plugins: Plugin[]) => Parameters<GraphBuilder['addExtension']>[0];
32
- };
33
- };
34
- export type GraphSerializerProvides = {
35
- graph: {
36
- serializer: (plugins: Plugin[]) => NodeSerializer[];
37
- };
38
- };
39
- /**
40
- * Type guard for graph plugins.
41
- */
42
- export declare const parseGraphPlugin: (plugin: Plugin) => Plugin<GraphProvides> | undefined;
43
- /**
44
- * Type guard for graph builder plugins.
45
- */
46
- export declare const parseGraphBuilderPlugin: (plugin: Plugin) => Plugin<GraphBuilderProvides> | undefined;
47
- /**
48
- * Type guard for graph serializer plugins.
49
- */
50
- export declare const parseGraphSerializerPlugin: (plugin: Plugin) => Plugin<GraphSerializerProvides> | undefined;
51
- //# sourceMappingURL=graph.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG7C,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;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE;QACL,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7E,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE;QACL,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,cAAc,EAAE,CAAC;KACrD,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,WAAY,MAAM,sCACuC,CAAC;AAEvF;;GAEG;AACH,eAAO,MAAM,uBAAuB,WAAY,MAAM,6CAC0C,CAAC;AAEjG;;GAEG;AACH,eAAO,MAAM,0BAA0B,WAAY,MAAM,gDAC6C,CAAC"}
@@ -1,7 +0,0 @@
1
- export * from './file';
2
- export * from './graph';
3
- export * from './layout';
4
- export * from './metadata';
5
- export * from './navigation';
6
- export * from './translations';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
@@ -1,176 +0,0 @@
1
- import { S } from '@dxos/echo-schema';
2
- import { type Plugin } from '../plugin-host';
3
- export declare const Toast: S.Struct<{
4
- id: typeof S.String;
5
- title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
6
- ns: typeof S.String;
7
- count: S.optional<typeof S.Number>;
8
- }>>]>>]>>;
9
- description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
10
- ns: typeof S.String;
11
- count: S.optional<typeof S.Number>;
12
- }>>]>>]>>;
13
- icon: S.optional<typeof S.String>;
14
- duration: S.optional<typeof S.Number>;
15
- closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
16
- ns: typeof S.String;
17
- count: S.optional<typeof S.Number>;
18
- }>>]>>]>>;
19
- actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
20
- ns: typeof S.String;
21
- count: S.optional<typeof S.Number>;
22
- }>>]>>]>>;
23
- actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
24
- ns: typeof S.String;
25
- count: S.optional<typeof S.Number>;
26
- }>>]>>]>>;
27
- onAction: S.optional<typeof S.Any>;
28
- }>;
29
- export type Toast = S.Schema.Type<typeof Toast>;
30
- /**
31
- * Basic state provided by a layout plugin.
32
- *
33
- * Layout provides the state of global UI landmarks, such as the sidebar, dialog, and popover.
34
- * Generally only one dialog or popover should be open at a time, a layout plugin should manage this.
35
- * For other landmarks, such as toasts, rendering them in the layout prevents them from unmounting when navigating.
36
- */
37
- declare const LayoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
38
- export declare const isLayoutMode: (value: any) => value is LayoutMode;
39
- export type LayoutMode = S.Schema.Type<typeof LayoutMode>;
40
- export declare const Layout: S.mutable<S.Struct<{
41
- layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
42
- sidebarOpen: typeof S.Boolean;
43
- complementarySidebarOpen: typeof S.Boolean;
44
- /**
45
- * @deprecated Data to be passed to the complementary sidebar Surface.
46
- */
47
- complementarySidebarContent: S.optional<typeof S.Any>;
48
- dialogOpen: typeof S.Boolean;
49
- /**
50
- * Data to be passed to the dialog Surface.
51
- */
52
- dialogContent: S.optional<typeof S.Any>;
53
- dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
54
- dialogType: S.optional<S.Literal<["default", "alert"]>>;
55
- popoverOpen: typeof S.Boolean;
56
- /**
57
- * Data to be passed to the popover Surface.
58
- */
59
- popoverContent: S.optional<typeof S.Any>;
60
- popoverAnchorId: S.optional<typeof S.String>;
61
- toasts: S.mutable<S.Array$<S.Struct<{
62
- id: typeof S.String;
63
- title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
64
- ns: typeof S.String;
65
- count: S.optional<typeof S.Number>;
66
- }>>]>>]>>;
67
- description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
68
- ns: typeof S.String;
69
- count: S.optional<typeof S.Number>;
70
- }>>]>>]>>;
71
- icon: S.optional<typeof S.String>;
72
- duration: S.optional<typeof S.Number>;
73
- closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
74
- ns: typeof S.String;
75
- count: S.optional<typeof S.Number>;
76
- }>>]>>]>>;
77
- actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
78
- ns: typeof S.String;
79
- count: S.optional<typeof S.Number>;
80
- }>>]>>]>>;
81
- actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
82
- ns: typeof S.String;
83
- count: S.optional<typeof S.Number>;
84
- }>>]>>]>>;
85
- onAction: S.optional<typeof S.Any>;
86
- }>>>;
87
- /**
88
- * The identifier of a component to scroll into view when it is mounted.
89
- */
90
- scrollIntoView: S.optional<typeof S.String>;
91
- }>>;
92
- export type Layout = S.Schema.Type<typeof Layout>;
93
- /**
94
- * Provides for a plugin that can manage the app layout.
95
- */
96
- export type LayoutProvides = {
97
- layout: Readonly<Layout>;
98
- };
99
- /**
100
- * Type guard for layout plugins.
101
- */
102
- export declare const parseLayoutPlugin: (plugin: Plugin) => Plugin<LayoutProvides> | undefined;
103
- export declare const LAYOUT_PLUGIN = "dxos.org/plugin/layout";
104
- export declare const LAYOUT_ACTION = "dxos.org/plugin/layout/action";
105
- /**
106
- * Expected payload for layout actions.
107
- */
108
- export declare namespace LayoutAction {
109
- const SetLayout_base: S.TaggedClass<SetLayout, "dxos.org/plugin/layout/action/set-layout", {
110
- readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout">;
111
- } & {
112
- input: S.Struct<{
113
- /**
114
- * Element to set the state of.
115
- */
116
- element: S.Literal<["fullscreen", "sidebar", "complementary", "dialog", "popover", "toast"]>;
117
- /**
118
- * Whether the element is on or off.
119
- *
120
- * If omitted, the element's state will be toggled or set based on other provided data.
121
- * For example, if `component` is provided, the state will be set to `true`.
122
- */
123
- state: S.optional<typeof S.Boolean>;
124
- /**
125
- * Component to render in the dialog or popover.
126
- */
127
- component: S.optional<typeof S.String>;
128
- /**
129
- * Data to be passed to the dialog or popover Surface.
130
- */
131
- subject: S.optional<typeof S.Any>;
132
- /**
133
- * Anchor ID for the popover.
134
- */
135
- anchorId: S.optional<typeof S.String>;
136
- /**
137
- * Block alignment for the dialog.
138
- */
139
- dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
140
- /**
141
- * Type of dialog.
142
- */
143
- dialogType: S.optional<S.Literal<["default", "alert"]>>;
144
- }>;
145
- output: typeof S.Void;
146
- }>;
147
- export class SetLayout extends SetLayout_base {
148
- }
149
- const SetLayoutMode_base: S.TaggedClass<SetLayoutMode, "dxos.org/plugin/layout/action/set-layout-mode", {
150
- readonly _tag: S.tag<"dxos.org/plugin/layout/action/set-layout-mode">;
151
- } & {
152
- input: S.Union<[S.Struct<{
153
- layoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
154
- }>, S.Struct<{
155
- revert: S.Literal<[true]>;
156
- }>]>;
157
- output: typeof S.Void;
158
- }>;
159
- export class SetLayoutMode extends SetLayoutMode_base {
160
- }
161
- const ScrollIntoView_base: S.TaggedClass<ScrollIntoView, "dxos.org/plugin/layout/action/scroll-into-view", {
162
- readonly _tag: S.tag<"dxos.org/plugin/layout/action/scroll-into-view">;
163
- } & {
164
- input: S.Struct<{
165
- id: S.optional<typeof S.String>;
166
- cursor: S.optional<typeof S.String>;
167
- ref: S.optional<typeof S.String>;
168
- }>;
169
- output: typeof S.Void;
170
- }>;
171
- export class ScrollIntoView extends ScrollIntoView_base {
172
- }
173
- export {};
174
- }
175
- export {};
176
- //# sourceMappingURL=layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/layout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAO7C,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;AAElD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,WAAY,MAAM,uCAG/C,CAAC;AAMF,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC;AAEvD;;GAEG;AACH,yBAAiB,YAAY,CAAC;;;;;YAGxB;;eAEG;;YAGH;;;;;eAKG;;YAGH;;eAEG;;YAGH;;eAEG;;YAGH;;eAEG;;YAKH;;eAEG;;YAGH;;eAEG;;;;;IAvCP,MAAM,OAAO,SAAU,SAAQ,cA2C7B;KAAG;;;;;;;;;;;IAIL,MAAM,OAAO,aAAc,SAAQ,kBAUjC;KAAG;;;;;;;;;;;IAEL,MAAM,OAAO,cAAe,SAAQ,mBAQlC;KAAG;;CACN"}
@@ -1,16 +0,0 @@
1
- import { type Plugin } from '../plugin-host';
2
- export type Metadata = Record<string, any>;
3
- export type MetadataRecordsProvides = {
4
- metadata: {
5
- records: Record<string, Metadata>;
6
- };
7
- };
8
- export type MetadataResolver = (type: string) => Metadata;
9
- export type MetadataResolverProvides = {
10
- metadata: {
11
- resolver: MetadataResolver;
12
- };
13
- };
14
- export declare const parseMetadataRecordsPlugin: (plugin: Plugin) => Plugin<MetadataRecordsProvides> | undefined;
15
- export declare const parseMetadataResolverPlugin: (plugin: Plugin) => Plugin<MetadataResolverProvides> | undefined;
16
- //# sourceMappingURL=metadata.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/common/metadata.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE3C,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KACnC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAC;AAE1D,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE;QACR,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,0BAA0B,WAAY,MAAM,gDAExD,CAAC;AAEF,eAAO,MAAM,2BAA2B,WAAY,MAAM,iDAEzD,CAAC"}