@dxos/app-framework 0.10.0 → 0.11.1

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 (294) hide show
  1. package/.storybook/main.mts +1 -1
  2. package/.storybook/preview.mts +2 -2
  3. package/CHANGELOG.md +120 -0
  4. package/TASKS.md +11 -0
  5. package/dist/lib/chunk-SurfaceManager.mjs +960 -0
  6. package/dist/lib/chunk-SurfaceManager.mjs.map +1 -0
  7. package/dist/lib/chunk-capability.mjs +15 -0
  8. package/dist/lib/chunk-capability.mjs.map +1 -0
  9. package/dist/lib/{browser/chunk-FJ4765WW.mjs → chunk-context.mjs} +4 -5
  10. package/dist/lib/chunk-context.mjs.map +1 -0
  11. package/dist/lib/chunk-history-tracker.mjs +160 -0
  12. package/dist/lib/chunk-history-tracker.mjs.map +1 -0
  13. package/dist/lib/chunk-plugin-manager.mjs +1390 -0
  14. package/dist/lib/chunk-plugin-manager.mjs.map +1 -0
  15. package/dist/lib/chunk-plugin-manifest.mjs +125 -0
  16. package/dist/lib/chunk-plugin-manifest.mjs.map +1 -0
  17. package/dist/lib/chunk-process-manager-capability.mjs +126 -0
  18. package/dist/lib/chunk-process-manager-capability.mjs.map +1 -0
  19. package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
  20. package/dist/lib/chunk-url-loader.mjs +347 -0
  21. package/dist/lib/chunk-url-loader.mjs.map +1 -0
  22. package/dist/lib/cli.mjs +78 -0
  23. package/dist/lib/cli.mjs.map +1 -0
  24. package/dist/lib/common/activation-events.mjs +35 -0
  25. package/dist/lib/common/activation-events.mjs.map +1 -0
  26. package/dist/lib/common/capabilities.mjs +184 -0
  27. package/dist/lib/common/capabilities.mjs.map +1 -0
  28. package/dist/lib/config.mjs +2 -0
  29. package/dist/lib/core/activation-event.mjs +55 -0
  30. package/dist/lib/core/activation-event.mjs.map +1 -0
  31. package/dist/lib/core/capability.mjs +189 -0
  32. package/dist/lib/core/capability.mjs.map +1 -0
  33. package/dist/lib/core/plugin-manager.mjs +2 -0
  34. package/dist/lib/core/plugin.mjs +340 -0
  35. package/dist/lib/core/plugin.mjs.map +1 -0
  36. package/dist/lib/core/url-loader.mjs +2 -0
  37. package/dist/lib/index.mjs +134 -0
  38. package/dist/lib/index.mjs.map +1 -0
  39. package/dist/lib/testing/react.mjs +70 -0
  40. package/dist/lib/testing/react.mjs.map +1 -0
  41. package/dist/lib/testing.mjs +399 -0
  42. package/dist/lib/testing.mjs.map +1 -0
  43. package/dist/lib/ui.mjs +636 -0
  44. package/dist/lib/ui.mjs.map +1 -0
  45. package/dist/lib/vite-plugin.mjs +986 -0
  46. package/dist/lib/vite-plugin.mjs.map +1 -0
  47. package/dist/plugin/node-esm/index.mjs +4 -3
  48. package/dist/plugin/node-esm/index.mjs.map +3 -3
  49. package/dist/plugin/node-esm/meta.json +1 -1
  50. package/dist/types/src/common/Role.d.ts +31 -0
  51. package/dist/types/src/common/Role.d.ts.map +1 -0
  52. package/dist/types/src/common/Role.test.d.ts +2 -0
  53. package/dist/types/src/common/Role.test.d.ts.map +1 -0
  54. package/dist/types/src/common/capabilities.d.ts +11 -2
  55. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  56. package/dist/types/src/common/index.d.ts +1 -0
  57. package/dist/types/src/common/index.d.ts.map +1 -1
  58. package/dist/types/src/core/capability-manager.d.ts +1 -1
  59. package/dist/types/src/core/capability-manager.d.ts.map +1 -1
  60. package/dist/types/src/core/capability.d.ts +38 -5
  61. package/dist/types/src/core/capability.d.ts.map +1 -1
  62. package/dist/types/src/core/plugin-manager.d.ts +1 -1
  63. package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
  64. package/dist/types/src/core/plugin.d.ts +14 -1
  65. package/dist/types/src/core/plugin.d.ts.map +1 -1
  66. package/dist/types/src/core/registry.d.ts +1 -1
  67. package/dist/types/src/core/registry.d.ts.map +1 -1
  68. package/dist/types/src/plugin-process-manager/history/capability.d.ts +1 -1
  69. package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts +1 -1
  70. package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts.map +1 -1
  71. package/dist/types/src/testing/StorybookErrorFallback.d.ts +15 -0
  72. package/dist/types/src/testing/StorybookErrorFallback.d.ts.map +1 -0
  73. package/dist/types/src/testing/harness.d.ts +1 -1
  74. package/dist/types/src/testing/harness.d.ts.map +1 -1
  75. package/dist/types/src/testing/index.d.ts +2 -0
  76. package/dist/types/src/testing/index.d.ts.map +1 -1
  77. package/dist/types/src/testing/react.d.ts +4 -4
  78. package/dist/types/src/testing/react.d.ts.map +1 -1
  79. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  80. package/dist/types/src/testing/withPluginManager.stories.d.ts +6 -0
  81. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  82. package/dist/types/src/testing/withSurfaceDebug.d.ts +10 -0
  83. package/dist/types/src/testing/withSurfaceDebug.d.ts.map +1 -0
  84. package/dist/types/src/ui/components/App/App.d.ts +0 -32
  85. package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
  86. package/dist/types/src/ui/components/App/index.d.ts +1 -0
  87. package/dist/types/src/ui/components/App/index.d.ts.map +1 -1
  88. package/dist/types/src/ui/components/App/loader.d.ts +35 -0
  89. package/dist/types/src/ui/components/App/loader.d.ts.map +1 -0
  90. package/dist/types/src/ui/components/HomeSection/HomeSection.d.ts +26 -0
  91. package/dist/types/src/ui/components/HomeSection/HomeSection.d.ts.map +1 -0
  92. package/dist/types/src/ui/components/HomeSection/HomeSection.stories.d.ts +15 -0
  93. package/dist/types/src/ui/components/HomeSection/HomeSection.stories.d.ts.map +1 -0
  94. package/dist/types/src/ui/components/HomeSection/index.d.ts +2 -0
  95. package/dist/types/src/ui/components/HomeSection/index.d.ts.map +1 -0
  96. package/dist/types/src/ui/components/NamePopover/NamePopover.d.ts +14 -0
  97. package/dist/types/src/ui/components/NamePopover/NamePopover.d.ts.map +1 -0
  98. package/dist/types/src/ui/components/NamePopover/index.d.ts +2 -0
  99. package/dist/types/src/ui/components/NamePopover/index.d.ts.map +1 -0
  100. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +21 -9
  101. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
  102. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts +4 -1
  103. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
  104. package/dist/types/src/ui/components/Surface/SurfaceComponent.test.d.ts +2 -0
  105. package/dist/types/src/ui/components/Surface/SurfaceComponent.test.d.ts.map +1 -0
  106. package/dist/types/src/ui/components/Surface/SurfaceDebug.d.ts +40 -0
  107. package/dist/types/src/ui/components/Surface/SurfaceDebug.d.ts.map +1 -0
  108. package/dist/types/src/ui/components/Surface/SurfaceManager.d.ts +23 -0
  109. package/dist/types/src/ui/components/Surface/SurfaceManager.d.ts.map +1 -0
  110. package/dist/types/src/ui/components/Surface/SurfaceManagerContext.d.ts +11 -0
  111. package/dist/types/src/ui/components/Surface/SurfaceManagerContext.d.ts.map +1 -0
  112. package/dist/types/src/ui/components/Surface/SurfaceMetrics.d.ts +72 -0
  113. package/dist/types/src/ui/components/Surface/SurfaceMetrics.d.ts.map +1 -0
  114. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -1
  115. package/dist/types/src/ui/components/Surface/index.d.ts +20 -25
  116. package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
  117. package/dist/types/src/ui/components/Surface/types.d.ts +56 -52
  118. package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
  119. package/dist/types/src/ui/components/index.d.ts +2 -0
  120. package/dist/types/src/ui/components/index.d.ts.map +1 -1
  121. package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
  122. package/dist/types/tsconfig.tsbuildinfo +1 -1
  123. package/moon.yml +25 -18
  124. package/package.json +58 -73
  125. package/src/common/Role.test.ts +41 -0
  126. package/src/common/Role.ts +54 -0
  127. package/src/common/capabilities.ts +17 -2
  128. package/src/common/index.ts +1 -0
  129. package/src/core/capability-manager.test.ts +1 -1
  130. package/src/core/capability-manager.ts +1 -1
  131. package/src/core/capability.ts +45 -6
  132. package/src/core/plugin-manager.test.ts +38 -3
  133. package/src/core/plugin-manager.ts +18 -1
  134. package/src/core/plugin.ts +16 -1
  135. package/src/core/registry.ts +1 -1
  136. package/src/plugin-process-manager/process-manager-capability.ts +25 -2
  137. package/src/testing/StorybookErrorFallback.tsx +40 -0
  138. package/src/testing/harness.ts +1 -1
  139. package/src/testing/index.ts +2 -0
  140. package/src/testing/react.test.tsx +2 -1
  141. package/src/testing/react.tsx +14 -8
  142. package/src/testing/withPluginManager.stories.tsx +16 -1
  143. package/src/testing/withPluginManager.tsx +13 -2
  144. package/src/testing/withSurfaceDebug.tsx +22 -0
  145. package/src/ui/components/App/App.tsx +7 -35
  146. package/src/ui/components/App/index.ts +1 -0
  147. package/src/ui/components/App/loader.ts +39 -0
  148. package/src/ui/components/HomeSection/HomeSection.stories.tsx +43 -0
  149. package/src/ui/components/HomeSection/HomeSection.tsx +69 -0
  150. package/src/ui/components/HomeSection/index.ts +5 -0
  151. package/src/ui/components/NamePopover/NamePopover.tsx +70 -0
  152. package/src/ui/components/NamePopover/index.ts +5 -0
  153. package/src/ui/components/Surface/DESIGN.md +136 -0
  154. package/src/ui/components/Surface/SurfaceComponent.stories.tsx +70 -41
  155. package/src/ui/components/Surface/SurfaceComponent.test.tsx +403 -0
  156. package/src/ui/components/Surface/SurfaceComponent.tsx +209 -189
  157. package/src/ui/components/Surface/SurfaceDebug.tsx +435 -0
  158. package/src/ui/components/Surface/SurfaceManager.ts +95 -0
  159. package/src/ui/components/Surface/SurfaceManagerContext.ts +23 -0
  160. package/src/ui/components/Surface/SurfaceMetrics.ts +202 -0
  161. package/src/ui/components/Surface/SurfaceProfilerContext.tsx +12 -2
  162. package/src/ui/components/Surface/index.ts +24 -22
  163. package/src/ui/components/Surface/types.test.ts +47 -54
  164. package/src/ui/components/Surface/types.ts +66 -91
  165. package/src/ui/components/index.ts +2 -0
  166. package/src/ui/hooks/useApp.tsx +7 -3
  167. package/src/vite-plugin/boot-loader/loader-app/boot-loader.css +1 -1
  168. package/tsconfig.json +3 -0
  169. package/vite.config.ts +26 -0
  170. package/dist/lib/browser/capability-S44TE2H7.mjs +0 -35
  171. package/dist/lib/browser/capability-S44TE2H7.mjs.map +0 -7
  172. package/dist/lib/browser/chunk-3NQLTQCP.mjs +0 -47
  173. package/dist/lib/browser/chunk-3NQLTQCP.mjs.map +0 -7
  174. package/dist/lib/browser/chunk-53HJHMS5.mjs +0 -7
  175. package/dist/lib/browser/chunk-53HJHMS5.mjs.map +0 -7
  176. package/dist/lib/browser/chunk-FJ4765WW.mjs.map +0 -7
  177. package/dist/lib/browser/chunk-J5LGTIGS.mjs +0 -10
  178. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +0 -7
  179. package/dist/lib/browser/chunk-KRJ4KK2W.mjs +0 -505
  180. package/dist/lib/browser/chunk-KRJ4KK2W.mjs.map +0 -7
  181. package/dist/lib/browser/chunk-LUH4Y5F2.mjs +0 -430
  182. package/dist/lib/browser/chunk-LUH4Y5F2.mjs.map +0 -7
  183. package/dist/lib/browser/chunk-NKVRSMFN.mjs +0 -95
  184. package/dist/lib/browser/chunk-NKVRSMFN.mjs.map +0 -7
  185. package/dist/lib/browser/chunk-OO53M5UK.mjs +0 -260
  186. package/dist/lib/browser/chunk-OO53M5UK.mjs.map +0 -7
  187. package/dist/lib/browser/chunk-OPTS3ZSN.mjs +0 -83
  188. package/dist/lib/browser/chunk-OPTS3ZSN.mjs.map +0 -7
  189. package/dist/lib/browser/chunk-Q2GLJTVV.mjs +0 -12
  190. package/dist/lib/browser/chunk-Q2GLJTVV.mjs.map +0 -7
  191. package/dist/lib/browser/chunk-SYXIYT6T.mjs +0 -143
  192. package/dist/lib/browser/chunk-SYXIYT6T.mjs.map +0 -7
  193. package/dist/lib/browser/chunk-U5MESPM5.mjs +0 -603
  194. package/dist/lib/browser/chunk-U5MESPM5.mjs.map +0 -7
  195. package/dist/lib/browser/chunk-UGYCLOXE.mjs +0 -1471
  196. package/dist/lib/browser/chunk-UGYCLOXE.mjs.map +0 -7
  197. package/dist/lib/browser/chunk-VF37YTXJ.mjs +0 -28
  198. package/dist/lib/browser/chunk-VF37YTXJ.mjs.map +0 -7
  199. package/dist/lib/browser/chunk-YUVQIOTB.mjs +0 -60
  200. package/dist/lib/browser/chunk-YUVQIOTB.mjs.map +0 -7
  201. package/dist/lib/browser/cli/index.mjs +0 -74
  202. package/dist/lib/browser/cli/index.mjs.map +0 -7
  203. package/dist/lib/browser/common/activation-events.mjs +0 -20
  204. package/dist/lib/browser/common/activation-events.mjs.map +0 -7
  205. package/dist/lib/browser/common/capabilities.mjs +0 -56
  206. package/dist/lib/browser/common/capabilities.mjs.map +0 -7
  207. package/dist/lib/browser/config/index.mjs +0 -8
  208. package/dist/lib/browser/config/index.mjs.map +0 -7
  209. package/dist/lib/browser/core/activation-event.mjs +0 -20
  210. package/dist/lib/browser/core/activation-event.mjs.map +0 -7
  211. package/dist/lib/browser/core/capability.mjs +0 -32
  212. package/dist/lib/browser/core/capability.mjs.map +0 -7
  213. package/dist/lib/browser/core/plugin-manager.mjs +0 -19
  214. package/dist/lib/browser/core/plugin-manager.mjs.map +0 -7
  215. package/dist/lib/browser/core/plugin.mjs +0 -51
  216. package/dist/lib/browser/core/plugin.mjs.map +0 -7
  217. package/dist/lib/browser/core/url-loader.mjs +0 -24
  218. package/dist/lib/browser/core/url-loader.mjs.map +0 -7
  219. package/dist/lib/browser/index.mjs +0 -98
  220. package/dist/lib/browser/index.mjs.map +0 -7
  221. package/dist/lib/browser/meta.json +0 -1
  222. package/dist/lib/browser/process-manager-capability-QK4BMKMN.mjs +0 -132
  223. package/dist/lib/browser/process-manager-capability-QK4BMKMN.mjs.map +0 -7
  224. package/dist/lib/browser/testing/index.mjs +0 -359
  225. package/dist/lib/browser/testing/index.mjs.map +0 -7
  226. package/dist/lib/browser/testing/react.mjs +0 -78
  227. package/dist/lib/browser/testing/react.mjs.map +0 -7
  228. package/dist/lib/browser/ui/index.mjs +0 -60
  229. package/dist/lib/browser/ui/index.mjs.map +0 -7
  230. package/dist/lib/node-esm/capability-3YRF77LV.mjs +0 -36
  231. package/dist/lib/node-esm/capability-3YRF77LV.mjs.map +0 -7
  232. package/dist/lib/node-esm/chunk-2UPUZXGU.mjs +0 -9
  233. package/dist/lib/node-esm/chunk-2UPUZXGU.mjs.map +0 -7
  234. package/dist/lib/node-esm/chunk-37Z53PXZ.mjs +0 -10
  235. package/dist/lib/node-esm/chunk-37Z53PXZ.mjs.map +0 -7
  236. package/dist/lib/node-esm/chunk-4SE7SX7N.mjs +0 -261
  237. package/dist/lib/node-esm/chunk-4SE7SX7N.mjs.map +0 -7
  238. package/dist/lib/node-esm/chunk-BMW6P6QA.mjs +0 -48
  239. package/dist/lib/node-esm/chunk-BMW6P6QA.mjs.map +0 -7
  240. package/dist/lib/node-esm/chunk-COHOWGGJ.mjs +0 -144
  241. package/dist/lib/node-esm/chunk-COHOWGGJ.mjs.map +0 -7
  242. package/dist/lib/node-esm/chunk-DRT75WGD.mjs +0 -604
  243. package/dist/lib/node-esm/chunk-DRT75WGD.mjs.map +0 -7
  244. package/dist/lib/node-esm/chunk-FKMVORZN.mjs +0 -431
  245. package/dist/lib/node-esm/chunk-FKMVORZN.mjs.map +0 -7
  246. package/dist/lib/node-esm/chunk-FPW45EZH.mjs +0 -14
  247. package/dist/lib/node-esm/chunk-FPW45EZH.mjs.map +0 -7
  248. package/dist/lib/node-esm/chunk-GLH4LGHZ.mjs +0 -84
  249. package/dist/lib/node-esm/chunk-GLH4LGHZ.mjs.map +0 -7
  250. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  251. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  252. package/dist/lib/node-esm/chunk-IL7O7IRX.mjs +0 -1472
  253. package/dist/lib/node-esm/chunk-IL7O7IRX.mjs.map +0 -7
  254. package/dist/lib/node-esm/chunk-ND2HETHD.mjs +0 -506
  255. package/dist/lib/node-esm/chunk-ND2HETHD.mjs.map +0 -7
  256. package/dist/lib/node-esm/chunk-TLKYZKPW.mjs +0 -29
  257. package/dist/lib/node-esm/chunk-TLKYZKPW.mjs.map +0 -7
  258. package/dist/lib/node-esm/chunk-VCPGX7WN.mjs +0 -62
  259. package/dist/lib/node-esm/chunk-VCPGX7WN.mjs.map +0 -7
  260. package/dist/lib/node-esm/chunk-XSZMX53L.mjs +0 -96
  261. package/dist/lib/node-esm/chunk-XSZMX53L.mjs.map +0 -7
  262. package/dist/lib/node-esm/cli/index.mjs +0 -75
  263. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  264. package/dist/lib/node-esm/common/activation-events.mjs +0 -21
  265. package/dist/lib/node-esm/common/activation-events.mjs.map +0 -7
  266. package/dist/lib/node-esm/common/capabilities.mjs +0 -57
  267. package/dist/lib/node-esm/common/capabilities.mjs.map +0 -7
  268. package/dist/lib/node-esm/config/index.mjs +0 -9
  269. package/dist/lib/node-esm/config/index.mjs.map +0 -7
  270. package/dist/lib/node-esm/core/activation-event.mjs +0 -21
  271. package/dist/lib/node-esm/core/activation-event.mjs.map +0 -7
  272. package/dist/lib/node-esm/core/capability.mjs +0 -33
  273. package/dist/lib/node-esm/core/capability.mjs.map +0 -7
  274. package/dist/lib/node-esm/core/plugin-manager.mjs +0 -20
  275. package/dist/lib/node-esm/core/plugin-manager.mjs.map +0 -7
  276. package/dist/lib/node-esm/core/plugin.mjs +0 -52
  277. package/dist/lib/node-esm/core/plugin.mjs.map +0 -7
  278. package/dist/lib/node-esm/core/url-loader.mjs +0 -25
  279. package/dist/lib/node-esm/core/url-loader.mjs.map +0 -7
  280. package/dist/lib/node-esm/index.mjs +0 -99
  281. package/dist/lib/node-esm/index.mjs.map +0 -7
  282. package/dist/lib/node-esm/meta.json +0 -1
  283. package/dist/lib/node-esm/process-manager-capability-5S7WZ2JR.mjs +0 -133
  284. package/dist/lib/node-esm/process-manager-capability-5S7WZ2JR.mjs.map +0 -7
  285. package/dist/lib/node-esm/testing/index.mjs +0 -360
  286. package/dist/lib/node-esm/testing/index.mjs.map +0 -7
  287. package/dist/lib/node-esm/testing/react.mjs +0 -79
  288. package/dist/lib/node-esm/testing/react.mjs.map +0 -7
  289. package/dist/lib/node-esm/ui/index.mjs +0 -61
  290. package/dist/lib/node-esm/ui/index.mjs.map +0 -7
  291. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts +0 -11
  292. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +0 -1
  293. package/src/ui/components/Surface/SurfaceInfo.tsx +0 -106
  294. package/vitest.config.ts +0 -14
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../src/testing/react.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAuB,MAAM,wBAAwB,CAAC;AACpG,OAAc,EAAE,KAAK,EAAE,EAAY,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASzF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG;IAClE,sFAAsF;IACtF,aAAa,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,YAAa,WAAW,MAAM,SAAS,YAAY,oBAAoB,KAAG,YAQ5F,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,SAAS,CAAC,GAAG,CAAC,IAAI;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,SAAS,SAAS,CAAC,MAAM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B,CAAC,IAAI,CAAC,KAAQ,SAuCxF,CAAC"}
1
+ {"version":3,"file":"withPluginManager.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrE,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,YAAY,CAAC;AAGlE,OAAO,EAAE,KAAK,eAAe,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAyB,MAAM,SAAS,CAAC;AAC1G,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,OAAO,CAAC;AA4CnD,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG;IACrD,kBAAkB;IAClB,YAAY,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpF,kBAAkB;IAClB,UAAU,CAAC,EAAE,CAAC,eAAe,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,4BAA4B,CAAC,IAAI,GAAG,IAAI,IAChD,wBAAwB,GACxB,CAAC,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,wBAAwB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,IAAI,SAAS,4BAA4B,CAAC,IAAI,CAAC,KAAQ,SAwCxF,CAAC"}
@@ -8,4 +8,10 @@ declare const meta: {
8
8
  export default meta;
9
9
  type Story = StoryObj<typeof meta>;
10
10
  export declare const Default: Story;
11
+ /**
12
+ * Demonstrates `withPluginManager`'s default fallback (`StorybookErrorFallback`): when the app
13
+ * throws, the theme-independent `ErrorFallback` renders with a "Download logs" button alongside
14
+ * the usual "Copy" action.
15
+ */
16
+ export declare const Crashes: Story;
11
17
  //# sourceMappingURL=withPluginManager.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withPluginManager.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAqB1B,QAAA,MAAM,IAAI;;;;CAkB2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"withPluginManager.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAuB1B,QAAA,MAAM,IAAI;;;;CAkB2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type Decorator } from '@storybook/react';
2
+ /**
3
+ * Storybook decorator that enables the surface debug overlays (`<dx-surface>` wrappers + boundary
4
+ * badges) for the wrapped story. The flag is a `window` singleton, so it is (re)applied on every
5
+ * render — enabling it on decorated stories and clearing it otherwise, so the setting never leaks
6
+ * between stories. Prefer this over the `.storybook/preview` flag when the story must also render
7
+ * under the aggregate root Storybook, which does not load a per-package preview.
8
+ */
9
+ export declare const withSurfaceDebug: (enabled?: boolean) => Decorator;
10
+ //# sourceMappingURL=withSurfaceDebug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withSurfaceDebug.d.ts","sourceRoot":"","sources":["../../../../src/testing/withSurfaceDebug.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,yBACT,SAIjB,CAAC"}
@@ -1,37 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type StartupProgress, type UseAppOptions } from '../../hooks';
3
- declare global {
4
- interface Window {
5
- /**
6
- * Driver injected by `@dxos/app-framework/vite-plugin`'s `bootLoaderPlugin`
7
- * (a Solid app inlined into `index.html`). Declared here — on a module that
8
- * is part of the `@dxos/app-framework/ui` export surface — so the React side
9
- * and host apps (e.g. composer-app) can drive the loader without each
10
- * re-declaring the type. The canonical definition lives in the plugin's
11
- * `loader-app/types.ts`; this mirror exists because that source compiles in a
12
- * separate (Solid) program that doesn't ship its globals to consumers.
13
- */
14
- __bootLoader?: {
15
- status: (payload: {
16
- event?: string;
17
- module?: string;
18
- humanized: string;
19
- /**
20
- * Optional `(index/total)` tick. When present, the loader replaces the
21
- * current line in place ("Loading plugins (12/80)") instead of appending
22
- * a new entry — keeps the visible log compact during long counted phases.
23
- */
24
- range?: {
25
- index: number;
26
- total: number;
27
- };
28
- }) => void;
29
- progress: (fraction?: number) => void;
30
- ready: () => void;
31
- dismiss: () => void;
32
- };
33
- }
34
- }
35
3
  export type AppProps = Pick<UseAppOptions, 'debounce'> & {
36
4
  ready: boolean;
37
5
  error: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/App/App.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAIlF,OAAO,EAAgB,KAAK,eAAe,EAAE,KAAK,aAAa,EAA+B,MAAM,aAAa,CAAC;AAElH,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,MAAM;QACd;;;;;;;;WAQG;QACH,YAAY,CAAC,EAAE;YACb,MAAM,EAAE,CAAC,OAAO,EAAE;gBAChB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,MAAM,CAAC,EAAE,MAAM,CAAC;gBAChB,SAAS,EAAE,MAAM,CAAC;gBAClB;;;;mBAIG;gBACH,KAAK,CAAC,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAC;oBAAC,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;aAC1C,KAAK,IAAI,CAAC;YACX,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;YACtC,KAAK,EAAE,MAAM,IAAI,CAAC;YAClB,OAAO,EAAE,MAAM,IAAI,CAAC;SACrB,CAAC;KACH;CACF;AAED,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAAG;IACvD,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B,CAAC;AAIF,eAAO,MAAM,GAAG,yCAA0C,QAAQ,6BAiFjE,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/App/App.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAIlF,OAAO,EAAgB,KAAK,eAAe,EAAE,KAAK,aAAa,EAA+B,MAAM,aAAa,CAAC;AAKlH,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAAG;IACvD,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,GAAG,yCAA0C,QAAQ,6BAkFjE,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './App';
2
+ export * from './loader';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/App/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/App/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,35 @@
1
+ declare global {
2
+ interface BootLoader {
3
+ status: (payload: {
4
+ event?: string;
5
+ module?: string;
6
+ humanized: string;
7
+ /**
8
+ * Optional `(index/total)` tick. When present, the loader replaces the
9
+ * current line in place ("Loading plugins (12/80)") instead of appending
10
+ * a new entry — keeps the visible log compact during long counted phases.
11
+ */
12
+ range?: {
13
+ index: number;
14
+ total: number;
15
+ };
16
+ }) => void;
17
+ progress: (fraction?: number) => void;
18
+ ready: () => void;
19
+ dismiss: () => void;
20
+ }
21
+ interface Window {
22
+ /**
23
+ * Driver injected by `@dxos/app-framework/vite-plugin`'s `bootLoaderPlugin`
24
+ * (a Solid app inlined into `index.html`). Declared here — on a module that
25
+ * is part of the `@dxos/app-framework/ui` export surface — so the React side
26
+ * and host apps (e.g. composer-app) can drive the loader without each
27
+ * re-declaring the type. The canonical definition lives in the plugin's
28
+ * `loader-app/types.ts`; this mirror exists because that source compiles in a
29
+ * separate (Solid) program that doesn't ship its globals to consumers.
30
+ */
31
+ __bootLoader?: BootLoader;
32
+ }
33
+ }
34
+ export declare const bootLoader: BootLoader | undefined;
35
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/App/loader.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,UAAU;QAClB,MAAM,EAAE,CAAC,OAAO,EAAE;YAChB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;YAClB;;;;eAIG;YACH,KAAK,CAAC,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAA;aAAE,CAAC;SAC1C,KAAK,IAAI,CAAC;QACX,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QACtC,KAAK,EAAE,MAAM,IAAI,CAAC;QAClB,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB;IAED,UAAU,MAAM;QACd;;;;;;;;WAQG;QACH,YAAY,CAAC,EAAE,UAAU,CAAC;KAC3B;CACF;AAID,eAAO,MAAM,UAAU,wBAAkE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type ThemedClassName } from '@dxos/react-ui';
3
+ type HomeSectionRootProps = ThemedClassName<PropsWithChildren>;
4
+ type HomeSectionHeaderProps = ThemedClassName<PropsWithChildren<{
5
+ /** Section heading. */
6
+ title?: string;
7
+ /** When provided, renders a close affordance that hides the section. */
8
+ onClose?: () => void;
9
+ }>>;
10
+ export declare const HomeSection: {
11
+ Root: React.ForwardRefExoticComponent<Omit<{
12
+ children?: React.ReactNode | undefined;
13
+ }, "className"> & {
14
+ classNames?: import("@dxos/ui-types").ClassNameValue;
15
+ } & React.RefAttributes<HTMLDivElement>>;
16
+ Header: React.ForwardRefExoticComponent<Omit<PropsWithChildren<{
17
+ /** Section heading. */
18
+ title?: string;
19
+ /** When provided, renders a close affordance that hides the section. */
20
+ onClose?: () => void;
21
+ }>, "className"> & {
22
+ classNames?: import("@dxos/ui-types").ClassNameValue;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ };
25
+ export type { HomeSectionHeaderProps, HomeSectionRootProps };
26
+ //# sourceMappingURL=HomeSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HomeSection.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/HomeSection/HomeSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAElE,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAOxE,KAAK,oBAAoB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAmB/D,KAAK,sBAAsB,GAAG,eAAe,CAC3C,iBAAiB,CAAC;IAChB,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC,CACH,CAAC;AAwBF,eAAO,MAAM,WAAW;IACtB,IAAI;;;;;IACJ,MAAM;QA/BJ,uBAAuB;gBACf,MAAM;QACd,wEAAwE;kBAC9D,MAAM,IAAI;;;;CA6BvB,CAAC;AAEF,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ render: () => React.JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ export declare const WithActions: Story;
15
+ //# sourceMappingURL=HomeSection.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HomeSection.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/HomeSection/HomeSection.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAwB1B,QAAA,MAAM,IAAI;;;;;QAIM,MAAM;;CACe,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAAoC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './HomeSection';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/HomeSection/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ export type NamePopoverProps = PropsWithChildren<{
3
+ open: boolean;
4
+ placeholder: string;
5
+ /** Translated label for the submit button (e.g. "Create"). */
6
+ submitLabel: string;
7
+ onSubmit: (name: string) => void;
8
+ onCancel: () => void;
9
+ }>;
10
+ export declare function NamePopover({ children, open, placeholder, submitLabel, onSubmit, onCancel }: NamePopoverProps): React.JSX.Element;
11
+ export declare namespace NamePopover {
12
+ var displayName: string;
13
+ }
14
+ //# sourceMappingURL=NamePopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NamePopover.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/NamePopover/NamePopover.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAIhE,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC,CAAC;oCAMyB,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,gBAAgB"}
@@ -0,0 +1,2 @@
1
+ export * from './NamePopover';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/NamePopover/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
@@ -1,20 +1,32 @@
1
- import React, { type NamedExoticComponent, type RefAttributes } from 'react';
2
- import { type CapabilityManager } from '../../../core';
3
- import { type RoleToken, type TokenData, type TypedProps } from './types';
1
+ import React, { type NamedExoticComponent } from 'react';
2
+ import { Role } from '../../../common';
3
+ import { type TypedProps } from './types';
4
4
  /**
5
5
  * A surface is a named region of the screen that can be populated by plugins.
6
- * The `type` prop is a {@link RoleToken} that defines which region and its
6
+ * The `type` prop is a {@link Role.Role} that defines which region and its
7
7
  * associated data contract.
8
+ *
9
+ * A surface is a boundary that may resolve to zero, one, or many components, so
10
+ * it intentionally accepts no `ref`; consumers needing an element should own one
11
+ * inside their contributed component.
8
12
  */
