@superblocksteam/vite-plugin-file-sync 2.0.170 → 2.0.171-next.0

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 (491) hide show
  1. package/dist/ai-service/agent/prompts/api-prompts.d.ts.map +1 -1
  2. package/dist/ai-service/agent/prompts/api-prompts.js +4 -6
  3. package/dist/ai-service/agent/prompts/api-prompts.js.map +1 -1
  4. package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts +3 -12
  5. package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts.map +1 -1
  6. package/dist/ai-service/agent/prompts/build-base-system-prompt.js +144 -71
  7. package/dist/ai-service/agent/prompts/build-base-system-prompt.js.map +1 -1
  8. package/dist/ai-service/agent/subagents/testing/types.d.ts +2 -1
  9. package/dist/ai-service/agent/subagents/testing/types.d.ts.map +1 -1
  10. package/dist/ai-service/agent/tool-message-utils.d.ts.map +1 -1
  11. package/dist/ai-service/agent/tool-message-utils.js +47 -36
  12. package/dist/ai-service/agent/tool-message-utils.js.map +1 -1
  13. package/dist/ai-service/agent/tool-result-metrics.d.ts +15 -0
  14. package/dist/ai-service/agent/tool-result-metrics.d.ts.map +1 -1
  15. package/dist/ai-service/agent/tool-result-metrics.js +28 -0
  16. package/dist/ai-service/agent/tool-result-metrics.js.map +1 -1
  17. package/dist/ai-service/agent/tools/apis/analysis.d.ts +24 -2
  18. package/dist/ai-service/agent/tools/apis/analysis.d.ts.map +1 -1
  19. package/dist/ai-service/agent/tools/apis/analysis.js +164 -11
  20. package/dist/ai-service/agent/tools/apis/analysis.js.map +1 -1
  21. package/dist/ai-service/agent/tools/apis/api-comparator.d.ts +2 -1
  22. package/dist/ai-service/agent/tools/apis/api-comparator.d.ts.map +1 -1
  23. package/dist/ai-service/agent/tools/apis/contained-source-reader.d.ts +11 -0
  24. package/dist/ai-service/agent/tools/apis/contained-source-reader.d.ts.map +1 -0
  25. package/dist/ai-service/agent/tools/apis/contained-source-reader.js +48 -0
  26. package/dist/ai-service/agent/tools/apis/contained-source-reader.js.map +1 -0
  27. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.d.ts +37 -10
  28. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.d.ts.map +1 -1
  29. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js +140 -70
  30. package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js.map +1 -1
  31. package/dist/ai-service/agent/tools/apis/spreadsheet-csv.d.ts +6 -20
  32. package/dist/ai-service/agent/tools/apis/spreadsheet-csv.d.ts.map +1 -1
  33. package/dist/ai-service/agent/tools/apis/spreadsheet-csv.js +3 -3
  34. package/dist/ai-service/agent/tools/apis/spreadsheet-csv.js.map +1 -1
  35. package/dist/ai-service/agent/tools/apis/test-api-metrics.d.ts +8 -0
  36. package/dist/ai-service/agent/tools/apis/test-api-metrics.d.ts.map +1 -0
  37. package/dist/ai-service/agent/tools/apis/test-api-metrics.js +41 -0
  38. package/dist/ai-service/agent/tools/apis/test-api-metrics.js.map +1 -0
  39. package/dist/ai-service/agent/tools/apis/test-api-timing.d.ts +27 -0
  40. package/dist/ai-service/agent/tools/apis/test-api-timing.d.ts.map +1 -0
  41. package/dist/ai-service/agent/tools/apis/test-api-timing.js +25 -0
  42. package/dist/ai-service/agent/tools/apis/test-api-timing.js.map +1 -0
  43. package/dist/ai-service/agent/tools/apis/test-api.d.ts +4 -0
  44. package/dist/ai-service/agent/tools/apis/test-api.d.ts.map +1 -1
  45. package/dist/ai-service/agent/tools/apis/test-api.js +119 -20
  46. package/dist/ai-service/agent/tools/apis/test-api.js.map +1 -1
  47. package/dist/ai-service/agent/tools/build-capture-screenshot.d.ts +0 -18
  48. package/dist/ai-service/agent/tools/build-capture-screenshot.d.ts.map +1 -1
  49. package/dist/ai-service/agent/tools/build-capture-screenshot.js +2 -2
  50. package/dist/ai-service/agent/tools/build-capture-screenshot.js.map +1 -1
  51. package/dist/ai-service/agent/tools/build-install-packages.d.ts +32 -5
  52. package/dist/ai-service/agent/tools/build-install-packages.d.ts.map +1 -1
  53. package/dist/ai-service/agent/tools/build-install-packages.js +20 -19
  54. package/dist/ai-service/agent/tools/build-install-packages.js.map +1 -1
  55. package/dist/ai-service/agent/tools/build-manage-checklist.d.ts +1 -1
  56. package/dist/ai-service/agent/tools/build-manage-packages.d.ts +19 -0
  57. package/dist/ai-service/agent/tools/build-manage-packages.d.ts.map +1 -0
  58. package/dist/ai-service/agent/tools/build-manage-packages.js +220 -0
  59. package/dist/ai-service/agent/tools/build-manage-packages.js.map +1 -0
  60. package/dist/ai-service/agent/tools/build-read-file.d.ts +5 -14
  61. package/dist/ai-service/agent/tools/build-read-file.d.ts.map +1 -1
  62. package/dist/ai-service/agent/tools/build-read-file.js +5 -8
  63. package/dist/ai-service/agent/tools/build-read-file.js.map +1 -1
  64. package/dist/ai-service/agent/tools/databases/dev-database-tasks.d.ts +2 -90
  65. package/dist/ai-service/agent/tools/databases/dev-database-tasks.d.ts.map +1 -1
  66. package/dist/ai-service/agent/tools/databases/dev-database-tasks.js +1 -2
  67. package/dist/ai-service/agent/tools/databases/dev-database-tasks.js.map +1 -1
  68. package/dist/ai-service/agent/tools/debug-cache.d.ts +0 -12
  69. package/dist/ai-service/agent/tools/debug-cache.d.ts.map +1 -1
  70. package/dist/ai-service/agent/tools/debug-cache.js +1 -1
  71. package/dist/ai-service/agent/tools/debug-cache.js.map +1 -1
  72. package/dist/ai-service/agent/tools/index.d.ts +3 -3
  73. package/dist/ai-service/agent/tools/index.d.ts.map +1 -1
  74. package/dist/ai-service/agent/tools/index.js +2 -2
  75. package/dist/ai-service/agent/tools/index.js.map +1 -1
  76. package/dist/ai-service/agent/tools/integrations/errors.d.ts.map +1 -1
  77. package/dist/ai-service/agent/tools/integrations/errors.js +3 -0
  78. package/dist/ai-service/agent/tools/integrations/errors.js.map +1 -1
  79. package/dist/ai-service/agent/tools/integrations/execute-request.d.ts +27 -0
  80. package/dist/ai-service/agent/tools/integrations/execute-request.d.ts.map +1 -1
  81. package/dist/ai-service/agent/tools/integrations/execute-request.js +85 -11
  82. package/dist/ai-service/agent/tools/integrations/execute-request.js.map +1 -1
  83. package/dist/ai-service/agent/tools/integrations/managed-app-database.d.ts +0 -2
  84. package/dist/ai-service/agent/tools/integrations/managed-app-database.d.ts.map +1 -1
  85. package/dist/ai-service/agent/tools/integrations/managed-app-database.js +1 -1
  86. package/dist/ai-service/agent/tools/integrations/managed-app-database.js.map +1 -1
  87. package/dist/ai-service/agent/tools/integrations/metadata.d.ts.map +1 -1
  88. package/dist/ai-service/agent/tools/integrations/metadata.js +1 -0
  89. package/dist/ai-service/agent/tools/integrations/metadata.js.map +1 -1
  90. package/dist/ai-service/agent/tools/read-state-trackers.d.ts +16 -2
  91. package/dist/ai-service/agent/tools/read-state-trackers.d.ts.map +1 -1
  92. package/dist/ai-service/agent/tools/read-state-trackers.js +11 -2
  93. package/dist/ai-service/agent/tools/read-state-trackers.js.map +1 -1
  94. package/dist/ai-service/agent/tools.d.ts.map +1 -1
  95. package/dist/ai-service/agent/tools.js +13 -6
  96. package/dist/ai-service/agent/tools.js.map +1 -1
  97. package/dist/ai-service/agent/tools2/registry.d.ts +20 -1
  98. package/dist/ai-service/agent/tools2/registry.d.ts.map +1 -1
  99. package/dist/ai-service/agent/tools2/registry.js +55 -9
  100. package/dist/ai-service/agent/tools2/registry.js.map +1 -1
  101. package/dist/ai-service/agent/tools2/tools/grep-metadata-ripgrep.d.ts.map +1 -1
  102. package/dist/ai-service/agent/tools2/tools/grep-metadata-ripgrep.js +25 -0
  103. package/dist/ai-service/agent/tools2/tools/grep-metadata-ripgrep.js.map +1 -1
  104. package/dist/ai-service/agent/tools2/tools/grep-metadata.d.ts +8 -2
  105. package/dist/ai-service/agent/tools2/tools/grep-metadata.d.ts.map +1 -1
  106. package/dist/ai-service/agent/tools2/tools/grep-metadata.js +17 -0
  107. package/dist/ai-service/agent/tools2/tools/grep-metadata.js.map +1 -1
  108. package/dist/ai-service/agent/tools2/tools/grep.d.ts.map +1 -1
  109. package/dist/ai-service/agent/tools2/tools/grep.js +50 -25
  110. package/dist/ai-service/agent/tools2/tools/grep.js.map +1 -1
  111. package/dist/ai-service/agent/utils.d.ts.map +1 -1
  112. package/dist/ai-service/agent/utils.js +3 -3
  113. package/dist/ai-service/agent/utils.js.map +1 -1
  114. package/dist/ai-service/app-interface/file-system-interface.d.ts +0 -6
  115. package/dist/ai-service/app-interface/file-system-interface.d.ts.map +1 -1
  116. package/dist/ai-service/app-interface/file-system-interface.js +39 -97
  117. package/dist/ai-service/app-interface/file-system-interface.js.map +1 -1
  118. package/dist/ai-service/app-interface/filesystem/handlers/skill-handler.d.ts.map +1 -1
  119. package/dist/ai-service/app-interface/filesystem/handlers/skill-handler.js +2 -2
  120. package/dist/ai-service/app-interface/filesystem/handlers/skill-handler.js.map +1 -1
  121. package/dist/ai-service/app-interface/filesystem/validation.js +1 -1
  122. package/dist/ai-service/app-interface/filesystem/validation.js.map +1 -1
  123. package/dist/ai-service/app-interface/npm-package-lookup.d.ts +1 -3
  124. package/dist/ai-service/app-interface/npm-package-lookup.d.ts.map +1 -1
  125. package/dist/ai-service/app-interface/npm-package-lookup.js +1 -1
  126. package/dist/ai-service/app-interface/npm-package-lookup.js.map +1 -1
  127. package/dist/ai-service/app-interface/pnpm-lockfile.d.ts.map +1 -1
  128. package/dist/ai-service/app-interface/pnpm-lockfile.js +2 -4
  129. package/dist/ai-service/app-interface/pnpm-lockfile.js.map +1 -1
  130. package/dist/ai-service/app-interface/shell.d.ts +38 -15
  131. package/dist/ai-service/app-interface/shell.d.ts.map +1 -1
  132. package/dist/ai-service/app-interface/shell.js +646 -48
  133. package/dist/ai-service/app-interface/shell.js.map +1 -1
  134. package/dist/ai-service/app-interface/vulnerability-gate.d.ts +7 -0
  135. package/dist/ai-service/app-interface/vulnerability-gate.d.ts.map +1 -1
  136. package/dist/ai-service/app-interface/vulnerability-gate.js +16 -6
  137. package/dist/ai-service/app-interface/vulnerability-gate.js.map +1 -1
  138. package/dist/ai-service/app-layout.d.ts +3 -0
  139. package/dist/ai-service/app-layout.d.ts.map +1 -1
  140. package/dist/ai-service/app-layout.js +14 -0
  141. package/dist/ai-service/app-layout.js.map +1 -1
  142. package/dist/ai-service/app-skills/parser.d.ts +2 -1
  143. package/dist/ai-service/app-skills/parser.d.ts.map +1 -1
  144. package/dist/ai-service/attachments/store.d.ts +4 -4
  145. package/dist/ai-service/attachments/store.d.ts.map +1 -1
  146. package/dist/ai-service/chat/chat-session-store-metrics.d.ts +1 -2
  147. package/dist/ai-service/chat/chat-session-store-metrics.d.ts.map +1 -1
  148. package/dist/ai-service/chat/chat-session-store-metrics.js +0 -6
  149. package/dist/ai-service/chat/chat-session-store-metrics.js.map +1 -1
  150. package/dist/ai-service/chat/chat-session-store.d.ts +2 -11
  151. package/dist/ai-service/chat/chat-session-store.d.ts.map +1 -1
  152. package/dist/ai-service/chat/chat-session-store.js +21 -4
  153. package/dist/ai-service/chat/chat-session-store.js.map +1 -1
  154. package/dist/ai-service/chat/utils.d.ts +1 -2
  155. package/dist/ai-service/chat/utils.d.ts.map +1 -1
  156. package/dist/ai-service/chat/utils.js +0 -1
  157. package/dist/ai-service/chat/utils.js.map +1 -1
  158. package/dist/ai-service/checklist/persisted-checklist-store.d.ts +3 -3
  159. package/dist/ai-service/checklist/persisted-checklist-store.d.ts.map +1 -1
  160. package/dist/ai-service/checklist/persisted-checklist-store.js +4 -2
  161. package/dist/ai-service/checklist/persisted-checklist-store.js.map +1 -1
  162. package/dist/ai-service/context/app-context.d.ts +7 -39
  163. package/dist/ai-service/context/app-context.d.ts.map +1 -1
  164. package/dist/ai-service/context/app-context.js +29 -110
  165. package/dist/ai-service/context/app-context.js.map +1 -1
  166. package/dist/ai-service/context-clear-metrics.d.ts +11 -0
  167. package/dist/ai-service/context-clear-metrics.d.ts.map +1 -0
  168. package/dist/ai-service/context-clear-metrics.js +64 -0
  169. package/dist/ai-service/context-clear-metrics.js.map +1 -0
  170. package/dist/ai-service/context-download.js +2 -2
  171. package/dist/ai-service/context-download.js.map +1 -1
  172. package/dist/ai-service/edit-after-clark.d.ts +0 -5
  173. package/dist/ai-service/edit-after-clark.d.ts.map +1 -1
  174. package/dist/ai-service/edit-after-clark.js +1 -1
  175. package/dist/ai-service/edit-after-clark.js.map +1 -1
  176. package/dist/ai-service/features.d.ts +20 -4
  177. package/dist/ai-service/features.d.ts.map +1 -1
  178. package/dist/ai-service/features.js +20 -4
  179. package/dist/ai-service/features.js.map +1 -1
  180. package/dist/ai-service/filter-disabled-tools-for-migration.js +1 -1
  181. package/dist/ai-service/filter-disabled-tools-for-migration.js.map +1 -1
  182. package/dist/ai-service/index.d.ts +58 -0
  183. package/dist/ai-service/index.d.ts.map +1 -1
  184. package/dist/ai-service/index.js +186 -21
  185. package/dist/ai-service/index.js.map +1 -1
  186. package/dist/ai-service/integrations/store.d.ts +6 -0
  187. package/dist/ai-service/integrations/store.d.ts.map +1 -1
  188. package/dist/ai-service/integrations/store.js +101 -3
  189. package/dist/ai-service/integrations/store.js.map +1 -1
  190. package/dist/ai-service/live-edit-events/forwarder.d.ts +1 -12
  191. package/dist/ai-service/live-edit-events/forwarder.d.ts.map +1 -1
  192. package/dist/ai-service/live-edit-events/forwarder.js +1 -7
  193. package/dist/ai-service/live-edit-events/forwarder.js.map +1 -1
  194. package/dist/ai-service/llm/context-v2/compaction/client-side.d.ts.map +1 -1
  195. package/dist/ai-service/llm/context-v2/compaction/client-side.js +15 -5
  196. package/dist/ai-service/llm/context-v2/compaction/client-side.js.map +1 -1
  197. package/dist/ai-service/llm/context-v2/compaction/compaction-strategy.d.ts +6 -0
  198. package/dist/ai-service/llm/context-v2/compaction/compaction-strategy.d.ts.map +1 -1
  199. package/dist/ai-service/llm/context-v2/compaction/server-side.d.ts.map +1 -1
  200. package/dist/ai-service/llm/context-v2/compaction/server-side.js +5 -1
  201. package/dist/ai-service/llm/context-v2/compaction/server-side.js.map +1 -1
  202. package/dist/ai-service/llm/context-v2/compactor.d.ts.map +1 -1
  203. package/dist/ai-service/llm/context-v2/compactor.js +34 -12
  204. package/dist/ai-service/llm/context-v2/compactor.js.map +1 -1
  205. package/dist/ai-service/llm/context-v2/context-management.d.ts.map +1 -1
  206. package/dist/ai-service/llm/context-v2/context-management.js +9 -0
  207. package/dist/ai-service/llm/context-v2/context-management.js.map +1 -1
  208. package/dist/ai-service/llm/context-v2/context-metrics.d.ts +4 -0
  209. package/dist/ai-service/llm/context-v2/context-metrics.d.ts.map +1 -1
  210. package/dist/ai-service/llm/context-v2/context-metrics.js +15 -3
  211. package/dist/ai-service/llm/context-v2/context-metrics.js.map +1 -1
  212. package/dist/ai-service/llm/context-v2/context.d.ts +36 -6
  213. package/dist/ai-service/llm/context-v2/context.d.ts.map +1 -1
  214. package/dist/ai-service/llm/context-v2/context.js +72 -28
  215. package/dist/ai-service/llm/context-v2/context.js.map +1 -1
  216. package/dist/ai-service/llm/context-v2/manager.d.ts +3 -3
  217. package/dist/ai-service/llm/context-v2/manager.d.ts.map +1 -1
  218. package/dist/ai-service/llm/context-v2/manager.js +13 -7
  219. package/dist/ai-service/llm/context-v2/manager.js.map +1 -1
  220. package/dist/ai-service/llm/context-v2/migrations/types.d.ts +2 -1
  221. package/dist/ai-service/llm/context-v2/migrations/types.d.ts.map +1 -1
  222. package/dist/ai-service/llm/context-v2/storage/event-types.d.ts +5 -5
  223. package/dist/ai-service/llm/context-v2/storage/event-types.d.ts.map +1 -1
  224. package/dist/ai-service/llm/context-v2/storage/event-types.js +3 -23
  225. package/dist/ai-service/llm/context-v2/storage/event-types.js.map +1 -1
  226. package/dist/ai-service/llm/context-v2/types.d.ts +9 -1
  227. package/dist/ai-service/llm/context-v2/types.d.ts.map +1 -1
  228. package/dist/ai-service/llm/context-v2/types.js.map +1 -1
  229. package/dist/ai-service/llm/context-v2/uniquify-filenames.d.ts +20 -4
  230. package/dist/ai-service/llm/context-v2/uniquify-filenames.d.ts.map +1 -1
  231. package/dist/ai-service/llm/context-v2/uniquify-filenames.js +128 -29
  232. package/dist/ai-service/llm/context-v2/uniquify-filenames.js.map +1 -1
  233. package/dist/ai-service/llm/error.d.ts +1 -1
  234. package/dist/ai-service/llm/error.d.ts.map +1 -1
  235. package/dist/ai-service/llm/error.js +57 -7
  236. package/dist/ai-service/llm/error.js.map +1 -1
  237. package/dist/ai-service/llm/stream/config.d.ts +3 -3
  238. package/dist/ai-service/llm/stream/config.d.ts.map +1 -1
  239. package/dist/ai-service/llm/stream/errors.d.ts +3 -0
  240. package/dist/ai-service/llm/stream/errors.d.ts.map +1 -1
  241. package/dist/ai-service/llm/stream/errors.js +72 -4
  242. package/dist/ai-service/llm/stream/errors.js.map +1 -1
  243. package/dist/ai-service/llm/stream/observers/workflow-usage.d.ts +0 -6
  244. package/dist/ai-service/llm/stream/observers/workflow-usage.d.ts.map +1 -1
  245. package/dist/ai-service/llm/stream/observers/workflow-usage.js +2 -2
  246. package/dist/ai-service/llm/stream/observers/workflow-usage.js.map +1 -1
  247. package/dist/ai-service/llm/stream/orchestrator.d.ts.map +1 -1
  248. package/dist/ai-service/llm/stream/orchestrator.js +6 -1
  249. package/dist/ai-service/llm/stream/orchestrator.js.map +1 -1
  250. package/dist/ai-service/managed-native-db-availability.d.ts +5 -2
  251. package/dist/ai-service/managed-native-db-availability.d.ts.map +1 -1
  252. package/dist/ai-service/managed-native-db-availability.js +5 -1
  253. package/dist/ai-service/managed-native-db-availability.js.map +1 -1
  254. package/dist/ai-service/mcp/embedded-playwright-mcp-server.js +2 -0
  255. package/dist/ai-service/mcp/embedded-playwright-mcp-server.js.map +1 -1
  256. package/dist/ai-service/migration-prompt-gating.d.ts +1 -0
  257. package/dist/ai-service/migration-prompt-gating.d.ts.map +1 -1
  258. package/dist/ai-service/migration-prompt-gating.js +3 -0
  259. package/dist/ai-service/migration-prompt-gating.js.map +1 -1
  260. package/dist/ai-service/migration-turns-log.d.ts +3 -2
  261. package/dist/ai-service/migration-turns-log.d.ts.map +1 -1
  262. package/dist/ai-service/migration-turns-log.js.map +1 -1
  263. package/dist/ai-service/policy-agent-metrics.d.ts +2 -4
  264. package/dist/ai-service/policy-agent-metrics.d.ts.map +1 -1
  265. package/dist/ai-service/policy-agent-metrics.js +3 -3
  266. package/dist/ai-service/policy-agent-metrics.js.map +1 -1
  267. package/dist/ai-service/policy-gate-remediation-usage.d.ts.map +1 -1
  268. package/dist/ai-service/policy-gate-remediation-usage.js +29 -19
  269. package/dist/ai-service/policy-gate-remediation-usage.js.map +1 -1
  270. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js +1 -1
  271. package/dist/ai-service/prompt-builder-service/classifiers/prompt-interpret-task.js.map +1 -1
  272. package/dist/ai-service/recording/types.d.ts +6 -5
  273. package/dist/ai-service/recording/types.d.ts.map +1 -1
  274. package/dist/ai-service/skills/system/_registry.generated.d.ts.map +1 -1
  275. package/dist/ai-service/skills/system/_registry.generated.js +10 -0
  276. package/dist/ai-service/skills/system/_registry.generated.js.map +1 -1
  277. package/dist/ai-service/skills/system/app-database/skill.generated.d.ts +2 -0
  278. package/dist/ai-service/skills/system/app-database/skill.generated.d.ts.map +1 -0
  279. package/dist/ai-service/skills/system/app-database/skill.generated.js +79 -0
  280. package/dist/ai-service/skills/system/app-database/skill.generated.js.map +1 -0
  281. package/dist/ai-service/skills/system/resolve.d.ts +1 -1
  282. package/dist/ai-service/skills/system/resolve.d.ts.map +1 -1
  283. package/dist/ai-service/skills/system/resolve.js +25 -2
  284. package/dist/ai-service/skills/system/resolve.js.map +1 -1
  285. package/dist/ai-service/skills/system/spreadsheet-import/skill.generated.d.ts +1 -1
  286. package/dist/ai-service/skills/system/spreadsheet-import/skill.generated.d.ts.map +1 -1
  287. package/dist/ai-service/skills/system/spreadsheet-import/skill.generated.js +1 -1
  288. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-plain.generated.d.ts +2 -0
  289. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-plain.generated.d.ts.map +1 -0
  290. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-plain.generated.js +5 -0
  291. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-plain.generated.js.map +1 -0
  292. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-registered.generated.d.ts +2 -0
  293. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-registered.generated.d.ts.map +1 -0
  294. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-registered.generated.js +5 -0
  295. package/dist/ai-service/skills/system/superblocks-frontend/_variants/base-ui-registered.generated.js.map +1 -0
  296. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-lucide.generated.d.ts +2 -0
  297. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-lucide.generated.d.ts.map +1 -0
  298. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-lucide.generated.js +32 -0
  299. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-lucide.generated.js.map +1 -0
  300. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-wrapper.generated.d.ts +2 -0
  301. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-wrapper.generated.d.ts.map +1 -0
  302. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-wrapper.generated.js +34 -0
  303. package/dist/ai-service/skills/system/superblocks-frontend/_variants/icons-wrapper.generated.js.map +1 -0
  304. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.d.ts +1 -1
  305. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.d.ts.map +1 -1
  306. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.js +99 -68
  307. package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.js.map +1 -1
  308. package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts +1 -1
  309. package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts.map +1 -1
  310. package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js +4 -4
  311. package/dist/ai-service/skills/system/superblocks-sdk-api/skill.generated.d.ts +1 -1
  312. package/dist/ai-service/skills/system/superblocks-sdk-api/skill.generated.d.ts.map +1 -1
  313. package/dist/ai-service/skills/system/superblocks-sdk-api/skill.generated.js +7 -7
  314. package/dist/ai-service/skills/system/third-party-migration/skill.generated.d.ts +1 -1
  315. package/dist/ai-service/skills/system/third-party-migration/skill.generated.d.ts.map +1 -1
  316. package/dist/ai-service/skills/system/third-party-migration/skill.generated.js +1 -1
  317. package/dist/ai-service/state-machine/clark-fsm.d.ts +2 -3
  318. package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
  319. package/dist/ai-service/state-machine/clark-fsm.js +1 -1
  320. package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
  321. package/dist/ai-service/state-machine/handlers/agent-planning.d.ts.map +1 -1
  322. package/dist/ai-service/state-machine/handlers/agent-planning.js +1 -4
  323. package/dist/ai-service/state-machine/handlers/agent-planning.js.map +1 -1
  324. package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
  325. package/dist/ai-service/state-machine/handlers/llm-generating.js +21 -12
  326. package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
  327. package/dist/ai-service/state-machine/helpers/prompt-degradation-cause.d.ts +63 -0
  328. package/dist/ai-service/state-machine/helpers/prompt-degradation-cause.d.ts.map +1 -0
  329. package/dist/ai-service/state-machine/helpers/prompt-degradation-cause.js +96 -0
  330. package/dist/ai-service/state-machine/helpers/prompt-degradation-cause.js.map +1 -0
  331. package/dist/ai-service/state-machine/helpers/prompt-degradation-metrics.d.ts +12 -3
  332. package/dist/ai-service/state-machine/helpers/prompt-degradation-metrics.d.ts.map +1 -1
  333. package/dist/ai-service/state-machine/helpers/prompt-degradation-metrics.js +89 -17
  334. package/dist/ai-service/state-machine/helpers/prompt-degradation-metrics.js.map +1 -1
  335. package/dist/ai-service/state-machine/helpers/prompt-org-claims.d.ts +17 -0
  336. package/dist/ai-service/state-machine/helpers/prompt-org-claims.d.ts.map +1 -0
  337. package/dist/ai-service/state-machine/helpers/prompt-org-claims.js +50 -0
  338. package/dist/ai-service/state-machine/helpers/prompt-org-claims.js.map +1 -0
  339. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.d.ts +6 -0
  340. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.d.ts.map +1 -1
  341. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.js +35 -5
  342. package/dist/ai-service/state-machine/helpers/prompt-request-metrics.js.map +1 -1
  343. package/dist/ai-service/state-machine/mocks.d.ts.map +1 -1
  344. package/dist/ai-service/state-machine/mocks.js +1 -4
  345. package/dist/ai-service/state-machine/mocks.js.map +1 -1
  346. package/dist/ai-service/tasks/peer-push.d.ts +2 -1
  347. package/dist/ai-service/tasks/peer-push.d.ts.map +1 -1
  348. package/dist/ai-service/test-utils/metrics-harness.d.ts +2 -1
  349. package/dist/ai-service/test-utils/metrics-harness.d.ts.map +1 -1
  350. package/dist/ai-service/util/llm-config-utils.d.ts +16 -5
  351. package/dist/ai-service/util/llm-config-utils.d.ts.map +1 -1
  352. package/dist/ai-service/util/llm-config-utils.js +25 -3
  353. package/dist/ai-service/util/llm-config-utils.js.map +1 -1
  354. package/dist/ai-service/util/parse-jwt.d.ts +5 -1
  355. package/dist/ai-service/util/parse-jwt.d.ts.map +1 -1
  356. package/dist/ai-service/util/parse-jwt.js +9 -1
  357. package/dist/ai-service/util/parse-jwt.js.map +1 -1
  358. package/dist/app-scope-source.d.ts +13 -0
  359. package/dist/app-scope-source.d.ts.map +1 -0
  360. package/dist/app-scope-source.js +68 -0
  361. package/dist/app-scope-source.js.map +1 -0
  362. package/dist/extract-api-integrations.d.ts +28 -6
  363. package/dist/extract-api-integrations.d.ts.map +1 -1
  364. package/dist/extract-api-integrations.js +166 -98
  365. package/dist/extract-api-integrations.js.map +1 -1
  366. package/dist/file-sync-vite-plugin.d.ts +1 -5
  367. package/dist/file-sync-vite-plugin.d.ts.map +1 -1
  368. package/dist/file-sync-vite-plugin.js +44 -70
  369. package/dist/file-sync-vite-plugin.js.map +1 -1
  370. package/dist/file-system-helpers.d.ts +0 -5
  371. package/dist/file-system-helpers.d.ts.map +1 -1
  372. package/dist/file-system-helpers.js +1 -1
  373. package/dist/file-system-helpers.js.map +1 -1
  374. package/dist/file-system-manager.d.ts +2 -9
  375. package/dist/file-system-manager.d.ts.map +1 -1
  376. package/dist/file-system-manager.js +50 -118
  377. package/dist/file-system-manager.js.map +1 -1
  378. package/dist/git-service/index.d.ts.map +1 -1
  379. package/dist/git-service/index.js +8 -0
  380. package/dist/git-service/index.js.map +1 -1
  381. package/dist/lock-service/index.d.ts +24 -0
  382. package/dist/lock-service/index.d.ts.map +1 -1
  383. package/dist/lock-service/index.js +74 -2
  384. package/dist/lock-service/index.js.map +1 -1
  385. package/dist/migration/integration-write-policy.d.ts +2 -1
  386. package/dist/migration/integration-write-policy.d.ts.map +1 -1
  387. package/dist/migration/integration-write-policy.js.map +1 -1
  388. package/dist/migration/restructure.d.ts +1 -1
  389. package/dist/migration/restructure.d.ts.map +1 -1
  390. package/dist/migration/restructure.js +1 -1
  391. package/dist/migration/restructure.js.map +1 -1
  392. package/dist/migration/translation-prompt.js +1 -1
  393. package/dist/migration-templates/app-fullstack/client/components/ui/accordion.tsx +0 -69
  394. package/dist/migration-templates/app-fullstack/client/components/ui/aspect-ratio.tsx +0 -31
  395. package/dist/migration-templates/app-fullstack/client/components/ui/avatar.tsx +0 -52
  396. package/dist/migration-templates/app-fullstack/client/components/ui/badge.tsx +5 -79
  397. package/dist/migration-templates/app-fullstack/client/components/ui/breadcrumb.tsx +14 -161
  398. package/dist/migration-templates/app-fullstack/client/components/ui/button.tsx +1 -53
  399. package/dist/migration-templates/app-fullstack/client/components/ui/calendar.tsx +4 -56
  400. package/dist/migration-templates/app-fullstack/client/components/ui/card.tsx +0 -34
  401. package/dist/migration-templates/app-fullstack/client/components/ui/chart.tsx +3 -51
  402. package/dist/migration-templates/app-fullstack/client/components/ui/checkbox.tsx +0 -42
  403. package/dist/migration-templates/app-fullstack/client/components/ui/dialog.tsx +0 -55
  404. package/dist/migration-templates/app-fullstack/client/components/ui/dropdown-menu.tsx +0 -29
  405. package/dist/migration-templates/app-fullstack/client/components/ui/hover-card.tsx +0 -64
  406. package/dist/migration-templates/app-fullstack/client/components/ui/input.tsx +0 -57
  407. package/dist/migration-templates/app-fullstack/client/components/ui/label.tsx +0 -30
  408. package/dist/migration-templates/app-fullstack/client/components/ui/navigation-menu.tsx +16 -172
  409. package/dist/migration-templates/app-fullstack/client/components/ui/pagination.tsx +0 -44
  410. package/dist/migration-templates/app-fullstack/client/components/ui/popover.tsx +0 -64
  411. package/dist/migration-templates/app-fullstack/client/components/ui/progress.tsx +0 -31
  412. package/dist/migration-templates/app-fullstack/client/components/ui/scroll-area.tsx +0 -30
  413. package/dist/migration-templates/app-fullstack/client/components/ui/select.tsx +0 -41
  414. package/dist/migration-templates/app-fullstack/client/components/ui/separator.tsx +0 -29
  415. package/dist/migration-templates/app-fullstack/client/components/ui/sheet.tsx +0 -64
  416. package/dist/migration-templates/app-fullstack/client/components/ui/sidebar.tsx +30 -265
  417. package/dist/migration-templates/app-fullstack/client/components/ui/slider.tsx +0 -45
  418. package/dist/migration-templates/app-fullstack/client/components/ui/switch.tsx +0 -41
  419. package/dist/migration-templates/app-fullstack/client/components/ui/table.tsx +0 -32
  420. package/dist/migration-templates/app-fullstack/client/components/ui/tabs.tsx +0 -23
  421. package/dist/migration-templates/app-fullstack/client/components/ui/textarea.tsx +0 -48
  422. package/dist/migration-templates/app-fullstack/client/components/ui/toggle-group.tsx +0 -81
  423. package/dist/migration-templates/app-fullstack/client/components/ui/toggle.tsx +0 -46
  424. package/dist/migration-templates/app-fullstack/client/components/ui/tooltip.tsx +0 -63
  425. package/dist/migration-templates/app-fullstack/eslint.config.js +7 -0
  426. package/dist/migration-templates/app-fullstack/package.json +0 -3
  427. package/dist/parsing/types.d.ts +3 -2
  428. package/dist/parsing/types.d.ts.map +1 -1
  429. package/dist/policy-gate-runner.d.ts +1 -1
  430. package/dist/policy-gate-runner.d.ts.map +1 -1
  431. package/dist/policy-gate-runner.js.map +1 -1
  432. package/dist/reconnect-guard-plugin.d.ts +0 -1
  433. package/dist/reconnect-guard-plugin.d.ts.map +1 -1
  434. package/dist/reconnect-guard-plugin.js +1 -1
  435. package/dist/reconnect-guard-plugin.js.map +1 -1
  436. package/dist/resolver.d.ts +1 -1
  437. package/dist/resolver.d.ts.map +1 -1
  438. package/dist/resolver.js +2 -2
  439. package/dist/resolver.js.map +1 -1
  440. package/dist/socket-manager.d.ts.map +1 -1
  441. package/dist/socket-manager.js +12 -2
  442. package/dist/socket-manager.js.map +1 -1
  443. package/dist/source-tracker.d.ts +5 -15
  444. package/dist/source-tracker.d.ts.map +1 -1
  445. package/dist/source-tracker.js +28 -66
  446. package/dist/source-tracker.js.map +1 -1
  447. package/dist/sync-service/checkpoint-result.d.ts +6 -5
  448. package/dist/sync-service/checkpoint-result.d.ts.map +1 -1
  449. package/dist/sync-service/checkpoint-result.js +9 -8
  450. package/dist/sync-service/checkpoint-result.js.map +1 -1
  451. package/dist/sync-service/index.d.ts +1 -0
  452. package/dist/sync-service/index.d.ts.map +1 -1
  453. package/dist/sync-service/index.js +8 -1
  454. package/dist/sync-service/index.js.map +1 -1
  455. package/dist/sync-service/snapshot/types.d.ts +3 -2
  456. package/dist/sync-service/snapshot/types.d.ts.map +1 -1
  457. package/dist/util/generation-wait-timeout-error.d.ts +12 -0
  458. package/dist/util/generation-wait-timeout-error.d.ts.map +1 -0
  459. package/dist/util/generation-wait-timeout-error.js +16 -0
  460. package/dist/util/generation-wait-timeout-error.js.map +1 -0
  461. package/package.json +9 -13
  462. package/dist/ai-service/agent/tools/apis/sdk-root-documentation.d.ts +0 -20
  463. package/dist/ai-service/agent/tools/apis/sdk-root-documentation.d.ts.map +0 -1
  464. package/dist/ai-service/agent/tools/apis/sdk-root-documentation.js +0 -284
  465. package/dist/ai-service/agent/tools/apis/sdk-root-documentation.js.map +0 -1
  466. package/dist/migration-templates/app-fullstack/client/components/hooks/use-active-page.ts +0 -73
  467. package/dist/migration-templates/app-fullstack/client/components/ui/area-chart.tsx +0 -312
  468. package/dist/migration-templates/app-fullstack/client/components/ui/bar-chart.tsx +0 -264
  469. package/dist/migration-templates/app-fullstack/client/components/ui/code-block-content.tsx +0 -66
  470. package/dist/migration-templates/app-fullstack/client/components/ui/date-range-picker.tsx +0 -255
  471. package/dist/migration-templates/app-fullstack/client/components/ui/file-dropzone.tsx +0 -312
  472. package/dist/migration-templates/app-fullstack/client/components/ui/file-input.tsx +0 -105
  473. package/dist/migration-templates/app-fullstack/client/components/ui/icon.tsx +0 -120
  474. package/dist/migration-templates/app-fullstack/client/components/ui/image.tsx +0 -56
  475. package/dist/migration-templates/app-fullstack/client/components/ui/line-chart.tsx +0 -264
  476. package/dist/migration-templates/app-fullstack/client/components/ui/link.tsx +0 -119
  477. package/dist/migration-templates/app-fullstack/client/components/ui/pie-chart.tsx +0 -181
  478. package/dist/migration-templates/app-fullstack/client/components/ui/radar-chart.tsx +0 -252
  479. package/dist/migration-templates/app-fullstack/client/components/ui/radial-chart.tsx +0 -250
  480. package/dist/refactor/entities.d.ts +0 -6
  481. package/dist/refactor/entities.d.ts.map +0 -1
  482. package/dist/refactor/entities.js +0 -65
  483. package/dist/refactor/entities.js.map +0 -1
  484. package/dist/refactor/javascript.d.ts +0 -15
  485. package/dist/refactor/javascript.d.ts.map +0 -1
  486. package/dist/refactor/javascript.js +0 -283
  487. package/dist/refactor/javascript.js.map +0 -1
  488. package/dist/rename-manager.d.ts +0 -28
  489. package/dist/rename-manager.d.ts.map +0 -1
  490. package/dist/rename-manager.js +0 -161
  491. package/dist/rename-manager.js.map +0 -1
