@vibesdotdev/editor 0.0.0-stage → 1.0.0-rc.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 (454) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +36 -2
  3. package/dist/capabilities/editor-document-capabilities.d.ts +6 -0
  4. package/dist/capabilities/editor-document-capabilities.d.ts.map +1 -0
  5. package/dist/capabilities/editor-document-capabilities.js +47 -0
  6. package/dist/capabilities/editor-document-capabilities.js.map +1 -0
  7. package/dist/cli/editor.cli-command.descriptor.d.ts +3 -0
  8. package/dist/cli/editor.cli-command.descriptor.d.ts.map +1 -0
  9. package/dist/cli/editor.cli-command.descriptor.js +27 -0
  10. package/dist/cli/editor.cli-command.descriptor.js.map +1 -0
  11. package/dist/cli/editor.impl.d.ts +10 -0
  12. package/dist/cli/editor.impl.d.ts.map +1 -0
  13. package/dist/cli/editor.impl.js +96 -0
  14. package/dist/cli/editor.impl.js.map +1 -0
  15. package/dist/cli/host-environment.context.descriptor.d.ts +35 -0
  16. package/dist/cli/host-environment.context.descriptor.d.ts.map +1 -0
  17. package/dist/cli/host-environment.context.descriptor.js +13 -0
  18. package/dist/cli/host-environment.context.descriptor.js.map +1 -0
  19. package/dist/cli/host-environment.context.impl.d.ts +8 -0
  20. package/dist/cli/host-environment.context.impl.d.ts.map +1 -0
  21. package/dist/cli/host-environment.context.impl.js +4 -0
  22. package/dist/cli/host-environment.context.impl.js.map +1 -0
  23. package/dist/cli/nvim/dev.nvim.cli-command.descriptor.d.ts +12 -0
  24. package/dist/cli/nvim/dev.nvim.cli-command.descriptor.d.ts.map +1 -0
  25. package/dist/cli/nvim/dev.nvim.cli-command.descriptor.js +12 -0
  26. package/dist/cli/nvim/dev.nvim.cli-command.descriptor.js.map +1 -0
  27. package/dist/cli/nvim/doctor.cli-command.descriptor.d.ts +17 -0
  28. package/dist/cli/nvim/doctor.cli-command.descriptor.d.ts.map +1 -0
  29. package/dist/cli/nvim/doctor.cli-command.descriptor.js +15 -0
  30. package/dist/cli/nvim/doctor.cli-command.descriptor.js.map +1 -0
  31. package/dist/cli/nvim/doctor.impl.d.ts +10 -0
  32. package/dist/cli/nvim/doctor.impl.d.ts.map +1 -0
  33. package/dist/cli/nvim/doctor.impl.js +31 -0
  34. package/dist/cli/nvim/doctor.impl.js.map +1 -0
  35. package/dist/cli/nvim/install-target.d.ts +7 -0
  36. package/dist/cli/nvim/install-target.d.ts.map +1 -0
  37. package/dist/cli/nvim/install-target.js +10 -0
  38. package/dist/cli/nvim/install-target.js.map +1 -0
  39. package/dist/cli/nvim/install.cli-command.descriptor.d.ts +29 -0
  40. package/dist/cli/nvim/install.cli-command.descriptor.d.ts.map +1 -0
  41. package/dist/cli/nvim/install.cli-command.descriptor.js +19 -0
  42. package/dist/cli/nvim/install.cli-command.descriptor.js.map +1 -0
  43. package/dist/cli/nvim/install.impl.d.ts +15 -0
  44. package/dist/cli/nvim/install.impl.d.ts.map +1 -0
  45. package/dist/cli/nvim/install.impl.js +75 -0
  46. package/dist/cli/nvim/install.impl.js.map +1 -0
  47. package/dist/cli/nvim/sidecar.cli-command.descriptor.d.ts +17 -0
  48. package/dist/cli/nvim/sidecar.cli-command.descriptor.d.ts.map +1 -0
  49. package/dist/cli/nvim/sidecar.cli-command.descriptor.js +16 -0
  50. package/dist/cli/nvim/sidecar.cli-command.descriptor.js.map +1 -0
  51. package/dist/cli/nvim/sidecar.impl.d.ts +7 -0
  52. package/dist/cli/nvim/sidecar.impl.d.ts.map +1 -0
  53. package/dist/cli/nvim/sidecar.impl.js +42 -0
  54. package/dist/cli/nvim/sidecar.impl.js.map +1 -0
  55. package/dist/cli/nvim/uninstall.cli-command.descriptor.d.ts +20 -0
  56. package/dist/cli/nvim/uninstall.cli-command.descriptor.d.ts.map +1 -0
  57. package/dist/cli/nvim/uninstall.cli-command.descriptor.js +16 -0
  58. package/dist/cli/nvim/uninstall.cli-command.descriptor.js.map +1 -0
  59. package/dist/cli/nvim/uninstall.impl.d.ts +8 -0
  60. package/dist/cli/nvim/uninstall.impl.d.ts.map +1 -0
  61. package/dist/cli/nvim/uninstall.impl.js +18 -0
  62. package/dist/cli/nvim/uninstall.impl.js.map +1 -0
  63. package/dist/cli/plugin.d.ts +3 -0
  64. package/dist/cli/plugin.d.ts.map +1 -0
  65. package/dist/cli/plugin.js +15 -0
  66. package/dist/cli/plugin.js.map +1 -0
  67. package/dist/client/editor-client.contract.d.ts +30 -0
  68. package/dist/client/editor-client.contract.d.ts.map +1 -0
  69. package/dist/client/editor-client.contract.js +2 -0
  70. package/dist/client/editor-client.contract.js.map +1 -0
  71. package/dist/client/editor-client.descriptor.d.ts +9 -0
  72. package/dist/client/editor-client.descriptor.d.ts.map +1 -0
  73. package/dist/client/editor-client.descriptor.js +10 -0
  74. package/dist/client/editor-client.descriptor.js.map +1 -0
  75. package/dist/client/editor-client.error.d.ts +7 -0
  76. package/dist/client/editor-client.error.d.ts.map +1 -0
  77. package/dist/client/editor-client.error.js +24 -0
  78. package/dist/client/editor-client.error.js.map +1 -0
  79. package/dist/client/editor-runtime-client.d.ts +18 -0
  80. package/dist/client/editor-runtime-client.d.ts.map +1 -0
  81. package/dist/client/editor-runtime-client.js +144 -0
  82. package/dist/client/editor-runtime-client.js.map +1 -0
  83. package/dist/client/editor-transaction.d.ts +72 -0
  84. package/dist/client/editor-transaction.d.ts.map +1 -0
  85. package/dist/client/editor-transaction.js +487 -0
  86. package/dist/client/editor-transaction.js.map +1 -0
  87. package/dist/client/get-vibes-editor-client.d.ts +4 -0
  88. package/dist/client/get-vibes-editor-client.d.ts.map +1 -0
  89. package/dist/client/get-vibes-editor-client.js +5 -0
  90. package/dist/client/get-vibes-editor-client.js.map +1 -0
  91. package/dist/client/index.d.ts +5 -0
  92. package/dist/client/index.d.ts.map +1 -0
  93. package/dist/client/index.js +5 -0
  94. package/dist/client/index.js.map +1 -0
  95. package/dist/code-atlas/atlas.consumer.plugin.d.ts +7 -0
  96. package/dist/code-atlas/atlas.consumer.plugin.d.ts.map +1 -0
  97. package/dist/code-atlas/atlas.consumer.plugin.js +23 -0
  98. package/dist/code-atlas/atlas.consumer.plugin.js.map +1 -0
  99. package/dist/code-atlas/cloud.plugin.d.ts +3 -0
  100. package/dist/code-atlas/cloud.plugin.d.ts.map +1 -0
  101. package/dist/code-atlas/cloud.plugin.js +13 -0
  102. package/dist/code-atlas/cloud.plugin.js.map +1 -0
  103. package/dist/code-atlas/code-atlas.plugin.d.ts +2 -0
  104. package/dist/code-atlas/code-atlas.plugin.d.ts.map +1 -0
  105. package/dist/code-atlas/code-atlas.plugin.js +2 -0
  106. package/dist/code-atlas/code-atlas.plugin.js.map +1 -0
  107. package/dist/code-atlas/consumer.d.ts +3 -0
  108. package/dist/code-atlas/consumer.d.ts.map +1 -0
  109. package/dist/code-atlas/consumer.js +3 -0
  110. package/dist/code-atlas/consumer.js.map +1 -0
  111. package/dist/code-atlas/index.d.ts +4 -0
  112. package/dist/code-atlas/index.d.ts.map +1 -0
  113. package/dist/code-atlas/index.js +4 -0
  114. package/dist/code-atlas/index.js.map +1 -0
  115. package/dist/code-atlas/plugin.d.ts +3 -0
  116. package/dist/code-atlas/plugin.d.ts.map +1 -0
  117. package/dist/code-atlas/plugin.js +3 -0
  118. package/dist/code-atlas/plugin.js.map +1 -0
  119. package/dist/code-atlas/tools/aliases.d.ts +16 -0
  120. package/dist/code-atlas/tools/aliases.d.ts.map +1 -0
  121. package/dist/code-atlas/tools/aliases.js +47 -0
  122. package/dist/code-atlas/tools/aliases.js.map +1 -0
  123. package/dist/code-atlas/tools/aliases.storage.descriptor.d.ts +18 -0
  124. package/dist/code-atlas/tools/aliases.storage.descriptor.d.ts.map +1 -0
  125. package/dist/code-atlas/tools/aliases.storage.descriptor.js +37 -0
  126. package/dist/code-atlas/tools/aliases.storage.descriptor.js.map +1 -0
  127. package/dist/code-atlas/tools/code-atlas.impl.consumer.d.ts +466 -0
  128. package/dist/code-atlas/tools/code-atlas.impl.consumer.d.ts.map +1 -0
  129. package/dist/code-atlas/tools/code-atlas.impl.consumer.js +83 -0
  130. package/dist/code-atlas/tools/code-atlas.impl.consumer.js.map +1 -0
  131. package/dist/code-atlas/tools/diagnostics/implementation.d.ts +20 -0
  132. package/dist/code-atlas/tools/diagnostics/implementation.d.ts.map +1 -0
  133. package/dist/code-atlas/tools/diagnostics/implementation.js +32 -0
  134. package/dist/code-atlas/tools/diagnostics/implementation.js.map +1 -0
  135. package/dist/code-atlas/tools/graph/cycles.d.ts +39 -0
  136. package/dist/code-atlas/tools/graph/cycles.d.ts.map +1 -0
  137. package/dist/code-atlas/tools/graph/cycles.js +24 -0
  138. package/dist/code-atlas/tools/graph/cycles.js.map +1 -0
  139. package/dist/code-atlas/tools/graph/implementation.d.ts +4 -0
  140. package/dist/code-atlas/tools/graph/implementation.d.ts.map +1 -0
  141. package/dist/code-atlas/tools/graph/implementation.js +131 -0
  142. package/dist/code-atlas/tools/graph/implementation.js.map +1 -0
  143. package/dist/code-atlas/tools/graph/schemas.d.ts +62 -0
  144. package/dist/code-atlas/tools/graph/schemas.d.ts.map +1 -0
  145. package/dist/code-atlas/tools/graph/schemas.js +51 -0
  146. package/dist/code-atlas/tools/graph/schemas.js.map +1 -0
  147. package/dist/code-atlas/tools/helpers.d.ts +60 -0
  148. package/dist/code-atlas/tools/helpers.d.ts.map +1 -0
  149. package/dist/code-atlas/tools/helpers.js +78 -0
  150. package/dist/code-atlas/tools/helpers.js.map +1 -0
  151. package/dist/code-atlas/tools/hooks/on-tool-error.impl.d.ts +14 -0
  152. package/dist/code-atlas/tools/hooks/on-tool-error.impl.d.ts.map +1 -0
  153. package/dist/code-atlas/tools/hooks/on-tool-error.impl.js +57 -0
  154. package/dist/code-atlas/tools/hooks/on-tool-error.impl.js.map +1 -0
  155. package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.d.ts +21 -0
  156. package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.d.ts.map +1 -0
  157. package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.js +19 -0
  158. package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.js.map +1 -0
  159. package/dist/code-atlas/tools/index-management/alias/implementation.d.ts +15 -0
  160. package/dist/code-atlas/tools/index-management/alias/implementation.d.ts.map +1 -0
  161. package/dist/code-atlas/tools/index-management/alias/implementation.js +51 -0
  162. package/dist/code-atlas/tools/index-management/alias/implementation.js.map +1 -0
  163. package/dist/code-atlas/tools/index-management/alias/schemas.d.ts +37 -0
  164. package/dist/code-atlas/tools/index-management/alias/schemas.d.ts.map +1 -0
  165. package/dist/code-atlas/tools/index-management/alias/schemas.js +31 -0
  166. package/dist/code-atlas/tools/index-management/alias/schemas.js.map +1 -0
  167. package/dist/code-atlas/tools/index-management/create/implementation.d.ts +4 -0
  168. package/dist/code-atlas/tools/index-management/create/implementation.d.ts.map +1 -0
  169. package/dist/code-atlas/tools/index-management/create/implementation.js +57 -0
  170. package/dist/code-atlas/tools/index-management/create/implementation.js.map +1 -0
  171. package/dist/code-atlas/tools/index-management/create/schemas.d.ts +38 -0
  172. package/dist/code-atlas/tools/index-management/create/schemas.d.ts.map +1 -0
  173. package/dist/code-atlas/tools/index-management/create/schemas.js +32 -0
  174. package/dist/code-atlas/tools/index-management/create/schemas.js.map +1 -0
  175. package/dist/code-atlas/tools/index-management/delete/implementation.d.ts +4 -0
  176. package/dist/code-atlas/tools/index-management/delete/implementation.d.ts.map +1 -0
  177. package/dist/code-atlas/tools/index-management/delete/implementation.js +43 -0
  178. package/dist/code-atlas/tools/index-management/delete/implementation.js.map +1 -0
  179. package/dist/code-atlas/tools/index-management/delete/schemas.d.ts +20 -0
  180. package/dist/code-atlas/tools/index-management/delete/schemas.d.ts.map +1 -0
  181. package/dist/code-atlas/tools/index-management/delete/schemas.js +18 -0
  182. package/dist/code-atlas/tools/index-management/delete/schemas.js.map +1 -0
  183. package/dist/code-atlas/tools/index-management/incremental/implementation.d.ts +4 -0
  184. package/dist/code-atlas/tools/index-management/incremental/implementation.d.ts.map +1 -0
  185. package/dist/code-atlas/tools/index-management/incremental/implementation.js +21 -0
  186. package/dist/code-atlas/tools/index-management/incremental/implementation.js.map +1 -0
  187. package/dist/code-atlas/tools/index-management/incremental/schemas.d.ts +14 -0
  188. package/dist/code-atlas/tools/index-management/incremental/schemas.d.ts.map +1 -0
  189. package/dist/code-atlas/tools/index-management/incremental/schemas.js +12 -0
  190. package/dist/code-atlas/tools/index-management/incremental/schemas.js.map +1 -0
  191. package/dist/code-atlas/tools/index-management/index.d.ts +17 -0
  192. package/dist/code-atlas/tools/index-management/index.d.ts.map +1 -0
  193. package/dist/code-atlas/tools/index-management/index.js +9 -0
  194. package/dist/code-atlas/tools/index-management/index.js.map +1 -0
  195. package/dist/code-atlas/tools/index-management/job-status/implementation.d.ts +4 -0
  196. package/dist/code-atlas/tools/index-management/job-status/implementation.d.ts.map +1 -0
  197. package/dist/code-atlas/tools/index-management/job-status/implementation.js +108 -0
  198. package/dist/code-atlas/tools/index-management/job-status/implementation.js.map +1 -0
  199. package/dist/code-atlas/tools/index-management/job-status/schemas.d.ts +109 -0
  200. package/dist/code-atlas/tools/index-management/job-status/schemas.d.ts.map +1 -0
  201. package/dist/code-atlas/tools/index-management/job-status/schemas.js +55 -0
  202. package/dist/code-atlas/tools/index-management/job-status/schemas.js.map +1 -0
  203. package/dist/code-atlas/tools/index-management/list/implementation.d.ts +4 -0
  204. package/dist/code-atlas/tools/index-management/list/implementation.d.ts.map +1 -0
  205. package/dist/code-atlas/tools/index-management/list/implementation.js +48 -0
  206. package/dist/code-atlas/tools/index-management/list/implementation.js.map +1 -0
  207. package/dist/code-atlas/tools/index-management/list/schemas.d.ts +16 -0
  208. package/dist/code-atlas/tools/index-management/list/schemas.d.ts.map +1 -0
  209. package/dist/code-atlas/tools/index-management/list/schemas.js +14 -0
  210. package/dist/code-atlas/tools/index-management/list/schemas.js.map +1 -0
  211. package/dist/code-atlas/tools/index-management/status/implementation.d.ts +4 -0
  212. package/dist/code-atlas/tools/index-management/status/implementation.d.ts.map +1 -0
  213. package/dist/code-atlas/tools/index-management/status/implementation.js +70 -0
  214. package/dist/code-atlas/tools/index-management/status/implementation.js.map +1 -0
  215. package/dist/code-atlas/tools/index-management/status/schemas.d.ts +44 -0
  216. package/dist/code-atlas/tools/index-management/status/schemas.d.ts.map +1 -0
  217. package/dist/code-atlas/tools/index-management/status/schemas.js +45 -0
  218. package/dist/code-atlas/tools/index-management/status/schemas.js.map +1 -0
  219. package/dist/code-atlas/tools/index-management/update/implementation.d.ts +4 -0
  220. package/dist/code-atlas/tools/index-management/update/implementation.d.ts.map +1 -0
  221. package/dist/code-atlas/tools/index-management/update/implementation.js +100 -0
  222. package/dist/code-atlas/tools/index-management/update/implementation.js.map +1 -0
  223. package/dist/code-atlas/tools/index-management/update/schemas.d.ts +36 -0
  224. package/dist/code-atlas/tools/index-management/update/schemas.d.ts.map +1 -0
  225. package/dist/code-atlas/tools/index-management/update/schemas.js +33 -0
  226. package/dist/code-atlas/tools/index-management/update/schemas.js.map +1 -0
  227. package/dist/code-atlas/tools/index.d.ts +13 -0
  228. package/dist/code-atlas/tools/index.d.ts.map +1 -0
  229. package/dist/code-atlas/tools/index.js +13 -0
  230. package/dist/code-atlas/tools/index.js.map +1 -0
  231. package/dist/code-atlas/tools/rename/implementation.d.ts +15 -0
  232. package/dist/code-atlas/tools/rename/implementation.d.ts.map +1 -0
  233. package/dist/code-atlas/tools/rename/implementation.js +181 -0
  234. package/dist/code-atlas/tools/rename/implementation.js.map +1 -0
  235. package/dist/code-atlas/tools/rename/schemas.d.ts +34 -0
  236. package/dist/code-atlas/tools/rename/schemas.d.ts.map +1 -0
  237. package/dist/code-atlas/tools/rename/schemas.js +27 -0
  238. package/dist/code-atlas/tools/rename/schemas.js.map +1 -0
  239. package/dist/code-atlas/tools/schemas/helpers.d.ts +3 -0
  240. package/dist/code-atlas/tools/schemas/helpers.d.ts.map +1 -0
  241. package/dist/code-atlas/tools/schemas/helpers.js +2 -0
  242. package/dist/code-atlas/tools/schemas/helpers.js.map +1 -0
  243. package/dist/code-atlas/tools/schemas-actions.d.ts +172 -0
  244. package/dist/code-atlas/tools/schemas-actions.d.ts.map +1 -0
  245. package/dist/code-atlas/tools/schemas-actions.js +46 -0
  246. package/dist/code-atlas/tools/schemas-actions.js.map +1 -0
  247. package/dist/code-atlas/tools/schemas-base.d.ts +153 -0
  248. package/dist/code-atlas/tools/schemas-base.d.ts.map +1 -0
  249. package/dist/code-atlas/tools/schemas-base.js +89 -0
  250. package/dist/code-atlas/tools/schemas-base.js.map +1 -0
  251. package/dist/code-atlas/tools/schemas.d.ts +159 -0
  252. package/dist/code-atlas/tools/schemas.d.ts.map +1 -0
  253. package/dist/code-atlas/tools/schemas.js +41 -0
  254. package/dist/code-atlas/tools/schemas.js.map +1 -0
  255. package/dist/code-atlas/tools/search/implementation.d.ts +4 -0
  256. package/dist/code-atlas/tools/search/implementation.d.ts.map +1 -0
  257. package/dist/code-atlas/tools/search/implementation.js +184 -0
  258. package/dist/code-atlas/tools/search/implementation.js.map +1 -0
  259. package/dist/code-atlas/tools/search/schemas.d.ts +65 -0
  260. package/dist/code-atlas/tools/search/schemas.d.ts.map +1 -0
  261. package/dist/code-atlas/tools/search/schemas.js +38 -0
  262. package/dist/code-atlas/tools/search/schemas.js.map +1 -0
  263. package/dist/code-atlas/tools/symbol/implementation.d.ts +4 -0
  264. package/dist/code-atlas/tools/symbol/implementation.d.ts.map +1 -0
  265. package/dist/code-atlas/tools/symbol/implementation.js +83 -0
  266. package/dist/code-atlas/tools/symbol/implementation.js.map +1 -0
  267. package/dist/code-atlas/tools/symbol/schemas.d.ts +51 -0
  268. package/dist/code-atlas/tools/symbol/schemas.d.ts.map +1 -0
  269. package/dist/code-atlas/tools/symbol/schemas.js +53 -0
  270. package/dist/code-atlas/tools/symbol/schemas.js.map +1 -0
  271. package/dist/code-atlas/tools/workspace-atlas.descriptor.d.ts +149 -0
  272. package/dist/code-atlas/tools/workspace-atlas.descriptor.d.ts.map +1 -0
  273. package/dist/code-atlas/tools/workspace-atlas.descriptor.js +35 -0
  274. package/dist/code-atlas/tools/workspace-atlas.descriptor.js.map +1 -0
  275. package/dist/code-atlas/tools/workspace-atlas.impl.consumer.d.ts +231 -0
  276. package/dist/code-atlas/tools/workspace-atlas.impl.consumer.d.ts.map +1 -0
  277. package/dist/code-atlas/tools/workspace-atlas.impl.consumer.js +16 -0
  278. package/dist/code-atlas/tools/workspace-atlas.impl.consumer.js.map +1 -0
  279. package/dist/code-atlas/tools/workspace-atlas.schemas.d.ts +118 -0
  280. package/dist/code-atlas/tools/workspace-atlas.schemas.d.ts.map +1 -0
  281. package/dist/code-atlas/tools/workspace-atlas.schemas.js +9 -0
  282. package/dist/code-atlas/tools/workspace-atlas.schemas.js.map +1 -0
  283. package/dist/code-atlas/tools/workspace-search.descriptor.d.ts +168 -0
  284. package/dist/code-atlas/tools/workspace-search.descriptor.d.ts.map +1 -0
  285. package/dist/code-atlas/tools/workspace-search.descriptor.js +56 -0
  286. package/dist/code-atlas/tools/workspace-search.descriptor.js.map +1 -0
  287. package/dist/code-atlas/tools/workspace-search.impl.consumer.d.ts +244 -0
  288. package/dist/code-atlas/tools/workspace-search.impl.consumer.d.ts.map +1 -0
  289. package/dist/code-atlas/tools/workspace-search.impl.consumer.js +23 -0
  290. package/dist/code-atlas/tools/workspace-search.impl.consumer.js.map +1 -0
  291. package/dist/code-atlas/tools/workspace-search.schemas.d.ts +115 -0
  292. package/dist/code-atlas/tools/workspace-search.schemas.d.ts.map +1 -0
  293. package/dist/code-atlas/tools/workspace-search.schemas.js +86 -0
  294. package/dist/code-atlas/tools/workspace-search.schemas.js.map +1 -0
  295. package/dist/code-atlas/tools/workspace-sync-status/schemas.d.ts +22 -0
  296. package/dist/code-atlas/tools/workspace-sync-status/schemas.d.ts.map +1 -0
  297. package/dist/code-atlas/tools/workspace-sync-status/schemas.js +22 -0
  298. package/dist/code-atlas/tools/workspace-sync-status/schemas.js.map +1 -0
  299. package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.d.ts +8 -0
  300. package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.d.ts.map +1 -0
  301. package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.js +49 -0
  302. package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.js.map +1 -0
  303. package/dist/config/editor.config.descriptor.d.ts +46 -0
  304. package/dist/config/editor.config.descriptor.d.ts.map +1 -0
  305. package/dist/config/editor.config.descriptor.js +35 -0
  306. package/dist/config/editor.config.descriptor.js.map +1 -0
  307. package/dist/config/load.d.ts +4 -0
  308. package/dist/config/load.d.ts.map +1 -0
  309. package/dist/config/load.js +12 -0
  310. package/dist/config/load.js.map +1 -0
  311. package/dist/docs/editor.transactions.docs.descriptor.d.ts +4 -0
  312. package/dist/docs/editor.transactions.docs.descriptor.d.ts.map +1 -0
  313. package/dist/docs/editor.transactions.docs.descriptor.js +52 -0
  314. package/dist/docs/editor.transactions.docs.descriptor.js.map +1 -0
  315. package/dist/editor.plugin.d.ts +3 -0
  316. package/dist/editor.plugin.d.ts.map +1 -0
  317. package/dist/editor.plugin.js +16 -0
  318. package/dist/editor.plugin.js.map +1 -0
  319. package/dist/index.d.ts +4 -0
  320. package/dist/index.d.ts.map +1 -0
  321. package/dist/index.js +4 -0
  322. package/dist/index.js.map +1 -0
  323. package/dist/nvim/index.d.ts +3 -0
  324. package/dist/nvim/index.d.ts.map +1 -0
  325. package/dist/nvim/index.js +3 -0
  326. package/dist/nvim/index.js.map +1 -0
  327. package/dist/nvim/nvim.consumer.plugin.d.ts +3 -0
  328. package/dist/nvim/nvim.consumer.plugin.d.ts.map +1 -0
  329. package/dist/nvim/nvim.consumer.plugin.js +21 -0
  330. package/dist/nvim/nvim.consumer.plugin.js.map +1 -0
  331. package/dist/nvim/nvim.plugin.d.ts +2 -0
  332. package/dist/nvim/nvim.plugin.d.ts.map +1 -0
  333. package/dist/nvim/nvim.plugin.js +2 -0
  334. package/dist/nvim/nvim.plugin.js.map +1 -0
  335. package/dist/nvim/schemas/clients.d.ts +40 -0
  336. package/dist/nvim/schemas/clients.d.ts.map +1 -0
  337. package/dist/nvim/schemas/clients.js +12 -0
  338. package/dist/nvim/schemas/clients.js.map +1 -0
  339. package/dist/nvim/schemas/index.d.ts +210 -0
  340. package/dist/nvim/schemas/index.d.ts.map +1 -0
  341. package/dist/nvim/schemas/index.js +94 -0
  342. package/dist/nvim/schemas/index.js.map +1 -0
  343. package/dist/nvim/sidecar/index.d.ts +6 -0
  344. package/dist/nvim/sidecar/index.d.ts.map +1 -0
  345. package/dist/nvim/sidecar/index.js +20 -0
  346. package/dist/nvim/sidecar/index.js.map +1 -0
  347. package/dist/nvim/sidecar/methods.d.ts +45 -0
  348. package/dist/nvim/sidecar/methods.d.ts.map +1 -0
  349. package/dist/nvim/sidecar/methods.js +381 -0
  350. package/dist/nvim/sidecar/methods.js.map +1 -0
  351. package/dist/nvim/sidecar/server.d.ts +12 -0
  352. package/dist/nvim/sidecar/server.d.ts.map +1 -0
  353. package/dist/nvim/sidecar/server.js +95 -0
  354. package/dist/nvim/sidecar/server.js.map +1 -0
  355. package/dist/nvim/sidecar/streams.d.ts +22 -0
  356. package/dist/nvim/sidecar/streams.d.ts.map +1 -0
  357. package/dist/nvim/sidecar/streams.js +63 -0
  358. package/dist/nvim/sidecar/streams.js.map +1 -0
  359. package/dist/schemas/editor-cli.d.ts +10 -0
  360. package/dist/schemas/editor-cli.d.ts.map +1 -0
  361. package/dist/schemas/editor-cli.js +7 -0
  362. package/dist/schemas/editor-cli.js.map +1 -0
  363. package/dist/schemas/editor-surface.d.ts +9 -0
  364. package/dist/schemas/editor-surface.d.ts.map +1 -0
  365. package/dist/schemas/editor-surface.js +5 -0
  366. package/dist/schemas/editor-surface.js.map +1 -0
  367. package/dist/schemas/editor-transaction.schema.d.ts +675 -0
  368. package/dist/schemas/editor-transaction.schema.d.ts.map +1 -0
  369. package/dist/schemas/editor-transaction.schema.js +210 -0
  370. package/dist/schemas/editor-transaction.schema.js.map +1 -0
  371. package/dist/schemas/index.d.ts +3 -0
  372. package/dist/schemas/index.d.ts.map +1 -0
  373. package/dist/schemas/index.js +3 -0
  374. package/dist/schemas/index.js.map +1 -0
  375. package/dist/schemas/nvim-install.d.ts +64 -0
  376. package/dist/schemas/nvim-install.d.ts.map +1 -0
  377. package/dist/schemas/nvim-install.js +26 -0
  378. package/dist/schemas/nvim-install.js.map +1 -0
  379. package/dist/schemas/search-card.d.ts +322 -0
  380. package/dist/schemas/search-card.d.ts.map +1 -0
  381. package/dist/schemas/search-card.js +46 -0
  382. package/dist/schemas/search-card.js.map +1 -0
  383. package/dist/svelte/DOM-TREE.md +168 -0
  384. package/dist/svelte/components/EditorAgentSpotlight.svelte +143 -0
  385. package/dist/svelte/components/EditorAgentSpotlight.svelte.d.ts +10 -0
  386. package/dist/svelte/components/EditorAgentSpotlight.svelte.d.ts.map +1 -0
  387. package/dist/svelte/components/EditorCapabilityRow.svelte +146 -0
  388. package/dist/svelte/components/EditorCapabilityRow.svelte.d.ts +10 -0
  389. package/dist/svelte/components/EditorCapabilityRow.svelte.d.ts.map +1 -0
  390. package/dist/svelte/components/EditorConflictState.svelte +230 -0
  391. package/dist/svelte/components/EditorConflictState.svelte.d.ts +16 -0
  392. package/dist/svelte/components/EditorConflictState.svelte.d.ts.map +1 -0
  393. package/dist/svelte/components/EditorDocumentPane.svelte +176 -0
  394. package/dist/svelte/components/EditorDocumentPane.svelte.d.ts +15 -0
  395. package/dist/svelte/components/EditorDocumentPane.svelte.d.ts.map +1 -0
  396. package/dist/svelte/components/EditorPreviewPane.svelte +323 -0
  397. package/dist/svelte/components/EditorPreviewPane.svelte.d.ts +11 -0
  398. package/dist/svelte/components/EditorPreviewPane.svelte.d.ts.map +1 -0
  399. package/dist/svelte/components/EditorProposalReview.svelte +326 -0
  400. package/dist/svelte/components/EditorProposalReview.svelte.d.ts +10 -0
  401. package/dist/svelte/components/EditorProposalReview.svelte.d.ts.map +1 -0
  402. package/dist/svelte/components/EditorResourceTrail.svelte +150 -0
  403. package/dist/svelte/components/EditorResourceTrail.svelte.d.ts +9 -0
  404. package/dist/svelte/components/EditorResourceTrail.svelte.d.ts.map +1 -0
  405. package/dist/svelte/components/EditorUnsupportedState.svelte +14 -0
  406. package/dist/svelte/components/EditorUnsupportedState.svelte.d.ts +9 -0
  407. package/dist/svelte/components/EditorUnsupportedState.svelte.d.ts.map +1 -0
  408. package/dist/svelte/components/EditorWorkspace.svelte +137 -0
  409. package/dist/svelte/components/EditorWorkspace.svelte.d.ts +11 -0
  410. package/dist/svelte/components/EditorWorkspace.svelte.d.ts.map +1 -0
  411. package/dist/svelte/components/VibesEditor.svelte +612 -0
  412. package/dist/svelte/components/VibesEditor.svelte.d.ts +27 -0
  413. package/dist/svelte/components/VibesEditor.svelte.d.ts.map +1 -0
  414. package/dist/svelte/controller.d.ts +86 -0
  415. package/dist/svelte/controller.d.ts.map +1 -0
  416. package/dist/svelte/controller.js +438 -0
  417. package/dist/svelte/editor-context-actions.d.ts +7 -0
  418. package/dist/svelte/editor-context-actions.d.ts.map +1 -0
  419. package/dist/svelte/editor-context-actions.js +41 -0
  420. package/dist/svelte/editor-exit.d.ts +11 -0
  421. package/dist/svelte/editor-exit.d.ts.map +1 -0
  422. package/dist/svelte/editor-exit.js +11 -0
  423. package/dist/svelte/editor-status.d.ts +19 -0
  424. package/dist/svelte/editor-status.d.ts.map +1 -0
  425. package/dist/svelte/editor-status.js +19 -0
  426. package/dist/svelte/editor-svelte.plugin.d.ts +38 -0
  427. package/dist/svelte/editor-svelte.plugin.d.ts.map +1 -0
  428. package/dist/svelte/editor-svelte.plugin.js +26 -0
  429. package/dist/svelte/editor-svelte.vessel.plugin.d.ts +309 -0
  430. package/dist/svelte/editor-svelte.vessel.plugin.d.ts.map +1 -0
  431. package/dist/svelte/editor-svelte.vessel.plugin.js +130 -0
  432. package/dist/svelte/editor-workspace-state.d.ts +8 -0
  433. package/dist/svelte/editor-workspace-state.d.ts.map +1 -0
  434. package/dist/svelte/editor-workspace-state.js +7 -0
  435. package/dist/svelte/editor-workspace.d.ts +41 -0
  436. package/dist/svelte/editor-workspace.d.ts.map +1 -0
  437. package/dist/svelte/editor-workspace.js +21 -0
  438. package/dist/svelte/index.d.ts +16 -0
  439. package/dist/svelte/index.d.ts.map +1 -0
  440. package/dist/svelte/index.js +15 -0
  441. package/dist/svelte/styles.css +1 -0
  442. package/dist/svelte/surface-reporter.d.ts +13 -0
  443. package/dist/svelte/surface-reporter.d.ts.map +1 -0
  444. package/dist/svelte/surface-reporter.js +30 -0
  445. package/dist/svelte/tool-widgets/WorkspaceSearchToolCard.svelte +276 -0
  446. package/dist/svelte/tool-widgets/WorkspaceSearchToolCard.svelte.d.ts +9 -0
  447. package/dist/svelte/tool-widgets/WorkspaceSearchToolCard.svelte.d.ts.map +1 -0
  448. package/dist/svelte/tool-widgets/index.d.ts +3 -0
  449. package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
  450. package/dist/svelte/tool-widgets/index.js +2 -0
  451. package/dist/svelte/tool-widgets/workspace-search-card.d.ts +127 -0
  452. package/dist/svelte/tool-widgets/workspace-search-card.d.ts.map +1 -0
  453. package/dist/svelte/tool-widgets/workspace-search-card.js +428 -0
  454. package/package.json +320 -4
