@superblocksteam/vite-plugin-file-sync 2.0.115-next.0 → 2.0.115-next.2

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 (355) hide show
  1. package/dist/ai-service/agent/middleware.d.ts.map +1 -1
  2. package/dist/ai-service/agent/middleware.js +19 -0
  3. package/dist/ai-service/agent/middleware.js.map +1 -1
  4. package/dist/ai-service/agent/prompts/api-prompts.d.ts.map +1 -1
  5. package/dist/ai-service/agent/prompts/api-prompts.js +13 -17
  6. package/dist/ai-service/agent/prompts/api-prompts.js.map +1 -1
  7. package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts.map +1 -1
  8. package/dist/ai-service/agent/prompts/build-base-system-prompt.js +22 -3
  9. package/dist/ai-service/agent/prompts/build-base-system-prompt.js.map +1 -1
  10. package/dist/ai-service/agent/subagents/coding/prompt-builder.d.ts +16 -0
  11. package/dist/ai-service/agent/subagents/coding/prompt-builder.d.ts.map +1 -0
  12. package/dist/ai-service/agent/subagents/coding/prompt-builder.js +30 -0
  13. package/dist/ai-service/agent/subagents/coding/prompt-builder.js.map +1 -0
  14. package/dist/ai-service/agent/subagents/coding/run-coding-subagent.d.ts +29 -0
  15. package/dist/ai-service/agent/subagents/coding/run-coding-subagent.d.ts.map +1 -0
  16. package/dist/ai-service/agent/subagents/coding/run-coding-subagent.js +108 -0
  17. package/dist/ai-service/agent/subagents/coding/run-coding-subagent.js.map +1 -0
  18. package/dist/ai-service/agent/subagents/types.d.ts +9 -1
  19. package/dist/ai-service/agent/subagents/types.d.ts.map +1 -1
  20. package/dist/ai-service/agent/subagents/types.js +8 -0
  21. package/dist/ai-service/agent/subagents/types.js.map +1 -1
  22. package/dist/ai-service/agent/tool-message-utils.d.ts.map +1 -1
  23. package/dist/ai-service/agent/tool-message-utils.js +5 -0
  24. package/dist/ai-service/agent/tool-message-utils.js.map +1 -1
  25. package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.d.ts.map +1 -1
  26. package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js +2 -1
  27. package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js.map +1 -1
  28. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.d.ts +6 -0
  29. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.d.ts.map +1 -0
  30. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js +138 -0
  31. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js.map +1 -0
  32. package/dist/ai-service/agent/tools/build-finalize.d.ts.map +1 -1
  33. package/dist/ai-service/agent/tools/build-finalize.js +39 -15
  34. package/dist/ai-service/agent/tools/build-finalize.js.map +1 -1
  35. package/dist/ai-service/agent/tools/build-manage-checklist.d.ts +6 -3
  36. package/dist/ai-service/agent/tools/build-manage-checklist.d.ts.map +1 -1
  37. package/dist/ai-service/agent/tools/build-manage-checklist.js +116 -49
  38. package/dist/ai-service/agent/tools/build-manage-checklist.js.map +1 -1
  39. package/dist/ai-service/agent/tools/index.d.ts +2 -0
  40. package/dist/ai-service/agent/tools/index.d.ts.map +1 -1
  41. package/dist/ai-service/agent/tools/index.js +2 -0
  42. package/dist/ai-service/agent/tools/index.js.map +1 -1
  43. package/dist/ai-service/agent/tools/integrations/execute-request.d.ts +3 -0
  44. package/dist/ai-service/agent/tools/integrations/execute-request.d.ts.map +1 -1
  45. package/dist/ai-service/agent/tools/integrations/execute-request.js +330 -204
  46. package/dist/ai-service/agent/tools/integrations/execute-request.js.map +1 -1
  47. package/dist/ai-service/agent/tools.d.ts.map +1 -1
  48. package/dist/ai-service/agent/tools.js +40 -2
  49. package/dist/ai-service/agent/tools.js.map +1 -1
  50. package/dist/ai-service/agent/tools2/access-control.d.ts +1 -1
  51. package/dist/ai-service/agent/tools2/access-control.d.ts.map +1 -1
  52. package/dist/ai-service/agent/tools2/access-control.js +15 -4
  53. package/dist/ai-service/agent/tools2/access-control.js.map +1 -1
  54. package/dist/ai-service/agent/tools2/registry.d.ts +3 -0
  55. package/dist/ai-service/agent/tools2/registry.d.ts.map +1 -1
  56. package/dist/ai-service/agent/tools2/registry.js +50 -8
  57. package/dist/ai-service/agent/tools2/registry.js.map +1 -1
  58. package/dist/ai-service/agent/tools2/tools/ask-multi-choice.d.ts.map +1 -1
  59. package/dist/ai-service/agent/tools2/tools/ask-multi-choice.js +3 -2
  60. package/dist/ai-service/agent/tools2/tools/ask-multi-choice.js.map +1 -1
  61. package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.d.ts.map +1 -1
  62. package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.js +2 -1
  63. package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.js.map +1 -1
  64. package/dist/ai-service/agent/tools2/tools/deploy-service.d.ts +16 -0
  65. package/dist/ai-service/agent/tools2/tools/deploy-service.d.ts.map +1 -0
  66. package/dist/ai-service/agent/tools2/tools/deploy-service.js +135 -0
  67. package/dist/ai-service/agent/tools2/tools/deploy-service.js.map +1 -0
  68. package/dist/ai-service/agent/tools2/tools/download-attachments.d.ts +33 -0
  69. package/dist/ai-service/agent/tools2/tools/download-attachments.d.ts.map +1 -0
  70. package/dist/ai-service/agent/tools2/tools/download-attachments.js +308 -0
  71. package/dist/ai-service/agent/tools2/tools/download-attachments.js.map +1 -0
  72. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.d.ts.map +1 -1
  73. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js +8 -4
  74. package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js.map +1 -1
  75. package/dist/ai-service/agent/tools2/tools/git.d.ts +57 -1
  76. package/dist/ai-service/agent/tools2/tools/git.d.ts.map +1 -1
  77. package/dist/ai-service/agent/tools2/tools/git.js +275 -8
  78. package/dist/ai-service/agent/tools2/tools/git.js.map +1 -1
  79. package/dist/ai-service/agent/tools2/tools/index.d.ts +2 -1
  80. package/dist/ai-service/agent/tools2/tools/index.d.ts.map +1 -1
  81. package/dist/ai-service/agent/tools2/tools/index.js +2 -1
  82. package/dist/ai-service/agent/tools2/tools/index.js.map +1 -1
  83. package/dist/ai-service/agent/tools2/tools/list-attachments.d.ts +4 -1
  84. package/dist/ai-service/agent/tools2/tools/list-attachments.d.ts.map +1 -1
  85. package/dist/ai-service/agent/tools2/tools/list-attachments.js +20 -4
  86. package/dist/ai-service/agent/tools2/tools/list-attachments.js.map +1 -1
  87. package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.d.ts +28 -0
  88. package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.d.ts.map +1 -0
  89. package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.js +152 -0
  90. package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.js.map +1 -0
  91. package/dist/ai-service/agent/tools2/types.d.ts +1 -18
  92. package/dist/ai-service/agent/tools2/types.d.ts.map +1 -1
  93. package/dist/ai-service/agent/tools2/types.js.map +1 -1
  94. package/dist/ai-service/agent/utils.d.ts.map +1 -1
  95. package/dist/ai-service/agent/utils.js +22 -5
  96. package/dist/ai-service/agent/utils.js.map +1 -1
  97. package/dist/ai-service/app-interface/file-system-interface.d.ts +0 -4
  98. package/dist/ai-service/app-interface/file-system-interface.d.ts.map +1 -1
  99. package/dist/ai-service/app-interface/file-system-interface.js +0 -21
  100. package/dist/ai-service/app-interface/file-system-interface.js.map +1 -1
  101. package/dist/ai-service/app-interface/filesystem/virtual-file-system.d.ts +11 -1
  102. package/dist/ai-service/app-interface/filesystem/virtual-file-system.d.ts.map +1 -1
  103. package/dist/ai-service/app-interface/filesystem/virtual-file-system.js +29 -7
  104. package/dist/ai-service/app-interface/filesystem/virtual-file-system.js.map +1 -1
  105. package/dist/ai-service/app-interface/shell.d.ts +6 -0
  106. package/dist/ai-service/app-interface/shell.d.ts.map +1 -1
  107. package/dist/ai-service/app-interface/shell.js +8 -0
  108. package/dist/ai-service/app-interface/shell.js.map +1 -1
  109. package/dist/ai-service/app-skills/helpers.d.ts.map +1 -1
  110. package/dist/ai-service/app-skills/helpers.js +4 -2
  111. package/dist/ai-service/app-skills/helpers.js.map +1 -1
  112. package/dist/ai-service/attachments/store.d.ts +18 -2
  113. package/dist/ai-service/attachments/store.d.ts.map +1 -1
  114. package/dist/ai-service/attachments/store.js +102 -9
  115. package/dist/ai-service/attachments/store.js.map +1 -1
  116. package/dist/ai-service/attachments/uploaded-content-part.d.ts +5 -2
  117. package/dist/ai-service/attachments/uploaded-content-part.d.ts.map +1 -1
  118. package/dist/ai-service/attachments/uploaded-content-part.js +32 -0
  119. package/dist/ai-service/attachments/uploaded-content-part.js.map +1 -1
  120. package/dist/ai-service/chat/chat-session-store.d.ts +2 -2
  121. package/dist/ai-service/chat/chat-session-store.d.ts.map +1 -1
  122. package/dist/ai-service/chat/chat-session-store.js +45 -243
  123. package/dist/ai-service/chat/chat-session-store.js.map +1 -1
  124. package/dist/ai-service/chat/utils.d.ts +6 -0
  125. package/dist/ai-service/chat/utils.d.ts.map +1 -1
  126. package/dist/ai-service/chat/utils.js +47 -0
  127. package/dist/ai-service/chat/utils.js.map +1 -1
  128. package/dist/ai-service/features.d.ts +4 -0
  129. package/dist/ai-service/features.d.ts.map +1 -1
  130. package/dist/ai-service/features.js +4 -0
  131. package/dist/ai-service/features.js.map +1 -1
  132. package/dist/ai-service/index.d.ts +36 -11
  133. package/dist/ai-service/index.d.ts.map +1 -1
  134. package/dist/ai-service/index.js +228 -68
  135. package/dist/ai-service/index.js.map +1 -1
  136. package/dist/ai-service/judge/tools/playwright-action.d.ts +1 -1
  137. package/dist/ai-service/llm/client.d.ts.map +1 -1
  138. package/dist/ai-service/llm/client.js +4 -2
  139. package/dist/ai-service/llm/client.js.map +1 -1
  140. package/dist/ai-service/llm/stream/observers/retry-notification.d.ts.map +1 -1
  141. package/dist/ai-service/llm/stream/observers/retry-notification.js +4 -2
  142. package/dist/ai-service/llm/stream/observers/retry-notification.js.map +1 -1
  143. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.d.ts.map +1 -1
  144. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js +1 -16
  145. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js.map +1 -1
  146. package/dist/ai-service/prompt-builder-service/types.d.ts +2 -13
  147. package/dist/ai-service/prompt-builder-service/types.d.ts.map +1 -1
  148. package/dist/ai-service/prompt-builder-service/types.js.map +1 -1
  149. package/dist/ai-service/skills/system/_registry.generated.d.ts.map +1 -1
  150. package/dist/ai-service/skills/system/_registry.generated.js +6 -0
  151. package/dist/ai-service/skills/system/_registry.generated.js.map +1 -1
  152. package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.d.ts +2 -0
  153. package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.d.ts.map +1 -0
  154. package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.js +58 -0
  155. package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.js.map +1 -0
  156. package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.d.ts +2 -0
  157. package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.d.ts.map +1 -0
  158. package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.js +107 -0
  159. package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.js.map +1 -0
  160. package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts +2 -0
  161. package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts.map +1 -0
  162. package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js +137 -0
  163. package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js.map +1 -0
  164. package/dist/ai-service/state-machine/clark-fsm.d.ts +26 -13
  165. package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
  166. package/dist/ai-service/state-machine/clark-fsm.js +12 -7
  167. package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
  168. package/dist/ai-service/state-machine/handlers/agent-planning.d.ts.map +1 -1
  169. package/dist/ai-service/state-machine/handlers/agent-planning.js +76 -27
  170. package/dist/ai-service/state-machine/handlers/agent-planning.js.map +1 -1
  171. package/dist/ai-service/state-machine/handlers/awaiting-user.d.ts.map +1 -1
  172. package/dist/ai-service/state-machine/handlers/awaiting-user.js +15 -6
  173. package/dist/ai-service/state-machine/handlers/awaiting-user.js.map +1 -1
  174. package/dist/ai-service/state-machine/handlers/idle.d.ts.map +1 -1
  175. package/dist/ai-service/state-machine/handlers/idle.js +4 -2
  176. package/dist/ai-service/state-machine/handlers/idle.js.map +1 -1
  177. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  178. package/dist/ai-service/state-machine/handlers/llm-generating.js +48 -15
  179. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  180. package/dist/ai-service/state-machine/handlers/post-processing.d.ts +1 -1
  181. package/dist/ai-service/state-machine/handlers/post-processing.d.ts.map +1 -1
  182. package/dist/ai-service/state-machine/handlers/post-processing.js +23 -151
  183. package/dist/ai-service/state-machine/handlers/post-processing.js.map +1 -1
  184. package/dist/ai-service/state-machine/handlers/runtime-reviewing.d.ts.map +1 -1
  185. package/dist/ai-service/state-machine/handlers/runtime-reviewing.js +16 -8
  186. package/dist/ai-service/state-machine/handlers/runtime-reviewing.js.map +1 -1
  187. package/dist/ai-service/state-machine/helpers/change-info.d.ts.map +1 -1
  188. package/dist/ai-service/state-machine/helpers/change-info.js +2 -15
  189. package/dist/ai-service/state-machine/helpers/change-info.js.map +1 -1
  190. package/dist/ai-service/state-machine/helpers/peer.d.ts +3 -3
  191. package/dist/ai-service/state-machine/helpers/peer.d.ts.map +1 -1
  192. package/dist/ai-service/state-machine/helpers/peer.js +9 -23
  193. package/dist/ai-service/state-machine/helpers/peer.js.map +1 -1
  194. package/dist/ai-service/state-machine/helpers/stable-peer.d.ts +52 -0
  195. package/dist/ai-service/state-machine/helpers/stable-peer.d.ts.map +1 -0
  196. package/dist/ai-service/state-machine/helpers/stable-peer.js +141 -0
  197. package/dist/ai-service/state-machine/helpers/stable-peer.js.map +1 -0
  198. package/dist/ai-service/state-machine/mocks.d.ts.map +1 -1
  199. package/dist/ai-service/state-machine/mocks.js +0 -17
  200. package/dist/ai-service/state-machine/mocks.js.map +1 -1
  201. package/dist/ai-service/types.d.ts +2 -21
  202. package/dist/ai-service/types.d.ts.map +1 -1
  203. package/dist/ai-service/types.js.map +1 -1
  204. package/dist/ai-service/util/archive-extractors.d.ts +52 -0
  205. package/dist/ai-service/util/archive-extractors.d.ts.map +1 -0
  206. package/dist/ai-service/util/archive-extractors.js +278 -0
  207. package/dist/ai-service/util/archive-extractors.js.map +1 -0
  208. package/dist/codegen.d.ts +1 -22
  209. package/dist/codegen.d.ts.map +1 -1
  210. package/dist/codegen.js +1 -117
  211. package/dist/codegen.js.map +1 -1
  212. package/dist/components-manager.d.ts +0 -6
  213. package/dist/components-manager.d.ts.map +1 -1
  214. package/dist/components-manager.js +0 -27
  215. package/dist/components-manager.js.map +1 -1
  216. package/dist/file-sync-vite-plugin.d.ts.map +1 -1
  217. package/dist/file-sync-vite-plugin.js +47 -94
  218. package/dist/file-sync-vite-plugin.js.map +1 -1
  219. package/dist/file-system-manager.d.ts +2 -15
  220. package/dist/file-system-manager.d.ts.map +1 -1
  221. package/dist/file-system-manager.js +16 -128
  222. package/dist/file-system-manager.js.map +1 -1
  223. package/dist/git-service/live-branch.d.ts.map +1 -1
  224. package/dist/git-service/live-branch.js +15 -1
  225. package/dist/git-service/live-branch.js.map +1 -1
  226. package/dist/lock-service/index.d.ts.map +1 -1
  227. package/dist/lock-service/index.js +8 -5
  228. package/dist/lock-service/index.js.map +1 -1
  229. package/dist/migration/get-fullstack-template-dir.d.ts +37 -0
  230. package/dist/migration/get-fullstack-template-dir.d.ts.map +1 -0
  231. package/dist/migration/get-fullstack-template-dir.js +99 -0
  232. package/dist/migration/get-fullstack-template-dir.js.map +1 -0
  233. package/dist/migration/migration-checklist.d.ts +60 -0
  234. package/dist/migration/migration-checklist.d.ts.map +1 -0
  235. package/dist/migration/migration-checklist.js +230 -0
  236. package/dist/migration/migration-checklist.js.map +1 -0
  237. package/dist/migration/migration-routes.d.ts +23 -0
  238. package/dist/migration/migration-routes.d.ts.map +1 -0
  239. package/dist/migration/migration-routes.js +533 -0
  240. package/dist/migration/migration-routes.js.map +1 -0
  241. package/dist/migration/restructure.d.ts +76 -0
  242. package/dist/migration/restructure.d.ts.map +1 -0
  243. package/dist/migration/restructure.js +446 -0
  244. package/dist/migration/restructure.js.map +1 -0
  245. package/dist/migration/translation-prompt.d.ts +22 -0
  246. package/dist/migration/translation-prompt.d.ts.map +1 -0
  247. package/dist/migration/translation-prompt.js +27 -0
  248. package/dist/migration/translation-prompt.js.map +1 -0
  249. package/dist/migration-templates/app-fullstack/client/App.tsx +17 -0
  250. package/dist/migration-templates/app-fullstack/client/components/common/sonner.tsx +20 -0
  251. package/dist/migration-templates/app-fullstack/client/components/hooks/use-active-page.ts +73 -0
  252. package/dist/migration-templates/app-fullstack/client/components/hooks/use-mobile.ts +21 -0
  253. package/dist/migration-templates/app-fullstack/client/components/ui/accordion.tsx +197 -0
  254. package/dist/migration-templates/app-fullstack/client/components/ui/area-chart.tsx +432 -0
  255. package/dist/migration-templates/app-fullstack/client/components/ui/aspect-ratio.tsx +45 -0
  256. package/dist/migration-templates/app-fullstack/client/components/ui/avatar.tsx +117 -0
  257. package/dist/migration-templates/app-fullstack/client/components/ui/badge.tsx +143 -0
  258. package/dist/migration-templates/app-fullstack/client/components/ui/bar-chart.tsx +390 -0
  259. package/dist/migration-templates/app-fullstack/client/components/ui/breadcrumb.tsx +259 -0
  260. package/dist/migration-templates/app-fullstack/client/components/ui/button.tsx +182 -0
  261. package/dist/migration-templates/app-fullstack/client/components/ui/calendar.tsx +300 -0
  262. package/dist/migration-templates/app-fullstack/client/components/ui/card.tsx +129 -0
  263. package/dist/migration-templates/app-fullstack/client/components/ui/chart.tsx +403 -0
  264. package/dist/migration-templates/app-fullstack/client/components/ui/chat.tsx +2303 -0
  265. package/dist/migration-templates/app-fullstack/client/components/ui/checkbox.tsx +97 -0
  266. package/dist/migration-templates/app-fullstack/client/components/ui/code-block-content.tsx +66 -0
  267. package/dist/migration-templates/app-fullstack/client/components/ui/date-range-picker.tsx +396 -0
  268. package/dist/migration-templates/app-fullstack/client/components/ui/dialog.tsx +223 -0
  269. package/dist/migration-templates/app-fullstack/client/components/ui/dropdown-menu.tsx +284 -0
  270. package/dist/migration-templates/app-fullstack/client/components/ui/file-dropzone.tsx +395 -0
  271. package/dist/migration-templates/app-fullstack/client/components/ui/file-input.tsx +166 -0
  272. package/dist/migration-templates/app-fullstack/client/components/ui/hover-card.tsx +162 -0
  273. package/dist/migration-templates/app-fullstack/client/components/ui/icon.tsx +133 -0
  274. package/dist/migration-templates/app-fullstack/client/components/ui/image.tsx +68 -0
  275. package/dist/migration-templates/app-fullstack/client/components/ui/input.tsx +219 -0
  276. package/dist/migration-templates/app-fullstack/client/components/ui/label.tsx +55 -0
  277. package/dist/migration-templates/app-fullstack/client/components/ui/line-chart.tsx +380 -0
  278. package/dist/migration-templates/app-fullstack/client/components/ui/link.tsx +139 -0
  279. package/dist/migration-templates/app-fullstack/client/components/ui/navigation-menu.tsx +345 -0
  280. package/dist/migration-templates/app-fullstack/client/components/ui/pagination.tsx +192 -0
  281. package/dist/migration-templates/app-fullstack/client/components/ui/pie-chart.tsx +295 -0
  282. package/dist/migration-templates/app-fullstack/client/components/ui/popover.tsx +162 -0
  283. package/dist/migration-templates/app-fullstack/client/components/ui/progress.tsx +69 -0
  284. package/dist/migration-templates/app-fullstack/client/components/ui/radar-chart.tsx +386 -0
  285. package/dist/migration-templates/app-fullstack/client/components/ui/radial-chart.tsx +402 -0
  286. package/dist/migration-templates/app-fullstack/client/components/ui/scroll-area.tsx +86 -0
  287. package/dist/migration-templates/app-fullstack/client/components/ui/select.tsx +229 -0
  288. package/dist/migration-templates/app-fullstack/client/components/ui/separator.tsx +62 -0
  289. package/dist/migration-templates/app-fullstack/client/components/ui/sheet.tsx +234 -0
  290. package/dist/migration-templates/app-fullstack/client/components/ui/sidebar.tsx +974 -0
  291. package/dist/migration-templates/app-fullstack/client/components/ui/skeleton.tsx +13 -0
  292. package/dist/migration-templates/app-fullstack/client/components/ui/slider.tsx +198 -0
  293. package/dist/migration-templates/app-fullstack/client/components/ui/switch.tsx +95 -0
  294. package/dist/migration-templates/app-fullstack/client/components/ui/table.tsx +145 -0
  295. package/dist/migration-templates/app-fullstack/client/components/ui/tabs.tsx +87 -0
  296. package/dist/migration-templates/app-fullstack/client/components/ui/textarea.tsx +148 -0
  297. package/dist/migration-templates/app-fullstack/client/components/ui/toggle-group.tsx +225 -0
  298. package/dist/migration-templates/app-fullstack/client/components/ui/toggle.tsx +150 -0
  299. package/dist/migration-templates/app-fullstack/client/components/ui/tooltip.tsx +175 -0
  300. package/dist/migration-templates/app-fullstack/client/hooks/useApi.ts +25 -0
  301. package/dist/migration-templates/app-fullstack/client/hooks/useApiData.ts +10 -0
  302. package/dist/migration-templates/app-fullstack/client/index.css +131 -0
  303. package/dist/migration-templates/app-fullstack/client/lib/executeApi.ts +9 -0
  304. package/dist/migration-templates/app-fullstack/client/lib/utils.ts +6 -0
  305. package/dist/migration-templates/app-fullstack/client/pages/Page1/index.tsx +3 -0
  306. package/dist/migration-templates/app-fullstack/client/root.tsx +17 -0
  307. package/dist/migration-templates/app-fullstack/client/router.tsx +48 -0
  308. package/dist/migration-templates/app-fullstack/client/types/node.d.ts +9 -0
  309. package/dist/migration-templates/app-fullstack/components.json +21 -0
  310. package/dist/migration-templates/app-fullstack/eslint.config.js +108 -0
  311. package/dist/migration-templates/app-fullstack/package.json +89 -0
  312. package/dist/migration-templates/app-fullstack/server/.gitkeep +0 -0
  313. package/dist/migration-templates/app-fullstack/server/apis/index.ts +22 -0
  314. package/dist/migration-templates/app-fullstack/server/index.ts +2 -0
  315. package/dist/migration-templates/app-fullstack/tsconfig.client.json +27 -0
  316. package/dist/migration-templates/app-fullstack/tsconfig.eslint.json +8 -0
  317. package/dist/migration-templates/app-fullstack/tsconfig.json +25 -0
  318. package/dist/migration-templates/app-fullstack/tsconfig.server.json +13 -0
  319. package/dist/migration-templates/app-fullstack/vite.config.ts +17 -0
  320. package/dist/parsing/imports.d.ts +0 -16
  321. package/dist/parsing/imports.d.ts.map +1 -1
  322. package/dist/parsing/imports.js +0 -68
  323. package/dist/parsing/imports.js.map +1 -1
  324. package/dist/parsing/jsx.d.ts +0 -2
  325. package/dist/parsing/jsx.d.ts.map +1 -1
  326. package/dist/parsing/jsx.js +0 -62
  327. package/dist/parsing/jsx.js.map +1 -1
  328. package/dist/socket-manager.d.ts.map +1 -1
  329. package/dist/socket-manager.js +109 -32
  330. package/dist/socket-manager.js.map +1 -1
  331. package/dist/source-tracker.d.ts +7 -85
  332. package/dist/source-tracker.d.ts.map +1 -1
  333. package/dist/source-tracker.js +19 -695
  334. package/dist/source-tracker.js.map +1 -1
  335. package/dist/sync-service/index.d.ts +79 -2
  336. package/dist/sync-service/index.d.ts.map +1 -1
  337. package/dist/sync-service/index.js +139 -10
  338. package/dist/sync-service/index.js.map +1 -1
  339. package/package.json +11 -9
  340. package/dist/ai-service/artifacts/bolt.d.ts +0 -8
  341. package/dist/ai-service/artifacts/bolt.d.ts.map +0 -1
  342. package/dist/ai-service/artifacts/bolt.js +0 -92
  343. package/dist/ai-service/artifacts/bolt.js.map +0 -1
  344. package/dist/ai-service/result-buffer/bolt.d.ts +0 -18
  345. package/dist/ai-service/result-buffer/bolt.d.ts.map +0 -1
  346. package/dist/ai-service/result-buffer/bolt.js +0 -100
  347. package/dist/ai-service/result-buffer/bolt.js.map +0 -1
  348. package/dist/ai-service/result-buffer/shared.d.ts +0 -17
  349. package/dist/ai-service/result-buffer/shared.d.ts.map +0 -1
  350. package/dist/ai-service/result-buffer/shared.js +0 -7
  351. package/dist/ai-service/result-buffer/shared.js.map +0 -1
  352. package/dist/inject-no-select.d.ts +0 -15
  353. package/dist/inject-no-select.d.ts.map +0 -1
  354. package/dist/inject-no-select.js +0 -175
  355. package/dist/inject-no-select.js.map +0 -1