9
- export declare const SurfaceComponent: (<TToken extends RoleToken<any>>(props: TypedProps<TToken> & RefAttributes<HTMLElement>) => React.ReactNode) & NamedExoticComponent<TypedProps<RoleToken<any>> & RefAttributes<HTMLElement>>;
13
+ export declare const SurfaceComponent: (<TToken extends Role.Role<any>>(props: TypedProps<TToken>) => React.ReactNode) & NamedExoticComponent<TypedProps<Role.Role<any>>>;
10
14
  /**
11
- * @returns `true` if there is a contributed surface which matches the specified role & data, `false` otherwise.
15
+ * Reports whether a contributed surface matches the given role & data, without mounting it.
12
16
  *
13
17
  * Typed: pass a `type` role token and `data` is constrained to the token's
14
18
  * declared contract (e.g. `AppSurface.Section` requires `attendableId`).
15
19
  */
16
- export declare function isSurfaceAvailable<TToken extends RoleToken<any>>(capabilityManager: CapabilityManager.CapabilityManager, args: {
20
+ type IsSurfaceAvailable = <TToken extends Role.Role<any>>(args: {
17
21
  type: TToken;
18
- data?: TokenData<TToken>;
19
- }): boolean;
22
+ data?: Role.Data<TToken>;
23
+ }) => boolean;
24
+ /**
25
+ * @returns a stable function that checks whether a contributed surface is available for a
26
+ * role & data. The surface manager is captured via context, so the returned function carries
27
+ * no dependency of its own and is safe to store and invoke later — e.g. from inside another
28
+ * callback such as a render-prop or event handler — since it calls no hooks itself.
29
+ */
30
+ export declare const useIsSurfaceAvailable: () => IsSurfaceAvailable;
31
+ export {};
20
32
  //# sourceMappingURL=SurfaceComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SurfaceComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceComponent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAGZ,KAAK,oBAAoB,EAEzB,KAAK,aAAa,EAOnB,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAKvD,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,UAAU,EAEhB,MAAM,SAAS,CAAC;AAmKjB;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,EA6CxB,CAAC,CAAC,MAAM,SAAS,SAAS,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAC/G,oBAAoB,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AAwChF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,SAAS,SAAS,CAAC,GAAG,CAAC,EAC9D,iBAAiB,EAAE,iBAAiB,CAAC,iBAAiB,EACtD,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;CAAE,GAC/C,OAAO,CAYT"}
