@vibesdotdev/applets 0.0.0-stage → 1.0.0-rc.3

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 (421) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +43 -2
  3. package/dist/applet-gate.d.ts +47 -0
  4. package/dist/applet-gate.d.ts.map +1 -0
  5. package/dist/applet-gate.js +167 -0
  6. package/dist/applet-gate.js.map +1 -0
  7. package/dist/applet-root-surface.d.ts +135 -0
  8. package/dist/applet-root-surface.d.ts.map +1 -0
  9. package/dist/applet-root-surface.js +222 -0
  10. package/dist/applet-root-surface.js.map +1 -0
  11. package/dist/applet-value-bound.d.ts +24 -0
  12. package/dist/applet-value-bound.d.ts.map +1 -0
  13. package/dist/applet-value-bound.js +46 -0
  14. package/dist/applet-value-bound.js.map +1 -0
  15. package/dist/applets.cloud.plugin.d.ts +4 -0
  16. package/dist/applets.cloud.plugin.d.ts.map +1 -0
  17. package/dist/applets.cloud.plugin.js +11 -0
  18. package/dist/applets.cloud.plugin.js.map +1 -0
  19. package/dist/applets.consumer.plugin.d.ts +4 -0
  20. package/dist/applets.consumer.plugin.d.ts.map +1 -0
  21. package/dist/applets.consumer.plugin.js +11 -0
  22. package/dist/applets.consumer.plugin.js.map +1 -0
  23. package/dist/applets.plugin.d.ts +3 -0
  24. package/dist/applets.plugin.d.ts.map +1 -0
  25. package/dist/applets.plugin.js +30 -0
  26. package/dist/applets.plugin.js.map +1 -0
  27. package/dist/authorization.d.ts +87 -0
  28. package/dist/authorization.d.ts.map +1 -0
  29. package/dist/authorization.js +189 -0
  30. package/dist/authorization.js.map +1 -0
  31. package/dist/browser-runtime.d.ts +34 -0
  32. package/dist/browser-runtime.d.ts.map +1 -0
  33. package/dist/browser-runtime.js +5 -0
  34. package/dist/browser-runtime.js.map +1 -0
  35. package/dist/build-definition.d.ts +34 -0
  36. package/dist/build-definition.d.ts.map +1 -0
  37. package/dist/build-definition.js +44 -0
  38. package/dist/build-definition.js.map +1 -0
  39. package/dist/capabilities/capability.kind.d.ts +44 -0
  40. package/dist/capabilities/capability.kind.d.ts.map +1 -0
  41. package/dist/capabilities/capability.kind.js +17 -0
  42. package/dist/capabilities/capability.kind.js.map +1 -0
  43. package/dist/capabilities/runtime-dispatch.d.ts +9 -0
  44. package/dist/capabilities/runtime-dispatch.d.ts.map +1 -0
  45. package/dist/capabilities/runtime-dispatch.js +62 -0
  46. package/dist/capabilities/runtime-dispatch.js.map +1 -0
  47. package/dist/cli/applet-group.descriptor.d.ts +11 -0
  48. package/dist/cli/applet-group.descriptor.d.ts.map +1 -0
  49. package/dist/cli/applet-group.descriptor.js +19 -0
  50. package/dist/cli/applet-group.descriptor.js.map +1 -0
  51. package/dist/cli/applet-local-store.storage.descriptor.d.ts +66 -0
  52. package/dist/cli/applet-local-store.storage.descriptor.d.ts.map +1 -0
  53. package/dist/cli/applet-local-store.storage.descriptor.js +39 -0
  54. package/dist/cli/applet-local-store.storage.descriptor.js.map +1 -0
  55. package/dist/cli/applet-serve.process.descriptor.d.ts +37 -0
  56. package/dist/cli/applet-serve.process.descriptor.d.ts.map +1 -0
  57. package/dist/cli/applet-serve.process.descriptor.js +41 -0
  58. package/dist/cli/applet-serve.process.descriptor.js.map +1 -0
  59. package/dist/cli/commands/build.command.descriptor.d.ts +40 -0
  60. package/dist/cli/commands/build.command.descriptor.d.ts.map +1 -0
  61. package/dist/cli/commands/build.command.descriptor.js +52 -0
  62. package/dist/cli/commands/build.command.descriptor.js.map +1 -0
  63. package/dist/cli/commands/build.command.impl.d.ts +8 -0
  64. package/dist/cli/commands/build.command.impl.d.ts.map +1 -0
  65. package/dist/cli/commands/build.command.impl.js +116 -0
  66. package/dist/cli/commands/build.command.impl.js.map +1 -0
  67. package/dist/cli/commands/init.command.descriptor.d.ts +29 -0
  68. package/dist/cli/commands/init.command.descriptor.d.ts.map +1 -0
  69. package/dist/cli/commands/init.command.descriptor.js +23 -0
  70. package/dist/cli/commands/init.command.descriptor.js.map +1 -0
  71. package/dist/cli/commands/init.command.impl.d.ts +7 -0
  72. package/dist/cli/commands/init.command.impl.d.ts.map +1 -0
  73. package/dist/cli/commands/init.command.impl.js +64 -0
  74. package/dist/cli/commands/init.command.impl.js.map +1 -0
  75. package/dist/cli/commands/list.command.descriptor.d.ts +26 -0
  76. package/dist/cli/commands/list.command.descriptor.d.ts.map +1 -0
  77. package/dist/cli/commands/list.command.descriptor.js +22 -0
  78. package/dist/cli/commands/list.command.descriptor.js.map +1 -0
  79. package/dist/cli/commands/list.command.impl.d.ts +13 -0
  80. package/dist/cli/commands/list.command.impl.d.ts.map +1 -0
  81. package/dist/cli/commands/list.command.impl.js +47 -0
  82. package/dist/cli/commands/list.command.impl.js.map +1 -0
  83. package/dist/cli/commands/serve-stylesheet.d.ts +11 -0
  84. package/dist/cli/commands/serve-stylesheet.d.ts.map +1 -0
  85. package/dist/cli/commands/serve-stylesheet.js +50 -0
  86. package/dist/cli/commands/serve-stylesheet.js.map +1 -0
  87. package/dist/cli/commands/serve-surface.d.ts +36 -0
  88. package/dist/cli/commands/serve-surface.d.ts.map +1 -0
  89. package/dist/cli/commands/serve-surface.js +410 -0
  90. package/dist/cli/commands/serve-surface.js.map +1 -0
  91. package/dist/cli/commands/serve.command.descriptor.d.ts +42 -0
  92. package/dist/cli/commands/serve.command.descriptor.d.ts.map +1 -0
  93. package/dist/cli/commands/serve.command.descriptor.js +46 -0
  94. package/dist/cli/commands/serve.command.descriptor.js.map +1 -0
  95. package/dist/cli/commands/serve.command.impl.d.ts +110 -0
  96. package/dist/cli/commands/serve.command.impl.d.ts.map +1 -0
  97. package/dist/cli/commands/serve.command.impl.js +1105 -0
  98. package/dist/cli/commands/serve.command.impl.js.map +1 -0
  99. package/dist/cli/commands/serve.schemas.d.ts +127 -0
  100. package/dist/cli/commands/serve.schemas.d.ts.map +1 -0
  101. package/dist/cli/commands/serve.schemas.js +85 -0
  102. package/dist/cli/commands/serve.schemas.js.map +1 -0
  103. package/dist/cli/commands/served-applet-browser.d.ts +12 -0
  104. package/dist/cli/commands/served-applet-browser.d.ts.map +1 -0
  105. package/dist/cli/commands/served-applet-browser.js +48 -0
  106. package/dist/cli/commands/served-applet-browser.js.map +1 -0
  107. package/dist/cli/commands/served-applet-connection.d.ts +15 -0
  108. package/dist/cli/commands/served-applet-connection.d.ts.map +1 -0
  109. package/dist/cli/commands/served-applet-connection.js +25 -0
  110. package/dist/cli/commands/served-applet-connection.js.map +1 -0
  111. package/dist/cli/commands/served-applet-rpc.d.ts +16 -0
  112. package/dist/cli/commands/served-applet-rpc.d.ts.map +1 -0
  113. package/dist/cli/commands/served-applet-rpc.js +108 -0
  114. package/dist/cli/commands/served-applet-rpc.js.map +1 -0
  115. package/dist/cli/commands/served-applet-surface.d.ts +14 -0
  116. package/dist/cli/commands/served-applet-surface.d.ts.map +1 -0
  117. package/dist/cli/commands/served-applet-surface.js +99 -0
  118. package/dist/cli/commands/served-applet-surface.js.map +1 -0
  119. package/dist/cli/commands/templates.command.descriptor.d.ts +22 -0
  120. package/dist/cli/commands/templates.command.descriptor.d.ts.map +1 -0
  121. package/dist/cli/commands/templates.command.descriptor.js +21 -0
  122. package/dist/cli/commands/templates.command.descriptor.js.map +1 -0
  123. package/dist/cli/commands/templates.command.impl.d.ts +35 -0
  124. package/dist/cli/commands/templates.command.impl.d.ts.map +1 -0
  125. package/dist/cli/commands/templates.command.impl.js +59 -0
  126. package/dist/cli/commands/templates.command.impl.js.map +1 -0
  127. package/dist/cli/index.d.ts +7 -0
  128. package/dist/cli/index.d.ts.map +1 -0
  129. package/dist/cli/index.js +7 -0
  130. package/dist/cli/index.js.map +1 -0
  131. package/dist/cli/local-serve.authz-policy.descriptor.d.ts +22 -0
  132. package/dist/cli/local-serve.authz-policy.descriptor.d.ts.map +1 -0
  133. package/dist/cli/local-serve.authz-policy.descriptor.js +13 -0
  134. package/dist/cli/local-serve.authz-policy.descriptor.js.map +1 -0
  135. package/dist/cli/plugin.d.ts +19 -0
  136. package/dist/cli/plugin.d.ts.map +1 -0
  137. package/dist/cli/plugin.js +57 -0
  138. package/dist/cli/plugin.js.map +1 -0
  139. package/dist/cli/project-files.d.ts +48 -0
  140. package/dist/cli/project-files.d.ts.map +1 -0
  141. package/dist/cli/project-files.js +130 -0
  142. package/dist/cli/project-files.js.map +1 -0
  143. package/dist/client/contract.d.ts +113 -0
  144. package/dist/client/contract.d.ts.map +1 -0
  145. package/dist/client/contract.js +17 -0
  146. package/dist/client/contract.js.map +1 -0
  147. package/dist/client/index.d.ts +3 -0
  148. package/dist/client/index.d.ts.map +1 -0
  149. package/dist/client/index.js +3 -0
  150. package/dist/client/index.js.map +1 -0
  151. package/dist/client/repository.context.d.ts +113 -0
  152. package/dist/client/repository.context.d.ts.map +1 -0
  153. package/dist/client/repository.context.js +8 -0
  154. package/dist/client/repository.context.js.map +1 -0
  155. package/dist/client/runtime-client.d.ts +22 -0
  156. package/dist/client/runtime-client.d.ts.map +1 -0
  157. package/dist/client/runtime-client.js +200 -0
  158. package/dist/client/runtime-client.js.map +1 -0
  159. package/dist/companion-path.d.ts +25 -0
  160. package/dist/companion-path.d.ts.map +1 -0
  161. package/dist/companion-path.js +90 -0
  162. package/dist/companion-path.js.map +1 -0
  163. package/dist/component-ref.d.ts +12 -0
  164. package/dist/component-ref.d.ts.map +1 -0
  165. package/dist/component-ref.js +45 -0
  166. package/dist/component-ref.js.map +1 -0
  167. package/dist/composition-plan.d.ts +92 -0
  168. package/dist/composition-plan.d.ts.map +1 -0
  169. package/dist/composition-plan.js +44 -0
  170. package/dist/composition-plan.js.map +1 -0
  171. package/dist/composition.d.ts +97 -0
  172. package/dist/composition.d.ts.map +1 -0
  173. package/dist/composition.js +99 -0
  174. package/dist/composition.js.map +1 -0
  175. package/dist/config/applets.config.descriptor.d.ts +55 -0
  176. package/dist/config/applets.config.descriptor.d.ts.map +1 -0
  177. package/dist/config/applets.config.descriptor.js +37 -0
  178. package/dist/config/applets.config.descriptor.js.map +1 -0
  179. package/dist/config/load.d.ts +4 -0
  180. package/dist/config/load.d.ts.map +1 -0
  181. package/dist/config/load.js +12 -0
  182. package/dist/config/load.js.map +1 -0
  183. package/dist/content-path.d.ts +62 -0
  184. package/dist/content-path.d.ts.map +1 -0
  185. package/dist/content-path.js +121 -0
  186. package/dist/content-path.js.map +1 -0
  187. package/dist/contribution-registry.d.ts +270 -0
  188. package/dist/contribution-registry.d.ts.map +1 -0
  189. package/dist/contribution-registry.js +488 -0
  190. package/dist/contribution-registry.js.map +1 -0
  191. package/dist/docs/applets.docs.descriptor.d.ts +4 -0
  192. package/dist/docs/applets.docs.descriptor.d.ts.map +1 -0
  193. package/dist/docs/applets.docs.descriptor.js +74 -0
  194. package/dist/docs/applets.docs.descriptor.js.map +1 -0
  195. package/dist/host/local-host.contract.d.ts +7 -0
  196. package/dist/host/local-host.contract.d.ts.map +1 -0
  197. package/dist/host/local-host.contract.js +2 -0
  198. package/dist/host/local-host.contract.js.map +1 -0
  199. package/dist/host/local-host.impl.d.ts +9 -0
  200. package/dist/host/local-host.impl.d.ts.map +1 -0
  201. package/dist/host/local-host.impl.js +41 -0
  202. package/dist/host/local-host.impl.js.map +1 -0
  203. package/dist/host/local-host.plugin.d.ts +3 -0
  204. package/dist/host/local-host.plugin.d.ts.map +1 -0
  205. package/dist/host/local-host.plugin.js +16 -0
  206. package/dist/host/local-host.plugin.js.map +1 -0
  207. package/dist/index.d.ts +28 -0
  208. package/dist/index.d.ts.map +1 -0
  209. package/dist/index.js +27 -0
  210. package/dist/index.js.map +1 -0
  211. package/dist/local-project.d.ts +106 -0
  212. package/dist/local-project.d.ts.map +1 -0
  213. package/dist/local-project.js +277 -0
  214. package/dist/local-project.js.map +1 -0
  215. package/dist/manifest-hash.d.ts +12 -0
  216. package/dist/manifest-hash.d.ts.map +1 -0
  217. package/dist/manifest-hash.js +76 -0
  218. package/dist/manifest-hash.js.map +1 -0
  219. package/dist/presentation.d.ts +43 -0
  220. package/dist/presentation.d.ts.map +1 -0
  221. package/dist/presentation.js +36 -0
  222. package/dist/presentation.js.map +1 -0
  223. package/dist/retention.d.ts +34 -0
  224. package/dist/retention.d.ts.map +1 -0
  225. package/dist/retention.js +51 -0
  226. package/dist/retention.js.map +1 -0
  227. package/dist/schemas/applet-messages.d.ts +97 -0
  228. package/dist/schemas/applet-messages.d.ts.map +1 -0
  229. package/dist/schemas/applet-messages.js +51 -0
  230. package/dist/schemas/applet-messages.js.map +1 -0
  231. package/dist/schemas/capabilities.d.ts +37 -0
  232. package/dist/schemas/capabilities.d.ts.map +1 -0
  233. package/dist/schemas/capabilities.js +28 -0
  234. package/dist/schemas/capabilities.js.map +1 -0
  235. package/dist/schemas/component-release-ref.d.ts +13 -0
  236. package/dist/schemas/component-release-ref.d.ts.map +1 -0
  237. package/dist/schemas/component-release-ref.js +21 -0
  238. package/dist/schemas/component-release-ref.js.map +1 -0
  239. package/dist/schemas/contributes.d.ts +306 -0
  240. package/dist/schemas/contributes.d.ts.map +1 -0
  241. package/dist/schemas/contributes.js +184 -0
  242. package/dist/schemas/contributes.js.map +1 -0
  243. package/dist/schemas/definition.d.ts +301 -0
  244. package/dist/schemas/definition.d.ts.map +1 -0
  245. package/dist/schemas/definition.js +457 -0
  246. package/dist/schemas/definition.js.map +1 -0
  247. package/dist/schemas/dispatch.d.ts +52 -0
  248. package/dist/schemas/dispatch.d.ts.map +1 -0
  249. package/dist/schemas/dispatch.js +32 -0
  250. package/dist/schemas/dispatch.js.map +1 -0
  251. package/dist/schemas/grants.d.ts +56 -0
  252. package/dist/schemas/grants.d.ts.map +1 -0
  253. package/dist/schemas/grants.js +64 -0
  254. package/dist/schemas/grants.js.map +1 -0
  255. package/dist/schemas/index.d.ts +16 -0
  256. package/dist/schemas/index.d.ts.map +1 -0
  257. package/dist/schemas/index.js +16 -0
  258. package/dist/schemas/index.js.map +1 -0
  259. package/dist/schemas/instance.d.ts +230 -0
  260. package/dist/schemas/instance.d.ts.map +1 -0
  261. package/dist/schemas/instance.js +44 -0
  262. package/dist/schemas/instance.js.map +1 -0
  263. package/dist/schemas/lineage.d.ts +60 -0
  264. package/dist/schemas/lineage.d.ts.map +1 -0
  265. package/dist/schemas/lineage.js +52 -0
  266. package/dist/schemas/lineage.js.map +1 -0
  267. package/dist/schemas/observation.d.ts +70 -0
  268. package/dist/schemas/observation.d.ts.map +1 -0
  269. package/dist/schemas/observation.js +49 -0
  270. package/dist/schemas/observation.js.map +1 -0
  271. package/dist/schemas/patterns.d.ts +24 -0
  272. package/dist/schemas/patterns.d.ts.map +1 -0
  273. package/dist/schemas/patterns.js +24 -0
  274. package/dist/schemas/patterns.js.map +1 -0
  275. package/dist/schemas/publishing.d.ts +27 -0
  276. package/dist/schemas/publishing.d.ts.map +1 -0
  277. package/dist/schemas/publishing.js +20 -0
  278. package/dist/schemas/publishing.js.map +1 -0
  279. package/dist/schemas/run.d.ts +35 -0
  280. package/dist/schemas/run.d.ts.map +1 -0
  281. package/dist/schemas/run.js +26 -0
  282. package/dist/schemas/run.js.map +1 -0
  283. package/dist/schemas/share-link.d.ts +61 -0
  284. package/dist/schemas/share-link.d.ts.map +1 -0
  285. package/dist/schemas/share-link.js +68 -0
  286. package/dist/schemas/share-link.js.map +1 -0
  287. package/dist/schemas/state-events.d.ts +66 -0
  288. package/dist/schemas/state-events.d.ts.map +1 -0
  289. package/dist/schemas/state-events.js +66 -0
  290. package/dist/schemas/state-events.js.map +1 -0
  291. package/dist/schemas/subscription.d.ts +47 -0
  292. package/dist/schemas/subscription.d.ts.map +1 -0
  293. package/dist/schemas/subscription.js +46 -0
  294. package/dist/schemas/subscription.js.map +1 -0
  295. package/dist/schemas/template-revision.d.ts +53 -0
  296. package/dist/schemas/template-revision.d.ts.map +1 -0
  297. package/dist/schemas/template-revision.js +30 -0
  298. package/dist/schemas/template-revision.js.map +1 -0
  299. package/dist/selection.d.ts +22 -0
  300. package/dist/selection.d.ts.map +1 -0
  301. package/dist/selection.js +21 -0
  302. package/dist/selection.js.map +1 -0
  303. package/dist/storage/index.d.ts +27 -0
  304. package/dist/storage/index.d.ts.map +1 -0
  305. package/dist/storage/index.js +27 -0
  306. package/dist/storage/index.js.map +1 -0
  307. package/dist/storage/records.d.ts +28 -0
  308. package/dist/storage/records.d.ts.map +1 -0
  309. package/dist/storage/records.js +272 -0
  310. package/dist/storage/records.js.map +1 -0
  311. package/dist/svelte/applets-svelte.plugin.d.ts +38 -0
  312. package/dist/svelte/applets-svelte.plugin.d.ts.map +1 -0
  313. package/dist/svelte/applets-svelte.plugin.js +25 -0
  314. package/dist/svelte/components/AppletCanvas.svelte +488 -0
  315. package/dist/svelte/components/AppletCanvas.svelte.d.ts +53 -0
  316. package/dist/svelte/components/AppletCanvas.svelte.d.ts.map +1 -0
  317. package/dist/svelte/components/AppletCatalog.svelte +42 -0
  318. package/dist/svelte/components/AppletCatalog.svelte.d.ts +8 -0
  319. package/dist/svelte/components/AppletCatalog.svelte.d.ts.map +1 -0
  320. package/dist/svelte/components/AppletComposition.svelte +128 -0
  321. package/dist/svelte/components/AppletComposition.svelte.d.ts +30 -0
  322. package/dist/svelte/components/AppletComposition.svelte.d.ts.map +1 -0
  323. package/dist/svelte/components/AppletConsent.svelte +143 -0
  324. package/dist/svelte/components/AppletConsent.svelte.d.ts +12 -0
  325. package/dist/svelte/components/AppletConsent.svelte.d.ts.map +1 -0
  326. package/dist/svelte/components/LocalAppletView.svelte +102 -0
  327. package/dist/svelte/components/LocalAppletView.svelte.d.ts +13 -0
  328. package/dist/svelte/components/LocalAppletView.svelte.d.ts.map +1 -0
  329. package/dist/svelte/components/RunnableTracker.svelte +51 -0
  330. package/dist/svelte/components/RunnableTracker.svelte.d.ts +18 -0
  331. package/dist/svelte/components/RunnableTracker.svelte.d.ts.map +1 -0
  332. package/dist/svelte/index.d.ts +11 -0
  333. package/dist/svelte/index.d.ts.map +1 -0
  334. package/dist/svelte/index.js +10 -0
  335. package/dist/svelte/lib/canvas-lifecycle.d.ts +68 -0
  336. package/dist/svelte/lib/canvas-lifecycle.d.ts.map +1 -0
  337. package/dist/svelte/lib/canvas-lifecycle.js +99 -0
  338. package/dist/svelte/lib/capability-review.d.ts +64 -0
  339. package/dist/svelte/lib/capability-review.d.ts.map +1 -0
  340. package/dist/svelte/lib/capability-review.js +77 -0
  341. package/dist/svelte/lib/message-protocol.d.ts +184 -0
  342. package/dist/svelte/lib/message-protocol.d.ts.map +1 -0
  343. package/dist/svelte/lib/message-protocol.js +251 -0
  344. package/dist/svelte/runnable-source.d.ts +5 -0
  345. package/dist/svelte/runnable-source.d.ts.map +1 -0
  346. package/dist/svelte/runnable-source.js +92 -0
  347. package/dist/svelte/serve-index.svelte +39 -0
  348. package/dist/svelte/serve-index.svelte.d.ts +10 -0
  349. package/dist/svelte/serve-index.svelte.d.ts.map +1 -0
  350. package/dist/svelte/state.svelte.d.ts +26 -0
  351. package/dist/svelte/state.svelte.d.ts.map +1 -0
  352. package/dist/svelte/state.svelte.js +74 -0
  353. package/dist/svelte/styles.css +4 -0
  354. package/dist/svelte/tool-widgets/AppletToolCard.svelte +148 -0
  355. package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts +5 -0
  356. package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts.map +1 -0
  357. package/dist/svelte/tool-widgets/applet-tool-card.d.ts +41 -0
  358. package/dist/svelte/tool-widgets/applet-tool-card.d.ts.map +1 -0
  359. package/dist/svelte/tool-widgets/applet-tool-card.js +167 -0
  360. package/dist/svelte/tool-widgets/index.d.ts +3 -0
  361. package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
  362. package/dist/svelte/tool-widgets/index.js +2 -0
  363. package/dist/templates/index.d.ts +2 -0
  364. package/dist/templates/index.d.ts.map +1 -0
  365. package/dist/templates/index.js +2 -0
  366. package/dist/templates/index.js.map +1 -0
  367. package/dist/templates/template.kind.d.ts +39 -0
  368. package/dist/templates/template.kind.d.ts.map +1 -0
  369. package/dist/templates/template.kind.js +29 -0
  370. package/dist/templates/template.kind.js.map +1 -0
  371. package/dist/tools/applet.descriptor.d.ts +196 -0
  372. package/dist/tools/applet.descriptor.d.ts.map +1 -0
  373. package/dist/tools/applet.descriptor.js +81 -0
  374. package/dist/tools/applet.descriptor.js.map +1 -0
  375. package/dist/tools/applet.impl.d.ts +32 -0
  376. package/dist/tools/applet.impl.d.ts.map +1 -0
  377. package/dist/tools/applet.impl.js +485 -0
  378. package/dist/tools/applet.impl.js.map +1 -0
  379. package/dist/tools/applet.schemas.d.ts +198 -0
  380. package/dist/tools/applet.schemas.d.ts.map +1 -0
  381. package/dist/tools/applet.schemas.js +136 -0
  382. package/dist/tools/applet.schemas.js.map +1 -0
  383. package/dist/tools/index.d.ts +3 -0
  384. package/dist/tools/index.d.ts.map +1 -0
  385. package/dist/tools/index.js +3 -0
  386. package/dist/tools/index.js.map +1 -0
  387. package/dist/upgrade.d.ts +45 -0
  388. package/dist/upgrade.d.ts.map +1 -0
  389. package/dist/upgrade.js +179 -0
  390. package/dist/upgrade.js.map +1 -0
  391. package/dist/vite.d.ts +26 -0
  392. package/dist/vite.d.ts.map +1 -0
  393. package/dist/vite.js +28 -0
  394. package/dist/vite.js.map +1 -0
  395. package/package.json +264 -4
  396. package/templates/applet-tour/Applet.svelte +95 -0
  397. package/templates/applet-tour/applet.descriptor.ts +15 -0
  398. package/templates/assembly-field/Applet.svelte +242 -0
  399. package/templates/assembly-field/applet.descriptor.ts +7 -0
  400. package/templates/assembly-field/applet.storage.json +47 -0
  401. package/templates/assembly-field/schemas/settings.ts +14 -0
  402. package/templates/assembly-field/settings.ts +32 -0
  403. package/templates/benchmark-comparison/Applet.svelte +17 -0
  404. package/templates/benchmark-comparison/applet.descriptor.ts +7 -0
  405. package/templates/file-diff-viewer/Applet.svelte +91 -0
  406. package/templates/file-diff-viewer/applet.descriptor.ts +14 -0
  407. package/templates/file-diff-viewer/diff.ts +63 -0
  408. package/templates/file-viewer/Applet.svelte +80 -0
  409. package/templates/file-viewer/applet.descriptor.ts +14 -0
  410. package/templates/fleet-runs/Applet.svelte +14 -0
  411. package/templates/fleet-runs/applet.descriptor.ts +7 -0
  412. package/templates/graph-runbook-tracker/Applet.svelte +13 -0
  413. package/templates/graph-runbook-tracker/applet.descriptor.ts +7 -0
  414. package/templates/runbook-tracker/Applet.svelte +12 -0
  415. package/templates/runbook-tracker/applet.descriptor.ts +7 -0
  416. package/templates/runnable-tracker/Applet.svelte +16 -0
  417. package/templates/runnable-tracker/applet.descriptor.ts +10 -0
  418. package/templates/storage-viewer/Applet.svelte +90 -0
  419. package/templates/storage-viewer/applet.descriptor.ts +15 -0
  420. package/templates/workspace-graph-runbook-tracker/Applet.svelte +13 -0
  421. package/templates/workspace-graph-runbook-tracker/applet.descriptor.ts +7 -0