@@ -0,0 +1,612 @@
1
+ <script lang="ts">
2
+ import { CaughtFailureSchema, settleNow, settle, type CaughtFailure } from '@vibesdotdev/kernel';
3
+ import { tick, untrack } from 'svelte';
4
+ import type { EditorClient, EditorContextRef, EditorTransaction } from '@vibesdotdev/editor';
5
+ import type { WorkspaceDocumentRef } from '@vibesdotdev/workspace-schemas/document';
6
+ import { getRuntimeSvelteContext } from '@vibesdotdev/surface-sveltekit/svelte';
7
+ import type { EditorContextActionClient } from '../editor-context-actions.js';
8
+ import { Button } from '@vibesdotdev/kit/components/ui/button';
9
+ import { Skeleton } from '@vibesdotdev/kit/components/ui/skeleton';
10
+ import {
11
+ createEditorController,
12
+ invokeEditorSurfaceObserver,
13
+ type EditorController,
14
+ type EditorControllerState,
15
+ type EditorSurfaceVariant
16
+ } from '../controller.js';
17
+ import EditorConflictState from './EditorConflictState.svelte';
18
+ import EditorDocumentPane from './EditorDocumentPane.svelte';
19
+ import EditorResourceTrail from './EditorResourceTrail.svelte';
20
+ import EditorUnsupportedState from './EditorUnsupportedState.svelte';
21
+ import EditorAgentSpotlight from './EditorAgentSpotlight.svelte';
22
+ import EditorProposalReview from './EditorProposalReview.svelte';
23
+ import EditorPreviewPane from './EditorPreviewPane.svelte';
24
+ import { surfaceReporterOn } from '../surface-reporter.js';
25
+
26
+ let {
27
+ controller: providedController,
28
+ transaction,
29
+ client,
30
+ context,
31
+ document,
32
+ documentId,
33
+ variant = 'embedded',
34
+ reviewOnly = false,
35
+ narrow = false,
36
+ height,
37
+ ariaLabel,
38
+ class: className = '',
39
+ oncontrollerready,
40
+ onstatechange,
41
+ onoperationerror,
42
+ contextActionClient
43
+ }: {
44
+ controller?: EditorController;
45
+ transaction?: EditorTransaction;
46
+ client?: EditorClient;
47
+ context?: EditorContextRef;
48
+ document?: WorkspaceDocumentRef;
49
+ documentId?: string;
50
+ variant?: EditorSurfaceVariant;
51
+ reviewOnly?: boolean;
52
+ narrow?: boolean;
53
+ height?: string | number;
54
+ ariaLabel?: string;
55
+ class?: string;
56
+ oncontrollerready?: (controller: EditorController) => void;
57
+ onstatechange?: (state: EditorControllerState) => void;
58
+ onoperationerror?: (error: CaughtFailure) => void;
59
+ contextActionClient?: EditorContextActionClient;
60
+ } = $props();
61
+
62
+ // Captured at component init: Svelte context is unavailable after mount.
63
+ const runtimeStore = getRuntimeSvelteContext();
64
+ const surfaceReporter = $derived(surfaceReporterOn(client ? { load: () => Promise.resolve(client.runtime) } : runtimeStore, 'editor.svelte'));
65
+
66
+ const surfaceId = $props.id();
67
+ let activeController = $state<EditorController | undefined>();
68
+ let surfaceState = $state<EditorControllerState | undefined>();
69
+ let openError = $state<string | undefined>();
70
+ let surfaceElement = $state<HTMLElement | null>(null);
71
+ let showProposals = $state<boolean>(true);
72
+ const pendingProposals = $derived(
73
+ surfaceState?.proposals.filter((p) => p.status === 'pending') ?? []
74
+ );
75
+ const surfaceLabel = $derived(
76
+ ariaLabel ?? (surfaceState ? `Vibes Editor — ${surfaceState.base.ref.path}` : 'Vibes Editor')
77
+ );
78
+ // Host layout updates replace spread props and reference objects. Reopen only
79
+ // when the document's source or reference values actually change.
80
+ const controllerSource = $derived(providedController);
81
+ const transactionSource = $derived(transaction);
82
+ const clientSource = $derived(client);
83
+ const documentRequest = $derived(JSON.stringify([
84
+ context?.workspaceSessionId, context?.projectId, context?.developerSessionId,
85
+ context?.codeSessionId, document?.workspaceSessionId, document?.path, documentId
86
+ ]));
87
+
88
+ $effect(() => {
89
+ const providedController = controllerSource;
90
+ const transaction = transactionSource;
91
+ const client = clientSource;
92
+ // Subscribe to scalar request identity, not newly allocated reference props.
93
+ void documentRequest;
94
+ const request = untrack(() => ({ context, document, documentId }));
95
+ const { context: requestedContext, document: requestedDocument, documentId: requestedDocumentId } = request;
96
+ let cancelled = false;
97
+ let surfaceController: EditorController | undefined;
98
+ let ownedTransaction: EditorTransaction | undefined;
99
+ let openAbort: AbortController | undefined;
100
+ openError = undefined;
101
+ activeController = undefined;
102
+
103
+ function accept(next: EditorController) {
104
+ if (cancelled) {
105
+ next.dispose();
106
+ return;
107
+ }
108
+ surfaceController = next;
109
+ activeController = next;
110
+ notifyControllerReady(next);
111
+ }
112
+
113
+ const hasClient = client !== undefined;
114
+ const hasDocument = requestedDocument !== undefined;
115
+ if (hasClient !== hasDocument) {
116
+ openError = 'This editor is missing its file source. Open the file again to continue.';
117
+ return;
118
+ }
119
+ const ownershipForms =
120
+ Number(providedController !== undefined) +
121
+ Number(transaction !== undefined) +
122
+ Number(hasClient && hasDocument);
123
+ if (ownershipForms !== 1) {
124
+ openError = 'This editor has an invalid configuration. Provide one document source.';
125
+ return;
126
+ }
127
+
128
+ if (providedController) {
129
+ if (providedController.state().disposed) {
130
+ openError = 'This editor is closed. Open the file again to continue.';
131
+ return;
132
+ }
133
+ activeController = providedController;
134
+ notifyControllerReady(providedController);
135
+ return () => {
136
+ cancelled = true;
137
+ activeController = undefined;
138
+ };
139
+ }
140
+
141
+ if (transaction) {
142
+ const created = settleNow(() => accept(createEditorController(transaction, { reporter: surfaceReporter })));
143
+ if (!created.ok) {
144
+ openError = 'This file could not be opened for editing.';
145
+ notifyOperationError(created.cause);
146
+ }
147
+ } else if (client && requestedDocument) {
148
+ const resolvedContext = requestedContext ?? { workspaceSessionId: requestedDocument.workspaceSessionId };
149
+ const opening = new AbortController();
150
+ openAbort = opening;
151
+ void settle(() => client.open({
152
+ context: resolvedContext, document: requestedDocument, documentId: requestedDocumentId
153
+ }, opening.signal)).then((opened) => {
154
+ if (!opened.ok) {
155
+ if (!cancelled) {
156
+ openError = 'This file could not be opened for editing.';
157
+ notifyOperationError(opened.cause);
158
+ } else surfaceReporter.error('Editor open ended after cancellation', { cause: opened.cause });
159
+ return;
160
+ }
161
+ if (cancelled) { opened.value.dispose(); return; }
162
+ ownedTransaction = opened.value;
163
+ const created = settleNow(() => accept(createEditorController(opened.value, { reporter: surfaceReporter })));
164
+ if (!created.ok) {
165
+ opened.value.dispose();
166
+ ownedTransaction = undefined;
167
+ openError = 'This file could not be opened for editing.';
168
+ notifyOperationError(created.cause);
169
+ }
170
+ });
171
+ }
172
+
173
+ return () => {
174
+ cancelled = true;
175
+ openAbort?.abort();
176
+ surfaceController?.dispose();
177
+ ownedTransaction?.dispose();
178
+ activeController = undefined;
179
+ };
180
+ });
181
+
182
+ $effect(() => {
183
+ if (!activeController) return;
184
+ if (activeController.state().disposed) return;
185
+ activeController.setVariant(variant);
186
+ activeController.setReviewMode({ reviewOnly, narrow });
187
+ });
188
+
189
+ $effect(() => {
190
+ const current = activeController;
191
+ if (!current) {
192
+ surfaceState = undefined;
193
+ return;
194
+ }
195
+ if (current.state().disposed) {
196
+ surfaceState = current.state();
197
+ return;
198
+ }
199
+ return current.subscribe((next) => {
200
+ surfaceState = next;
201
+ notifyStateChange(next);
202
+ });
203
+ });
204
+
205
+ const publicationAvailable = $derived(
206
+ Boolean(
207
+ surfaceState &&
208
+ !surfaceState.readOnly &&
209
+ surfaceState.dirty &&
210
+ !surfaceState.conflict &&
211
+ surfaceState.phase !== 'publishing' &&
212
+ surfaceState.phase !== 'reloading'
213
+ )
214
+ );
215
+
216
+ function notifyControllerReady(readyController: EditorController) {
217
+ untrack(() =>
218
+ invokeEditorSurfaceObserver(oncontrollerready, readyController, {
219
+ boundary: 'host.controller-ready',
220
+ transactionId: readyController.state().transactionId,
221
+ resourceUri: readyController.state().resourceUri,
222
+ phase: readyController.state().phase
223
+ }, surfaceReporter)
224
+ );
225
+ }
226
+
227
+ function notifyStateChange(next: EditorControllerState) {
228
+ untrack(() =>
229
+ invokeEditorSurfaceObserver(onstatechange, next, {
230
+ boundary: 'host.state-change',
231
+ transactionId: next.transactionId,
232
+ resourceUri: next.resourceUri,
233
+ phase: next.phase
234
+ }, surfaceReporter)
235
+ );
236
+ }
237
+
238
+ function notifyOperationError(error: CaughtFailure) {
239
+ surfaceReporter.error('Editor surface operation failed', { cause: error });
240
+ untrack(() => {
241
+ const current = activeController?.state();
242
+ invokeEditorSurfaceObserver(onoperationerror, error, {
243
+ boundary: 'host.operation-error',
244
+ transactionId: current?.transactionId,
245
+ resourceUri: current?.resourceUri,
246
+ phase: current?.phase
247
+ }, surfaceReporter);
248
+ });
249
+ }
250
+
251
+ async function publish() {
252
+ const controller = activeController;
253
+ if (!controller || !publicationAvailable) return;
254
+ const result = await settle(() => controller.publish());
255
+ if (!result.ok) notifyOperationError(result.cause);
256
+ }
257
+
258
+ async function reload() {
259
+ const controller = activeController;
260
+ if (!controller || !surfaceState?.conflict) return;
261
+ const result = await settle(() => controller.reload());
262
+ if (!result.ok) { notifyOperationError(result.cause); return; }
263
+ await tick();
264
+ focusDocument();
265
+ }
266
+
267
+ function focusDocument() {
268
+ const editorInput =
269
+ surfaceElement?.querySelector<HTMLElement>('.monaco-editor textarea') ??
270
+ surfaceElement?.querySelector<HTMLElement>('[data-editor-document] [role="textbox"]');
271
+ (editorInput ?? surfaceElement)?.focus();
272
+ }
273
+
274
+ function handleKeydown(event: KeyboardEvent) {
275
+ if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 's') {
276
+ event.preventDefault();
277
+ void publish();
278
+ }
279
+ }
280
+
281
+ function localKeyboardShortcuts(node: HTMLElement) {
282
+ node.addEventListener('keydown', handleKeydown);
283
+ return {
284
+ destroy() {
285
+ node.removeEventListener('keydown', handleKeydown);
286
+ }
287
+ };
288
+ }
289
+ </script>
290
+
291
+ <section
292
+ bind:this={surfaceElement}
293
+ id={surfaceId}
294
+ class="vibes-editor {className}"
295
+ class:vibes-editor--embedded={(surfaceState?.variant ?? variant) === 'embedded'}
296
+ class:vibes-editor--focused={(surfaceState?.variant ?? variant) === 'focused'}
297
+ aria-labelledby={`${surfaceId}-label`}
298
+ aria-busy={(!surfaceState && !openError) ||
299
+ surfaceState?.phase === 'publishing' ||
300
+ surfaceState?.phase === 'reloading'}
301
+ tabindex="-1"
302
+ data-editor-transaction={surfaceState?.transactionId}
303
+ data-editor-state={surfaceState?.phase ?? (openError ? 'unavailable' : 'opening')}
304
+ data-editor-variant={surfaceState?.variant ?? variant}
305
+ use:localKeyboardShortcuts
306
+ >
307
+ <h2 id={`${surfaceId}-label`} class="vibes-editor__a11y-label">{surfaceLabel}</h2>
308
+ {#if openError}
309
+ <EditorUnsupportedState title="Editor unavailable" reason={openError} code="open-unavailable" />
310
+ {:else if !surfaceState || !activeController}
311
+ <div class="vibes-editor__loading" aria-label="Opening editor">
312
+ <Skeleton class="h-5 w-2/3" />
313
+ <Skeleton class="h-4 w-full" />
314
+ <Skeleton class="h-64 w-full" />
315
+ </div>
316
+ {:else if surfaceState.disposed}
317
+ <EditorUnsupportedState
318
+ title="Editor closed"
319
+ reason="Open the file again to continue."
320
+ code="transaction-disposed"
321
+ />
322
+ {:else}
323
+ <header class="vibes-editor__header">
324
+ <EditorResourceTrail state={surfaceState} statusId={`${surfaceId}-status`} />
325
+ <div class="vibes-editor__header-actions">
326
+ {#if pendingProposals.length > 0}
327
+ <Button
328
+ type="button"
329
+ variant={showProposals ? 'secondary' : 'outline'}
330
+ size="sm"
331
+ class="vibes-editor__toolbar-btn"
332
+ onclick={() => (showProposals = !showProposals)}
333
+ aria-label={`Toggle proposals review (${pendingProposals.length} pending)`}
334
+ >
335
+ Proposals ({pendingProposals.length})
336
+ </Button>
337
+ {/if}
338
+ <Button
339
+ type="button"
340
+ variant={surfaceState.previewState.open ? 'secondary' : 'ghost'}
341
+ size="sm"
342
+ class="vibes-editor__toolbar-btn"
343
+ onclick={() => activeController?.togglePreview()}
344
+ aria-label="Toggle live preview"
345
+ title="Toggle live preview"
346
+ >
347
+ Preview
348
+ </Button>
349
+ <Button
350
+ id={`${surfaceId}-save`}
351
+ type="button"
352
+ variant={surfaceState.variant === 'focused' ? 'ghost' : 'default'}
353
+ size="sm"
354
+ class={surfaceState.variant === 'focused' ? 'vibes-editor__save--focused' : undefined}
355
+ disabled={!publicationAvailable}
356
+ aria-label={`Save ${surfaceState.base.ref.path}`}
357
+ aria-describedby={`${surfaceId}-status`}
358
+ title="Save (Mod+S)"
359
+ onclick={publish}
360
+ >
361
+ Save
362
+ </Button>
363
+ </div>
364
+ </header>
365
+
366
+ <div class="vibes-editor__notices">
367
+ {#if surfaceState.agentPresences.length > 0}
368
+ <EditorAgentSpotlight
369
+ presences={surfaceState.agentPresences}
370
+ followAgent={surfaceState.followAgent}
371
+ ontogglefollow={(follow) => activeController?.setFollowAgent(follow)}
372
+ />
373
+ {/if}
374
+
375
+ {#if pendingProposals.length > 0 && showProposals}
376
+ <EditorProposalReview
377
+ proposals={surfaceState.proposals}
378
+ onapprove={async (id) => {
379
+ const result = await settle(async () => { await activeController?.approveProposal(id); });
380
+ if (!result.ok) notifyOperationError(result.cause);
381
+ }}
382
+ onreject={(id, reason) => {
383
+ const result = settleNow(() => activeController?.rejectProposal(id, reason));
384
+ if (!result.ok) notifyOperationError(result.cause);
385
+ }}
386
+ />
387
+ {/if}
388
+
389
+ {#if surfaceState.readOnlyReason}
390
+ <EditorUnsupportedState
391
+ title="View only"
392
+ reason={surfaceState.narrow
393
+ ? 'Editing is available in a larger window. You can still review and copy this file.'
394
+ : 'You can review and copy this file, but changes cannot be saved here.'}
395
+ code={surfaceState.narrow ? 'narrow-review' : 'read-only'}
396
+ />
397
+ {/if}
398
+
399
+ {#if surfaceState.conflict}
400
+ <EditorConflictState
401
+ current={surfaceState.conflict}
402
+ draft={surfaceState.draft}
403
+ filename={surfaceState.base.ref.path}
404
+ dirty={surfaceState.dirty}
405
+ focused={surfaceState.variant === 'focused'}
406
+ onreload={reload}
407
+ onstay={focusDocument}
408
+ busy={surfaceState.phase === 'reloading'}
409
+ />
410
+ {/if}
411
+
412
+ {#if surfaceState.error}
413
+ <EditorUnsupportedState
414
+ title={surfaceState.conflict
415
+ ? "Couldn't load the newer version"
416
+ : surfaceState.dirty
417
+ ? "Couldn't save"
418
+ : 'Editing unavailable'}
419
+ reason={surfaceState.conflict || surfaceState.dirty
420
+ ? 'Your changes are still here. Check your connection, then try again.'
421
+ : 'This file is not available right now. Your current view has not been replaced.'}
422
+ code="operation-error"
423
+ />
424
+ {/if}
425
+ </div>
426
+
427
+ <div class="vibes-editor__main" class:vibes-editor__main--split={surfaceState.previewState.open}>
428
+ <div class="vibes-editor__document">
429
+ <EditorDocumentPane
430
+ controller={activeController}
431
+ state={surfaceState}
432
+ {height}
433
+ ariaLabel={`${surfaceLabel} document`}
434
+ {contextActionClient}
435
+ oncontextactionerror={notifyOperationError}
436
+ />
437
+ </div>
438
+ {#if surfaceState.previewState.open}
439
+ <div class="vibes-editor__preview">
440
+ <EditorPreviewPane
441
+ previewState={surfaceState.previewState}
442
+ onmodechange={(mode) => activeController?.togglePreview(true, mode)}
443
+ onurlchange={(url) =>
444
+ activeController?.togglePreview(true, surfaceState?.previewState.mode, url)}
445
+ onclose={() => activeController?.togglePreview(false)}
446
+ />
447
+ </div>
448
+ {/if}
449
+ </div>
450
+ {/if}
451
+ </section>
452
+
453
+ <style>
454
+ .vibes-editor {
455
+ container-name: vibes-editor;
456
+ container-type: inline-size;
457
+ display: grid;
458
+ width: 100%;
459
+ min-width: 0;
460
+ box-sizing: border-box;
461
+ background: var(--background);
462
+ color: var(--foreground);
463
+ }
464
+
465
+ .vibes-editor--embedded {
466
+ gap: 0.75rem;
467
+ padding: 0.75rem;
468
+ border: 1px solid var(--border);
469
+ border-radius: 0.75rem;
470
+ }
471
+
472
+ .vibes-editor--focused {
473
+ grid-template-rows: auto auto minmax(0, 1fr);
474
+ gap: 0;
475
+ height: 100%;
476
+ min-height: 0;
477
+ padding: 0;
478
+ border: 0;
479
+ border-radius: 0;
480
+ }
481
+
482
+ .vibes-editor__a11y-label {
483
+ position: absolute;
484
+ width: 1px;
485
+ height: 1px;
486
+ padding: 0;
487
+ margin: -1px;
488
+ overflow: hidden;
489
+ clip: rect(0, 0, 0, 0);
490
+ white-space: nowrap;
491
+ border: 0;
492
+ }
493
+
494
+ .vibes-editor__header {
495
+ display: flex;
496
+ align-items: center;
497
+ justify-content: space-between;
498
+ flex-wrap: wrap;
499
+ min-width: 0;
500
+ gap: 0.75rem;
501
+ }
502
+
503
+ .vibes-editor__header :global(.resource-trail) {
504
+ min-width: 0;
505
+ flex: 1;
506
+ }
507
+
508
+ .vibes-editor--focused .vibes-editor__header {
509
+ min-height: var(--vibes-workbench-chrome-height, 2rem);
510
+ padding-inline: var(--vibes-workbench-chrome-inset, 0.5rem);
511
+ border-bottom: 1px solid var(--vibes-workbench-hairline, var(--border));
512
+ background: color-mix(in oklab, var(--card) 72%, var(--background));
513
+ }
514
+
515
+ .vibes-editor__save--focused {
516
+ height: 1.75rem;
517
+ flex: none;
518
+ padding-inline: 0.625rem;
519
+ color: var(--muted-foreground);
520
+ font-size: 0.75rem;
521
+ }
522
+
523
+ .vibes-editor__save--focused:not(:disabled) {
524
+ color: var(--foreground);
525
+ }
526
+
527
+ .vibes-editor__loading {
528
+ display: grid;
529
+ gap: 0.65rem;
530
+ }
531
+
532
+ .vibes-editor--focused .vibes-editor__loading {
533
+ padding: 0.75rem;
534
+ }
535
+
536
+ .vibes-editor__notices {
537
+ display: grid;
538
+ gap: 0.5rem;
539
+ }
540
+
541
+ .vibes-editor__notices:empty {
542
+ display: none;
543
+ }
544
+
545
+ .vibes-editor__header-actions {
546
+ display: flex;
547
+ align-items: center;
548
+ gap: 0.375rem;
549
+ flex-shrink: 0;
550
+ min-width: 0;
551
+ }
552
+
553
+ .vibes-editor__toolbar-btn {
554
+ height: 1.75rem;
555
+ padding-inline: 0.5rem;
556
+ font-size: 0.75rem;
557
+ }
558
+
559
+ .vibes-editor__document {
560
+ min-width: 0;
561
+ min-height: 0;
562
+ height: 100%;
563
+ }
564
+
565
+ .vibes-editor__main {
566
+ display: grid;
567
+ grid-template-columns: minmax(0, 1fr);
568
+ min-width: 0;
569
+ min-height: 0;
570
+ height: 100%;
571
+ }
572
+
573
+ .vibes-editor__main--split {
574
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
575
+ }
576
+
577
+ .vibes-editor__preview {
578
+ min-width: 0;
579
+ min-height: 0;
580
+ height: 100%;
581
+ }
582
+
583
+ .vibes-editor--focused .vibes-editor__header {
584
+ grid-row: 1;
585
+ }
586
+
587
+ .vibes-editor--focused .vibes-editor__notices {
588
+ grid-row: 2;
589
+ }
590
+
591
+ .vibes-editor--focused .vibes-editor__main {
592
+ grid-row: 3;
593
+ height: 100%;
594
+ }
595
+
596
+ .vibes-editor--focused :global([data-editor-unsupported]) {
597
+ border-inline: 0;
598
+ border-radius: 0;
599
+ }
600
+
601
+ @container vibes-editor (max-width: 22rem) {
602
+ .vibes-editor--embedded .vibes-editor__header {
603
+ align-items: stretch;
604
+ flex-direction: column;
605
+ }
606
+
607
+ .vibes-editor--embedded .vibes-editor__header :global(button) {
608
+ align-self: stretch;
609
+ width: 100%;
610
+ }
611
+ }
612
+ </style>
@@ -0,0 +1,27 @@
1
+ import { type CaughtFailure } from '@vibesdotdev/kernel';
2
+ import type { EditorClient, EditorContextRef, EditorTransaction } from '@vibesdotdev/editor';
3
+ import type { WorkspaceDocumentRef } from '@vibesdotdev/workspace-schemas/document';
4
+ import type { EditorContextActionClient } from '../editor-context-actions.ts';
5
+ import { type EditorController, type EditorControllerState, type EditorSurfaceVariant } from '../controller.ts';
6
+ type $$ComponentProps = {
7
+ controller?: EditorController;
8
+ transaction?: EditorTransaction;
9
+ client?: EditorClient;
10
+ context?: EditorContextRef;
11
+ document?: WorkspaceDocumentRef;
12
+ documentId?: string;
13
+ variant?: EditorSurfaceVariant;
14
+ reviewOnly?: boolean;
15
+ narrow?: boolean;
16
+ height?: string | number;
17
+ ariaLabel?: string;
18
+ class?: string;
19
+ oncontrollerready?: (controller: EditorController) => void;
20
+ onstatechange?: (state: EditorControllerState) => void;
21
+ onoperationerror?: (error: CaughtFailure) => void;
22
+ contextActionClient?: EditorContextActionClient;
23
+ };
24
+ declare const VibesEditor: import("svelte").Component<$$ComponentProps, {}, "">;
25
+ type VibesEditor = ReturnType<typeof VibesEditor>;
26
+ export default VibesEditor;
27
+ //# sourceMappingURL=VibesEditor.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VibesEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/VibesEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0C,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEjG,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAG9E,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,MAAM,kBAAkB,CAAC;AAU1B,KAAK,gBAAgB,GAAI;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACvD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,mBAAmB,CAAC,EAAE,yBAAyB,CAAC;CAChD,CAAC;AAkWH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}