@dxos/app-framework 0.8.2-main.fbd8ed0 → 0.8.2-staging.4d6ad0f

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 (249) hide show
  1. package/dist/lib/browser/{app-graph-builder-6E7NCZ77.mjs → app-graph-builder-DYEAGZPS.mjs} +3 -3
  2. package/dist/lib/browser/{chunk-2KSDY3EZ.mjs → chunk-5GE2ERNU.mjs} +24 -17
  3. package/dist/lib/browser/chunk-5GE2ERNU.mjs.map +7 -0
  4. package/dist/lib/browser/{chunk-KPRHX73H.mjs → chunk-WWEJRWFX.mjs} +2 -2
  5. package/dist/lib/browser/{chunk-KPRHX73H.mjs.map → chunk-WWEJRWFX.mjs.map} +1 -1
  6. package/dist/lib/browser/{chunk-K3HOLGVH.mjs → chunk-ZMXJV64L.mjs} +95 -47
  7. package/dist/lib/browser/chunk-ZMXJV64L.mjs.map +7 -0
  8. package/dist/lib/browser/index.mjs +8 -8
  9. package/dist/lib/browser/{intent-dispatcher-VGUJBPPN.mjs → intent-dispatcher-ELZN5EM7.mjs} +2 -2
  10. package/dist/lib/browser/{intent-resolver-QLFZY5R5.mjs → intent-resolver-SGWLINTO.mjs} +3 -3
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/{store-QGVXOY4T.mjs → store-YIU6IPZ2.mjs} +2 -2
  13. package/dist/lib/browser/testing/index.mjs +25 -13
  14. package/dist/lib/browser/testing/index.mjs.map +3 -3
  15. package/dist/lib/browser/worker.mjs +1 -1
  16. package/dist/lib/node/{app-graph-builder-4IWMG67O.cjs → app-graph-builder-GBLISL7L.cjs} +28 -28
  17. package/dist/lib/node/{chunk-JQMNABMK.cjs → chunk-G774ASXO.cjs} +5 -5
  18. package/dist/lib/node/{chunk-JQMNABMK.cjs.map → chunk-G774ASXO.cjs.map} +1 -1
  19. package/dist/lib/node/{chunk-2EBZ2ICH.cjs → chunk-HIVITTZD.cjs} +26 -19
  20. package/dist/lib/node/chunk-HIVITTZD.cjs.map +7 -0
  21. package/dist/lib/node/{chunk-7J66KH2T.cjs → chunk-Z2PMVDJ5.cjs} +107 -59
  22. package/dist/lib/node/chunk-Z2PMVDJ5.cjs.map +7 -0
  23. package/dist/lib/node/index.cjs +80 -80
  24. package/dist/lib/node/{intent-dispatcher-TASJBG5M.cjs → intent-dispatcher-LFXZJTAS.cjs} +8 -8
  25. package/dist/lib/node/{intent-dispatcher-TASJBG5M.cjs.map → intent-dispatcher-LFXZJTAS.cjs.map} +2 -2
  26. package/dist/lib/node/{intent-resolver-5CG5NIJY.cjs → intent-resolver-EPSFTHL6.cjs} +12 -12
  27. package/dist/lib/node/meta.json +1 -1
  28. package/dist/lib/node/{store-IF3UR2KA.cjs → store-CVVRXUTH.cjs} +8 -8
  29. package/dist/lib/node/testing/index.cjs +28 -16
  30. package/dist/lib/node/testing/index.cjs.map +3 -3
  31. package/dist/lib/node/worker.cjs +38 -38
  32. package/dist/lib/node/worker.cjs.map +1 -1
  33. package/dist/lib/node-esm/{app-graph-builder-LYCG5CO3.mjs → app-graph-builder-LUBDEIT6.mjs} +3 -3
  34. package/dist/lib/node-esm/{chunk-ISNBS46Y.mjs → chunk-6IKYKERU.mjs} +95 -47
  35. package/dist/lib/node-esm/chunk-6IKYKERU.mjs.map +7 -0
  36. package/dist/lib/node-esm/{chunk-JUJF5L4G.mjs → chunk-I6BVZMAH.mjs} +2 -2
  37. package/dist/lib/node-esm/{chunk-JUJF5L4G.mjs.map → chunk-I6BVZMAH.mjs.map} +1 -1
  38. package/dist/lib/node-esm/{chunk-BOEJMAVK.mjs → chunk-Z2ZHH4HN.mjs} +24 -17
  39. package/dist/lib/node-esm/chunk-Z2ZHH4HN.mjs.map +7 -0
  40. package/dist/lib/node-esm/index.mjs +8 -8
  41. package/dist/lib/node-esm/{intent-dispatcher-ZUSNX2OY.mjs → intent-dispatcher-A2JCMWRD.mjs} +2 -2
  42. package/dist/lib/node-esm/{intent-resolver-NGDHUKDD.mjs → intent-resolver-5C4O43GK.mjs} +3 -3
  43. package/dist/lib/node-esm/meta.json +1 -1
  44. package/dist/lib/node-esm/{store-NCRSE25X.mjs → store-HRZXZ2D2.mjs} +2 -2
  45. package/dist/lib/node-esm/testing/index.mjs +25 -13
  46. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  47. package/dist/lib/node-esm/worker.mjs +1 -1
  48. package/dist/types/src/App.d.ts +1 -1
  49. package/dist/types/src/App.d.ts.map +1 -1
  50. package/dist/types/src/common/capabilities.d.ts +36 -28
  51. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  52. package/dist/types/src/common/collaboration.d.ts +2 -9
  53. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  54. package/dist/types/src/common/layout.d.ts +3 -1
  55. package/dist/types/src/common/layout.d.ts.map +1 -1
  56. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  57. package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
  58. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  59. package/dist/types/src/testing/withPluginManager.d.ts +1 -0
  60. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  61. package/package.json +22 -20
  62. package/src/App.tsx +93 -55
  63. package/src/common/capabilities.ts +11 -3
  64. package/src/common/collaboration.ts +4 -7
  65. package/src/common/layout.ts +9 -1
  66. package/src/core/capabilities.ts +2 -2
  67. package/src/core/manager.ts +10 -10
  68. package/src/playground/playground.stories.tsx +12 -8
  69. package/src/react/ErrorBoundary.tsx +3 -3
  70. package/src/testing/withPluginManager.tsx +24 -13
  71. package/tsconfig.json +1 -56
  72. package/typedoc/assets/navigation.js +1 -1
  73. package/typedoc/assets/search.js +1 -1
  74. package/typedoc/classes/CollaborationActions.InsertContent.html +131 -170
  75. package/typedoc/classes/ErrorBoundary.html +6 -6
  76. package/typedoc/classes/IntentAction.ShowUndo.html +5 -5
  77. package/typedoc/classes/IntentAction.Track.html +5 -5
  78. package/typedoc/classes/LayoutAction.AddToast.html +4 -4
  79. package/typedoc/classes/LayoutAction.Close.html +4 -4
  80. package/typedoc/classes/LayoutAction.Expose.html +4 -4
  81. package/typedoc/classes/LayoutAction.Open.html +4 -4
  82. package/typedoc/classes/LayoutAction.RevertWorkspace.html +4 -4
  83. package/typedoc/classes/LayoutAction.ScrollIntoView.html +4 -4
  84. package/typedoc/classes/LayoutAction.Set.html +4 -4
  85. package/typedoc/classes/LayoutAction.SetLayoutMode.html +4 -4
  86. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +4 -4
  87. package/typedoc/classes/LayoutAction.UpdateComplementary.html +4 -4
  88. package/typedoc/classes/LayoutAction.UpdateDialog.html +365 -53
  89. package/typedoc/classes/LayoutAction.UpdateLayout.html +5 -5
  90. package/typedoc/classes/LayoutAction.UpdatePopover.html +4 -4
  91. package/typedoc/classes/LayoutAction.UpdateSidebar.html +4 -4
  92. package/typedoc/classes/Plugin.html +3 -3
  93. package/typedoc/classes/PluginContext.html +10 -10
  94. package/typedoc/classes/PluginManager.html +16 -16
  95. package/typedoc/classes/PluginModule.html +8 -8
  96. package/typedoc/classes/SettingsAction.Open.html +4 -4
  97. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +4 -4
  98. package/typedoc/functions/Events.createStateEvent.html +2 -2
  99. package/typedoc/functions/IntentPlugin.html +1 -1
  100. package/typedoc/functions/SettingsPlugin.html +1 -1
  101. package/typedoc/functions/allOf.html +2 -2
  102. package/typedoc/functions/chain.html +2 -2
  103. package/typedoc/functions/contributes.html +2 -2
  104. package/typedoc/functions/createDispatcher.html +2 -2
  105. package/typedoc/functions/createIntent.html +2 -2
  106. package/typedoc/functions/createResolver.html +2 -2
  107. package/typedoc/functions/createSurface.html +2 -2
  108. package/typedoc/functions/defineCapability.html +2 -2
  109. package/typedoc/functions/defineEvent.html +2 -2
  110. package/typedoc/functions/defineModule.html +2 -2
  111. package/typedoc/functions/definePlugin.html +2 -2
  112. package/typedoc/functions/eventKey.html +2 -2
  113. package/typedoc/functions/getEvents.html +2 -2
  114. package/typedoc/functions/isAllOf.html +2 -2
  115. package/typedoc/functions/isOneOf.html +2 -2
  116. package/typedoc/functions/isSurfaceAvailable.html +2 -2
  117. package/typedoc/functions/lazy.html +2 -2
  118. package/typedoc/functions/oneOf.html +2 -2
  119. package/typedoc/functions/{createApp.html → useApp.html} +2 -2
  120. package/typedoc/functions/useAppGraph.html +1 -1
  121. package/typedoc/functions/useCapabilities.html +2 -2
  122. package/typedoc/functions/useCapability.html +2 -2
  123. package/typedoc/functions/useIntentDispatcher.html +1 -1
  124. package/typedoc/functions/useIntentResolver.html +1 -1
  125. package/typedoc/functions/useLayout.html +1 -1
  126. package/typedoc/functions/usePluginManager.html +2 -2
  127. package/typedoc/hierarchy.html +1 -1
  128. package/typedoc/index.html +2 -2
  129. package/typedoc/interfaces/LayoutAction.Toast.html +2 -2
  130. package/typedoc/modules/Capabilities.html +1 -1
  131. package/typedoc/modules/CollaborationActions.html +1 -1
  132. package/typedoc/modules/Events.html +1 -1
  133. package/typedoc/modules/IntentAction.html +1 -1
  134. package/typedoc/modules/LayoutAction.html +2 -2
  135. package/typedoc/modules/SettingsAction.html +1 -1
  136. package/typedoc/modules.html +1 -1
  137. package/typedoc/types/ActivationEvent.html +3 -3
  138. package/typedoc/types/ActivationEvents.html +2 -2
  139. package/typedoc/types/AnyCapability.html +1 -1
  140. package/typedoc/types/AnyIntent.html +1 -1
  141. package/typedoc/types/AnyIntentChain.html +1 -1
  142. package/typedoc/types/AnyIntentEffectResult.html +1 -1
  143. package/typedoc/types/AnyIntentResolver.html +1 -1
  144. package/typedoc/types/AnyIntentResult.html +1 -1
  145. package/typedoc/types/Capabilities.FileUploader.html +1 -1
  146. package/typedoc/types/Capabilities.IntentResolver.html +1 -1
  147. package/typedoc/types/Capabilities.Layout.html +1 -1
  148. package/typedoc/types/Capabilities.Metadata.html +1 -1
  149. package/typedoc/types/Capabilities.ReactContext.html +1 -1
  150. package/typedoc/types/Capabilities.ReactRoot.html +1 -1
  151. package/typedoc/types/Capabilities.ReactSurface.html +1 -1
  152. package/typedoc/types/Capabilities.Settings.html +2 -2
  153. package/typedoc/types/Capability.html +5 -5
  154. package/typedoc/types/CreateAppOptions.html +2 -2
  155. package/typedoc/types/FileInfo.html +1 -1
  156. package/typedoc/types/Intent.html +6 -6
  157. package/typedoc/types/IntentChain.html +3 -3
  158. package/typedoc/types/IntentContext.html +2 -2
  159. package/typedoc/types/IntentData.html +1 -1
  160. package/typedoc/types/IntentDispatcher.html +2 -2
  161. package/typedoc/types/IntentDispatcherResult.html +2 -2
  162. package/typedoc/types/IntentEffectDefinition.html +2 -2
  163. package/typedoc/types/IntentEffectResult.html +6 -6
  164. package/typedoc/types/IntentParams.html +2 -2
  165. package/typedoc/types/IntentResolver.html +2 -2
  166. package/typedoc/types/IntentResultData.html +1 -1
  167. package/typedoc/types/IntentSchema.html +1 -1
  168. package/typedoc/types/IntentUndo.html +2 -2
  169. package/typedoc/types/InterfaceDef.html +3 -3
  170. package/typedoc/types/Label.html +1 -1
  171. package/typedoc/types/NodeSerializer.html +3 -3
  172. package/typedoc/types/PluginManagerOptions.html +2 -2
  173. package/typedoc/types/PluginMeta.html +9 -9
  174. package/typedoc/types/PromiseIntentDispatcher.html +2 -2
  175. package/typedoc/types/PromiseIntentUndo.html +2 -2
  176. package/typedoc/types/Resource.html +1 -1
  177. package/typedoc/types/ResourceKey.html +1 -1
  178. package/typedoc/types/ResourceLanguage.html +1 -1
  179. package/typedoc/types/SerializedNode.html +2 -2
  180. package/typedoc/types/SurfaceComponent.html +2 -2
  181. package/typedoc/types/SurfaceDefinition.html +2 -2
  182. package/typedoc/types/SurfaceProps.html +2 -2
  183. package/typedoc/variables/Capabilities.AnchorSort.html +1 -0
  184. package/typedoc/variables/Capabilities.AppGraph.html +1 -1
  185. package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -1
  186. package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -1
  187. package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -1
  188. package/typedoc/variables/Capabilities.FileUploader.html +1 -1
  189. package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -1
  190. package/typedoc/variables/Capabilities.IntentResolver.html +1 -1
  191. package/typedoc/variables/Capabilities.Layout.html +1 -1
  192. package/typedoc/variables/Capabilities.Metadata.html +1 -1
  193. package/typedoc/variables/Capabilities.Null.html +1 -1
  194. package/typedoc/variables/Capabilities.PluginManager.html +1 -1
  195. package/typedoc/variables/Capabilities.ReactContext.html +1 -1
  196. package/typedoc/variables/Capabilities.ReactRoot.html +1 -1
  197. package/typedoc/variables/Capabilities.ReactSurface.html +1 -1
  198. package/typedoc/variables/Capabilities.RxRegistry.html +1 -1
  199. package/typedoc/variables/Capabilities.Settings.html +1 -1
  200. package/typedoc/variables/Capabilities.SettingsStore.html +1 -1
  201. package/typedoc/variables/Capabilities.Tools.html +1 -1
  202. package/typedoc/variables/Capabilities.Translations.html +1 -1
  203. package/typedoc/variables/Events.AppGraphReady.html +2 -2
  204. package/typedoc/variables/Events.DispatcherReady.html +2 -2
  205. package/typedoc/variables/Events.LayoutReady.html +1 -1
  206. package/typedoc/variables/Events.SettingsReady.html +2 -2
  207. package/typedoc/variables/Events.SetupAppGraph.html +2 -2
  208. package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -2
  209. package/typedoc/variables/Events.SetupIntentResolver.html +2 -2
  210. package/typedoc/variables/Events.SetupMetadata.html +2 -2
  211. package/typedoc/variables/Events.SetupReactSurface.html +2 -2
  212. package/typedoc/variables/Events.SetupSettings.html +2 -2
  213. package/typedoc/variables/Events.SetupTranslations.html +2 -2
  214. package/typedoc/variables/Events.Startup.html +2 -2
  215. package/typedoc/variables/FileInfoSchema.html +1 -1
  216. package/typedoc/variables/INTENT_ACTION.html +1 -1
  217. package/typedoc/variables/INTENT_PLUGIN.html +1 -1
  218. package/typedoc/variables/LAYOUT_ACTION.html +1 -1
  219. package/typedoc/variables/LAYOUT_PLUGIN.html +1 -1
  220. package/typedoc/variables/Label.html +1 -1
  221. package/typedoc/variables/LayoutAction.Toast.html +1 -1
  222. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -1
  223. package/typedoc/variables/PluginManagerProvider.html +2 -2
  224. package/typedoc/variables/Resource.html +2 -2
  225. package/typedoc/variables/ResourceKey.html +1 -1
  226. package/typedoc/variables/ResourceLanguage.html +1 -1
  227. package/typedoc/variables/SETTINGS_ACTION.html +1 -1
  228. package/typedoc/variables/SETTINGS_ID.html +1 -1
  229. package/typedoc/variables/SETTINGS_KEY.html +1 -1
  230. package/typedoc/variables/SETTINGS_PLUGIN.html +1 -1
  231. package/typedoc/variables/Surface.html +2 -2
  232. package/typedoc/variables/defaultFileTypes.html +1 -1
  233. package/dist/lib/browser/chunk-2KSDY3EZ.mjs.map +0 -7
  234. package/dist/lib/browser/chunk-K3HOLGVH.mjs.map +0 -7
  235. package/dist/lib/node/chunk-2EBZ2ICH.cjs.map +0 -7
  236. package/dist/lib/node/chunk-7J66KH2T.cjs.map +0 -7
  237. package/dist/lib/node-esm/chunk-BOEJMAVK.mjs.map +0 -7
  238. package/dist/lib/node-esm/chunk-ISNBS46Y.mjs.map +0 -7
  239. /package/dist/lib/browser/{app-graph-builder-6E7NCZ77.mjs.map → app-graph-builder-DYEAGZPS.mjs.map} +0 -0
  240. /package/dist/lib/browser/{intent-dispatcher-VGUJBPPN.mjs.map → intent-dispatcher-ELZN5EM7.mjs.map} +0 -0
  241. /package/dist/lib/browser/{intent-resolver-QLFZY5R5.mjs.map → intent-resolver-SGWLINTO.mjs.map} +0 -0
  242. /package/dist/lib/browser/{store-QGVXOY4T.mjs.map → store-YIU6IPZ2.mjs.map} +0 -0
  243. /package/dist/lib/node/{app-graph-builder-4IWMG67O.cjs.map → app-graph-builder-GBLISL7L.cjs.map} +0 -0
  244. /package/dist/lib/node/{intent-resolver-5CG5NIJY.cjs.map → intent-resolver-EPSFTHL6.cjs.map} +0 -0
  245. /package/dist/lib/node/{store-IF3UR2KA.cjs.map → store-CVVRXUTH.cjs.map} +0 -0
  246. /package/dist/lib/node-esm/{app-graph-builder-LYCG5CO3.mjs.map → app-graph-builder-LUBDEIT6.mjs.map} +0 -0
  247. /package/dist/lib/node-esm/{intent-dispatcher-ZUSNX2OY.mjs.map → intent-dispatcher-A2JCMWRD.mjs.map} +0 -0
  248. /package/dist/lib/node-esm/{intent-resolver-NGDHUKDD.mjs.map → intent-resolver-5C4O43GK.mjs.map} +0 -0
  249. /package/dist/lib/node-esm/{store-NCRSE25X.mjs.map → store-HRZXZ2D2.mjs.map} +0 -0