@@ -1,264 +0,0 @@
1
- import React from "react";
2
- import {
3
- LineChart as LineChartComponent,
4
- Line,
5
- XAxis,
6
- YAxis,
7
- CartesianGrid,
8
- LabelList,
9
- } from "recharts";
10
-
11
- import {
12
- registerComponent,
13
- Prop,
14
- Section,
15
- PropsCategory,
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
- lineType?:
47
- | "monotone"
48
- | "linear"
49
- | "step"
50
- | "bump"
51
- | "basis"
52
- | "stepBefore"
53
- | "stepAfter"
54
- | "natural";
55
- strokeWidth?: number;
56
- connectNulls?: boolean;
57
- enableAnimation?: boolean;
58
- showDots?: boolean;
59
- showPointLabels?: boolean;
60
- onDataClick?: (data: any) => void;
61
- };
62
-
63
- const LineChart = ({ className, ...props }: ComponentProps) => {
64
- const chartConfig: ChartConfig = React.useMemo(() => {
65
- const effectiveCategories =
66
- props.categories && props.categories.length > 0
67
- ? props.categories
68
- : props.data && props.data.length > 0
69
- ? Object.keys(props.data[0]).filter((key) => {
70
- if (key === props.xAxisKey) return false;
71
- const value = props.data![0][key];
72
- return typeof value === "number";
73
- })
74
- : [];
75
-
76
- if (!effectiveCategories.length) return {};
77
-
78
- const config: ChartConfig = {};
79
- effectiveCategories.forEach((key, index) => {
80
- const sanitizedKey = sanitizeForCssVar(key);
81
- const label = props.seriesLabels?.[key] || key;
82
- const color = fixColorFormat(
83
- props.colors?.[index] || `var(--chart-${(index % 5) + 1})`,
84
- );
85
-
86
- config[sanitizedKey] = {
87
- label,
88
- color,
89
- };
90
- });
91
-
92
- return config;
93
- }, [
94
- props.categories,
95
- props.seriesLabels,
96
- props.colors,
97
- props.data,
98
- props.xAxisKey,
99
- ]);
100
-
101
- const keyMapping = React.useMemo(() => {
102
- const effectiveCategories =
103
- props.categories && props.categories.length > 0
104
- ? props.categories
105
- : props.data && props.data.length > 0
106
- ? Object.keys(props.data[0]).filter((key) => {
107
- if (key === props.xAxisKey) return false;
108
- const value = props.data![0][key];
109
- return typeof value === "number";
110
- })
111
- : [];
112
-
113
- return effectiveCategories.length > 0
114
- ? createKeyMapping(
115
- Object.fromEntries(effectiveCategories.map((k) => [k, { label: k }])),
116
- )
117
- : new Map();
118
- }, [props.categories, props.data, props.xAxisKey]);
119
-
120
- const hasData = Array.isArray(props.data) && props.data?.length;
121
-
122
- return (
123
- <ChartContainer
124
- {...props}
125
- className={cn("h-full w-full pt-4 pb-4 pr-4", className)}
126
- config={chartConfig}
127
- >
128
- {hasData ? (
129
- <LineChartComponent
130
- data={props.data}
131
- onClick={props.onDataClick}
132
- accessibilityLayer
133
- >
134
- {props.gridStyle !== "hidden" && (
135
- <CartesianGrid
136
- vertical={false}
137
- strokeDasharray={props.gridStyle === "dashed" ? "3 3" : "0"}
138
- />
139
- )}
140
-
141
- {props.showXAxis && (
142
- <XAxis
143
- dataKey={props.xAxisKey}
144
- tickLine={false}
145
- axisLine={false}
146
- tickMargin={8}
147
- />
148
- )}
149
-
150
- {props.showYAxis && (
151
- <YAxis tickLine={false} axisLine={false} tickMargin={8} />
152
- )}
153
-
154
- {props.showTooltip && (
155
- <ChartTooltip cursor={false} content={<ChartTooltipContent />} />
156
- )}
157
-
158
- {props.showLegend && <ChartLegend content={<ChartLegendContent />} />}
159
-
160
- {Object.keys(chartConfig).map((key) => {
161
- const originalKey = keyMapping.get(key) || key;
162
- const wouldHideLine = props.strokeWidth === 0;
163
-
164
- return (
165
- <Line
166
- key={key}
167
- dataKey={originalKey}
168
- type={props.lineType}
169
- stroke={`var(--color-${key})`}
170
- {...(!wouldHideLine && { strokeWidth: props.strokeWidth })}
171
- connectNulls={props.connectNulls}
172
- isAnimationActive={props.enableAnimation}
173
- dot={
174
- props.showDots
175
- ? {
176
- fill: `var(--color-${key})`,
177
- strokeWidth: 2,
178
- r: 2,
179
- }
180
- : false
181
- }
182
- activeDot={{
183
- fill: `var(--color-${key})`,
184
- strokeWidth: 2,
185
- r: 4,
186
- }}
187
- >
188
- {props.showPointLabels && (
189
- <LabelList
190
- dataKey={originalKey}
191
- position="top"
192
- offset={10}
193
- className="fill-foreground font-semibold text-xs"
194
- />
195
- )}
196
- </Line>
197
- );
198
- })}
199
- </LineChartComponent>
200
- ) : (
201
- <div className="flex items-center justify-center h-full w-full min-h-32 text-muted-foreground">
202
- No data available
203
- </div>
204
- )}
205
- </ChartContainer>
206
- );
207
- };
208
-
209
- registerComponent(LineChart, {
210
- general: Section.category(PropsCategory.Content).children({
211
- data: Prop.array<any>().docs({
212
- description:
213
- "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 line series that can be styled independently.",
214
- }),
215
- xAxisKey: Prop.string().docs({
216
- description:
217
- "The property name in your data objects that contains the X-axis values (categories, dates, or sequential values). This determines the horizontal positioning and connection order of data points along the line. Should be consistent across all data objects.",
218
- }),
219
- categories: Prop.array<string>().docs({
220
- description:
221
- "Array of property names from your data objects to plot as separate line series. Example: ['desktop', 'mobile'] will create two line 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.",
222
- }),
223
- seriesLabels: Prop.any<Record<string, string>>().docs({
224
- description:
225
- "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.",
226
- }),
227
- colors: Prop.array<string>().docs({
228
- description:
229
- "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.",
230
- }),
231
- }),
232
- appearance: Section.category(PropsCategory.Appearance).children({
233
- gridStyle: Prop.string<"solid" | "dashed" | "hidden">(),
234
- showXAxis: Prop.boolean(),
235
- showYAxis: Prop.boolean(),
236
- showTooltip: Prop.boolean(),
237
- showLegend: Prop.boolean(),
238
- showPointLabels: Prop.boolean(),
239
- strokeWidth: Prop.number(),
240
- showDots: Prop.boolean(),
241
- connectNulls: Prop.boolean(),
242
- lineType: Prop.string<
243
- | "linear"
244
- | "bump"
245
- | "step"
246
- | "basis"
247
- | "stepBefore"
248
- | "stepAfter"
249
- | "natural"
250
- | "monotone"
251
- >().docs({
252
- description:
253
- "Curve interpolation type for line paths. 'linear' creates straight line segments between points, 'monotone' creates smooth curves that preserve monotonicity (no overshooting), 'natural' creates natural spline curves for smoothest appearance, 'step' creates step functions with sharp transitions, 'basis' creates B-spline curves, 'bump' creates rounded transitions, 'stepBefore' steps before each point, 'stepAfter' steps after each point. Choose 'monotone' for smooth data trends, 'linear' for precise point-to-point connections.",
254
- }),
255
- }),
256
- interaction: Section.category(PropsCategory.Interaction).children({
257
- enableAnimation: Prop.boolean(),
258
- }),
259
- events: Section.category(PropsCategory.EventHandlers).children({
260
- onDataClick: Prop.eventHandler(),
261
- }),
262
- }).editorConfig({ icon: "chart" });
263
-
264
- export { LineChart };
@@ -1,119 +0,0 @@
1
- import { useMemo } from "react";
2
- import { Link as BaseLink } from "react-router";
3
- import type { LinkProps as RouterLinkProps } from "react-router";
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
- import { Button } from "./button";
17
-
18
- // Base Link Component
19
- type BaseLinkProps = RouterLinkProps &
20
- React.RefAttributes<HTMLAnchorElement> & {
21
- applyLinkStyles?: boolean;
22
- };
23
-
24
- function BaseLinkComponent({
25
- children,
26
- className,
27
- applyLinkStyles = true,
28
- ...props
29
- }: BaseLinkProps) {
30
- return (
31
- <BaseLink
32
- className={cn(
33
- "cursor-pointer",
34
- applyLinkStyles && "underline underline-offset-4",
35
- className,
36
- )}
37
- {...props}
38
- >
39
- {children}
40
- </BaseLink>
41
- );
42
- }
43
-
44
- // Link with Variant Support
45
- export type LinkProps = BaseLinkProps & {
46
- openInNewTab?: boolean;
47
- variant?: "link" | "button-default" | "button-secondary";
48
- } & Record<string, unknown>;
49
-
50
- const Link = ({
51
- children,
52
- openInNewTab,
53
- variant,
54
- style,
55
- ...props
56
- }: LinkProps) => {
57
- const linkProps = useMemo(
58
- () => ({
59
- ...props,
60
- ...(openInNewTab && {
61
- target: "_blank",
62
- rel: "noopener noreferrer",
63
- }),
64
- }),
65
- [props, openInNewTab],
66
- );
67
-
68
- const buttonVariant =
69
- variant === "button-default"
70
- ? "default"
71
- : variant === "button-secondary"
72
- ? "secondary"
73
- : undefined;
74
-
75
- if (buttonVariant) {
76
- return (
77
- <Button asChild variant={buttonVariant} style={style}>
78
- <BaseLinkComponent applyLinkStyles={false} {...linkProps}>
79
- {children}
80
- </BaseLinkComponent>
81
- </Button>
82
- );
83
- }
84
-
85
- return (
86
- <BaseLinkComponent style={style} {...linkProps}>
87
- {children}
88
- </BaseLinkComponent>
89
- );
90
- };
91
-
92
- // Properties Definition
93
- const propertiesDefinition: PropertiesPanelDefinition<LinkProps> = {
94
- general: Section.category(PropsCategory.Content).add({
95
- children: Prop.jsx(),
96
- openInNewTab: Prop.boolean(),
97
- }),
98
- appearance: Section.category(PropsCategory.Appearance).children({
99
- variant: Prop.string<"link" | "button-default" | "button-secondary">(),
100
- }),
101
- events: Section.category(PropsCategory.EventHandlers).children({
102
- onClick: Prop.eventHandler(),
103
- }),
104
- };
105
-
106
- // Editor Template
107
- // Editor Config
108
- const editorConfig: EditorConfig = {
109
- icon: "link",
110
- description:
111
- "A link component used for navigating to other pages in the application.",
112
- hasExtendedClickArea: true,
113
- isDroppable: false,
114
- };
115
-
116
- // Register Component
117
- registerComponent(Link, propertiesDefinition).editorConfig(editorConfig);
118
-
119
- export { Link };
@@ -1,181 +0,0 @@
1
- import React from "react";
2
- import { PieChart as PieChartComponent, Pie, LabelList } from "recharts";
3
-
4
- import {
5
- registerComponent,
6
- Prop,
7
- Section,
8
- PropsCategory,
9
- } from "@superblocksteam/library";
10
-
11
- import { cn } from "@/lib/utils";
12
-
13
- import type { ChartConfig } from "./chart";
14
- import {
15
- ChartContainer,
16
- ChartTooltip,
17
- ChartTooltipContent,
18
- ChartLegend,
19
- ChartLegendContent,
20
- sanitizeForCssVar,
21
- fixColorFormat,
22
- } from "./chart";
23
-
24
- type ComponentProps = Omit<
25
- React.ComponentPropsWithoutRef<typeof ChartContainer>,
26
- "children" | "config"
27
- > & {
28
- data?: any[];
29
- valueKey?: string;
30
- nameKey?: string;
31
- labelKey?: string;
32
- colorKey?: string;
33
- colors?: string[];
34
- startAngle?: number;
35
- endAngle?: number;
36
- enableAnimation?: boolean;
37
- showLabels?: boolean;
38
- showTooltip?: boolean;
39
- showLegend?: boolean;
40
- onDataClick?: (data: any) => void;
41
- };
42
-
43
- const PieChart = ({ className, ...props }: ComponentProps) => {
44
- const chartConfig: ChartConfig = React.useMemo(() => {
45
- if (!props.data || !Array.isArray(props.data)) return {};
46
-
47
- const config: ChartConfig = {};
48
- props.data.forEach((item, index) => {
49
- const nameValue = item[props.nameKey ?? "name"];
50
- const labelValue = props.labelKey ? item[props.labelKey] : nameValue;
51
- const sanitizedName = sanitizeForCssVar(nameValue);
52
-
53
- // Get color from: 1) data item colorKey, 2) colors array, 3) default theme color
54
- const itemColor = props.colorKey ? item[props.colorKey] : undefined;
55
- const color = fixColorFormat(
56
- itemColor || props.colors?.[index] || `var(--chart-${(index % 5) + 1})`,
57
- );
58
-
59
- config[sanitizedName] = {
60
- label: labelValue,
61
- color,
62
- };
63
- });
64
- return config;
65
- }, [props.data, props.nameKey, props.labelKey, props.colorKey, props.colors]);
66
-
67
- const chartData = React.useMemo(() => {
68
- return props.data?.map((item) => {
69
- const nameValue = item[props.nameKey ?? "name"];
70
- const sanitizedName = sanitizeForCssVar(nameValue);
71
-
72
- const fillColor = chartConfig[sanitizedName]
73
- ? `var(--color-${sanitizedName})`
74
- : "var(--chart-1)";
75
-
76
- return {
77
- ...item,
78
- fill: fillColor,
79
- };
80
- });
81
- }, [props.data, props.nameKey, chartConfig]);
82
-
83
- const hasData = Array.isArray(props.data) && props.data?.length;
84
-
85
- return (
86
- <ChartContainer
87
- className={cn(
88
- "h-full w-full",
89
- props.showLabels ? "[&_.recharts-pie-label-text]:fill-foreground" : "",
90
- className,
91
- )}
92
- {...props}
93
- config={chartConfig}
94
- >
95
- {hasData ? (
96
- <PieChartComponent accessibilityLayer>
97
- {props.showTooltip && (
98
- <ChartTooltip
99
- cursor={false}
100
- content={<ChartTooltipContent hideLabel />}
101
- />
102
- )}
103
- {props.showLegend && (
104
- <ChartLegend
105
- content={<ChartLegendContent nameKey={props.nameKey} />}
106
- className="-translate-y-2 flex-wrap gap-2 [&>*]:basis-1/4 [&>*]:justify-center"
107
- />
108
- )}
109
- <Pie
110
- data={chartData}
111
- dataKey={props.valueKey ?? "value"}
112
- nameKey={props.nameKey}
113
- startAngle={props.startAngle}
114
- endAngle={props.endAngle}
115
- paddingAngle={0}
116
- isAnimationActive={props.enableAnimation}
117
- label={props.showLabels}
118
- onClick={props.onDataClick}
119
- >
120
- {props.showLabels && (
121
- <LabelList
122
- dataKey={props.nameKey}
123
- className="fill-background"
124
- stroke="none"
125
- fontSize={12}
126
- />
127
- )}
128
- </Pie>
129
- </PieChartComponent>
130
- ) : (
131
- <div className="flex items-center justify-center h-full w-full min-h-32 text-muted-foreground">
132
- No data available
133
- </div>
134
- )}
135
- </ChartContainer>
136
- );
137
- };
138
-
139
- registerComponent(PieChart, {
140
- general: Section.category(PropsCategory.Content).children({
141
- data: Prop.array<any>().docs({
142
- description:
143
- "Array of objects where each object represents a pie slice. Each object should have properties for the slice name/label and numeric value. Example: [{name: 'Chrome', value: 275, color: '#4285F4'}, {name: 'Safari', value: 200}]. The nameKey, valueKey, and colorKey props specify which properties to use.",
144
- }),
145
- nameKey: Prop.string().docs({
146
- description:
147
- "The property name in your data objects that contains unique identifiers for each slice. Used to generate consistent colors and match data across renders.",
148
- }),
149
- valueKey: Prop.string().docs({
150
- description:
151
- "The property name in your data objects that contains the numeric values for each slice. These values determine slice sizes and are used in calculations for percentages and display.",
152
- }),
153
- labelKey: Prop.string().docs({
154
- description:
155
- "Optional property name for human-readable labels shown in tooltips and legends. If not specified, the nameKey value is used as the label.",
156
- }),
157
- colorKey: Prop.string().docs({
158
- description:
159
- "Optional property name in your data objects that contains color values (hex, rgb, or CSS variable). If not specified, colors are auto-assigned from the theme.",
160
- }),
161
- colors: Prop.array<string>().docs({
162
- description:
163
- "Optional array of color values to use for slices in order. Can be hex codes, rgb values, or CSS variables like 'var(--chart-1)'. Falls back to theme colors if not provided.",
164
- }),
165
- }),
166
- appearance: Section.category(PropsCategory.Appearance).children({
167
- startAngle: Prop.number(),
168
- endAngle: Prop.number(),
169
- showTooltip: Prop.boolean(),
170
- showLegend: Prop.boolean(),
171
- showLabels: Prop.boolean(),
172
- }),
173
- interaction: Section.category(PropsCategory.Interaction).children({
174
- enableAnimation: Prop.boolean(),
175
- }),
176
- events: Section.category(PropsCategory.EventHandlers).children({
177
- onDataClick: Prop.eventHandler(),
178
- }),
179
- }).editorConfig({ icon: "chart" });
180
-
181
- export { PieChart };