@dxos/app-framework 0.6.13 → 0.6.14-main.1366248

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 (204) hide show
  1. package/dist/lib/browser/chunk-3E7RY3CE.mjs +72 -0
  2. package/dist/lib/browser/chunk-3E7RY3CE.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-653Y45CL.mjs +41 -0
  4. package/dist/lib/browser/chunk-653Y45CL.mjs.map +7 -0
  5. package/dist/lib/browser/{plugin-MM66VRCO.mjs → chunk-CDLQO5K2.mjs} +66 -20
  6. package/dist/lib/browser/chunk-CDLQO5K2.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-EQTQGGE6.mjs +214 -0
  8. package/dist/lib/browser/chunk-EQTQGGE6.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +183 -293
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/plugin-intent-Q5KFPKFA.mjs +22 -0
  13. package/dist/lib/browser/plugin-intent-Q5KFPKFA.mjs.map +7 -0
  14. package/dist/lib/browser/plugin-settings-OM3G2QFY.mjs +11 -0
  15. package/dist/lib/browser/plugin-settings-OM3G2QFY.mjs.map +7 -0
  16. package/dist/lib/browser/plugin-surface-ZQXFAL46.mjs +24 -0
  17. package/dist/lib/browser/plugin-surface-ZQXFAL46.mjs.map +7 -0
  18. package/dist/lib/node/chunk-EF67TRWJ.cjs +236 -0
  19. package/dist/lib/node/chunk-EF67TRWJ.cjs.map +7 -0
  20. package/dist/lib/node/chunk-JZ2JVKRY.cjs +58 -0
  21. package/dist/lib/node/chunk-JZ2JVKRY.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-62W6CMGM.cjs → chunk-QBM42OQ6.cjs} +56 -5
  23. package/dist/lib/node/chunk-QBM42OQ6.cjs.map +7 -0
  24. package/dist/lib/node/{plugin-QV7ESETI.cjs → chunk-VOKMWTKO.cjs} +74 -20
  25. package/dist/lib/node/chunk-VOKMWTKO.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +195 -310
  27. package/dist/lib/node/index.cjs.map +4 -4
  28. package/dist/lib/node/meta.json +1 -1
  29. package/dist/lib/node/plugin-intent-FMC4SDI3.cjs +43 -0
  30. package/dist/lib/node/plugin-intent-FMC4SDI3.cjs.map +7 -0
  31. package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs +32 -0
  32. package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs.map +7 -0
  33. package/dist/lib/node/{chunk-P5GRB4XF.cjs → plugin-surface-B5NHOBSW.cjs} +19 -22
  34. package/dist/lib/node/plugin-surface-B5NHOBSW.cjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-3FCLBEOX.mjs +215 -0
  36. package/dist/lib/node-esm/chunk-3FCLBEOX.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs +74 -0
  38. package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs.map +7 -0
  39. package/dist/lib/node-esm/chunk-MYNXI5VG.mjs +214 -0
  40. package/dist/lib/node-esm/chunk-MYNXI5VG.mjs.map +7 -0
  41. package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs +43 -0
  42. package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs.map +7 -0
  43. package/dist/lib/node-esm/index.mjs +567 -0
  44. package/dist/lib/node-esm/index.mjs.map +7 -0
  45. package/dist/lib/node-esm/meta.json +1 -0
  46. package/dist/lib/node-esm/plugin-intent-KETLP7UL.mjs +23 -0
  47. package/dist/lib/node-esm/plugin-intent-KETLP7UL.mjs.map +7 -0
  48. package/dist/lib/node-esm/plugin-settings-37UVWF2V.mjs +12 -0
  49. package/dist/lib/node-esm/plugin-settings-37UVWF2V.mjs.map +7 -0
  50. package/dist/lib/node-esm/plugin-surface-QXQRR534.mjs +25 -0
  51. package/dist/lib/node-esm/plugin-surface-QXQRR534.mjs.map +7 -0
  52. package/dist/types/src/App.d.ts +5 -5
  53. package/dist/types/src/App.d.ts.map +1 -1
  54. package/dist/types/src/plugins/common/file.d.ts +1 -1
  55. package/dist/types/src/plugins/common/file.d.ts.map +1 -1
  56. package/dist/types/src/plugins/common/graph.d.ts +1 -1
  57. package/dist/types/src/plugins/common/graph.d.ts.map +1 -1
  58. package/dist/types/src/plugins/common/index.d.ts +0 -1
  59. package/dist/types/src/plugins/common/index.d.ts.map +1 -1
  60. package/dist/types/src/plugins/common/layout.d.ts +6 -6
  61. package/dist/types/src/plugins/common/layout.d.ts.map +1 -1
  62. package/dist/types/src/plugins/common/metadata.d.ts +1 -1
  63. package/dist/types/src/plugins/common/metadata.d.ts.map +1 -1
  64. package/dist/types/src/plugins/common/navigation.d.ts +9 -20
  65. package/dist/types/src/plugins/common/navigation.d.ts.map +1 -1
  66. package/dist/types/src/plugins/common/translations.d.ts +1 -1
  67. package/dist/types/src/plugins/common/translations.d.ts.map +1 -1
  68. package/dist/types/src/plugins/helpers.d.ts +20 -5
  69. package/dist/types/src/plugins/helpers.d.ts.map +1 -1
  70. package/dist/types/src/plugins/index.d.ts +4 -3
  71. package/dist/types/src/plugins/index.d.ts.map +1 -1
  72. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts +21 -0
  73. package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts.map +1 -0
  74. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts +14 -0
  75. package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts.map +1 -0
  76. package/dist/types/src/plugins/{PluginHost → plugin-host}/PluginContext.d.ts +4 -4
  77. package/dist/types/src/plugins/plugin-host/PluginContext.d.ts.map +1 -0
  78. package/dist/types/src/plugins/plugin-host/index.d.ts +4 -0
  79. package/dist/types/src/plugins/plugin-host/index.d.ts.map +1 -0
  80. package/dist/types/src/plugins/{PluginHost → plugin-host}/plugin.d.ts +41 -83
  81. package/dist/types/src/plugins/plugin-host/plugin.d.ts.map +1 -0
  82. package/dist/types/src/plugins/plugin-host/plugin.test.d.ts.map +1 -0
  83. package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts.map +1 -0
  84. package/dist/types/src/plugins/{IntentPlugin/plugin.d.ts → plugin-intent/IntentPlugin.d.ts} +3 -4
  85. package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts.map +1 -0
  86. package/dist/types/src/plugins/plugin-intent/helpers.d.ts.map +1 -0
  87. package/dist/types/src/plugins/plugin-intent/index.d.ts +6 -0
  88. package/dist/types/src/plugins/plugin-intent/index.d.ts.map +1 -0
  89. package/dist/types/src/plugins/{IntentPlugin → plugin-intent}/intent.d.ts +1 -1
  90. package/dist/types/src/plugins/plugin-intent/intent.d.ts.map +1 -0
  91. package/dist/types/src/plugins/plugin-intent/meta.d.ts.map +1 -0
  92. package/dist/types/src/plugins/{IntentPlugin → plugin-intent}/provides.d.ts +2 -2
  93. package/dist/types/src/plugins/plugin-intent/provides.d.ts.map +1 -0
  94. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts +4 -0
  95. package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts.map +1 -0
  96. package/dist/types/src/plugins/plugin-settings/index.d.ts +4 -0
  97. package/dist/types/src/plugins/plugin-settings/index.d.ts.map +1 -0
  98. package/dist/types/src/plugins/plugin-settings/meta.d.ts +5 -0
  99. package/dist/types/src/plugins/plugin-settings/meta.d.ts.map +1 -0
  100. package/dist/types/src/plugins/plugin-settings/provides.d.ts +13 -0
  101. package/dist/types/src/plugins/plugin-settings/provides.d.ts.map +1 -0
  102. package/dist/types/src/plugins/plugin-surface/ErrorBoundary.d.ts.map +1 -0
  103. package/dist/types/src/plugins/{SurfacePlugin → plugin-surface}/Surface.d.ts +6 -2
  104. package/dist/types/src/plugins/plugin-surface/Surface.d.ts.map +1 -0
  105. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts +7 -0
  106. package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts.map +1 -0
  107. package/dist/types/src/plugins/{SurfacePlugin → plugin-surface}/SurfaceRootContext.d.ts +15 -2
  108. package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts.map +1 -0
  109. package/dist/types/src/plugins/plugin-surface/helpers.d.ts.map +1 -0
  110. package/dist/types/src/plugins/{SurfacePlugin → plugin-surface}/index.d.ts +2 -0
  111. package/dist/types/src/plugins/plugin-surface/index.d.ts.map +1 -0
  112. package/dist/types/src/plugins/plugin-surface/meta.d.ts.map +1 -0
  113. package/dist/types/src/plugins/{SurfacePlugin → plugin-surface}/provides.d.ts +1 -1
  114. package/dist/types/src/plugins/plugin-surface/provides.d.ts.map +1 -0
  115. package/package.json +16 -14
  116. package/project.json +3 -8
  117. package/src/App.tsx +18 -16
  118. package/src/plugins/common/file.ts +1 -1
  119. package/src/plugins/common/graph.ts +1 -1
  120. package/src/plugins/common/index.ts +0 -1
  121. package/src/plugins/common/layout.ts +6 -3
  122. package/src/plugins/common/metadata.ts +1 -1
  123. package/src/plugins/common/navigation.ts +10 -15
  124. package/src/plugins/common/translations.ts +2 -8
  125. package/src/plugins/helpers.ts +55 -11
  126. package/src/plugins/index.ts +4 -3
  127. package/src/plugins/plugin-host/HostPlugin.tsx +96 -0
  128. package/src/plugins/plugin-host/PluginContainer.tsx +120 -0
  129. package/src/plugins/{PluginHost → plugin-host}/PluginContext.tsx +9 -14
  130. package/src/plugins/{PluginHost → plugin-host}/index.ts +2 -1
  131. package/src/plugins/{PluginHost → plugin-host}/plugin.test.ts +1 -2
  132. package/src/plugins/{PluginHost → plugin-host}/plugin.ts +50 -52
  133. package/src/plugins/{IntentPlugin/plugin.tsx → plugin-intent/IntentPlugin.tsx} +3 -6
  134. package/src/plugins/{IntentPlugin → plugin-intent}/index.ts +4 -0
  135. package/src/plugins/{IntentPlugin → plugin-intent}/intent.ts +1 -1
  136. package/src/plugins/{IntentPlugin → plugin-intent}/provides.ts +5 -2
  137. package/src/plugins/plugin-settings/SettingsPlugin.tsx +22 -0
  138. package/src/plugins/plugin-settings/index.ts +9 -0
  139. package/src/plugins/plugin-settings/meta.ts +9 -0
  140. package/src/plugins/plugin-settings/provides.ts +29 -0
  141. package/src/plugins/{SurfacePlugin → plugin-surface}/Surface.tsx +74 -40
  142. package/src/plugins/{SurfacePlugin/plugin.tsx → plugin-surface/SurfacePlugin.tsx} +3 -5
  143. package/src/plugins/{SurfacePlugin → plugin-surface}/SurfaceRootContext.tsx +21 -4
  144. package/src/plugins/{SurfacePlugin → plugin-surface}/index.ts +4 -0
  145. package/src/plugins/{SurfacePlugin → plugin-surface}/provides.ts +2 -1
  146. package/tsconfig.json +2 -30
  147. package/vitest.config.ts +9 -0
  148. package/dist/lib/browser/chunk-J45KR4DI.mjs +0 -52
  149. package/dist/lib/browser/chunk-J45KR4DI.mjs.map +0 -7
  150. package/dist/lib/browser/chunk-S5CI6EUQ.mjs +0 -20
  151. package/dist/lib/browser/chunk-S5CI6EUQ.mjs.map +0 -7
  152. package/dist/lib/browser/chunk-YYV26N3W.mjs +0 -26
  153. package/dist/lib/browser/chunk-YYV26N3W.mjs.map +0 -7
  154. package/dist/lib/browser/plugin-K3KCPCTJ.mjs +0 -39
  155. package/dist/lib/browser/plugin-K3KCPCTJ.mjs.map +0 -7
  156. package/dist/lib/browser/plugin-MM66VRCO.mjs.map +0 -7
  157. package/dist/lib/node/chunk-62W6CMGM.cjs.map +0 -7
  158. package/dist/lib/node/chunk-DFST5IG5.cjs +0 -77
  159. package/dist/lib/node/chunk-DFST5IG5.cjs.map +0 -7
  160. package/dist/lib/node/chunk-P5GRB4XF.cjs.map +0 -7
  161. package/dist/lib/node/plugin-QV7ESETI.cjs.map +0 -7
  162. package/dist/lib/node/plugin-RUJ5PEXB.cjs +0 -61
  163. package/dist/lib/node/plugin-RUJ5PEXB.cjs.map +0 -7
  164. package/dist/types/src/plugins/IntentPlugin/IntentContext.d.ts.map +0 -1
  165. package/dist/types/src/plugins/IntentPlugin/helpers.d.ts.map +0 -1
  166. package/dist/types/src/plugins/IntentPlugin/index.d.ts +0 -4
  167. package/dist/types/src/plugins/IntentPlugin/index.d.ts.map +0 -1
  168. package/dist/types/src/plugins/IntentPlugin/intent.d.ts.map +0 -1
  169. package/dist/types/src/plugins/IntentPlugin/meta.d.ts.map +0 -1
  170. package/dist/types/src/plugins/IntentPlugin/plugin.d.ts.map +0 -1
  171. package/dist/types/src/plugins/IntentPlugin/provides.d.ts.map +0 -1
  172. package/dist/types/src/plugins/PluginHost/PluginContext.d.ts.map +0 -1
  173. package/dist/types/src/plugins/PluginHost/PluginHost.d.ts +0 -25
  174. package/dist/types/src/plugins/PluginHost/PluginHost.d.ts.map +0 -1
  175. package/dist/types/src/plugins/PluginHost/index.d.ts +0 -4
  176. package/dist/types/src/plugins/PluginHost/index.d.ts.map +0 -1
  177. package/dist/types/src/plugins/PluginHost/plugin.d.ts.map +0 -1
  178. package/dist/types/src/plugins/PluginHost/plugin.test.d.ts.map +0 -1
  179. package/dist/types/src/plugins/SurfacePlugin/ErrorBoundary.d.ts.map +0 -1
  180. package/dist/types/src/plugins/SurfacePlugin/Surface.d.ts.map +0 -1
  181. package/dist/types/src/plugins/SurfacePlugin/SurfaceRootContext.d.ts.map +0 -1
  182. package/dist/types/src/plugins/SurfacePlugin/helpers.d.ts.map +0 -1
  183. package/dist/types/src/plugins/SurfacePlugin/index.d.ts.map +0 -1
  184. package/dist/types/src/plugins/SurfacePlugin/meta.d.ts.map +0 -1
  185. package/dist/types/src/plugins/SurfacePlugin/plugin.d.ts +0 -8
  186. package/dist/types/src/plugins/SurfacePlugin/plugin.d.ts.map +0 -1
  187. package/dist/types/src/plugins/SurfacePlugin/provides.d.ts.map +0 -1
  188. package/dist/types/src/plugins/common/settings.d.ts +0 -9
  189. package/dist/types/src/plugins/common/settings.d.ts.map +0 -1
  190. package/src/plugins/PluginHost/PluginHost.tsx +0 -198
  191. package/src/plugins/common/settings.ts +0 -22
  192. /package/dist/types/src/plugins/{PluginHost → plugin-host}/plugin.test.d.ts +0 -0
  193. /package/dist/types/src/plugins/{IntentPlugin → plugin-intent}/IntentContext.d.ts +0 -0
  194. /package/dist/types/src/plugins/{IntentPlugin → plugin-intent}/helpers.d.ts +0 -0
  195. /package/dist/types/src/plugins/{IntentPlugin → plugin-intent}/meta.d.ts +0 -0
  196. /package/dist/types/src/plugins/{SurfacePlugin → plugin-surface}/ErrorBoundary.d.ts +0 -0
  197. /package/dist/types/src/plugins/{SurfacePlugin → plugin-surface}/helpers.d.ts +0 -0
  198. /package/dist/types/src/plugins/{SurfacePlugin → plugin-surface}/meta.d.ts +0 -0
  199. /package/src/plugins/{IntentPlugin → plugin-intent}/IntentContext.tsx +0 -0
  200. /package/src/plugins/{IntentPlugin → plugin-intent}/helpers.ts +0 -0
  201. /package/src/plugins/{IntentPlugin → plugin-intent}/meta.ts +0 -0
  202. /package/src/plugins/{SurfacePlugin → plugin-surface}/ErrorBoundary.tsx +0 -0
  203. /package/src/plugins/{SurfacePlugin → plugin-surface}/helpers.ts +0 -0
  204. /package/src/plugins/{SurfacePlugin → plugin-surface}/meta.ts +0 -0