@@ -10,6 +10,7 @@ export type WithPluginManagerOptions = CreateAppOptions & {
10
10
  };
11
11
  /**
12
12
  * Wraps a story with a plugin manager.
13
+ * NOTE: This builds up and tears down the plugin manager on every render.
13
14
  */
14
15
  export declare const withPluginManager: (options?: WithPluginManagerOptions) => Decorator;
15
16
  //# sourceMappingURL=withPluginManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withPluginManager.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAKlB,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,MAAM,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AACvD,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,CAAC,EAAE,iBAAiB,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,KAAG,CAEnF,CAAC;AA+BF,MAAM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{
2
2
  "name": "@dxos/app-framework",
3
- "version": "0.8.2-main.fbd8ed0",
3
+ "version": "0.8.2-staging.4d6ad0f",
4
4
  "description": "A framework for building applications from composible plugins.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -37,20 +37,22 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "@preact/signals-core": "^1.6.0",
41
- "@dxos/app-graph": "0.8.2-main.fbd8ed0",
42
- "@dxos/async": "0.8.2-main.fbd8ed0",
43
- "@dxos/client-protocol": "0.8.2-main.fbd8ed0",
44
- "@dxos/artifact": "0.8.2-main.fbd8ed0",
45
- "@dxos/debug": "0.8.2-main.fbd8ed0",
46
- "@dxos/echo-schema": "0.8.2-main.fbd8ed0",
47
- "@dxos/keys": "0.8.2-main.fbd8ed0",
48
- "@dxos/invariant": "0.8.2-main.fbd8ed0",
49
- "@dxos/local-storage": "0.8.2-main.fbd8ed0",
50
- "@dxos/live-object": "0.8.2-main.fbd8ed0",
51
- "@dxos/log": "0.8.2-main.fbd8ed0",
52
- "@dxos/react-hooks": "0.8.2-main.fbd8ed0",
53
- "@dxos/util": "0.8.2-main.fbd8ed0"
40
+ "@preact/signals-core": "^1.9.0",
41
+ "@dxos/ai": "0.8.2-staging.4d6ad0f",
42
+ "@dxos/app-graph": "0.8.2-staging.4d6ad0f",
43
+ "@dxos/artifact": "0.8.2-staging.4d6ad0f",
44
+ "@dxos/client-protocol": "0.8.2-staging.4d6ad0f",
45
+ "@dxos/async": "0.8.2-staging.4d6ad0f",
46
+ "@dxos/debug": "0.8.2-staging.4d6ad0f",
47
+ "@dxos/echo-schema": "0.8.2-staging.4d6ad0f",
48
+ "@dxos/invariant": "0.8.2-staging.4d6ad0f",
49
+ "@dxos/keys": "0.8.2-staging.4d6ad0f",
50
+ "@dxos/live-object": "0.8.2-staging.4d6ad0f",
51
+ "@dxos/log": "0.8.2-staging.4d6ad0f",
52
+ "@dxos/schema": "0.8.2-staging.4d6ad0f",
53
+ "@dxos/util": "0.8.2-staging.4d6ad0f",
54
+ "@dxos/react-hooks": "0.8.2-staging.4d6ad0f",
55
+ "@dxos/local-storage": "0.8.2-staging.4d6ad0f"
54
56
  },