@@ -0,0 +1,488 @@
1
+ <script lang="ts">
2
+ import { listenMessagePort, type MessagePortListener } from '@vibesdotdev/kernel-rpc/messageport';
3
+ import type { RpcLifecycle } from '@vibesdotdev/kernel-rpc';
4
+ import type { InvokePipeline } from '@vibesdotdev/kernel';
5
+ import { onMount } from 'svelte';
6
+ import { APPLET_ROOT_SURFACE_METHODS, type ComponentReleaseRef } from '@vibesdotdev/applets';
7
+ import { createCanvasState } from '../state.svelte.js';
8
+ import {
9
+ createCorrelatedRunnerUrl,
10
+ createDisposeMessage,
11
+ createMountMessage,
12
+ createRunnerConnectionMessage,
13
+ isCapabilityRequest,
14
+ isDisposedAck,
15
+ isHeartbeat,
16
+ isMountedAck,
17
+ isRunnerBootMessage,
18
+ isRunnerError,
19
+ isStateMutation,
20
+ validateHandshake
21
+ } from '../lib/message-protocol.js';
22
+ import { verifyBundleBytes, verifyBundleHash } from '../lib/capability-review.js';
23
+ import type { JsonValue } from '@vibesdotdev/shared/types';
24
+ import AppletConsent from './AppletConsent.svelte';
25
+
26
+ interface Props {
27
+ instanceId: string;
28
+ release: ComponentReleaseRef;
29
+ capabilities: string[];
30
+ capabilityReasons?: Record<string, string>;
31
+ /** URL of the separate-site runner. Not set until consent. */
32
+ runnerUrl?: string;
33
+ /** Fetch the bundle bytes after consent. Returns the hash + bytes. */
34
+ fetchBundle?: () => Promise<{ hash: string; bytes: ArrayBuffer }>;
35
+ onApprove?: () => void | Promise<void>;
36
+ onReject?: () => void | Promise<void>;
37
+ onMutate?: (input: { scope: 'shared' | 'viewer'; operationId: string; expectedRevision: number; eventType: string; payload: JsonValue }) => Promise<void>;
38
+ /**
39
+ * Store ids this release DECLARED, from its manifest. The frame refuses a
40
+ * storage handle for anything else, so an undeclared id never reaches the
41
+ * host.
42
+ */
43
+ declaredStorageIds?: string[];
44
+ /**
45
+ * What this applet may reach, or nothing.
46
+ *
47
+ * `root` is the ONE object the applet can invoke; `pipeline` is the L1
48
+ * chain the applet gate hangs on — the same chain a local call runs, which
49
+ * is the whole point of making this boundary a transport rather than a
50
+ * protocol.
51
+ *
52
+ * Omitting it is a real configuration: a render-only applet. The mount
53
+ * message then carries `rootRef: null`, and the frame refuses runtime calls
54
+ * with a reason instead of posting invokes nobody answers.
55
+ */
56
+ runtime?: { root: object; pipeline: InvokePipeline; lifecycle: RpcLifecycle };
57
+ }
58
+
59
+ let {
60
+ instanceId,
61
+ release,
62
+ capabilities,
63
+ capabilityReasons = {},
64
+ runnerUrl = '',
65
+ fetchBundle,
66
+ onApprove,
67
+ onReject,
68
+ onMutate,
69
+ declaredStorageIds = [],
70
+ runtime
71
+ }: Props = $props();
72
+
73
+ const canvas = createCanvasState();
74
+
75
+ let frame = $state<HTMLIFrameElement | null>(null);
76
+ let port = $state<MessagePort | null>(null);
77
+ let frameSrc = $state('');
78
+ let launchToken = '';
79
+ let mountNonce = '';
80
+ let verifiedBundle: ArrayBuffer | null = null;
81
+ let connectionSent = false;
82
+ /** The host's half of the RPC lane, when this host exposes a runtime. */
83
+ let rpcListener: MessagePortListener | null = null;
84
+ let mountSent = false;
85
+ let approvalInFlight = false;
86
+ let heartbeatTimer: ReturnType<typeof setInterval> | null = null;
87
+ let disposed = $state(false);
88
+ /** Resolved by the disposed ack so `dispose()` can stop waiting. */
89
+ let resolveDisposedAck: (() => void) | null = null;
90
+ /** Slightly longer than the runner's own 2s `__unmount` bound. */
91
+ const DISPOSE_ACK_TIMEOUT_MS = 2_500;
92
+
93
+ // Heartbeat timeout — if no heartbeat in 5s, mark unresponsive
94
+ const HEARTBEAT_TIMEOUT_MS = 5000;
95
+ let lastHeartbeat = 0;
96
+
97
+ function startHeartbeatWatch() {
98
+ lastHeartbeat = Date.now();
99
+ if (heartbeatTimer) clearInterval(heartbeatTimer);
100
+ heartbeatTimer = setInterval(() => {
101
+ if (Date.now() - lastHeartbeat > HEARTBEAT_TIMEOUT_MS) {
102
+ canvas.transitionToUnresponsive();
103
+ stopHeartbeat();
104
+ }
105
+ }, 1000);
106
+ }
107
+
108
+ function stopHeartbeat() {
109
+ if (heartbeatTimer) {
110
+ clearInterval(heartbeatTimer);
111
+ heartbeatTimer = null;
112
+ }
113
+ }
114
+
115
+ async function handleApprove() {
116
+ if (approvalInFlight) return;
117
+ approvalInFlight = true;
118
+ canvas.transitionToApproved();
119
+ if (!canvas.canFetchBundle) {
120
+ approvalInFlight = false;
121
+ return;
122
+ }
123
+
124
+ try {
125
+ await onApprove?.();
126
+ if (!fetchBundle) throw new Error('Applet bundle loader is unavailable.');
127
+ if (!runnerUrl) throw new Error('Applet runner is unavailable.');
128
+
129
+ // Bundle bytes do not exist in the DOM or runner before this consented
130
+ // fetch. The host hashes the actual bytes instead of trusting an ETag or
131
+ // a caller-projected digest.
132
+ const { hash, bytes } = await fetchBundle();
133
+ if (!verifyBundleHash(hash, release.bundleHash)) {
134
+ throw new Error('Bundle registry hash mismatch.');
135
+ }
136
+ if (!(await verifyBundleBytes(bytes, release.bundleHash))) {
137
+ throw new Error('Bundle byte digest mismatch.');
138
+ }
139
+ if (disposed) return;
140
+
141
+ launchToken = crypto.randomUUID();
142
+ mountNonce = crypto.randomUUID();
143
+ const correlated = createCorrelatedRunnerUrl(
144
+ runnerUrl,
145
+ launchToken,
146
+ window.location.origin
147
+ );
148
+ frameSrc = correlated.href;
149
+ verifiedBundle = bytes;
150
+ canvas.transitionToMounted();
151
+ } catch (cause) {
152
+ canvas.transitionToCrashed(
153
+ cause instanceof Error ? cause.message : String(cause)
154
+ );
155
+ throw cause;
156
+ } finally {
157
+ approvalInFlight = false;
158
+ }
159
+ }
160
+
161
+ function handleReject() {
162
+ void onReject?.();
163
+ }
164
+
165
+ function handlePortMessage(event: MessageEvent) {
166
+ const msg = event.data;
167
+
168
+ // DISPOSAL CLOSES BOTH LANES, not just the RPC one.
169
+ //
170
+ // `dispose()` closes the RPC listener first and then waits up to
171
+ // DISPOSE_ACK_TIMEOUT_MS for an ack — during which this handler was still
172
+ // bound, so a frame that declined to ack could keep posting
173
+ // `state-mutation` frames and have every one applied. The comment above
174
+ // `dispose()` claims the lane closes first; it closed one of two.
175
+ //
176
+ // `disposed` frames are dropped here except the ack itself, which is the
177
+ // one message disposal is waiting for.
178
+ if (disposed && !isDisposedAck(msg)) return;
179
+
180
+ if (msg?.type === 'ready') {
181
+ if (mountSent || !verifiedBundle) {
182
+ crashProtocol('Runner repeated its ready handshake.');
183
+ return;
184
+ }
185
+ const result = validateHandshake(msg, launchToken);
186
+ if (result.success) {
187
+ const bundle = verifiedBundle;
188
+ const mountMsg = createMountMessage(
189
+ mountNonce,
190
+ capabilities,
191
+ release.bundleHash,
192
+ bundle,
193
+ { instanceId, release, declaredStorageIds }
194
+ );
195
+ mountSent = true;
196
+ verifiedBundle = null;
197
+ port?.postMessage(mountMsg, [bundle]);
198
+ } else {
199
+ crashProtocol(result.error ?? 'Runner handshake failed.');
200
+ }
201
+ return;
202
+ }
203
+
204
+ if (isMountedAck(msg, mountNonce)) {
205
+ canvas.transitionToRunning();
206
+ startHeartbeatWatch();
207
+ return;
208
+ }
209
+
210
+ if (isHeartbeat(msg)) {
211
+ canvas.recordHeartbeat();
212
+ lastHeartbeat = Date.now();
213
+ return;
214
+ }
215
+
216
+ if (isCapabilityRequest(msg)) {
217
+ // The trusted host owns capability review. A mediated response will be
218
+ // added with a capability implementation; unknown requests receive no
219
+ // ambient authority from this transport.
220
+ return;
221
+ }
222
+
223
+ if (isStateMutation(msg) && onMutate) {
224
+ void (async () => {
225
+ try {
226
+ await onMutate({
227
+ scope: msg.scope,
228
+ operationId: msg.operationId,
229
+ expectedRevision: msg.expectedRevision,
230
+ eventType: msg.eventType,
231
+ payload: msg.payload
232
+ });
233
+ } catch (cause) {
234
+ crashProtocol(cause instanceof Error ? cause.message : String(cause));
235
+ throw cause;
236
+ }
237
+ })();
238
+ return;
239
+ }
240
+
241
+ if (isRunnerError(msg)) {
242
+ if (msg.nonce && msg.nonce !== mountNonce) return;
243
+ crashProtocol(`${msg.code}: ${msg.message}`);
244
+ return;
245
+ }
246
+
247
+ if (isDisposedAck(msg)) {
248
+ // Let a pending `dispose()` stop waiting; it does the teardown itself so
249
+ // there is exactly one path that closes the port.
250
+ resolveDisposedAck?.();
251
+ resolveDisposedAck = null;
252
+ }
253
+ }
254
+
255
+ function handleRunnerBoot(event: MessageEvent) {
256
+ if (
257
+ connectionSent ||
258
+ disposed ||
259
+ !frame?.contentWindow ||
260
+ !launchToken ||
261
+ !isRunnerBootMessage(event, frame.contentWindow, launchToken)
262
+ ) {
263
+ return;
264
+ }
265
+ const channel = new MessageChannel();
266
+ port = channel.port1;
267
+ port.onmessage = handlePortMessage;
268
+ port.start();
269
+ // The RPC lane layers on the SAME port: `listenMessagePort` attaches with
270
+ // addEventListener and answers only frames it recognises, while the canvas
271
+ // protocol keeps its own `onmessage`. Neither reads the other's traffic.
272
+ if (runtime) {
273
+ rpcListener = listenMessagePort(port, {
274
+ root: runtime.root,
275
+ // The root is the applet surface, not the runtime root: advertise its methods.
276
+ rootMethods: APPLET_ROOT_SURFACE_METHODS,
277
+ pipeline: runtime.pipeline,
278
+ lifecycle: runtime.lifecycle
279
+ });
280
+ }
281
+ connectionSent = true;
282
+ frame.contentWindow.postMessage(
283
+ createRunnerConnectionMessage(launchToken),
284
+ // sandbox="allow-scripts" deliberately gives the frame an opaque
285
+ // origin, so Window.postMessage requires "*". This envelope carries
286
+ // no bundle or authority; the runner authenticates source + parent
287
+ // origin + launch token before the consented bytes cross its port.
288
+ '*',
289
+ [channel.port2]
290
+ );
291
+ }
292
+
293
+ function crashProtocol(message: string) {
294
+ stopHeartbeat();
295
+ rpcListener?.close();
296
+ rpcListener = null;
297
+ port?.close();
298
+ port = null;
299
+ canvas.transitionToCrashed(message);
300
+ }
301
+
302
+ function resetAfterFailure() {
303
+ stopHeartbeat();
304
+ rpcListener?.close();
305
+ rpcListener = null;
306
+ port?.close();
307
+ port = null;
308
+ frameSrc = '';
309
+ launchToken = '';
310
+ mountNonce = '';
311
+ verifiedBundle = null;
312
+ connectionSent = false;
313
+ mountSent = false;
314
+ disposed = false;
315
+ canvas.reset();
316
+ canvas.transitionToReady();
317
+ }
318
+
319
+ async function dispose() {
320
+ if (disposed) return;
321
+ disposed = true;
322
+
323
+ // The RPC lane closes FIRST, before anything waits.
324
+ //
325
+ // Revocation begins here and the dispose ack is awaited for up to
326
+ // DISPOSE_ACK_TIMEOUT_MS. A frame that simply declines to ack and instead
327
+ // posts invokes had that whole window to keep writing — the one window
328
+ // where revocation is the entire point. `crashProtocol` and
329
+ // `resetAfterFailure` always did this; the NORMAL path did not.
330
+ rpcListener?.close();
331
+ rpcListener = null;
332
+
333
+ // Persist revocation BEFORE closing ports
334
+ canvas.transitionToRevoked();
335
+
336
+ // Send dispose, then WAIT for the ack so the applet can run `__unmount`
337
+ // and flush. This used to be a comment saying "in production: with
338
+ // timeout" and no wait at all, which made `isDisposedAck` dead code on
339
+ // the only path that should have used it.
340
+ //
341
+ // Bounded, because the ack is applet-dependent: the runner caps its own
342
+ // `__unmount` at 2s and always posts the ack afterwards, so a slightly
343
+ // longer deadline here waits for a well-behaved applet and does not let a
344
+ // hostile one delay revocation.
345
+ if (port) {
346
+ const acked = new Promise<void>((resolve) => {
347
+ resolveDisposedAck = resolve;
348
+ });
349
+ port.postMessage(createDisposeMessage());
350
+ await Promise.race([
351
+ acked,
352
+ new Promise<void>((resolve) => setTimeout(resolve, DISPOSE_ACK_TIMEOUT_MS))
353
+ ]);
354
+ resolveDisposedAck = null;
355
+ }
356
+
357
+ // Close the port and destroy the frame
358
+ port?.close();
359
+ port = null;
360
+ verifiedBundle = null;
361
+ stopHeartbeat();
362
+ canvas.transitionToDisposed();
363
+ }
364
+
365
+ onMount(() => {
366
+ window.addEventListener('message', handleRunnerBoot);
367
+ canvas.transitionToReady();
368
+ return () => {
369
+ window.removeEventListener('message', handleRunnerBoot);
370
+ void dispose();
371
+ };
372
+ });
373
+ </script>
374
+
375
+ <div class="applet-canvas" data-testid="applet-canvas" data-state={canvas.state}>
376
+ {#if canvas.state === 'loading'}
377
+ <div class="loading" data-testid="loading">Loading release metadata...</div>
378
+ {:else if canvas.state === 'ready'}
379
+ <AppletConsent
380
+ {release}
381
+ {capabilities}
382
+ {capabilityReasons}
383
+ onApprove={handleApprove}
384
+ onReject={handleReject}
385
+ />
386
+ {:else if canvas.state === 'approved' || canvas.state === 'mounted' || canvas.state === 'running'}
387
+ <div class="runner-container" data-testid="runner-container">
388
+ {#if runnerUrl && canvas.runnerMounted}
389
+ <iframe
390
+ bind:this={frame}
391
+ src={frameSrc}
392
+ sandbox="allow-scripts"
393
+ allow="accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; microphone 'none'; payment 'none'; usb 'none'"
394
+ title="Applet runner"
395
+ data-testid="runner-frame"
396
+ ></iframe>
397
+ {:else}
398
+ <div class="mounting" data-testid="mounting">Mounting runner...</div>
399
+ {/if}
400
+ </div>
401
+ {:else if canvas.state === 'crashed'}
402
+ <div class="error-state" data-testid="error-state">
403
+ <p class="error-title">Applet crashed</p>
404
+ <p class="error-message">{canvas.error}</p>
405
+ <button onclick={resetAfterFailure}>Retry</button>
406
+ </div>
407
+ {:else if canvas.state === 'unresponsive'}
408
+ <div class="error-state" data-testid="unresponsive-state">
409
+ <p class="error-title">Applet is unresponsive</p>
410
+ <button onclick={resetAfterFailure}>Retry</button>
411
+ </div>
412
+ {:else if canvas.state === 'revoked'}
413
+ <div class="revoked-state" data-testid="revoked-state">
414
+ <p>Capabilities revoked. Applet disposed.</p>
415
+ </div>
416
+ {:else if canvas.state === 'expired'}
417
+ <div class="expired-state" data-testid="expired-state">
418
+ <p>Launch lease expired.</p>
419
+ </div>
420
+ {:else if canvas.state === 'disposed'}
421
+ <div class="disposed-state" data-testid="disposed-state">
422
+ <p>Applet disposed.</p>
423
+ </div>
424
+ {/if}
425
+ </div>
426
+
427
+ <style>
428
+ .applet-canvas {
429
+ display: flex;
430
+ flex-direction: column;
431
+ min-height: 12rem;
432
+ border: 1px solid var(--applet-border, #e2e8f0);
433
+ border-radius: 0.5rem;
434
+ overflow: hidden;
435
+ }
436
+
437
+ .loading,
438
+ .mounting {
439
+ display: flex;
440
+ align-items: center;
441
+ justify-content: center;
442
+ padding: 2rem;
443
+ color: var(--applet-muted, #64748b);
444
+ }
445
+
446
+ .runner-container {
447
+ flex: 1;
448
+ min-height: 12rem;
449
+ }
450
+
451
+ .runner-container iframe {
452
+ width: 100%;
453
+ height: 100%;
454
+ border: none;
455
+ min-height: 12rem;
456
+ }
457
+
458
+ .error-state,
459
+ .revoked-state,
460
+ .expired-state,
461
+ .disposed-state {
462
+ display: flex;
463
+ flex-direction: column;
464
+ align-items: center;
465
+ justify-content: center;
466
+ gap: 0.5rem;
467
+ padding: 2rem;
468
+ }
469
+
470
+ .error-title {
471
+ font-weight: 600;
472
+ color: var(--applet-error, #dc2626);
473
+ }
474
+
475
+ .error-message {
476
+ font-size: 0.875rem;
477
+ color: var(--applet-muted, #64748b);
478
+ font-family: monospace;
479
+ }
480
+
481
+ .error-state button {
482
+ padding: 0.5rem 1rem;
483
+ border-radius: 0.25rem;
484
+ border: 1px solid var(--applet-border, #e2e8f0);
485
+ cursor: pointer;
486
+ font-size: 0.875rem;
487
+ }
488
+ </style>
@@ -0,0 +1,53 @@
1
+ import type { RpcLifecycle } from '@vibesdotdev/kernel-rpc';
2
+ import type { InvokePipeline } from '@vibesdotdev/kernel';
3
+ import { type ComponentReleaseRef } from '@vibesdotdev/applets';
4
+ import type { JsonValue } from '@vibesdotdev/shared/types';
5
+ interface Props {
6
+ instanceId: string;
7
+ release: ComponentReleaseRef;
8
+ capabilities: string[];
9
+ capabilityReasons?: Record<string, string>;
10
+ /** URL of the separate-site runner. Not set until consent. */
11
+ runnerUrl?: string;
12
+ /** Fetch the bundle bytes after consent. Returns the hash + bytes. */
13
+ fetchBundle?: () => Promise<{
14
+ hash: string;
15
+ bytes: ArrayBuffer;
16
+ }>;
17
+ onApprove?: () => void | Promise<void>;
18
+ onReject?: () => void | Promise<void>;
19
+ onMutate?: (input: {
20
+ scope: 'shared' | 'viewer';
21
+ operationId: string;
22
+ expectedRevision: number;
23
+ eventType: string;
24
+ payload: JsonValue;
25
+ }) => Promise<void>;
26
+ /**
27
+ * Store ids this release DECLARED, from its manifest. The frame refuses a
28
+ * storage handle for anything else, so an undeclared id never reaches the
29
+ * host.
30
+ */
31
+ declaredStorageIds?: string[];
32
+ /**
33
+ * What this applet may reach, or nothing.
34
+ *
35
+ * `root` is the ONE object the applet can invoke; `pipeline` is the L1
36
+ * chain the applet gate hangs on — the same chain a local call runs, which
37
+ * is the whole point of making this boundary a transport rather than a
38
+ * protocol.
39
+ *
40
+ * Omitting it is a real configuration: a render-only applet. The mount
41
+ * message then carries `rootRef: null`, and the frame refuses runtime calls
42
+ * with a reason instead of posting invokes nobody answers.
43
+ */
44
+ runtime?: {
45
+ root: object;
46
+ pipeline: InvokePipeline;
47
+ lifecycle: RpcLifecycle;
48
+ };
49
+ }
50
+ declare const AppletCanvas: import("svelte").Component<Props, {}, "">;
51
+ type AppletCanvas = ReturnType<typeof AppletCanvas>;
52
+ export default AppletCanvas;
53
+ //# sourceMappingURL=AppletCanvas.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppletCanvas.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/AppletCanvas.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAA+B,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAiB7F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI1D,UAAU,KAAK;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IAClE,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,SAAS,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1J;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,cAAc,CAAC;QAAC,SAAS,EAAE,YAAY,CAAA;KAAE,CAAC;CAC9E;AAqXF,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
@@ -0,0 +1,42 @@
1
+ <script lang="ts">
2
+ import { Button, Card, Input, Icon } from '@vibesdotdev/kit/components';
3
+ import type { AppletPresentation } from '../../presentation.js';
4
+
5
+ interface Props { applets: readonly AppletPresentation[] }
6
+ let { applets }: Props = $props();
7
+ let search = $state('');
8
+ const visible = $derived(applets.filter(applet =>
9
+ `${applet.title} ${applet.description} ${applet.id}`.toLocaleLowerCase().includes(search.trim().toLocaleLowerCase())));
10
+ </script>
11
+
12
+ <section class="space-y-6" aria-label="Available applets">
13
+ <div class="flex flex-wrap items-end justify-between gap-4">
14
+ <div class="space-y-1">
15
+ <h1 class="text-2xl font-semibold tracking-tight">Applets</h1>
16
+ <p class="text-sm text-muted-foreground">Focused tools for your workspace, using your signed-in Vibes account.</p>
17
+ </div>
18
+ <Input type="search" aria-label="Find an applet" placeholder="Find an applet…" bind:value={search} class="w-full sm:max-w-xs" />
19
+ </div>
20
+ {#if visible.length}
21
+ <div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
22
+ {#each visible as applet (applet.id)}
23
+ <Card.Root class="flex flex-col">
24
+ <Card.Header>
25
+ <Card.Title>{applet.title}</Card.Title>
26
+ <Card.Description>{applet.description}</Card.Description>
27
+ </Card.Header>
28
+ <Card.Footer class="mt-auto">
29
+ <Button href={`/${encodeURIComponent(applet.id)}/`} variant="outline" class="w-full justify-between">
30
+ Open {applet.title}<Icon icon="lucide:arrow-up-right" class="size-4" />
31
+ </Button>
32
+ </Card.Footer>
33
+ </Card.Root>
34
+ {/each}
35
+ </div>
36
+ {:else}
37
+ <div class="py-12 text-center" role="status">
38
+ <h2 class="font-medium">{search ? 'No matching applets' : 'No applets in this workspace yet'}</h2>
39
+ <p class="mt-2 text-sm text-muted-foreground">{search ? 'Try another name or clear the search.' : 'Create an applet from a template to make it available here.'}</p>
40
+ </div>
41
+ {/if}
42
+ </section>
@@ -0,0 +1,8 @@
1
+ import type { AppletPresentation } from '../../presentation.ts';
2
+ interface Props {
3
+ applets: readonly AppletPresentation[];
4
+ }
5
+ declare const AppletCatalog: import("svelte").Component<Props, {}, "">;
6
+ type AppletCatalog = ReturnType<typeof AppletCatalog>;
7
+ export default AppletCatalog;
8
+ //# sourceMappingURL=AppletCatalog.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppletCatalog.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/AppletCatalog.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG/D,UAAU,KAAK;IAAG,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAAE;AA6C3D,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}