@@ -29,15 +29,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var node_exports = {};
30
30
  __export(node_exports, {
31
31
  ActiveParts: () => ActiveParts,
32
- Attention: () => Attention,
33
- ErrorBoundary: () => ErrorBoundary,
34
- IntentAction: () => import_chunk_DFST5IG5.IntentAction,
35
- IntentProvider: () => import_chunk_DFST5IG5.IntentProvider,
32
+ ErrorBoundary: () => import_chunk_EF67TRWJ.ErrorBoundary,
33
+ HostPlugin: () => HostPlugin,
34
+ IntentAction: () => import_chunk_VOKMWTKO.IntentAction,
35
+ IntentProvider: () => import_chunk_VOKMWTKO.IntentProvider,
36
36
  Layout: () => Layout,
37
37
  LayoutAction: () => LayoutAction,
38
38
  NavigationAction: () => NavigationAction,
39
39
  Plugin: () => Plugin,
40
- PluginHost: () => PluginHost,
41
40
  PluginProvider: () => PluginProvider,
42
41
  Resource: () => Resource,
43
42
  ResourceKey: () => ResourceKey,
@@ -47,70 +46,67 @@ __export(node_exports, {
47
46
  SLUG_KEY_VALUE_SEPARATOR: () => SLUG_KEY_VALUE_SEPARATOR,
48
47
  SLUG_LIST_SEPARATOR: () => SLUG_LIST_SEPARATOR,
49
48
  SLUG_PATH_SEPARATOR: () => SLUG_PATH_SEPARATOR,
50
- SettingsAction: () => SettingsAction,
51
- Surface: () => Surface,
52
- SurfaceProvider: () => import_chunk_P5GRB4XF.SurfaceProvider,
49
+ SettingsAction: () => import_chunk_JZ2JVKRY.SettingsAction,
50
+ Surface: () => import_chunk_EF67TRWJ.Surface,
51
+ SurfaceProvider: () => import_chunk_EF67TRWJ.SurfaceProvider,
53
52
  Toast: () => Toast,
54
53
  createApp: () => createApp,
55
54
  defaultFileTypes: () => defaultFileTypes,
56
- definePlugin: () => import_chunk_62W6CMGM.definePlugin,
57
- filterPlugins: () => import_chunk_62W6CMGM.filterPlugins,
58
- findPlugin: () => import_chunk_62W6CMGM.findPlugin,
55
+ definePlugin: () => import_chunk_QBM42OQ6.definePlugin,
56
+ filterPlugins: () => import_chunk_QBM42OQ6.filterPlugins,
57
+ findPlugin: () => import_chunk_QBM42OQ6.findPlugin,
59
58
  firstIdInPart: () => firstIdInPart,
60
- getPlugin: () => import_chunk_62W6CMGM.getPlugin,
59
+ getPlugin: () => import_chunk_QBM42OQ6.getPlugin,
61
60
  indexInPart: () => indexInPart,
62
- initializePlugin: () => initializePlugin,
63
61
  isLayoutAdjustment: () => isLayoutAdjustment,
64
62
  isLayoutMode: () => isLayoutMode,
65
63
  isLayoutParts: () => isLayoutParts,
66
- isObject: () => isObject,
64
+ isObject: () => import_chunk_EF67TRWJ.isObject,
67
65
  openIds: () => openIds,
68
66
  parseFileManagerPlugin: () => parseFileManagerPlugin,
69
67
  parseGraphBuilderPlugin: () => parseGraphBuilderPlugin,
70
68
  parseGraphPlugin: () => parseGraphPlugin,
71
69
  parseGraphSerializerPlugin: () => parseGraphSerializerPlugin,
72
- parseIntentPlugin: () => import_chunk_DFST5IG5.parseIntentPlugin,
73
- parseIntentResolverPlugin: () => import_chunk_DFST5IG5.parseIntentResolverPlugin,
70
+ parseIntentPlugin: () => import_chunk_VOKMWTKO.parseIntentPlugin,
71
+ parseIntentResolverPlugin: () => import_chunk_VOKMWTKO.parseIntentResolverPlugin,
74
72
  parseLayoutPlugin: () => parseLayoutPlugin,
75
73
  parseMetadataRecordsPlugin: () => parseMetadataRecordsPlugin,
76
74
  parseMetadataResolverPlugin: () => parseMetadataResolverPlugin,
77
75
  parseNavigationPlugin: () => parseNavigationPlugin,
78
76
  parsePluginHost: () => parsePluginHost,
79
- parseRootSurfacePlugin: () => import_chunk_P5GRB4XF.parseRootSurfacePlugin,
80
- parseSettingsPlugin: () => parseSettingsPlugin,
81
- parseSurfacePlugin: () => import_chunk_P5GRB4XF.parseSurfacePlugin,
77
+ parseRootSurfacePlugin: () => import_chunk_EF67TRWJ.parseRootSurfacePlugin,
78
+ parseSettingsPlugin: () => import_chunk_JZ2JVKRY.parseSettingsPlugin,
79
+ parseSurfacePlugin: () => import_chunk_EF67TRWJ.parseSurfacePlugin,
82
80
  parseTranslationsPlugin: () => parseTranslationsPlugin,
83
81
  partLength: () => partLength,
84
- pluginMeta: () => pluginMeta,
85
- resolvePlugin: () => import_chunk_62W6CMGM.resolvePlugin,
86
- useIntent: () => import_chunk_DFST5IG5.useIntent,
87
- useIntentDispatcher: () => import_chunk_DFST5IG5.useIntentDispatcher,
88
- useIntentResolver: () => import_chunk_DFST5IG5.useIntentResolver,
82
+ resolvePlugin: () => import_chunk_QBM42OQ6.resolvePlugin,
83
+ useIntent: () => import_chunk_VOKMWTKO.useIntent,
84
+ useIntentDispatcher: () => import_chunk_VOKMWTKO.useIntentDispatcher,
85
+ useIntentResolver: () => import_chunk_VOKMWTKO.useIntentResolver,
89
86
  usePlugin: () => usePlugin,
90
87
  usePlugins: () => usePlugins,
91
88
  useResolvePlugin: () => useResolvePlugin,
92
89
  useResolvePlugins: () => useResolvePlugins,
93
- useSurface: () => useSurface,
94
- useSurfaceRoot: () => import_chunk_P5GRB4XF.useSurfaceRoot
90
+ useSurface: () => import_chunk_EF67TRWJ.useSurface,
91
+ useSurfaceRoot: () => import_chunk_EF67TRWJ.useSurfaceRoot
95
92
  });
96
93
  module.exports = __toCommonJS(node_exports);
97
- var import_chunk_P5GRB4XF = require("./chunk-P5GRB4XF.cjs");
98
- var import_chunk_DFST5IG5 = require("./chunk-DFST5IG5.cjs");
99
- var import_chunk_62W6CMGM = require("./chunk-62W6CMGM.cjs");
94
+ var import_chunk_VOKMWTKO = require("./chunk-VOKMWTKO.cjs");
95
+ var import_chunk_EF67TRWJ = require("./chunk-EF67TRWJ.cjs");
96
+ var import_chunk_QBM42OQ6 = require("./chunk-QBM42OQ6.cjs");
97
+ var import_chunk_JZ2JVKRY = require("./chunk-JZ2JVKRY.cjs");
100
98
  var import_zod = require("zod");
99
+ var import_schema = require("@effect/schema");
101
100
  var import_zod2 = require("zod");
102
- var import_echo_schema = require("@dxos/echo-schema");
103
101
  var import_zod3 = require("zod");
104
- var import_react = require("react");
105
- var import_util = require("@dxos/util");
106
- var import_react2 = __toESM(require("react"));
102
+ var import_react = __toESM(require("react"));
107
103
  var import_local_storage = require("@dxos/local-storage");
104
+ var import_react2 = __toESM(require("react"));
108
105
  var import_log = require("@dxos/log");
109
- var import_react3 = __toESM(require("react"));
110
- var import_react4 = __toESM(require("react"));
111
- var import_react5 = require("react");
106
+ var import_react3 = require("react");
112
107
  var import_debug = require("@dxos/debug");
113
- var import_react6 = __toESM(require("react"));
108
+ var import_util = require("@dxos/util");
109
+ var import_react4 = __toESM(require("react"));
114
110
  var import_invariant = require("@dxos/invariant");
115
111
  var defaultFileTypes = {
116
112
  images: [
@@ -184,7 +180,8 @@ var parseLayoutPlugin = (plugin) => {
184
180
  const { success } = Layout.safeParse(plugin.provides.layout);
185
181
  return success ? plugin : void 0;
186
182
  };
187
- var LAYOUT_ACTION = "dxos.org/plugin/layout";
183
+ var LAYOUT_PLUGIN = "dxos.org/plugin/layout";
184
+ var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
188
185
  var LayoutAction;
189
186
  (function(LayoutAction2) {
190
187
  LayoutAction2[LayoutAction2["SET_LAYOUT"] = `${LAYOUT_ACTION}/set-layout`] = "SET_LAYOUT";
@@ -203,18 +200,21 @@ var SLUG_ENTRY_SEPARATOR = "_";
203
200
  var SLUG_KEY_VALUE_SEPARATOR = "-";
204
201
  var SLUG_PATH_SEPARATOR = "~";
205
202
  var SLUG_COLLECTION_INDICATOR = "";
206
- var LayoutEntrySchema = import_echo_schema.S.mutable(import_echo_schema.S.Struct({
207
- id: import_echo_schema.S.String,
208
- path: import_echo_schema.S.optional(import_echo_schema.S.String)
203
+ var LayoutEntrySchema = import_schema.Schema.mutable(import_schema.Schema.Struct({
204
+ id: import_schema.Schema.String,
205
+ path: import_schema.Schema.optional(import_schema.Schema.String)
209
206
  }));
210
- var LayoutPartSchema = import_echo_schema.S.Union(import_echo_schema.S.Literal("sidebar"), import_echo_schema.S.Literal("main"), import_echo_schema.S.Literal("solo"), import_echo_schema.S.Literal("complementary"), import_echo_schema.S.Literal("fullScreen"));
211
- var LayoutPartsSchema = import_echo_schema.S.partial(import_echo_schema.S.mutable(import_echo_schema.S.Record(LayoutPartSchema, import_echo_schema.S.mutable(import_echo_schema.S.Array(LayoutEntrySchema)))));
212
- var LayoutCoordinateSchema = import_echo_schema.S.mutable(import_echo_schema.S.Struct({
207
+ var LayoutPartSchema = import_schema.Schema.Union(import_schema.Schema.Literal("sidebar"), import_schema.Schema.Literal("main"), import_schema.Schema.Literal("solo"), import_schema.Schema.Literal("complementary"), import_schema.Schema.Literal("fullScreen"));
208
+ var LayoutPartsSchema = import_schema.Schema.partial(import_schema.Schema.mutable(import_schema.Schema.Record({
209
+ key: LayoutPartSchema,
210
+ value: import_schema.Schema.mutable(import_schema.Schema.Array(LayoutEntrySchema))
211
+ })));
212
+ var LayoutCoordinateSchema = import_schema.Schema.mutable(import_schema.Schema.Struct({
213
213
  part: LayoutPartSchema,
214
- entryId: import_echo_schema.S.String
214
+ entryId: import_schema.Schema.String
215
215
  }));
216
- var PartAdjustmentSchema = import_echo_schema.S.Union(import_echo_schema.S.Literal("increment-start"), import_echo_schema.S.Literal("increment-end"), import_echo_schema.S.Literal("solo"));
217
- var LayoutAdjustmentSchema = import_echo_schema.S.mutable(import_echo_schema.S.Struct({
216
+ var PartAdjustmentSchema = import_schema.Schema.Union(import_schema.Schema.Literal("increment-start"), import_schema.Schema.Literal("increment-end"), import_schema.Schema.Literal("solo"));
217
+ var LayoutAdjustmentSchema = import_schema.Schema.mutable(import_schema.Schema.Struct({
218
218
  layoutCoordinate: LayoutCoordinateSchema,
219
219
  type: PartAdjustmentSchema
220
220
  }));
@@ -222,27 +222,24 @@ var ActiveParts = import_zod2.z.record(import_zod2.z.string(), import_zod2.z.uni
222
222
  import_zod2.z.string(),
223
223
  import_zod2.z.array(import_zod2.z.string())
224
224
  ]));
225
- var Attention = import_zod2.z.object({
226
- attended: import_zod2.z.set(import_zod2.z.string()).optional().describe("Ids of items which have focus.")
227
- });
228
- var LocationProvidesSchema = import_echo_schema.S.mutable(import_echo_schema.S.Struct({
229
- location: import_echo_schema.S.Struct({
225
+ var LocationProvidesSchema = import_schema.Schema.mutable(import_schema.Schema.Struct({
226
+ location: import_schema.Schema.Struct({
230
227
  active: LayoutPartsSchema,
231
- closed: import_echo_schema.S.Array(import_echo_schema.S.String)
228
+ closed: import_schema.Schema.Array(import_schema.Schema.String)
232
229
  })
233
230
  }));
234
231
  var isLayoutParts = (value) => {
235
- return import_echo_schema.S.is(LayoutPartsSchema)(value);
232
+ return import_schema.Schema.is(LayoutPartsSchema)(value);
236
233
  };
237
234
  var isLayoutAdjustment = (value) => {
238
- return import_echo_schema.S.is(LayoutAdjustmentSchema)(value);
235
+ return import_schema.Schema.is(LayoutAdjustmentSchema)(value);
239
236
  };
240
237
  var parseNavigationPlugin = (plugin) => {
241
238
  const location = plugin.provides?.location;
242
239
  if (!location) {
243
240
  return void 0;
244
241
  }
245
- if (import_echo_schema.S.is(LocationProvidesSchema)({
242
+ if (import_schema.Schema.is(LocationProvidesSchema)({
246
243
  location
247
244
  })) {
248
245
  return plugin;
@@ -271,7 +268,8 @@ var partLength = (layout, part) => {
271
268
  }
272
269
  return layout[part]?.length ?? 0;
273
270
  };
274
- var NAVIGATION_ACTION = "dxos.org/plugin/navigation";
271
+ var NAVIGATION_PLUGIN = "dxos.org/plugin/navigation";
272
+ var NAVIGATION_ACTION = `${NAVIGATION_PLUGIN}/action`;
275
273
  var NavigationAction;
276
274
  (function(NavigationAction2) {
277
275
  NavigationAction2[NavigationAction2["OPEN"] = `${NAVIGATION_ACTION}/open`] = "OPEN";
@@ -281,14 +279,6 @@ var NavigationAction;
281
279
  NavigationAction2[NavigationAction2["CLOSE"] = `${NAVIGATION_ACTION}/close`] = "CLOSE";
282
280
  NavigationAction2[NavigationAction2["EXPOSE"] = `${NAVIGATION_ACTION}/expose`] = "EXPOSE";
283
281
  })(NavigationAction || (NavigationAction = {}));
284
- var parseSettingsPlugin = (plugin) => {
285
- return typeof plugin.provides.settings === "object" ? plugin : void 0;
286
- };
287
- var SETTINGS_ACTION = "dxos.org/plugin/settings";
288
- var SettingsAction;
289
- (function(SettingsAction2) {
290
- SettingsAction2[SettingsAction2["OPEN"] = `${SETTINGS_ACTION}/open`] = "OPEN";
291
- })(SettingsAction || (SettingsAction = {}));
292
282
  var ResourceKey = import_zod3.z.union([
293
283
  import_zod3.z.string(),
294
284
  import_zod3.z.record(import_zod3.z.any())
@@ -299,7 +289,6 @@ var parseTranslationsPlugin = (plugin) => {
299
289
  const { success } = import_zod3.z.array(Resource).safeParse(plugin.provides.translations);
300
290
  return success ? plugin : void 0;
301
291
  };
302
- var pluginMeta = (meta) => meta;
303
292
  var Plugin;
304
293
  (function(Plugin2) {
305
294
  Plugin2.lazy = (p, props) => {
@@ -308,225 +297,24 @@ var Plugin;
308
297
  });
309
298
  };
310
299
  })(Plugin || (Plugin = {}));
311
- var PluginContext = /* @__PURE__ */ (0, import_react.createContext)({
312
- ready: false,
313
- core: [],
314
- enabled: [],
315
- plugins: [],
316
- available: [],
317
- setPlugin: () => {
318
- }
319
- });
320
- var usePlugins = () => (0, import_react.useContext)(PluginContext);
321
- var usePlugin = (id) => {
322
- const { plugins } = usePlugins();
323
- return (0, import_chunk_62W6CMGM.findPlugin)(plugins, id);
324
- };
325
- var useResolvePlugin = (predicate) => {
326
- const { plugins } = usePlugins();
327
- return (0, import_chunk_62W6CMGM.resolvePlugin)(plugins, predicate);
328
- };
329
- var useResolvePlugins = (predicate) => {
330
- const { plugins } = usePlugins();
331
- return (0, import_react.useMemo)(() => plugins.map(predicate).filter(import_util.nonNullable), [
332
- plugins,
333
- predicate
334
- ]);
335
- };
336
- var PluginProvider = PluginContext.Provider;
337
- var isObject = (data) => !!data && typeof data === "object";
338
- var ErrorBoundary = class extends import_react3.Component {
339
- constructor(props) {
340
- super(props);
341
- this.state = {
342
- error: void 0
343
- };
344
- }
345
- static getDerivedStateFromError(error) {
346
- return {
347
- error
348
- };
349
- }
350
- componentDidUpdate(prevProps) {
351
- if (prevProps.data !== this.props.data) {
352
- this.resetError();
353
- }
354
- }
355
- render() {
356
- if (this.state.error) {
357
- return /* @__PURE__ */ import_react3.default.createElement(this.props.fallback, {
358
- data: this.props.data,
359
- error: this.state.error,
360
- reset: this.resetError
361
- });
362
- }
363
- return this.props.children;
364
- }
365
- resetError() {
366
- this.setState({
367
- error: void 0
368
- });
369
- }
370
- };
371
- var Surface = /* @__PURE__ */ (0, import_react4.forwardRef)(({ role, name = role, fallback, placeholder, ...rest }, forwardedRef) => {
372
- const props = {
373
- role,
374
- name,
375
- fallback,
376
- ...rest
377
- };
378
- const context = (0, import_react5.useContext)(SurfaceContext);
379
- const data = props.data ?? (name && context?.surfaces?.[name]?.data || {});
380
- const resolver = /* @__PURE__ */ import_react4.default.createElement(SurfaceResolver, {
381
- ...props,
382
- ref: forwardedRef
383
- });
384
- const suspense = placeholder ? /* @__PURE__ */ import_react4.default.createElement(import_react4.Suspense, {
385
- fallback: placeholder
386
- }, resolver) : resolver;
387
- return fallback ? /* @__PURE__ */ import_react4.default.createElement(ErrorBoundary, {
388
- data,
389
- fallback
390
- }, suspense) : suspense;
391
- });
392
- var SurfaceContext = /* @__PURE__ */ (0, import_react5.createContext)(null);
393
- var useSurface = () => (0, import_react5.useContext)(SurfaceContext) ?? (0, import_debug.raise)(new Error("Surface context not found"));
394
- var SurfaceResolver = /* @__PURE__ */ (0, import_react4.forwardRef)((props, forwardedRef) => {
395
- const { components } = (0, import_chunk_P5GRB4XF.useSurfaceRoot)();
396
- const parent = (0, import_react5.useContext)(SurfaceContext);
397
- const nodes = resolveNodes(components, props, parent, forwardedRef);
398
- const currentContext = {
399
- ...props,
400
- surfaces: {
401
- ...props.name && parent?.surfaces?.[props.name]?.surfaces || {},
402
- ...props.surfaces
403
- }
404
- };
405
- return /* @__PURE__ */ import_react4.default.createElement(SurfaceContext.Provider, {
406
- value: currentContext
407
- }, nodes);
408
- });
409
- var resolveNodes = (components, props, context, forwardedRef) => {
410
- const data = {
411
- ...props.name && context?.surfaces?.[props.name]?.data || {},
412
- ...props.data
413
- };
414
- const nodes = Object.entries(components).map(([key, component]) => {
415
- const result = component({
416
- ...props,
417
- data
418
- }, forwardedRef);
419
- if (!result || typeof result !== "object") {
420
- return void 0;
421
- }
422
- return "node" in result ? [
423
- key,
424
- result
425
- ] : /* @__PURE__ */ (0, import_react4.isValidElement)(result) ? [
426
- key,
427
- {
428
- node: result
429
- }
430
- ] : void 0;
431
- }).filter((result) => Boolean(result)).sort(([, a], [, b]) => {
432
- const aDisposition = a.disposition ?? "default";
433
- const bDisposition = b.disposition ?? "default";
434
- if (aDisposition === bDisposition) {
435
- return 0;
436
- } else if (aDisposition === "hoist" || bDisposition === "fallback") {
437
- return -1;
438
- } else if (bDisposition === "hoist" || aDisposition === "fallback") {
439
- return 1;
440
- }
441
- return 0;
442
- }).map(([key, result]) => /* @__PURE__ */ import_react4.default.createElement(import_react4.Fragment, {
443
- key
444
- }, result.node));
445
- return props.limit ? nodes.slice(0, props.limit) : nodes;
446
- };
447
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugins/PluginHost/PluginHost.tsx";
448
- var parsePluginHost = (plugin) => plugin.provides.plugins ? plugin : void 0;
449
- var PLUGIN_HOST = "dxos.org/plugin/host";
450
- var PluginHost = ({ order, plugins: definitions, core = [], defaults = [], fallback = DefaultFallback, placeholder = null }) => {
451
- const state = new import_local_storage.LocalStorageStore(PLUGIN_HOST, {
452
- ready: false,
453
- core,
454
- enabled: [
455
- ...defaults
456
- ],
457
- plugins: [],
458
- available: order.filter(({ id }) => !core.includes(id)),
459
- setPlugin: (id, enabled) => {
460
- if (enabled) {
461
- state.values.enabled.push(id);
462
- } else {
463
- const index = state.values.enabled.findIndex((enabled2) => enabled2 === id);
464
- index !== -1 && state.values.enabled.splice(index, 1);
465
- }
466
- }
467
- });
468
- state.prop({
469
- key: "enabled",
470
- type: import_local_storage.LocalStorageStore.json()
471
- });
472
- return {
473
- meta: {
474
- id: PLUGIN_HOST,
475
- name: "Plugin host"
476
- },
477
- provides: {
478
- plugins: state.values,
479
- context: ({ children }) => /* @__PURE__ */ import_react2.default.createElement(PluginProvider, {
480
- value: state.values
481
- }, children),
482
- root: () => {
483
- return /* @__PURE__ */ import_react2.default.createElement(ErrorBoundary, {
484
- fallback
485
- }, /* @__PURE__ */ import_react2.default.createElement(Root, {
486
- order,
487
- core,
488
- definitions,
489
- state: state.values,
490
- placeholder
491
- }));
492
- }
493
- }
494
- };
495
- };
496
- var DefaultFallback = ({ error }) => {
497
- return /* @__PURE__ */ import_react2.default.createElement("div", {
498
- style: {
499
- padding: "1rem"
500
- }
501
- }, /* @__PURE__ */ import_react2.default.createElement("h1", {
502
- style: {
503
- fontSize: "1.2rem",
504
- fontWeight: 700,
505
- margin: "0.5rem 0"
506
- }
507
- }, error.message), /* @__PURE__ */ import_react2.default.createElement("pre", null, error.stack));
508
- };
509
- var Root = ({ order, core: corePluginIds, definitions, state, placeholder }) => {
300
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugins/plugin-host/PluginContainer.tsx";
301
+ var PluginContainer = ({ plugins: definitions, core, state, placeholder }) => {
510
302
  const [error, setError] = (0, import_react2.useState)();
511
303
  (0, import_react2.useEffect)(() => {
512
304
  (0, import_log.log)("initializing plugins", {
513
305
  enabled: state.enabled
514
306
  }, {
515
307
  F: __dxlog_file,
516
- L: 102,
308
+ L: 26,
517
309
  S: void 0,
518
310
  C: (f, a) => f(...a)
519
311
  });
520
- const timeout = setTimeout(async () => {
312
+ const t = setTimeout(async () => {
521
313
  try {
522
314
  const enabledIds = [
523
- ...corePluginIds,
315
+ ...core,
524
316
  ...state.enabled
525
- ].sort((a, b) => {
526
- const indexA = order.findIndex(({ id }) => id === a);
527
- const indexB = order.findIndex(({ id }) => id === b);
528
- return indexA - indexB;
529
- });
317
+ ];
530
318
  const enabled = await Promise.all(enabledIds.map((id) => definitions[id]).filter((definition) => Boolean(definition)).map((definition) => definition()));
531
319
  const plugins = await Promise.all(enabled.map(async (definition) => {
532
320
  const plugin = await initializePlugin(definition).catch((err) => {
@@ -535,39 +323,47 @@ var Root = ({ order, core: corePluginIds, definitions, state, placeholder }) =>
535
323
  err
536
324
  }, {
537
325
  F: __dxlog_file,
538
- L: 122,
326
+ L: 41,
539
327
  S: void 0,
540
328
  C: (f, a) => f(...a)
541
329
  });
542
- return void 0;
330
+ });
331
+ (0, import_log.log)("initialized", {
332
+ plugin: definition.meta.id
333
+ }, {
334
+ F: __dxlog_file,
335
+ L: 44,
336
+ S: void 0,
337
+ C: (f, a) => f(...a)
543
338
  });
544
339
  return plugin;
545
- })).then((plugins2) => plugins2.filter((plugin) => Boolean(plugin)));
340
+ }));
341
+ const initialized = plugins.filter((plugin) => Boolean(plugin));
546
342
  (0, import_log.log)("plugins initialized", {
547
- plugins
343
+ plugins: initialized
548
344
  }, {
549
345
  F: __dxlog_file,
550
- L: 128,
346
+ L: 50,
551
347
  S: void 0,
552
348
  C: (f, a) => f(...a)
553
349
  });
554
- await Promise.all(enabled.map((pluginDefinition) => pluginDefinition.ready?.(plugins)));
350
+ await Promise.all(enabled.map((plugin) => plugin.ready?.(initialized)));
555
351
  (0, import_log.log)("plugins ready", {
556
- plugins
352
+ plugins: initialized
557
353
  }, {
558
354
  F: __dxlog_file,
559
- L: 131,
355
+ L: 53,
560
356
  S: void 0,
561
357
  C: (f, a) => f(...a)
562
358
  });
563
- state.plugins = plugins;
359
+ state.plugins = initialized;
564
360
  state.ready = true;
565
361
  } catch (err) {
566
362
  setError(err);
567
363
  }
568
364
  });
569
365
  return () => {
570
- clearTimeout(timeout);
366
+ clearTimeout(t);
571
367
  state.ready = false;
572
368
  };
573
369
  }, []);
@@ -592,9 +388,9 @@ var initializePlugin = async (pluginDefinition) => {
592
388
  };
593
389
  var rootComponents = (plugins) => {
594
390
  return plugins.map((plugin) => {
595
- const Component2 = plugin.provides.root;
596
- if (Component2) {
597
- return /* @__PURE__ */ import_react2.default.createElement(Component2, {
391
+ const Component = plugin.provides.root;
392
+ if (Component) {
393
+ return /* @__PURE__ */ import_react2.default.createElement(Component, {
598
394
  key: plugin.meta.id
599
395
  });
600
396
  } else {
@@ -610,60 +406,151 @@ var compose = (contexts) => {
610
406
  ...contexts
611
407
  ].reduce((Acc, Next) => ({ children }) => /* @__PURE__ */ import_react2.default.createElement(Acc, null, /* @__PURE__ */ import_react2.default.createElement(Next, null, children)));
612
408
  };
613
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/App.tsx";
614
- var createApp = ({ order, plugins, core = order.map(({ id }) => id), ...params }) => {
615
- const host = PluginHost({
616
- order: [
617
- import_chunk_P5GRB4XF.meta_default,
618
- import_chunk_DFST5IG5.meta_default,
619
- ...order
409
+ var PluginContext = /* @__PURE__ */ (0, import_react3.createContext)(void 0);
410
+ var usePlugins = () => (0, import_react3.useContext)(PluginContext) ?? (0, import_debug.raise)(new Error("Missing PluginContext"));
411
+ var usePlugin = (id) => {
412
+ const { plugins } = usePlugins();
413
+ return (0, import_chunk_QBM42OQ6.findPlugin)(plugins, id);
414
+ };
415
+ var useResolvePlugin = (predicate) => {
416
+ const { plugins } = usePlugins();
417
+ return (0, import_chunk_QBM42OQ6.resolvePlugin)(plugins, predicate);
418
+ };
419
+ var useResolvePlugins = (predicate) => {
420
+ const { plugins } = usePlugins();
421
+ return (0, import_react3.useMemo)(() => plugins.map(predicate).filter(import_util.nonNullable), [
422
+ plugins,
423
+ predicate
424
+ ]);
425
+ };
426
+ var PluginProvider = PluginContext.Provider;
427
+ var parsePluginHost = (plugin) => plugin.provides.plugins ? plugin : void 0;
428
+ var HOST_PLUGIN = "dxos.org/plugin/host";
429
+ var HostPlugin = ({ plugins, meta, core, defaults = [], fallback = DefaultFallback, placeholder = null }) => {
430
+ const state = new import_local_storage.LocalStorageStore(HOST_PLUGIN, {
431
+ ready: false,
432
+ core,
433
+ enabled: [
434
+ ...defaults
620
435
  ],
436
+ plugins: [],
437
+ available: meta.filter(({ id }) => !core.includes(id)),
438
+ // TODO(burdon): Functions should not be part of the settings type.
439
+ setPlugin: (id, enabled) => {
440
+ if (enabled) {
441
+ state.values.enabled.push(id);
442
+ } else {
443
+ const index = state.values.enabled.findIndex((enabled2) => enabled2 === id);
444
+ index !== -1 && state.values.enabled.splice(index, 1);
445
+ }
446
+ }
447
+ });
448
+ state.prop({
449
+ key: "enabled",
450
+ type: import_local_storage.LocalStorageStore.json()
451
+ });
452
+ return {
453
+ meta: {
454
+ id: HOST_PLUGIN,
455
+ name: "Plugin host"
456
+ },
457
+ provides: {
458
+ plugins: state.values,
459
+ context: ({ children }) => {
460
+ return /* @__PURE__ */ import_react.default.createElement(PluginProvider, {
461
+ value: state.values
462
+ }, children);
463
+ },
464
+ root: () => {
465
+ return /* @__PURE__ */ import_react.default.createElement(import_chunk_EF67TRWJ.ErrorBoundary, {
466
+ fallback
467
+ }, /* @__PURE__ */ import_react.default.createElement(PluginContainer, {
468
+ plugins,
469
+ core,
470
+ state: state.values,
471
+ placeholder
472
+ }));
473
+ }
474
+ }
475
+ };
476
+ };
477
+ var DefaultFallback = ({ error }) => {
478
+ return /* @__PURE__ */ import_react.default.createElement("div", {
479
+ style: {
480
+ padding: "1rem"
481
+ }
482
+ }, /* @__PURE__ */ import_react.default.createElement("h1", {
483
+ style: {
484
+ fontSize: "1.2rem",
485
+ fontWeight: 700,
486
+ margin: "0.5rem 0"
487
+ }
488
+ }, error.message), /* @__PURE__ */ import_react.default.createElement("pre", null, error.stack));
489
+ };
490
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/App.tsx";
491
+ var createApp = ({ meta, plugins, core, ...params }) => {
492
+ const hostPlugin = HostPlugin({
621
493
  plugins: {
622
494
  ...plugins,
623
- [import_chunk_P5GRB4XF.meta_default.id]: Plugin.lazy(() => import("./plugin-RUJ5PEXB.cjs")),
624
- [import_chunk_DFST5IG5.meta_default.id]: Plugin.lazy(() => import("./plugin-QV7ESETI.cjs"))
495
+ [import_chunk_VOKMWTKO.meta_default.id]: Plugin.lazy(() => import("./plugin-intent-FMC4SDI3.cjs")),
496
+ [import_chunk_JZ2JVKRY.meta_default.id]: Plugin.lazy(() => import("./plugin-settings-OZ6IKAE5.cjs")),
497
+ [import_chunk_EF67TRWJ.meta_default.id]: Plugin.lazy(() => import("./plugin-surface-B5NHOBSW.cjs"))
625
498
  },
499
+ meta: [
500
+ import_chunk_VOKMWTKO.meta_default,
501
+ import_chunk_JZ2JVKRY.meta_default,
502
+ import_chunk_EF67TRWJ.meta_default,
503
+ ...meta
504
+ ],
626
505
  core: [
627
- import_chunk_P5GRB4XF.meta_default.id,
628
- import_chunk_DFST5IG5.meta_default.id,
506
+ import_chunk_VOKMWTKO.meta_default.id,
507
+ import_chunk_JZ2JVKRY.meta_default.id,
508
+ import_chunk_EF67TRWJ.meta_default.id,
629
509
  ...core
630
510
  ],
631
511
  ...params
632
512
  });
633
- (0, import_invariant.invariant)(host.provides?.context, void 0, {
513
+ (0, import_invariant.invariant)(hostPlugin.provides, void 0, {
514
+ F: __dxlog_file2,
515
+ L: 53,
516
+ S: void 0,
517
+ A: [
518
+ "hostPlugin.provides",
519
+ ""
520
+ ]
521
+ });
522
+ const { context: Context, root: Root } = hostPlugin.provides;
523
+ (0, import_invariant.invariant)(Context, void 0, {
634
524
  F: __dxlog_file2,
635
- L: 51,
525
+ L: 55,
636
526
  S: void 0,
637
527
  A: [
638
- "host.provides?.context",
528
+ "Context",
639
529
  ""
640
530
  ]
641
531
  });
642
- (0, import_invariant.invariant)(host.provides?.root, void 0, {
532
+ (0, import_invariant.invariant)(Root, void 0, {
643
533
  F: __dxlog_file2,
644
- L: 52,
534
+ L: 56,
645
535
  S: void 0,
646
536
  A: [
647
- "host.provides?.root",
537
+ "Root",
648
538
  ""
649
539
  ]
650
540
  });
651
- const Context = host.provides.context;
652
- const Root2 = host.provides.root;
653
- return () => /* @__PURE__ */ import_react6.default.createElement(Context, null, /* @__PURE__ */ import_react6.default.createElement(Root2, null));
541
+ return () => /* @__PURE__ */ import_react4.default.createElement(Context, null, /* @__PURE__ */ import_react4.default.createElement(Root, null));
654
542
  };
655
543
  // Annotate the CommonJS export names for ESM import in node:
656
544
  0 && (module.exports = {
657
545
  ActiveParts,
658
- Attention,
659
546
  ErrorBoundary,
547
+ HostPlugin,
660
548
  IntentAction,
661
549
  IntentProvider,
662
550
  Layout,
663
551
  LayoutAction,
664
552
  NavigationAction,
665
553
  Plugin,
666
- PluginHost,
667
554
  PluginProvider,
668
555
  Resource,
669
556
  ResourceKey,
@@ -685,7 +572,6 @@ var createApp = ({ order, plugins, core = order.map(({ id }) => id), ...params }
685
572
  firstIdInPart,
686
573
  getPlugin,
687
574
  indexInPart,
688
- initializePlugin,
689
575
  isLayoutAdjustment,
690
576
  isLayoutMode,
691
577
  isLayoutParts,
@@ -707,7 +593,6 @@ var createApp = ({ order, plugins, core = order.map(({ id }) => id), ...params }
707
593
  parseSurfacePlugin,
708
594
  parseTranslationsPlugin,
709
595
  partLength,
710
- pluginMeta,
711
596
  resolvePlugin,
712
597
  useIntent,
713
598
  useIntentDispatcher,