55
57
  "devDependencies": {
56
58
  "@effect-rx/rx-react": "^0.34.1",
@@ -60,11 +62,11 @@
60
62
  "effect": "3.14.21",
61
63
  "react": "~18.2.0",
62
64
  "typedoc": "0.28.1",
63
- "@dxos/echo-signals": "0.8.2-main.fbd8ed0",
64
- "@dxos/random": "0.8.2-main.fbd8ed0",
65
- "@dxos/react-ui": "0.8.2-main.fbd8ed0",
66
- "@dxos/react-ui-syntax-highlighter": "0.8.2-main.fbd8ed0",
67
- "@dxos/storybook-utils": "0.8.2-main.fbd8ed0"
65
+ "@dxos/echo-signals": "0.8.2-staging.4d6ad0f",
66
+ "@dxos/random": "0.8.2-staging.4d6ad0f",
67
+ "@dxos/react-ui": "0.8.2-staging.4d6ad0f",
68
+ "@dxos/storybook-utils": "0.8.2-staging.4d6ad0f",
69
+ "@dxos/react-ui-syntax-highlighter": "0.8.2-staging.4d6ad0f"
68
70
  },
69
71
  "peerDependencies": {
70
72
  "@effect-rx/rx-react": "^0.34.1",
package/src/App.tsx CHANGED
@@ -4,10 +4,11 @@
4
4
 
5
5
  import { RegistryContext } from '@effect-rx/rx-react';
6
6
  import { effect } from '@preact/signals-core';
7
- import React, { useEffect, useState, type FC, type PropsWithChildren } from 'react';
7
+ import React, { useCallback, useEffect, useMemo, useState, type FC, type PropsWithChildren } from 'react';
8
8
 
9
9
  import { invariant } from '@dxos/invariant';
10
10
  import { live } from '@dxos/live-object';
11
+ import { useDefaultValue } from '@dxos/react-hooks';
11
12
 
12
13
  import { Capabilities, Events } from './common';
13
14
  import { PluginManager, type PluginManagerOptions, type Plugin } from './core';
@@ -53,72 +54,109 @@ export type CreateAppOptions = {
53
54
  * @param params.cacheEnabled Whether to cache enabled plugins in localStorage.
54
55
  * @param params.safeMode Whether to enable safe mode, which disables optional plugins.
55
56
  */
56
- export const createApp = ({
57
+ export const useApp = ({
57
58
  pluginManager,
58
59
  pluginLoader: _pluginLoader,
59
- plugins = [],
60
- core = plugins.map(({ meta }) => meta.id),
61
- defaults = [],
60
+ plugins: _plugins,
61
+ core: _core,
62
+ defaults: _defaults,
62
63
  placeholder,
63
64
  fallback = DefaultFallback,
64
65
  cacheEnabled = false,
65
66
  safeMode = false,
66
67
  }: CreateAppOptions) => {
68
+ const plugins = useDefaultValue(_plugins, () => []);
69
+ const core = useDefaultValue(_core, () => plugins.map(({ meta }) => meta.id));
70
+ const defaults = useDefaultValue(_defaults, () => []);
71
+
67
72
  // TODO(wittjosiah): Provide a custom plugin loader which supports loading via url.
68
- const pluginLoader =
69
- _pluginLoader ??
70
- ((id: string) => {
71
- const plugin = plugins.find((plugin) => plugin.meta.id === id);
72
- invariant(plugin, `Plugin not found: ${id}`);
73
- return plugin;
73
+ const pluginLoader = useMemo(
74
+ () =>
75
+ _pluginLoader ??
76
+ ((id: string) => {
77
+ const plugin = plugins.find((plugin) => plugin.meta.id === id);
78
+ invariant(plugin, `Plugin not found: ${id}`);
79
+ return plugin;
80
+ }),
81
+ [_pluginLoader, plugins],
82
+ );
83
+
84
+ const state = useMemo(() => live({ ready: false, error: null }), []);
85
+ const cached: string[] = useMemo(() => JSON.parse(localStorage.getItem(ENABLED_KEY) ?? '[]'), []);
86
+ const enabled = useMemo(
87
+ () => (safeMode ? [] : cacheEnabled && cached.length > 0 ? cached : defaults),
88
+ [safeMode, cacheEnabled, cached, defaults],
89
+ );
90
+ const manager = useMemo(
91
+ () => pluginManager ?? new PluginManager({ pluginLoader, plugins, core, enabled }),
92
+ [pluginManager, pluginLoader, plugins, core, enabled],
93
+ );
94
+
95
+ useEffect(() => {
96
+ return manager.activation.on(({ event, state: _state, error }) => {
97
+ // Once the app is ready the first time, don't show the fallback again.
98
+ if (!state.ready && event === Events.Startup.id) {
99
+ state.ready = _state === 'activated';
100
+ }
101
+
102
+ if (error && !state.ready && !state.error) {
103
+ state.error = error;
104
+ }
74
105
  });
106
+ }, [manager, state]);
75
107
 
76
- const state = live({ ready: false, error: null });
77
- const cached: string[] = JSON.parse(localStorage.getItem(ENABLED_KEY) ?? '[]');
78
- const enabled = safeMode ? [] : cacheEnabled && cached.length > 0 ? cached : defaults;
79
- const manager = pluginManager ?? new PluginManager({ pluginLoader, plugins, core, enabled });
108
+ useEffect(() => {
109
+ effect(() => {
110
+ cacheEnabled && localStorage.setItem(ENABLED_KEY, JSON.stringify(manager.enabled));
111
+ });
112
+ }, [cacheEnabled, manager]);
80
113
 
81
- manager.activation.on(({ event, state: _state, error }) => {
82
- // Once the app is ready the first time, don't show the fallback again.
83
- if (!state.ready && event === Events.Startup.id) {
84
- state.ready = _state === 'activated';
85
- }
114
+ useEffect(() => {
115
+ manager.context.contributeCapability({
116
+ interface: Capabilities.PluginManager,
117
+ implementation: manager,
118
+ module: 'dxos.org/app-framework/plugin-manager',
119
+ });
86
120
 
87
- if (error && !state.ready && !state.error) {
88
- state.error = error;
89
- }
90
- });
91
-
92
- effect(() => {
93
- cacheEnabled && localStorage.setItem(ENABLED_KEY, JSON.stringify(manager.enabled));
94
- });
95
-
96
- manager.context.contributeCapability({
97
- interface: Capabilities.PluginManager,
98
- implementation: manager,
99
- module: 'dxos.org/app-framework/plugin-manager',
100
- });
101
-
102
- manager.context.contributeCapability({
103
- interface: Capabilities.RxRegistry,
104
- implementation: manager.registry,
105
- module: 'dxos.org/app-framework/rx-registry',
106
- });
107
-
108
- setupDevtools(manager);
109
-
110
- // TODO(wittjosiah): Factor out such that this could be called per surface role when attempting to render.
111
- void manager.activate(Events.SetupReactSurface);
112
- void manager.activate(Events.Startup);
113
-
114
- return () => (
115
- <ErrorBoundary fallback={fallback}>
116
- <PluginManagerProvider value={manager}>
117
- <RegistryContext.Provider value={manager.registry}>
118
- <App placeholder={placeholder} state={state} />
119
- </RegistryContext.Provider>
120
- </PluginManagerProvider>
121
- </ErrorBoundary>
121
+ manager.context.contributeCapability({
122
+ interface: Capabilities.RxRegistry,
123
+ implementation: manager.registry,
124
+ module: 'dxos.org/app-framework/rx-registry',
125
+ });
126
+
127
+ return () => {
128
+ manager.context.removeCapability(Capabilities.PluginManager, manager);
129
+ manager.context.removeCapability(Capabilities.RxRegistry, manager.registry);
130
+ };
131
+ }, [manager]);
132
+
133
+ useEffect(() => {
134
+ setupDevtools(manager);
135
+ }, [manager]);
136
+
137
+ useEffect(() => {
138
+ const timeout = setTimeout(async () => {
139
+ await Promise.all([
140
+ // TODO(wittjosiah): Factor out such that this could be called per surface role when attempting to render.
141
+ manager.activate(Events.SetupReactSurface),
142
+ manager.activate(Events.Startup),
143
+ ]);
144
+ });
145
+
146
+ return () => clearTimeout(timeout);
147
+ }, [manager]);
148
+
149
+ return useCallback(
150
+ () => (
151
+ <ErrorBoundary fallback={fallback}>
152
+ <PluginManagerProvider value={manager}>
153
+ <RegistryContext.Provider value={manager.registry}>
154
+ <App placeholder={placeholder} state={state} />
155
+ </RegistryContext.Provider>
156
+ </PluginManagerProvider>
157
+ </ErrorBoundary>
158
+ ),
159
+ [fallback, manager, placeholder, state],
122
160
  );
123
161
  };
124
162
 
@@ -6,16 +6,18 @@ import { type Registry } from '@effect-rx/rx-react';
6
6
  import { type Schema } from 'effect';
7
7
  import { type FC, type PropsWithChildren } from 'react';
8
8
 
9
+ import { type ExecutableTool } from '@dxos/ai';
9
10
  import { type GraphBuilder, type BuilderExtensions } from '@dxos/app-graph';
10
- import { type ArtifactDefinition, type Tool } from '@dxos/artifact';
11
+ import { type ArtifactDefinition } from '@dxos/artifact';
11
12
  import { type Space } from '@dxos/client-protocol';
12
13
  import { type RootSettingsStore } from '@dxos/local-storage';
14
+ import { type AnchoredTo } from '@dxos/schema';
13
15
 
14
16
  import { type FileInfo } from './file';
15
17
  import { type NodeSerializer } from './graph';
16
18
  import { type SurfaceDefinition } from './surface';
17
19
  import { type Resource } from './translations';
18
- import { defineCapability, type PluginManager } from '../core';
20
+ import { type PluginManager, defineCapability } from '../core';
19
21
  import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
20
22
 
21
23
  export namespace Capabilities {
@@ -94,11 +96,17 @@ export namespace Capabilities {
94
96
  export type Metadata = Readonly<{ id: string; metadata: Record<string, any> }>;
95
97
  export const Metadata = defineCapability<Metadata>('dxos.org/app-framework/capability/metadata');
96
98
 
97
- export const Tools = defineCapability<Tool[]>('dxos.org/app-framework/capability/tools');
99
+ export const Tools = defineCapability<ExecutableTool[]>('dxos.org/app-framework/capability/tools');
98
100
  export const ArtifactDefinition = defineCapability<ArtifactDefinition>(
99
101
  'dxos.org/app-framework/capability/artifact-definition',
100
102
  );
101
103
 
102
104
  export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
103
105
  export const FileUploader = defineCapability<FileUploader>('dxos.org/app-framework/capability/file-uploader');
106
+
107
+ type AnchorSort = {
108
+ key: string;
109
+ sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
110
+ };
111
+ export const AnchorSort = defineCapability<AnchorSort>('dxos.org/app-framework/capability/anchor-sort');
104
112
  }
@@ -2,22 +2,19 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema, SchemaAST } from 'effect';
5
+ import { Schema } from 'effect';
6
6
 
7
7
  import { Expando, Ref } from '@dxos/echo-schema';
8
- // TODO(dmaretskyi): Import from @dxos/echo
9
- import { SpaceId } from '@dxos/keys';
10
8
 
11
9
  export namespace CollaborationActions {
12
10
  export class InsertContent extends Schema.TaggedClass<InsertContent>()('assistant/intent-content', {
13
11
  input: Schema.Struct({
14
- spaceId: SpaceId,
15
- target: Ref(Expando),
12
+ target: Expando,
16
13
  object: Ref(Expando),
14
+ at: Schema.optional(Schema.String),
17
15
  label: Schema.String.pipe(Schema.optional),
18
16
  }).annotations({
19
- [SchemaAST.DescriptionAnnotationId]:
20
- 'Enables plugins to inject content blocks or references into a related entity.',
17
+ description: 'Enables plugins to inject content blocks or references into a related entity.',
21
18
  }),
22
19
  output: Schema.Void,
23
20
  }) {}
@@ -97,10 +97,18 @@ export namespace LayoutAction {
97
97
  ),
98
98
  options: Schema.Struct({
99
99
  state: Schema.optional(Schema.Boolean.annotations({ description: 'Whether the dialog is open or closed.' })),
100
+ type: Schema.optional(Schema.Literal('default', 'alert').annotations({ description: 'The type of dialog.' })),
100
101
  blockAlign: Schema.optional(
101
102
  Schema.Literal('start', 'center', 'end').annotations({ description: 'The alignment of the dialog.' }),
102
103
  ),
103
- type: Schema.optional(Schema.Literal('default', 'alert').annotations({ description: 'The type of dialog.' })),
104
+ overlayClasses: Schema.optional(
105
+ Schema.String.annotations({ description: 'Additional classes for the dialog overlay.' }),
106
+ ),
107
+ overlayStyle: Schema.optional(
108
+ Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({
109
+ description: 'Additional styles for the dialog overlay.',
110
+ }),
111
+ ),
104
112
  props: Schema.optional(
105
113
  Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({
106
114
  description: 'Additional props for the dialog.',
@@ -150,7 +150,7 @@ export class PluginContext {
150
150
  module: string;
151
151
  interface: InterfaceDef<T>;
152
152
  implementation: T;
153
- }) {
153
+ }): void {
154
154
  const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
155
155
  const capability = new CapabilityImpl(moduleId, implementation);
156
156
  if (current.includes(capability)) {
@@ -168,7 +168,7 @@ export class PluginContext {
168
168
  /**
169
169
  * @internal
170
170
  */
171
- removeCapability<T>(interfaceDef: InterfaceDef<T>, implementation: T) {
171
+ removeCapability<T>(interfaceDef: InterfaceDef<T>, implementation: T): void {
172
172
  const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
173
173
  if (current.length === 0) {
174
174
  return;
@@ -265,7 +265,7 @@ export class PluginManager {
265
265
  return untracked(() => Effect.runPromise(this._reset(event)));
266
266
  }
267
267
 
268
- private _addPlugin(plugin: Plugin) {
268
+ private _addPlugin(plugin: Plugin): void {
269
269
  untracked(() => {
270
270
  log('add plugin', { id: plugin.meta.id });
271
271
  if (!this._state.plugins.includes(plugin)) {
@@ -274,7 +274,7 @@ export class PluginManager {
274
274
  });
275
275
  }
276
276
 
277
- private _removePlugin(id: string) {
277
+ private _removePlugin(id: string): void {
278
278
  untracked(() => {
279
279
  log('remove plugin', { id });
280
280
  const pluginIndex = this._state.plugins.findIndex((plugin) => plugin.meta.id === id);
@@ -284,7 +284,7 @@ export class PluginManager {
284
284
  });
285
285
  }
286
286
 
287
- private _addModule(module: PluginModule) {
287
+ private _addModule(module: PluginModule): void {
288
288
  untracked(() => {
289
289
  log('add module', { id: module.id });
290
290
  if (!this._state.modules.includes(module)) {
@@ -293,7 +293,7 @@ export class PluginManager {
293
293
  });
294
294
  }
295
295
 
296
- private _removeModule(id: string) {
296
+ private _removeModule(id: string): void {
297
297
  untracked(() => {
298
298
  log('remove module', { id });
299
299
  const moduleIndex = this._state.modules.findIndex((module) => module.id === id);
@@ -303,27 +303,27 @@ export class PluginManager {
303
303
  });
304
304
  }
305
305
 
306
- private _getPlugin(id: string) {
306
+ private _getPlugin(id: string): Plugin | undefined {
307
307
  return this._state.plugins.find((plugin) => plugin.meta.id === id);
308
308
  }
309
309
 
310
- private _getActiveModules() {
310
+ private _getActiveModules(): PluginModule[] {
311
311
  return this._state.modules.filter((module) => this._state.active.includes(module.id));
312
312
  }
313
313
 
314
- private _getInactiveModules() {
314
+ private _getInactiveModules(): PluginModule[] {
315
315
  return this._state.modules.filter((module) => !this._state.active.includes(module.id));
316
316
  }
317
317
 
318
- private _getActiveModulesByEvent(key: string) {
318
+ private _getActiveModulesByEvent(key: string): PluginModule[] {
319
319
  return this._getActiveModules().filter((module) => getEvents(module.activatesOn).map(eventKey).includes(key));
320
320
  }
321
321
 
322
- private _getInactiveModulesByEvent(key: string) {
322
+ private _getInactiveModulesByEvent(key: string): PluginModule[] {
323
323
  return this._getInactiveModules().filter((module) => getEvents(module.activatesOn).map(eventKey).includes(key));
324
324
  }
325
325
 
326
- private _setPendingResetByModule(module: PluginModule) {
326
+ private _setPendingResetByModule(module: PluginModule): void {
327
327
  return untracked(() => {
328
328
  const activationEvents = getEvents(module.activatesOn)
329
329
  .map(eventKey)
@@ -12,7 +12,7 @@ import { DebugPlugin } from './debug';
12
12
  import { createNumberPlugin, GeneratorPlugin } from './generator';
13
13
  import { LayoutPlugin } from './layout';
14
14
  import { LoggerPlugin } from './logger';
15
- import { createApp } from '../App';
15
+ import { useApp } from '../App';
16
16
  import { IntentPlugin } from '../plugin-intent';
17
17
 
18
18
  const plugins = [IntentPlugin(), LayoutPlugin(), DebugPlugin(), LoggerPlugin(), GeneratorPlugin()];
@@ -21,13 +21,17 @@ const Placeholder = () => {
21
21
  return <div>Loading...</div>;
22
22
  };
23
23
 
24
- const Story = createApp({
25
- pluginLoader: (id) => createNumberPlugin(id),
26
- plugins,
27
- core: plugins.map((plugin) => plugin.meta.id),
28
- // Having a non-empty placeholder makes it clear if it's taking a while to load.
29
- placeholder: Placeholder,
30
- });
24
+ const Story = () => {
25
+ const App = useApp({
26
+ pluginLoader: (id) => createNumberPlugin(id),
27
+ plugins,
28
+ core: plugins.map((plugin) => plugin.meta.id),
29
+ // Having a non-empty placeholder makes it clear if it's taking a while to load.
30
+ placeholder: Placeholder,
31
+ });
32
+
33
+ return <App />;
34
+ };
31
35
 
32
36
  export const Playground = {};
33
37
 
@@ -21,7 +21,7 @@ export class ErrorBoundary extends Component<Props, State> {
21
21
  this.state = { error: undefined };
22
22
  }
23
23
 
24
- static getDerivedStateFromError(error: Error) {
24
+ static getDerivedStateFromError(error: Error): { error: Error } {
25
25
  return { error };
26
26
  }
27
27
 
@@ -31,7 +31,7 @@ export class ErrorBoundary extends Component<Props, State> {
31
31
  }
32
32
  }
33
33
 
34
- override render() {
34
+ override render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined {
35
35
  if (this.state.error) {
36
36
  return <this.props.fallback data={this.props.data} error={this.state.error} reset={this.resetError} />;
37
37
  }
@@ -39,7 +39,7 @@ export class ErrorBoundary extends Component<Props, State> {
39
39
  return this.props.children;
40
40
  }
41
41
 
42
- private resetError() {
42
+ private resetError(): void {
43
43
  this.setState({ error: undefined });
44
44
  }
45
45
  }
@@ -3,18 +3,18 @@
3
3
  //
4
4
 
5
5
  import { type Decorator } from '@storybook/react';
6
- import React, { useEffect } from 'react';
6
+ import React, { useEffect, useMemo } from 'react';
7
7
 
8
8
  import { raise } from '@dxos/debug';
9
9
 
10
- import { createApp, type CreateAppOptions } from '../App';
10
+ import { useApp, type CreateAppOptions } from '../App';
11
11
  import { Capabilities, Events } from '../common';
12
12
  import {
13
- type ActivationEvent,
14
- type AnyCapability,
15
13
  contributes,
16
14
  defineModule,
17
15
  definePlugin,
16
+ type ActivationEvent,
17
+ type AnyCapability,
18
18
  PluginManager,
19
19
  type PluginContext,
20
20
  } from '../core';
@@ -62,16 +62,13 @@ export type WithPluginManagerOptions = CreateAppOptions & {
62
62
 
63
63
  /**
64
64
  * Wraps a story with a plugin manager.
65
+ * NOTE: This builds up and tears down the plugin manager on every render.
65
66
  */
66
67
  export const withPluginManager = (options: WithPluginManagerOptions = {}): Decorator => {
67
- const pluginManager = setupPluginManager(options);
68
- const App = createApp({ pluginManager });
69
-
70
- options.fireEvents?.forEach((event) => {
71
- void pluginManager.activate(event);
72
- });
73
-
74
68
  return (Story, context) => {
69
+ const pluginManager = useMemo(() => setupPluginManager(options), [options]);
70
+
71
+ // Set-up root capability.
75
72
  useEffect(() => {
76
73
  const capability = contributes(Capabilities.ReactRoot, {
77
74
  id: context.id,
@@ -83,8 +80,22 @@ export const withPluginManager = (options: WithPluginManagerOptions = {}): Decor
83
80
  module: 'dxos.org/app-framework/withPluginManager',
84
81
  });
85
82
 
86
- return () => pluginManager.context.removeCapability(capability.interface, capability.implementation);
87
- }, []);
83
+ return () => {
84
+ pluginManager.context.removeCapability(capability.interface, capability.implementation);
85
+ };
86
+ }, [pluginManager, context]);
87
+
88
+ // Fire events.
89
+ useEffect(() => {
90
+ const timeout = setTimeout(async () => {
91
+ await Promise.all(options.fireEvents?.map((event) => pluginManager.activate(event)) ?? []);
92
+ });
93
+
94
+ return () => clearTimeout(timeout);
95
+ }, [pluginManager]);
96
+
97
+ // Create app.
98
+ const App = useApp({ pluginManager });
88
99
 
89
100
  return <App />;
90
101
  };
package/tsconfig.json CHANGED
@@ -7,62 +7,7 @@
7
7
  "include": [
8
8
  "src"
9
9
  ],
10
- "references": [
11
- {
12
- "path": "../../common/async"
13
- },
14
- {
15
- "path": "../../common/debug"
16
- },
17
- {
18
- "path": "../../common/invariant"
19
- },
20
- {
21
- "path": "../../common/keys"
22
- },
23
- {
24
- "path": "../../common/local-storage"
25
- },
26
- {
27
- "path": "../../common/log"
28
- },
29
- {
30
- "path": "../../common/random"
31
- },
32
- {
33
- "path": "../../common/storybook-utils"
34
- },
35
- {
36
- "path": "../../common/util"
37
- },
38
- {
39
- "path": "../../core/echo/echo-schema"
40
- },
41
- {
42
- "path": "../../core/echo/echo-signals"
43
- },
44
- {
45
- "path": "../../core/echo/live-object"
46
- },
47
- {
48
- "path": "../../experimental/artifact"
49
- },
50
- {
51
- "path": "../../ui/primitives/react-hooks"
52
- },
53
- {
54
- "path": "../../ui/react-ui"
55
- },
56
- {
57
- "path": "../../ui/react-ui-syntax-highlighter"
58
- },
59
- {
60
- "path": "../app-graph"
61
- },
62
- {
63
- "path": "../client-protocol"
64
- }
65
- ],
10
+ "references": [],
66
11
  "ts-node": {
67
12
  "compilerOptions": {
68
13
  "module": "CommonJS"
@@ -1 +1 @@
1
- window.navigationData = "eJylmmFv2zYQhv+LPwfbmrTdlm+u7RVGUyeInQ1FMRSMRNtEaVGQKLfpsP8+SLIsHnm8o7GP0b33hLKolzyePv8zsfK7ndxOZqIUz0orq2Q9uZqUwu4nt5ODyRst65/d6E97e9CTq8lXVeST29dXk2yvdF7JYnL7+Yz7Q2n5VGojclmNOPtS+jBXCMnXv/z+66s31/9enaHLwsrCPsra6CODhVIOfCdeTGNJYC/hQB+lFbmwgkQNIg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