1
+ {"version":3,"file":"SurfaceComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceComponent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAGZ,KAAK,oBAAoB,EAS1B,MAAM,OAAO,CAAC;AAMf,OAAO,EAAgB,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAOrD,OAAO,EAA+B,KAAK,UAAU,EAA+B,MAAM,SAAS,CAAC;AAiJpG;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAqExB,CAAC,CAAC,MAAM,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAClF,oBAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AA6CnD;;;;;GAKG;AACH,KAAK,kBAAkB,GAAG,CAAC,MAAM,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;CAAE,KAAK,OAAO,CAAC;AAEvH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAO,kBAoBxC,CAAC"}
@@ -1,8 +1,11 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
+ type StoryProps = {
4
+ debug?: boolean;
5
+ };
3
6
  declare const meta: {
4
7
  title: string;
5
- render: () => React.JSX.Element;
8
+ render: ({ debug: debugProp }: StoryProps) => React.JSX.Element;
6
9
  decorators: import("@storybook/react").Decorator[];
7
10
  parameters: {
8
11
  layout: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SurfaceComponent.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceComponent.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmD,MAAM,OAAO,CAAC;AA6HxE,QAAA,MAAM,IAAI;;;;;QAKN,MAAM;;CAE2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"SurfaceComponent.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceComponent.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA2C,MAAM,OAAO,CAAC;AAyDhE,KAAK,UAAU,GAAG;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA2FF,QAAA,MAAM,IAAI;;mCAzFkC,UAAU;;;QA8FlD,MAAM;;CAE2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SurfaceComponent.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurfaceComponent.test.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceComponent.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ import { type PropsWithChildren, type ReactNode } from 'react';
2
+ import { type SurfaceContext } from './context';
3
+ declare global {
4
+ interface Window {
5
+ __DX_DEBUG__?: boolean;
6
+ __DX__?: {
7
+ surfaces: (component?: string) => HTMLElement[];
8
+ };
9
+ }
10
+ }
11
+ /**
12
+ * Custom element tag wrapping each React surface in debug builds.
13
+ */
14
+ export declare const DX_SURFACE_TAG = "dx-surface";
15
+ /**
16
+ * Whether surface debugging is enabled, via the `VITE_DEBUG` build flag or the
17
+ * `__DX_DEBUG__` runtime global. The runtime flag is toggleable without a
18
+ * rebuild and takes effect on the next render.
19
+ */
20
+ export declare const isSurfaceDebugEnabled: () => boolean;
21
+ /**
22
+ * Whether the `<dx-surface>` wrapper is rendered. Enabled in any development build (or when
23
+ * `VITE_DEBUG` is set) so the wrapper's `data-*` attributes and `window.__DX__` helpers are available
24
+ * for DOM inspection independent of the runtime highlight flag. Production renders no wrapper.
25
+ */
26
+ export declare const isSurfaceWrapperEnabled: () => boolean;
27
+ /**
28
+ * Toggles the `__DX_DEBUG__` runtime flag, which gates the visual highlight overlay (not the
29
+ * `<dx-surface>` wrapper). The overlay redraws immediately; surfaces pick it up on their next render.
30
+ */
31
+ export declare const setSurfaceDebug: (enabled: boolean) => void;
32
+ /**
33
+ * Debug wrapper that mounts each React surface inside a `<dx-surface>` element
34
+ * and registers it with the centralized overlay. The element is named and
35
+ * inspectable in DevTools and queryable (`document.querySelectorAll('dx-surface')`).
36
+ */
37
+ export declare const DebugSurface: ({ info, children }: PropsWithChildren<{
38
+ info: SurfaceContext;
39
+ }>) => ReactNode;
40
+ //# sourceMappingURL=SurfaceDebug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurfaceDebug.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceDebug.tsx"],"names":[],"mappings":"AAIA,OAAc,EACZ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAOf,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,MAAM;QACd,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,MAAM,CAAC,EAAE;YAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,WAAW,EAAE,CAAA;SAAE,CAAC;KAC9D;CACF;AAID;;GAEG;AACH,eAAO,MAAM,cAAc,eAAe,CAAC;AAuB3C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAAO,OACwD,CAAC;AAElG;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,QAAO,OAC4B,CAAC;AAYxE;;;GAGG;AACH,eAAO,MAAM,eAAe,YAAa,OAAO,KAAG,IAalD,CAAC;AA+RF;;;;GAIG;AACH,eAAO,MAAM,YAAY,uBAAwB,iBAAiB,CAAC;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC,KAAG,SAyC9F,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Atom } from '@effect-atom/atom';
2
+ import { type CapabilityManager } from '../../../core';
3
+ import { type Definition } from './types';
4
+ /**
5
+ * Groups definitions by role with each bucket pre-sorted by {@link Position}, so
6
+ * dispatch avoids a full scan and re-sort on every render. Pure helper — callers
7
+ * are responsible for filtering out invalid definitions before calling this.
8
+ */
9
+ export declare const indexByRole: (definitions: Definition[]) => Map<string, Definition[]>;
10
+ /**
11
+ * Owns the per-manager surface memoization: one derived index atom plus a per-role
12
+ * family of candidate atoms. A single instance is provided via
13
+ * {@link SurfaceManagerProvider}, so instance identity does the per-manager keying
14
+ * (replacing module-level WeakMaps) and `Atom.family` does the per-role keying.
15
+ * Atom lifecycle is tied to the provider rather than module-global state.
16
+ */
17
+ export declare class SurfaceManager {
18
+ #private;
19
+ constructor(capabilities: CapabilityManager.CapabilityManager);
20
+ /** Derived atom yielding the (position-sorted) candidates for a single role. */
21
+ candidatesAtom(role: string): Atom.Atom<ReadonlyArray<Definition>>;
22
+ }
23
+ //# sourceMappingURL=SurfaceManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurfaceManager.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAOzC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,SAAS,CAAC;AAI1D;;;;GAIG;AACH,eAAO,MAAM,WAAW,gBAAiB,UAAU,EAAE,KAAG,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAiB/E,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,cAAc;;IAuBzB,YAAY,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,EAE5D;IAED,gFAAgF;IAChF,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAEjE;CAiBF"}
@@ -0,0 +1,11 @@
1
+ import { type SurfaceManager } from './SurfaceManager';
2
+ /**
3
+ * Get the surface manager. Throws when rendered outside a {@link SurfaceManagerProvider};
4
+ * surfaces already hard-require the plugin-manager context, so there is no optional variant.
5
+ */
6
+ export declare const useSurfaceManager: () => SurfaceManager;
7
+ /**
8
+ * Context provider for a surface manager.
9
+ */
10
+ export declare const SurfaceManagerProvider: import("react").Provider<SurfaceManager | undefined>;
11
+ //# sourceMappingURL=SurfaceManagerContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurfaceManagerContext.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceManagerContext.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,cACmD,CAAC;AAEzF;;GAEG;AACH,eAAO,MAAM,sBAAsB,sDAAiC,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Per-surface dev metrics, complementing the render-timing data collected by the
3
+ * React Profiler ({@link SurfaceProfilerStats}). Captures dispatch-level signals
4
+ * the Profiler cannot see: how many candidates matched, whether the consumer's
5
+ * `data` prop is referentially unstable (the most common Surface footgun), error
6
+ * boundary trips, and mount churn.
7
+ *
8
+ * Keyed by the same `surface/<id>/<role>` identifier the Profiler uses, so the
9
+ * two can be joined in the devtools panel.
10
+ */
11
+ export type SurfaceMetric = {
12
+ /** `surface/<id>/<role>`. */
13
+ id: string;
14
+ /** Surface definition id. */
15
+ surfaceId: string;
16
+ /** Resolved role NSID. */
17
+ role: string;
18
+ /** Number of times the dispatcher resolved candidates for this surface. */
19
+ dispatches: number;
20
+ /** Candidates matched on the last dispatch. */
21
+ candidates: number;
22
+ /** `true` when more candidates matched than `limit` rendered. */
23
+ truncated: boolean;
24
+ /** `true` when the `data` prop identity churns across renders without changing value. */
25
+ dataUnstable: boolean;
26
+ /** Consecutive renders where `data` identity changed but value did not. */
27
+ dataChurn: number;
28
+ /** Error boundary trips. */
29
+ errors: number;
30
+ /** Mounts of the matched component. */
31
+ mounts: number;
32
+ /** Unmounts of the matched component. */
33
+ unmounts: number;
34
+ };
35
+ export declare const surfaceMetricKey: (surfaceId: string, role: string) => string;
36
+ /**
37
+ * Singleton store of surface dev metrics. A module singleton (rather than a React
38
+ * context) so the debug overlay — which renders in its own root outside the app's
39
+ * provider tree — can read the same data as the in-app devtools panel.
40
+ */
41
+ declare class SurfaceMetricsStore {
42
+ #private;
43
+ /**
44
+ * Records a dispatch. `previousData` is the consumer's prior `data` reference;
45
+ * the store derives churn/instability from the identity-vs-value comparison.
46
+ */
47
+ recordDispatch(surfaceId: string, role: string, args: {
48
+ candidates: number;
49
+ truncated: boolean;
50
+ dataChurn: number;
51
+ }): void;
52
+ recordError(surfaceId: string, role: string): void;
53
+ recordMount(surfaceId: string, role: string): void;
54
+ recordUnmount(surfaceId: string, role: string): void;
55
+ clear(): void;
56
+ subscribe: (listener: () => void) => (() => void);
57
+ getSnapshot: () => SurfaceMetric[];
58
+ }
59
+ export declare const surfaceMetrics: SurfaceMetricsStore;
60
+ /**
61
+ * Updates the running churn count for a consumer's `data` prop.
62
+ *
63
+ * @returns the new churn count (0 when `data` changed value or is unchanged).
64
+ */
65
+ export declare const nextDataChurn: (previous: unknown, next: unknown, churn: number) => number;
66
+ /**
67
+ * Subscribes to surface dev metrics, sorted with the most concerning first
68
+ * (unstable data, then errors, then dispatch count).
69
+ */
70
+ export declare const useSurfaceMetrics: () => SurfaceMetric[];
71
+ export {};
72
+ //# sourceMappingURL=SurfaceMetrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurfaceMetrics.d.ts","sour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KAAG,CAAC,MAAM,IAAI,CAAC,CAK9C;IAEF,WAAW,QAAO,aAAa,EAAE,CAAmB;CAuBrD;AAED,eAAO,MAAM,cAAc,qBAA4B,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,aAAa,aAAc,OAAO,QAAQ,OAAO,SAAS,MAAM,KAAG,MAU/E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,aAAa,EASjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SurfaceProfilerContext.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceProfilerContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAEZ,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAC;AAIf;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,eAAe,CAAC;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAmEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,iBAAkB,iBAAiB,sBAQtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAO,wBAAwB,GAAG,SAkBxE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,SAAS,oBAAoB,EAGzE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,oBAAoB,EAqC9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,CAAC,MAAM,IAAI,CAAC,GAAG,SAGzD,CAAC"}
1
+ {"version":3,"file":"SurfaceProfilerContext.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/SurfaceProfilerContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAEZ,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAC;AAIf;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,eAAe,CAAC;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA6EF;;GAEG;AACH,eAAO,MAAM,uBAAuB,iBAAkB,iBAAiB,sBAQtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAO,wBAAwB,GAAG,SAkBxE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,SAAS,oBAAoB,EAGzE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,oBAAoB,EAqC9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,CAAC,MAAM,IAAI,CAAC,GAAG,SAGzD,CAAC"}
@@ -1,43 +1,38 @@
1
- import type { DXN } from '@dxos/keys';
1
+ import { Role } from '../../../common';
2
2
  import { SurfaceContext } from './context';
3
- import { isSurfaceAvailable } from './SurfaceComponent';
4
- import { type SurfaceBinding as SurfaceBindingType, type Definition as SurfaceDefinition, type SurfaceFilter as SurfaceFilterType, type RoleToken as SurfaceRoleToken, type TokenData as SurfaceTokenData, type TypedProps as SurfaceTypedProps, create as createSurface, createWeb as createWebSurface } from './types';
3
+ import { type SurfaceMetric } from './SurfaceMetrics';
4
+ import { type Binding as SurfaceBindingType, type ComponentProps as SurfaceComponentPropsType, type Definition as SurfaceDefinition, type Filter as SurfaceFilterType, type TypedProps as SurfaceTypedProps, create as createSurface, createWeb as createWebSurface } from './types';
5
5
  export declare namespace Surface {
6
6
  type Definition = SurfaceDefinition;
7
7
  const create: typeof createSurface;
8
8
  const createWeb: typeof createWebSurface;
9
9
  type Context = SurfaceContext;
10
10
  const Context: import("react").Context<SurfaceContext | undefined>;
11
- const Surface: (<TToken extends SurfaceRoleToken<any>>(props: SurfaceTypedProps<TToken> & import("react").RefAttributes<HTMLElement>) => React.ReactNode) & import("react").NamedExoticComponent<{
12
- fallback?: import("react").FC<{
13
- error: Error;
14
- data?: any;
15
- }>;
16
- placeholder?: import("react").ReactNode;
17
- id?: string;
18
- type: SurfaceRoleToken<any>;
19
- data?: any;
20
- limit?: number | undefined;
21
- } & {
22
- [x: string]: any;
23
- } & import("react").RefAttributes<HTMLElement>>;
24
- const isAvailable: typeof isSurfaceAvailable;
25
- type RoleToken<TData> = SurfaceRoleToken<TData>;
11
+ const Surface: (<TToken extends Role.Role<any>>(props: SurfaceTypedProps<TToken>) => React.ReactNode) & import("react").NamedExoticComponent<SurfaceTypedProps<Role.Role<any>>>;
12
+ const useIsAvailable: () => <TToken extends Role.Role<any>>(args: {
13
+ type: TToken;
14
+ data?: Role.Data<TToken>;
15
+ }) => boolean;
26
16
  type Binding = SurfaceBindingType;
27
17
  type Filter<TData> = SurfaceFilterType<TData>;
28
- type TokenData<T> = SurfaceTokenData<T>;
29
- type TypedProps<TToken extends SurfaceRoleToken<any>> = SurfaceTypedProps<TToken>;
30
- /** Mints a typed role token. The NSID is validated at compile time via {@link DXN.Name}. */
31
- const makeType: {
32
- <TData = unknown, T extends string = string>(nsid: [DXN.Name<T>] extends [never] ? `Invalid NSID "${T}": final segment must be camelCase (no hyphens)` : T): SurfaceRoleToken<TData>;
33
- };
34
- const makeFilter: <TData>(token: SurfaceRoleToken<TData>, guard?: (data: TData) => boolean) => SurfaceFilterType<TData>;
18
+ const makeFilter: <TData>(token: Role.Role<TData>, guard?: (data: TData) => boolean) => SurfaceFilterType<TData>;
35
19
  const isFilter: (value: unknown) => value is SurfaceFilterType<any>;
20
+ type TypedProps<TToken extends Role.Role<any>> = SurfaceTypedProps<TToken>;
21
+ /** Props a matched surface component receives, and the input to a definition's `props` mapper. */
22
+ type ComponentProps<T extends Record<string, any> = Record<string, any>> = SurfaceComponentPropsType<T>;
23
+ const isDebugEnabled: () => boolean;
24
+ const setDebug: (enabled: boolean) => void;
36
25
  const ProfilerProvider: ({ children }: import("react").PropsWithChildren) => import("react").JSX.Element;
37
26
  const useProfilerCallback: () => import("react").ProfilerOnRenderCallback | undefined;
38
27
  const useProfilerEntries: () => readonly import("./SurfaceProfilerContext").SurfaceProfilerEntry[];
39
28
  const useProfilerStats: () => import("./SurfaceProfilerContext").SurfaceProfilerStats[];
40
29
  const useProfilerClear: () => (() => void) | undefined;
30
+ type Metric = SurfaceMetric;
31
+ const useMetrics: () => SurfaceMetric[];
32
+ const clearMetrics: () => void;
41
33
  }
42
34
  export type { SurfaceProfilerEntry, SurfaceProfilerStats } from './SurfaceProfilerContext';
35
+ export type { SurfaceMetric } from './SurfaceMetrics';
36
+ export { SurfaceManager } from './SurfaceManager';
37
+ export { SurfaceManagerProvider, useSurfaceManager } from './SurfaceManagerContext';
43
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/Surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAoB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAQ1E,OAAO,EACL,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,UAAU,IAAI,iBAAiB,EACpC,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,SAAS,IAAI,gBAAgB,EAClC,KAAK,SAAS,IAAI,gBAAgB,EAClC,KAAK,UAAU,IAAI,iBAAiB,EACpC,MAAM,IAAI,aAAa,EACvB,SAAS,IAAI,gBAAgB,EAI9B,MAAM,SAAS,CAAC;AAEjB,yBAAiB,OAAO,CAAC,CAAC;IACxB,KAAY,UAAU,GAAG,iBAAiB,CAAC;IACpC,MAAM,MAAM,sBAAgB,CAAC;IAC7B,MAAM,SAAS,yBAAmB,CAAC;IAE1C,KAAY,OAAO,GAAG,cAAc,CAAC;IAC9B,MAAM,OAAO,qDAAiB,CAAC;IAE/B,MAAM,OAAO;;;;;;;;;;;;mDAAmB,CAAC;IACjC,MAAM,WAAW,2BAAqB,CAAC;IAE9C,KAAY,SAAS,CAAC,KAAK,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACvD,KAAY,OAAO,GAAG,kBAAkB,CAAC;IACzC,KAAY,MAAM,CAAC,KAAK,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACrD,KAAY,SAAS,CAAC,CAA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