@@ -0,0 +1,197 @@
1
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
2
+ import { ChevronDownIcon } from "lucide-react";
3
+ import * as React from "react";
4
+
5
+ import { registerComponent } from "@superblocksteam/library";
6
+ import {
7
+ Prop,
8
+ Section,
9
+ PropsCategory,
10
+ type PropertiesPanelDefinition,
11
+ type EditorConfig,
12
+ } from "@superblocksteam/library";
13
+
14
+ import { cn } from "@/lib/utils";
15
+
16
+ // Base Accordion Components
17
+ function Accordion({
18
+ ...props
19
+ }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
20
+ return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
21
+ }
22
+
23
+ interface AccordionItemProps extends React.ComponentProps<
24
+ typeof AccordionPrimitive.Item
25
+ > {
26
+ className?: string;
27
+ overrideClassName?: string;
28
+ }
29
+
30
+ function AccordionItem({
31
+ className,
32
+ overrideClassName,
33
+ ...props
34
+ }: AccordionItemProps) {
35
+ return (
36
+ <AccordionPrimitive.Item
37
+ data-slot="accordion-item"
38
+ className={overrideClassName ?? cn("border-b last:border-b-0", className)}
39
+ {...props}
40
+ />
41
+ );
42
+ }
43
+
44
+ function AccordionTrigger({
45
+ className,
46
+ children,
47
+ ...props
48
+ }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
49
+ return (
50
+ <AccordionPrimitive.Header className="flex">
51
+ <AccordionPrimitive.Trigger
52
+ data-slot="accordion-trigger"
53
+ className={cn(
54
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
55
+ className,
56
+ )}
57
+ {...props}
58
+ >
59
+ {children}
60
+ <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
61
+ </AccordionPrimitive.Trigger>
62
+ </AccordionPrimitive.Header>
63
+ );
64
+ }
65
+
66
+ function AccordionContent({
67
+ className,
68
+ children,
69
+ ...props
70
+ }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
71
+ return (
72
+ <AccordionPrimitive.Content
73
+ data-slot="accordion-content"
74
+ className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
75
+ {...props}
76
+ >
77
+ <div className={cn("pt-0 pb-4", className)}>{children}</div>
78
+ </AccordionPrimitive.Content>
79
+ );
80
+ }
81
+
82
+ // AccordionItem Properties Definition
83
+ const accordionItemPropertiesDefinition: PropertiesPanelDefinition<AccordionItemProps> =
84
+ {
85
+ general: Section.category(PropsCategory.Content).children({
86
+ value: Prop.string().propertiesPanel({
87
+ label: "Value",
88
+ description:
89
+ "Unique identifier for this accordion item. Used to identify which item is open/closed",
90
+ }),
91
+ children: Prop.jsx().propertiesPanel({
92
+ label: "Children",
93
+ description: "The content of the accordion item",
94
+ }),
95
+ }),
96
+ };
97
+
98
+ registerComponent(
99
+ AccordionItem,
100
+ accordionItemPropertiesDefinition,
101
+ ).editorConfig({
102
+ isDroppable: false,
103
+ isDraggable: false,
104
+ });
105
+
106
+ // Accordion Properties Definition
107
+ interface AccordionPropsForPanel {
108
+ type?: "single" | "multiple";
109
+ value?: string | string[];
110
+ defaultValue?: string | string[];
111
+ onValueChange?: (value: string | string[]) => void;
112
+ collapsible?: boolean;
113
+ disabled?: boolean;
114
+ children?: React.ReactNode;
115
+ }
116
+
117
+ const accordionPropertiesDefinition: PropertiesPanelDefinition<AccordionPropsForPanel> =
118
+ {
119
+ general: Section.category(PropsCategory.Content).children({
120
+ value: Prop.any<string | string[]>().propertiesPanel({
121
+ label: "Value",
122
+ controlType: "INPUT_TEXT",
123
+ description:
124
+ "The controlled value of the accordion (string or array of strings)",
125
+ isRemovable: true,
126
+ visibility: "SHOW_NAME",
127
+ }),
128
+ type: Prop.string<"single" | "multiple">().propertiesPanel({
129
+ label: "Type",
130
+ controlType: "RADIO_BUTTON_GROUP",
131
+ options: [
132
+ {
133
+ label: "Single",
134
+ value: "single",
135
+ },
136
+ {
137
+ label: "Multiple",
138
+ value: "multiple",
139
+ },
140
+ ],
141
+ }),
142
+ children: Prop.jsx().propertiesPanel({
143
+ label: "Children",
144
+ description: "The accordion items to display",
145
+ }),
146
+ defaultValue: Prop.any<string | string[]>().propertiesPanel({
147
+ label: "Default value",
148
+ controlType: "INPUT_TEXT",
149
+ description:
150
+ "The default value of the accordion (string or array of strings)",
151
+ defaultOnAdd: "item-1",
152
+ visibility: "SHOW_NAME",
153
+ isRemovable: true,
154
+ }),
155
+ collapsible: Prop.boolean().propertiesPanel({
156
+ label: "Collapsible",
157
+ controlType: "SWITCH",
158
+ description: "Allow all items to be collapsed",
159
+ }),
160
+ }),
161
+
162
+ interaction: Section.category(PropsCategory.Interaction).children({
163
+ disabled: Prop.boolean().propertiesPanel({
164
+ label: "Disabled",
165
+ controlType: "SWITCH",
166
+ description: "Disable the accordion",
167
+ }),
168
+ }),
169
+
170
+ events: Section.category(PropsCategory.EventHandlers).children({
171
+ onValueChange: Prop.eventHandler().propertiesPanel({
172
+ label: "onValueChange",
173
+ description: "Triggered when the accordion value changes",
174
+ computedArgs: [
175
+ {
176
+ name: "value",
177
+ type: "string",
178
+ description: "The selected value",
179
+ },
180
+ ],
181
+ }),
182
+ }),
183
+ };
184
+
185
+ // Editor Template
186
+ // Editor Config
187
+ const editorConfig: EditorConfig = {
188
+ icon: "custom",
189
+ isDroppable: false,
190
+ };
191
+
192
+ // Register Accordion Component
193
+ registerComponent(Accordion, accordionPropertiesDefinition).editorConfig(
194
+ editorConfig,
195
+ );
196
+
197
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,432 @@
1
+ import React from "react";
2
+ import {
3
+ AreaChart as AreaChartComponent,
4
+ Area,
5
+ XAxis,
6
+ YAxis,
7
+ CartesianGrid,
8
+ } from "recharts";
9
+
10
+ import {
11
+ registerComponent,
12
+ Prop,
13
+ Section,
14
+ PropsCategory,
15
+ type EditorConfig,
16
+ } from "@superblocksteam/library";
17
+
18
+ import { cn } from "@/lib/utils";
19
+
20
+ import type { ChartConfig } from "./chart";
21
+ import {
22
+ ChartContainer,
23
+ ChartTooltip,
24
+ ChartTooltipContent,
25
+ ChartLegend,
26
+ ChartLegendContent,
27
+ sanitizeForCssVar,
28
+ fixColorFormat,
29
+ createKeyMapping,
30
+ } from "./chart";
31
+
32
+ type ComponentProps = Omit<
33
+ React.ComponentPropsWithoutRef<typeof ChartContainer>,
34
+ "children" | "config"
35
+ > & {
36
+ data?: any[];
37
+ xAxisKey?: string;
38
+ categories?: string[];
39
+ seriesLabels?: Record<string, string>;
40
+ colors?: string[];
41
+ gridStyle?: "solid" | "dashed" | "hidden";
42
+ showXAxis?: boolean;
43
+ showYAxis?: boolean;
44
+ showTooltip?: boolean;
45
+ showLegend?: boolean;
46
+ areaType?:
47
+ | "monotone"
48
+ | "linear"
49
+ | "step"
50
+ | "bump"
51
+ | "basis"
52
+ | "stepBefore"
53
+ | "stepAfter"
54
+ | "natural";
55
+ useGradient?: boolean;
56
+ fillOpacity?: number;
57
+ strokeWidth?: number;
58
+ connectNulls?: boolean;
59
+ enableAnimation?: boolean;
60
+ showDots?: boolean;
61
+ onDataClick?: (data: any) => void;
62
+ };
63
+
64
+ const AreaChart = ({ className, ...props }: ComponentProps) => {
65
+ const chartConfig: ChartConfig = React.useMemo(() => {
66
+ const effectiveCategories =
67
+ props.categories && props.categories.length > 0
68
+ ? props.categories
69
+ : props.data && props.data.length > 0
70
+ ? Object.keys(props.data[0]).filter((key) => {
71
+ if (key === props.xAxisKey) return false;
72
+ const value = props.data![0][key];
73
+ return typeof value === "number";
74
+ })
75
+ : [];
76
+
77
+ if (!effectiveCategories.length) return {};
78
+
79
+ const config: ChartConfig = {};
80
+ effectiveCategories.forEach((key, index) => {
81
+ const sanitizedKey = sanitizeForCssVar(key);
82
+ const label = props.seriesLabels?.[key] || key;
83
+ const color = fixColorFormat(
84
+ props.colors?.[index] || `var(--chart-${(index % 5) + 1})`,
85
+ );
86
+
87
+ config[sanitizedKey] = {
88
+ label,
89
+ color,
90
+ };
91
+ });
92
+
93
+ return config;
94
+ }, [
95
+ props.categories,
96
+ props.seriesLabels,
97
+ props.colors,
98
+ props.data,
99
+ props.xAxisKey,
100
+ ]);
101
+
102
+ const keyMapping = React.useMemo(() => {
103
+ const effectiveCategories =
104
+ props.categories && props.categories.length > 0
105
+ ? props.categories
106
+ : props.data && props.data.length > 0
107
+ ? Object.keys(props.data[0]).filter((key) => {
108
+ if (key === props.xAxisKey) return false;
109
+ const value = props.data![0][key];
110
+ return typeof value === "number";
111
+ })
112
+ : [];
113
+
114
+ return effectiveCategories.length > 0
115
+ ? createKeyMapping(
116
+ Object.fromEntries(effectiveCategories.map((k) => [k, { label: k }])),
117
+ )
118
+ : new Map();
119
+ }, [props.categories, props.data, props.xAxisKey]);
120
+
121
+ const hasData = Array.isArray(props.data) && props.data?.length;
122
+
123
+ const renderGradients = () => {
124
+ if (!props.useGradient || !hasData) return null;
125
+
126
+ return (
127
+ <defs>
128
+ {Object.keys(chartConfig).map((key) => {
129
+ return (
130
+ <linearGradient
131
+ key={key}
132
+ id={`${key}-gradient`}
133
+ x1="0"
134
+ y1="0"
135
+ x2="0"
136
+ y2="1"
137
+ >
138
+ <stop
139
+ offset="0%"
140
+ stopColor={chartConfig[key]?.color}
141
+ stopOpacity={props.fillOpacity}
142
+ />
143
+ <stop
144
+ offset="100%"
145
+ stopColor={chartConfig[key]?.color}
146
+ stopOpacity={0.05}
147
+ />
148
+ </linearGradient>
149
+ );
150
+ })}
151
+ </defs>
152
+ );
153
+ };
154
+
155
+ return (
156
+ <ChartContainer
157
+ className={cn("h-full w-full pt-4 pb-4 pr-4", className)}
158
+ {...props}
159
+ config={chartConfig}
160
+ >
161
+ {hasData ? (
162
+ <AreaChartComponent
163
+ data={props.data}
164
+ onClick={props.onDataClick}
165
+ accessibilityLayer
166
+ >
167
+ {renderGradients()}
168
+
169
+ {props.gridStyle !== "hidden" && (
170
+ <CartesianGrid
171
+ vertical={false}
172
+ strokeDasharray={props.gridStyle === "dashed" ? "3 3" : "0"}
173
+ />
174
+ )}
175
+
176
+ {props.showXAxis && (
177
+ <XAxis
178
+ dataKey={props.xAxisKey}
179
+ tickLine={false}
180
+ axisLine={false}
181
+ tickMargin={8}
182
+ />
183
+ )}
184
+
185
+ {props.showYAxis && (
186
+ <YAxis tickLine={false} axisLine={false} tickMargin={8} />
187
+ )}
188
+
189
+ {props.showTooltip && (
190
+ <ChartTooltip cursor={false} content={<ChartTooltipContent />} />
191
+ )}
192
+
193
+ {props.showLegend && <ChartLegend content={<ChartLegendContent />} />}
194
+
195
+ {Object.keys(chartConfig).map((key) => {
196
+ // Use memoized mapping instead of O(n²) find operation
197
+ const originalKey = keyMapping.get(key) || key;
198
+ const effectiveFillOpacity = props.useGradient
199
+ ? 1
200
+ : props.fillOpacity;
201
+ const wouldHideChart =
202
+ props.fillOpacity === 0 && props.strokeWidth === 0;
203
+
204
+ return (
205
+ <Area
206
+ key={key}
207
+ dataKey={originalKey}
208
+ type={props.areaType}
209
+ fill={
210
+ props.useGradient
211
+ ? `url(#${key}-gradient)`
212
+ : `var(--color-${key})`
213
+ }
214
+ {...(!wouldHideChart && { fillOpacity: effectiveFillOpacity })}
215
+ stroke={`var(--color-${key})`}
216
+ {...(!wouldHideChart && { strokeWidth: props.strokeWidth })}
217
+ connectNulls={props.connectNulls}
218
+ isAnimationActive={props.enableAnimation}
219
+ activeDot={{
220
+ fill: `var(--color-${key})`,
221
+ strokeWidth: 2,
222
+ r: 4,
223
+ }}
224
+ dot={
225
+ props.showDots
226
+ ? {
227
+ fill: `var(--color-${key})`,
228
+ strokeWidth: 2,
229
+ r: 2,
230
+ }
231
+ : false
232
+ }
233
+ />
234
+ );
235
+ })}
236
+ </AreaChartComponent>
237
+ ) : (
238
+ <div className="flex items-center justify-center h-full w-full min-h-32 text-muted-foreground">
239
+ No data available
240
+ </div>
241
+ )}
242
+ </ChartContainer>
243
+ );
244
+ };
245
+
246
+ const properties = {
247
+ general: Section.category(PropsCategory.Content).children({
248
+ data: Prop.array<any>()
249
+ .propertiesPanel({
250
+ label: "Data",
251
+ description: "Array of data objects for the area chart",
252
+ controlType: "FUNCTION_CODE_EDITOR",
253
+ isJSConvertible: false,
254
+ })
255
+ .docs({
256
+ description:
257
+ "Array of objects where each object represents a data point with X-axis and Y-axis values. Each object should contain the xAxisKey property and properties for each data series defined in categories. Example: [{month: 'January', desktop: 186, mobile: 80}, {month: 'February', desktop: 305, mobile: 200}]. Multiple Y-value properties create multiple area series.",
258
+ }),
259
+
260
+ xAxisKey: Prop.string()
261
+ .propertiesPanel({
262
+ label: "X-axis data key",
263
+ description: " name for X-axis values (categories)",
264
+ placeholder: "month",
265
+ controlType: "DROP_DOWN",
266
+ options: function (this) {
267
+ if (!this.data || !Array.isArray(this.data) || !this.data.length) {
268
+ return [];
269
+ }
270
+ const keys = Object.keys(this.data[0]);
271
+ return keys.map((key) => ({
272
+ label: key,
273
+ value: key,
274
+ }));
275
+ },
276
+ })
277
+ .docs({
278
+ description:
279
+ "The property name in your data objects that contains the X-axis values (categories, dates, or labels). This determines the horizontal positioning of data points. Should be consistent across all data objects.",
280
+ }),
281
+
282
+ categories: Prop.array<string>()
283
+ .propertiesPanel({
284
+ label: "Categories",
285
+ description:
286
+ "Array of data keys to plot as area series (optional, auto-detects numeric properties if not provided)",
287
+ controlType: "FUNCTION_CODE_EDITOR",
288
+ isJSConvertible: false,
289
+ })
290
+ .docs({
291
+ description:
292
+ "Array of property names from your data objects to plot as separate area series. Example: ['desktop', 'mobile'] will create two area series. Each category should correspond to a numeric property in your data. If not provided, automatically detects all numeric properties (excluding xAxisKey) from the data.",
293
+ }),
294
+
295
+ seriesLabels: Prop.any<Record<string, string>>()
296
+ .propertiesPanel({
297
+ label: "Series labels",
298
+ description:
299
+ "Optional labels for series (optional, defaults to category names)",
300
+ controlType: "FUNCTION_CODE_EDITOR",
301
+ isJSConvertible: false,
302
+ })
303
+ .docs({
304
+ description:
305
+ "Optional object mapping category keys to display labels. Example: {desktop: 'Desktop Users', mobile: 'Mobile Users'}. If not provided, the category keys are used as labels.",
306
+ }),
307
+
308
+ colors: Prop.array<string>()
309
+ .propertiesPanel({
310
+ label: "Colors",
311
+ description: "Array of colors for series (optional)",
312
+ controlType: "FUNCTION_CODE_EDITOR",
313
+ isJSConvertible: false,
314
+ })
315
+ .docs({
316
+ description:
317
+ "Optional array of color values to use for series in order. Can be hex codes, rgb values, or CSS variables like 'var(--chart-1)'. Falls back to theme colors if not provided.",
318
+ }),
319
+ }),
320
+ appearance: Section.category(PropsCategory.Appearance).children({
321
+ gridStyle: Prop.string<"solid" | "dashed" | "hidden">().propertiesPanel({
322
+ label: "Grid style",
323
+ description: "Style of the chart grid lines",
324
+ controlType: "DROP_DOWN",
325
+ options: [
326
+ { label: "Solid", value: "solid" },
327
+ { label: "Dashed", value: "dashed" },
328
+ { label: "Hidden", value: "hidden" },
329
+ ],
330
+ }),
331
+ showXAxis: Prop.boolean().propertiesPanel({
332
+ label: "Show X-axis",
333
+ description: "Display X-axis with labels",
334
+ controlType: "SWITCH",
335
+ }),
336
+ showYAxis: Prop.boolean().propertiesPanel({
337
+ label: "Show Y-axis",
338
+ description: "Display Y-axis with labels",
339
+ controlType: "SWITCH",
340
+ }),
341
+ showTooltip: Prop.boolean().propertiesPanel({
342
+ label: "Show tooltip",
343
+ description: "Display tooltip on hover",
344
+ controlType: "SWITCH",
345
+ }),
346
+ showLegend: Prop.boolean().propertiesPanel({
347
+ label: "Show legend",
348
+ description: "Display chart legend",
349
+ controlType: "SWITCH",
350
+ }),
351
+ fillOpacity: Prop.number().propertiesPanel({
352
+ label: "Fill opacity",
353
+ description: "Opacity of the area fill (0-1)",
354
+ }),
355
+ strokeWidth: Prop.number().propertiesPanel({
356
+ label: "Stroke width",
357
+ description: "Width of the area border line",
358
+ }),
359
+ useGradient: Prop.boolean().propertiesPanel({
360
+ label: "Use gradient",
361
+ description: "Use gradient fill for the area",
362
+ controlType: "SWITCH",
363
+ }),
364
+ showDots: Prop.boolean().propertiesPanel({
365
+ label: "Show dots",
366
+ description: "Display dots on the area",
367
+ controlType: "SWITCH",
368
+ }),
369
+ connectNulls: Prop.boolean().propertiesPanel({
370
+ label: "Connect nulls",
371
+ description: "Connect nulls with the previous non-null value",
372
+ controlType: "SWITCH",
373
+ }),
374
+ areaType: Prop.string<
375
+ | "linear"
376
+ | "bump"
377
+ | "step"
378
+ | "basis"
379
+ | "stepBefore"
380
+ | "stepAfter"
381
+ | "natural"
382
+ | "monotone"
383
+ >()
384
+ .propertiesPanel({
385
+ label: "Area type",
386
+ description: "Type of area to display",
387
+ controlType: "DROP_DOWN",
388
+ options: [
389
+ { label: "Linear", value: "linear" },
390
+ { label: "Bump", value: "bump" },
391
+ { label: "Step", value: "step" },
392
+ { label: "Basis", value: "basis" },
393
+ { label: "Step Before", value: "stepBefore" },
394
+ { label: "Step After", value: "stepAfter" },
395
+ { label: "Natural", value: "natural" },
396
+ { label: "Monotone", value: "monotone" },
397
+ ],
398
+ })
399
+ .docs({
400
+ description:
401
+ "Curve interpolation type for area paths. 'linear' creates straight lines, 'monotone' creates smooth curves that preserve monotonicity, 'natural' creates natural spline curves, 'step' creates step functions, 'basis' creates B-spline curves, 'bump' creates rounded bumps, 'stepBefore' steps before point, 'stepAfter' steps after point.",
402
+ }),
403
+ }),
404
+ interaction: Section.category(PropsCategory.Interaction).children({
405
+ enableAnimation: Prop.boolean().propertiesPanel({
406
+ label: "Enable animation",
407
+ description: "Enable chart animations on load",
408
+ controlType: "SWITCH",
409
+ }),
410
+ }),
411
+ events: Section.category(PropsCategory.EventHandlers).children({
412
+ onDataClick: Prop.eventHandler().propertiesPanel({
413
+ label: "onDataClick",
414
+ description: "Triggered when an area is clicked",
415
+ computedArgs: [
416
+ {
417
+ name: "data",
418
+ type: "object",
419
+ description: "The data point that was clicked",
420
+ },
421
+ ],
422
+ }),
423
+ }),
424
+ };
425
+
426
+ const editorConfig: EditorConfig = {
427
+ icon: "chart",
428
+ };
429
+
430
+ registerComponent(AreaChart, properties).editorConfig(editorConfig);
431
+
432
+ export { AreaChart };
@@ -0,0 +1,45 @@
1
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
+ import type React from "react";
3
+
4
+ import { registerComponent } from "@superblocksteam/library";
5
+ import {
6
+ Prop,
7
+ Section,
8
+ PropsCategory,
9
+ type PropertiesPanelDefinition,
10
+ type EditorConfig,
11
+ } from "@superblocksteam/library";
12
+
13
+ // Base AspectRatio Component
14
+ function AspectRatio({
15
+ ...props
16
+ }: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
17
+ return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />;
18
+ }
19
+
20
+ // AspectRatio Props
21
+ type AspectRatioProps = React.ComponentPropsWithoutRef<typeof AspectRatio>;
22
+
23
+ // Properties Definition
24
+ const propertiesDefinition: PropertiesPanelDefinition<AspectRatioProps> = {
25
+ general: Section.category(PropsCategory.Content).children({
26
+ ratio: Prop.number().propertiesPanel({
27
+ label: "Aspect ratio",
28
+ description: "The desired width/height ratio (e.g., 1.777 for 16:9)",
29
+ placeholder: "1.777",
30
+ }),
31
+ }),
32
+ };
33
+
34
+ // Editor Template
35
+ // Editor Config
36
+ const editorConfig: EditorConfig = {
37
+ description:
38
+ "Container that maintains a consistent aspect ratio for content, useful for responsive images and videos",
39
+ isDroppable: true,
40
+ };
41
+
42
+ // Register Component
43
+ registerComponent(AspectRatio, propertiesDefinition).editorConfig(editorConfig);
44
+
45
+ export { AspectRatio };