@lobb-js/studio 0.1.31 → 0.1.32

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 (364) hide show
  1. package/{src/lib/components → dist}/LlmButton.svelte +2 -2
  2. package/dist/LlmButton.svelte.d.ts +17 -0
  3. package/{src → dist}/Studio.svelte +15 -15
  4. package/dist/Studio.svelte.d.ts +6 -0
  5. package/{src/lib/components → dist}/alertView.svelte +1 -1
  6. package/dist/alertView.svelte.d.ts +8 -0
  7. package/{src/lib/components → dist}/breadCrumbs.svelte +2 -2
  8. package/dist/breadCrumbs.svelte.d.ts +3 -0
  9. package/{src/lib/components → dist}/combobox.svelte +4 -4
  10. package/dist/combobox.svelte.d.ts +15 -0
  11. package/{src/lib/components → dist}/confirmationDialog/confirmationDialog.svelte +1 -1
  12. package/dist/confirmationDialog/confirmationDialog.svelte.d.ts +8 -0
  13. package/dist/confirmationDialog/store.svelte.d.ts +1 -0
  14. package/dist/confirmationDialog/store.svelte.js +69 -0
  15. package/{src/lib/components → dist}/createManyButton.svelte +2 -2
  16. package/dist/createManyButton.svelte.d.ts +8 -0
  17. package/{src/lib/components → dist}/dataTable/childRecords.svelte +2 -2
  18. package/dist/dataTable/childRecords.svelte.d.ts +9 -0
  19. package/{src/lib/components → dist}/dataTable/dataTable.svelte +3 -3
  20. package/dist/dataTable/dataTable.svelte.d.ts +15 -0
  21. package/{src/lib/components → dist}/dataTable/fieldCell.svelte +1 -1
  22. package/dist/dataTable/fieldCell.svelte.d.ts +10 -0
  23. package/{src/lib/components → dist}/dataTable/filter.svelte +2 -2
  24. package/dist/dataTable/filter.svelte.d.ts +10 -0
  25. package/{src/lib/components → dist}/dataTable/filterButton.svelte +1 -1
  26. package/dist/dataTable/filterButton.svelte.d.ts +8 -0
  27. package/dist/dataTable/footer.svelte.d.ts +8 -0
  28. package/{src/lib/components → dist}/dataTable/header.svelte +2 -2
  29. package/dist/dataTable/header.svelte.d.ts +10 -0
  30. package/{src/lib/components → dist}/dataTable/sort.svelte +2 -2
  31. package/dist/dataTable/sort.svelte.d.ts +8 -0
  32. package/{src/lib/components → dist}/dataTable/sortButton.svelte +2 -2
  33. package/dist/dataTable/sortButton.svelte.d.ts +8 -0
  34. package/dist/dataTable/table.svelte.d.ts +32 -0
  35. package/dist/dataTable/utils.d.ts +7 -0
  36. package/dist/dataTable/utils.js +111 -0
  37. package/{src/lib/components → dist}/detailView/create/children.svelte +3 -3
  38. package/dist/detailView/create/children.svelte.d.ts +8 -0
  39. package/{src/lib/components → dist}/detailView/create/createDetailView.svelte +6 -6
  40. package/dist/detailView/create/createDetailView.svelte.d.ts +18 -0
  41. package/{src/lib/components → dist}/detailView/create/createDetailViewButton.svelte +2 -2
  42. package/dist/detailView/create/createDetailViewButton.svelte.d.ts +11 -0
  43. package/{src/lib/components → dist}/detailView/create/createManyView.svelte +5 -5
  44. package/dist/detailView/create/createManyView.svelte.d.ts +16 -0
  45. package/{src/lib/components → dist}/detailView/create/subRecords.svelte +1 -1
  46. package/dist/detailView/create/subRecords.svelte.d.ts +8 -0
  47. package/dist/detailView/detailViewForm.svelte.d.ts +48 -0
  48. package/dist/detailView/fieldCustomInput.svelte.d.ts +10 -0
  49. package/{src/lib/components → dist}/detailView/fieldInput.svelte +4 -4
  50. package/dist/detailView/fieldInput.svelte.d.ts +10 -0
  51. package/{src/lib/components → dist}/detailView/fieldInputReplacement.svelte +1 -1
  52. package/dist/detailView/fieldInputReplacement.svelte.d.ts +11 -0
  53. package/dist/detailView/store.svelte.d.ts +4 -0
  54. package/dist/detailView/store.svelte.js +125 -0
  55. package/{src/lib/components → dist}/detailView/update/children.svelte +4 -4
  56. package/dist/detailView/update/children.svelte.d.ts +7 -0
  57. package/{src/lib/components → dist}/detailView/update/updateDetailView.svelte +6 -6
  58. package/dist/detailView/update/updateDetailView.svelte.d.ts +19 -0
  59. package/{src/lib/components → dist}/detailView/update/updateDetailViewButton.svelte +2 -2
  60. package/dist/detailView/update/updateDetailViewButton.svelte.d.ts +11 -0
  61. package/dist/detailView/utils.d.ts +8 -0
  62. package/dist/detailView/utils.js +165 -0
  63. package/{src/lib/components → dist}/diffViewer.svelte +1 -1
  64. package/dist/diffViewer.svelte.d.ts +9 -0
  65. package/{src/lib/components → dist}/drawer.svelte +1 -1
  66. package/dist/drawer.svelte.d.ts +8 -0
  67. package/{src/lib/components → dist}/extensionsComponents.svelte +1 -2
  68. package/dist/extensionsComponents.svelte.d.ts +11 -0
  69. package/dist/foreingKeyInput.svelte.d.ts +11 -0
  70. package/{src/lib/components → dist}/header.svelte +1 -1
  71. package/dist/header.svelte.d.ts +6 -0
  72. package/dist/loadingTypesForMonacoEditor.d.ts +7 -0
  73. package/dist/loadingTypesForMonacoEditor.js +72 -0
  74. package/{src/lib/components → dist}/miniSidebar.svelte +7 -7
  75. package/dist/miniSidebar.svelte.d.ts +20 -0
  76. package/{src/lib/components → dist}/monacoEditor.svelte +1 -1
  77. package/dist/monacoEditor.svelte.d.ts +13 -0
  78. package/{src/lib/components → dist}/rangeCalendarButton.svelte +4 -4
  79. package/dist/rangeCalendarButton.svelte.d.ts +7 -0
  80. package/{src/lib/components → dist}/selectRecord.svelte +1 -1
  81. package/dist/selectRecord.svelte.d.ts +15 -0
  82. package/{src/lib/components → dist}/setServerPage.svelte +2 -2
  83. package/dist/setServerPage.svelte.d.ts +18 -0
  84. package/{src/lib/components/sidebar/index.ts → dist/sidebar/index.d.ts} +1 -2
  85. package/dist/sidebar/index.js +3 -0
  86. package/{src/lib/components → dist}/sidebar/sidebar.svelte +1 -1
  87. package/dist/sidebar/sidebar.svelte.d.ts +17 -0
  88. package/dist/sidebar/sidebarElements.svelte.d.ts +19 -0
  89. package/dist/sidebar/sidebarTrigger.svelte.d.ts +7 -0
  90. package/{src/lib/components → dist}/singletone.svelte +1 -1
  91. package/dist/singletone.svelte.d.ts +6 -0
  92. package/{src/lib/components → dist}/ui/accordion/accordion-content.svelte +1 -1
  93. package/dist/ui/accordion/accordion-content.svelte.d.ts +4 -0
  94. package/{src/lib/components → dist}/ui/accordion/accordion-item.svelte +1 -1
  95. package/dist/ui/accordion/accordion-item.svelte.d.ts +4 -0
  96. package/{src/lib/components → dist}/ui/accordion/accordion-trigger.svelte +1 -1
  97. package/dist/ui/accordion/accordion-trigger.svelte.d.ts +7 -0
  98. package/dist/ui/accordion/index.d.ts +6 -0
  99. package/{src/lib/components/ui/accordion/index.ts → dist/ui/accordion/index.js} +4 -13
  100. package/{src/lib/components → dist}/ui/alert/alert-description.svelte +1 -1
  101. package/dist/ui/alert/alert-description.svelte.d.ts +5 -0
  102. package/{src/lib/components → dist}/ui/alert/alert-title.svelte +1 -1
  103. package/dist/ui/alert/alert-title.svelte.d.ts +8 -0
  104. package/{src/lib/components → dist}/ui/alert/alert.svelte +1 -1
  105. package/dist/ui/alert/alert.svelte.d.ts +26 -0
  106. package/{src/lib/components/ui/alert/index.ts → dist/ui/alert/index.d.ts} +1 -10
  107. package/dist/ui/alert/index.js +7 -0
  108. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-action.svelte +2 -2
  109. package/dist/ui/alert-dialog/alert-dialog-action.svelte.d.ts +4 -0
  110. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-cancel.svelte +2 -2
  111. package/dist/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +4 -0
  112. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-content.svelte +1 -1
  113. package/dist/ui/alert-dialog/alert-dialog-content.svelte.d.ts +7 -0
  114. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-description.svelte +1 -1
  115. package/dist/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
  116. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-footer.svelte +1 -1
  117. package/dist/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
  118. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-header.svelte +1 -1
  119. package/dist/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
  120. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-overlay.svelte +1 -1
  121. package/dist/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
  122. package/{src/lib/components → dist}/ui/alert-dialog/alert-dialog-title.svelte +1 -1
  123. package/dist/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
  124. package/dist/ui/alert-dialog/index.d.ts +13 -0
  125. package/dist/ui/alert-dialog/index.js +15 -0
  126. package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-ellipsis.svelte +1 -1
  127. package/dist/ui/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +5 -0
  128. package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-item.svelte +1 -1
  129. package/dist/ui/breadcrumb/breadcrumb-item.svelte.d.ts +5 -0
  130. package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-link.svelte +1 -1
  131. package/dist/ui/breadcrumb/breadcrumb-link.svelte.d.ts +11 -0
  132. package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-list.svelte +1 -1
  133. package/dist/ui/breadcrumb/breadcrumb-list.svelte.d.ts +5 -0
  134. package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-page.svelte +1 -1
  135. package/dist/ui/breadcrumb/breadcrumb-page.svelte.d.ts +5 -0
  136. package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb-separator.svelte +1 -1
  137. package/dist/ui/breadcrumb/breadcrumb-separator.svelte.d.ts +5 -0
  138. package/dist/ui/breadcrumb/breadcrumb.svelte.d.ts +5 -0
  139. package/{src/lib/components/ui/breadcrumb/index.ts → dist/ui/breadcrumb/index.d.ts} +1 -18
  140. package/dist/ui/breadcrumb/index.js +10 -0
  141. package/{src/lib/components → dist}/ui/button/button.svelte +1 -1
  142. package/dist/ui/button/button.svelte.d.ts +60 -0
  143. package/dist/ui/button/index.d.ts +2 -0
  144. package/dist/ui/button/index.js +4 -0
  145. package/{src/lib/components → dist}/ui/checkbox/checkbox.svelte +1 -1
  146. package/dist/ui/checkbox/checkbox.svelte.d.ts +4 -0
  147. package/dist/ui/checkbox/index.d.ts +2 -0
  148. package/dist/ui/checkbox/index.js +4 -0
  149. package/{src/lib/components → dist}/ui/command/command-dialog.svelte +1 -1
  150. package/dist/ui/command/command-dialog.svelte.d.ts +9 -0
  151. package/{src/lib/components → dist}/ui/command/command-empty.svelte +1 -1
  152. package/dist/ui/command/command-empty.svelte.d.ts +4 -0
  153. package/{src/lib/components → dist}/ui/command/command-group.svelte +1 -1
  154. package/dist/ui/command/command-group.svelte.d.ts +7 -0
  155. package/{src/lib/components → dist}/ui/command/command-input.svelte +1 -1
  156. package/dist/ui/command/command-input.svelte.d.ts +4 -0
  157. package/{src/lib/components → dist}/ui/command/command-item.svelte +1 -1
  158. package/dist/ui/command/command-item.svelte.d.ts +4 -0
  159. package/{src/lib/components → dist}/ui/command/command-link-item.svelte +1 -1
  160. package/dist/ui/command/command-link-item.svelte.d.ts +4 -0
  161. package/{src/lib/components → dist}/ui/command/command-list.svelte +1 -1
  162. package/dist/ui/command/command-list.svelte.d.ts +4 -0
  163. package/{src/lib/components → dist}/ui/command/command-separator.svelte +1 -1
  164. package/dist/ui/command/command-separator.svelte.d.ts +4 -0
  165. package/{src/lib/components → dist}/ui/command/command-shortcut.svelte +1 -1
  166. package/dist/ui/command/command-shortcut.svelte.d.ts +5 -0
  167. package/{src/lib/components → dist}/ui/command/command.svelte +1 -1
  168. package/dist/ui/command/command.svelte.d.ts +4 -0
  169. package/{src/lib/components/ui/command/index.ts → dist/ui/command/index.d.ts} +2 -29
  170. package/dist/ui/command/index.js +15 -0
  171. package/{src/lib/components → dist}/ui/dialog/dialog-content.svelte +1 -1
  172. package/dist/ui/dialog/dialog-content.svelte.d.ts +9 -0
  173. package/{src/lib/components → dist}/ui/dialog/dialog-description.svelte +1 -1
  174. package/dist/ui/dialog/dialog-description.svelte.d.ts +4 -0
  175. package/{src/lib/components → dist}/ui/dialog/dialog-footer.svelte +1 -1
  176. package/dist/ui/dialog/dialog-footer.svelte.d.ts +5 -0
  177. package/{src/lib/components → dist}/ui/dialog/dialog-header.svelte +1 -1
  178. package/dist/ui/dialog/dialog-header.svelte.d.ts +5 -0
  179. package/{src/lib/components → dist}/ui/dialog/dialog-overlay.svelte +1 -1
  180. package/dist/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
  181. package/{src/lib/components → dist}/ui/dialog/dialog-title.svelte +1 -1
  182. package/dist/ui/dialog/dialog-title.svelte.d.ts +4 -0
  183. package/dist/ui/dialog/index.d.ts +12 -0
  184. package/dist/ui/dialog/index.js +14 -0
  185. package/dist/ui/input/index.d.ts +2 -0
  186. package/dist/ui/input/index.js +4 -0
  187. package/{src/lib/components → dist}/ui/input/input.svelte +1 -1
  188. package/dist/ui/input/input.svelte.d.ts +13 -0
  189. package/dist/ui/label/index.d.ts +2 -0
  190. package/dist/ui/label/index.js +4 -0
  191. package/{src/lib/components → dist}/ui/label/label.svelte +1 -1
  192. package/dist/ui/label/label.svelte.d.ts +4 -0
  193. package/dist/ui/popover/index.d.ts +6 -0
  194. package/dist/ui/popover/index.js +8 -0
  195. package/{src/lib/components → dist}/ui/popover/popover-content.svelte +1 -1
  196. package/dist/ui/popover/popover-content.svelte.d.ts +7 -0
  197. package/{src/lib/components/ui/range-calendar/index.ts → dist/ui/range-calendar/index.d.ts} +1 -17
  198. package/dist/ui/range-calendar/index.js +16 -0
  199. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-cell.svelte +1 -1
  200. package/dist/ui/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
  201. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-day.svelte +2 -2
  202. package/dist/ui/range-calendar/range-calendar-day.svelte.d.ts +6 -0
  203. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid-body.svelte +1 -1
  204. package/dist/ui/range-calendar/range-calendar-grid-body.svelte.d.ts +4 -0
  205. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid-head.svelte +1 -1
  206. package/dist/ui/range-calendar/range-calendar-grid-head.svelte.d.ts +4 -0
  207. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid-row.svelte +1 -1
  208. package/dist/ui/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
  209. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-grid.svelte +1 -1
  210. package/dist/ui/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
  211. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-head-cell.svelte +1 -1
  212. package/dist/ui/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
  213. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-header.svelte +1 -1
  214. package/dist/ui/range-calendar/range-calendar-header.svelte.d.ts +4 -0
  215. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-heading.svelte +1 -1
  216. package/dist/ui/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
  217. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-months.svelte +1 -1
  218. package/dist/ui/range-calendar/range-calendar-months.svelte.d.ts +5 -0
  219. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-next-button.svelte +2 -2
  220. package/dist/ui/range-calendar/range-calendar-next-button.svelte.d.ts +4 -0
  221. package/{src/lib/components → dist}/ui/range-calendar/range-calendar-prev-button.svelte +2 -2
  222. package/dist/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +4 -0
  223. package/{src/lib/components → dist}/ui/range-calendar/range-calendar.svelte +1 -1
  224. package/dist/ui/range-calendar/range-calendar.svelte.d.ts +5 -0
  225. package/dist/ui/select/index.d.ts +11 -0
  226. package/dist/ui/select/index.js +13 -0
  227. package/{src/lib/components → dist}/ui/select/select-content.svelte +1 -1
  228. package/dist/ui/select/select-content.svelte.d.ts +7 -0
  229. package/{src/lib/components → dist}/ui/select/select-group-heading.svelte +1 -1
  230. package/dist/ui/select/select-group-heading.svelte.d.ts +4 -0
  231. package/{src/lib/components → dist}/ui/select/select-item.svelte +1 -1
  232. package/dist/ui/select/select-item.svelte.d.ts +4 -0
  233. package/{src/lib/components → dist}/ui/select/select-scroll-down-button.svelte +1 -1
  234. package/dist/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
  235. package/{src/lib/components → dist}/ui/select/select-scroll-up-button.svelte +1 -1
  236. package/dist/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
  237. package/{src/lib/components → dist}/ui/select/select-separator.svelte +2 -2
  238. package/dist/ui/select/select-separator.svelte.d.ts +4 -0
  239. package/{src/lib/components → dist}/ui/select/select-trigger.svelte +1 -1
  240. package/dist/ui/select/select-trigger.svelte.d.ts +4 -0
  241. package/dist/ui/separator/index.d.ts +2 -0
  242. package/dist/ui/separator/index.js +4 -0
  243. package/{src/lib/components → dist}/ui/separator/separator.svelte +1 -1
  244. package/dist/ui/separator/separator.svelte.d.ts +4 -0
  245. package/dist/ui/skeleton/index.d.ts +2 -0
  246. package/dist/ui/skeleton/index.js +4 -0
  247. package/{src/lib/components → dist}/ui/skeleton/skeleton.svelte +1 -1
  248. package/dist/ui/skeleton/skeleton.svelte.d.ts +5 -0
  249. package/dist/ui/sonner/index.js +1 -0
  250. package/dist/ui/sonner/sonner.svelte.d.ts +4 -0
  251. package/dist/ui/switch/index.d.ts +2 -0
  252. package/dist/ui/switch/index.js +4 -0
  253. package/{src/lib/components → dist}/ui/switch/switch.svelte +1 -1
  254. package/dist/ui/switch/switch.svelte.d.ts +4 -0
  255. package/dist/ui/textarea/index.d.ts +2 -0
  256. package/dist/ui/textarea/index.js +4 -0
  257. package/{src/lib/components → dist}/ui/textarea/textarea.svelte +1 -1
  258. package/dist/ui/textarea/textarea.svelte.d.ts +5 -0
  259. package/dist/ui/tooltip/index.d.ts +6 -0
  260. package/dist/ui/tooltip/index.js +8 -0
  261. package/{src/lib/components → dist}/ui/tooltip/tooltip-content.svelte +1 -1
  262. package/dist/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
  263. package/{src/lib/components → dist}/workflowEditor.svelte +5 -5
  264. package/dist/workflowEditor.svelte.d.ts +16 -0
  265. package/package.json +24 -14
  266. package/{vite-plugin-contextual-lib.js → vite-plugins/contextual-lib-alias.js} +2 -7
  267. package/vite-plugins/index.js +21 -0
  268. package/vite-plugins/studio-source-resolver.js +41 -0
  269. package/.env.example +0 -1
  270. package/.storybook/main.ts +0 -31
  271. package/.storybook/preview.ts +0 -21
  272. package/.storybook/vitest.setup.ts +0 -7
  273. package/components.json +0 -16
  274. package/docker-entrypoint.sh +0 -7
  275. package/dockerfile +0 -27
  276. package/index.html +0 -13
  277. package/public/lobb.svg +0 -15
  278. package/src/app.css +0 -121
  279. package/src/components-export.ts +0 -21
  280. package/src/extensions/extension.types.ts +0 -93
  281. package/src/extensions/extensionUtils.ts +0 -192
  282. package/src/lib/Lobb.ts +0 -241
  283. package/src/lib/components/confirmationDialog/store.svelte.ts +0 -28
  284. package/src/lib/components/dataTable/utils.ts +0 -127
  285. package/src/lib/components/detailView/store.svelte.ts +0 -61
  286. package/src/lib/components/detailView/utils.ts +0 -177
  287. package/src/lib/components/loadingTypesForMonacoEditor.ts +0 -36
  288. package/src/lib/components/ui/alert-dialog/index.ts +0 -40
  289. package/src/lib/components/ui/button/index.ts +0 -17
  290. package/src/lib/components/ui/checkbox/index.ts +0 -6
  291. package/src/lib/components/ui/dialog/index.ts +0 -37
  292. package/src/lib/components/ui/input/index.ts +0 -7
  293. package/src/lib/components/ui/label/index.ts +0 -7
  294. package/src/lib/components/ui/popover/index.ts +0 -17
  295. package/src/lib/components/ui/select/index.ts +0 -34
  296. package/src/lib/components/ui/separator/index.ts +0 -7
  297. package/src/lib/components/ui/skeleton/index.ts +0 -7
  298. package/src/lib/components/ui/switch/index.ts +0 -7
  299. package/src/lib/components/ui/textarea/index.ts +0 -7
  300. package/src/lib/components/ui/tooltip/index.ts +0 -18
  301. package/src/lib/eventSystem.ts +0 -38
  302. package/src/lib/index.ts +0 -40
  303. package/src/lib/store.svelte.ts +0 -21
  304. package/src/lib/store.types.ts +0 -28
  305. package/src/lib/utils.ts +0 -84
  306. package/src/main.ts +0 -18
  307. package/src/routes/collections/collection.svelte +0 -46
  308. package/src/routes/collections/collections.svelte +0 -43
  309. package/src/routes/data_model/dataModel.svelte +0 -40
  310. package/src/routes/data_model/flow.css +0 -22
  311. package/src/routes/data_model/flow.svelte +0 -82
  312. package/src/routes/data_model/syncManager.svelte +0 -93
  313. package/src/routes/data_model/utils.ts +0 -35
  314. package/src/routes/extensions/extension.svelte +0 -16
  315. package/src/routes/home.svelte +0 -36
  316. package/src/routes/workflows/workflows.svelte +0 -135
  317. package/src/stories/Configure.mdx +0 -364
  318. package/src/stories/assets/accessibility.png +0 -0
  319. package/src/stories/assets/accessibility.svg +0 -1
  320. package/src/stories/assets/addon-library.png +0 -0
  321. package/src/stories/assets/assets.png +0 -0
  322. package/src/stories/assets/avif-test-image.avif +0 -0
  323. package/src/stories/assets/context.png +0 -0
  324. package/src/stories/assets/discord.svg +0 -1
  325. package/src/stories/assets/docs.png +0 -0
  326. package/src/stories/assets/figma-plugin.png +0 -0
  327. package/src/stories/assets/github.svg +0 -1
  328. package/src/stories/assets/share.png +0 -0
  329. package/src/stories/assets/styling.png +0 -0
  330. package/src/stories/assets/testing.png +0 -0
  331. package/src/stories/assets/theming.png +0 -0
  332. package/src/stories/assets/tutorials.svg +0 -1
  333. package/src/stories/assets/youtube.svg +0 -1
  334. package/src/stories/detailView/detailViewForm.stories.svelte +0 -79
  335. package/src/stories/examples/Button.stories.svelte +0 -31
  336. package/src/stories/examples/Button.svelte +0 -30
  337. package/src/stories/examples/Header.stories.svelte +0 -26
  338. package/src/stories/examples/Header.svelte +0 -45
  339. package/src/stories/examples/Page.stories.svelte +0 -29
  340. package/src/stories/examples/Page.svelte +0 -70
  341. package/src/stories/examples/button.css +0 -30
  342. package/src/stories/examples/header.css +0 -32
  343. package/src/stories/examples/page.css +0 -68
  344. package/src/vite-env.d.ts +0 -2
  345. package/svelte.config.js +0 -7
  346. package/todo.md +0 -24
  347. package/tsconfig.app.json +0 -25
  348. package/tsconfig.json +0 -14
  349. package/tsconfig.node.json +0 -24
  350. package/vite.build.svelte.config.ts +0 -18
  351. package/vite.config.ts +0 -84
  352. package/vite.extension.config.ts +0 -81
  353. package/vite_utils.ts +0 -28
  354. package/vitest.shims.d.ts +0 -1
  355. /package/{src/lib/components → dist}/dataTable/footer.svelte +0 -0
  356. /package/{src/lib/components → dist}/dataTable/table.svelte +0 -0
  357. /package/{src/lib/components → dist}/detailView/detailViewForm.svelte +0 -0
  358. /package/{src/lib/components → dist}/detailView/fieldCustomInput.svelte +0 -0
  359. /package/{src/lib/components → dist}/foreingKeyInput.svelte +0 -0
  360. /package/{src/lib/components → dist}/sidebar/sidebarElements.svelte +0 -0
  361. /package/{src/lib/components → dist}/sidebar/sidebarTrigger.svelte +0 -0
  362. /package/{src/lib/components → dist}/ui/breadcrumb/breadcrumb.svelte +0 -0
  363. /package/{src/lib/components/ui/sonner/index.ts → dist/ui/sonner/index.d.ts} +0 -0
  364. /package/{src/lib/components → dist}/ui/sonner/sonner.svelte +0 -0
package/src/lib/Lobb.ts DELETED
@@ -1,241 +0,0 @@
1
- import qs from "qs";
2
- import { parseFunction } from "./utils";
3
-
4
- interface RouteParams {
5
- method: string;
6
- route: string;
7
- payload?: any;
8
- }
9
-
10
- type OnResponseHandlers = (reponse: Response) => void;
11
-
12
- export class Lobb {
13
- public lobbUrl: string;
14
- private headers: HeadersInit = [];
15
- private onResponseHandlers: Array<OnResponseHandlers> = [];
16
-
17
- constructor(lobbUrl: string) {
18
- this.lobbUrl = lobbUrl;
19
- }
20
-
21
- public async onResponse(callback: OnResponseHandlers) {
22
- this.onResponseHandlers.push(callback);
23
- }
24
-
25
- public setHeaders(headers: HeadersInit) {
26
- this.headers = headers;
27
- }
28
-
29
- public getHeaders() {
30
- return this.headers;
31
- }
32
-
33
- public async getMeta() {
34
- const response = await fetch(`${this.lobbUrl}/api/meta`, {
35
- headers: this.headers,
36
- });
37
-
38
- const metaResponse = await this.handleResponse(response);
39
- const meta = await metaResponse.json();
40
-
41
- meta.studio_workflows = meta.studio_workflows.map((workflow: any) => {
42
- return {
43
- ...workflow,
44
- handler: parseFunction(workflow.handler),
45
- };
46
- });
47
-
48
- return meta;
49
- }
50
-
51
- // CRUD methods
52
- public async findAll(collectionName: string, params: any) {
53
- const response = await fetch(
54
- `${this.lobbUrl}/api/collections/${collectionName}/search`,
55
- {
56
- method: "POST",
57
- headers: this.headers,
58
- body: JSON.stringify(params),
59
- },
60
- );
61
- return await this.handleResponse(response);
62
- }
63
-
64
- public async findOne(
65
- collectionName: string,
66
- id: string,
67
- queryParams?: any,
68
- ) {
69
- queryParams = queryParams ? `?${qs.stringify(queryParams)}` : "";
70
- const response = await fetch(
71
- `${this.lobbUrl}/api/collections/${collectionName}/${id}${queryParams}`,
72
- {
73
- method: "GET",
74
- headers: this.headers,
75
- },
76
- );
77
- return await this.handleResponse(response);
78
- }
79
-
80
- public async createOne(collectionName: string, body: any, file?: File) {
81
- if (file) {
82
- const formData = new FormData();
83
- Object.keys(body).forEach((key) => {
84
- formData.append(key, body[key]);
85
- });
86
- formData.append("file", file, file.name);
87
- formData.append(
88
- "payload",
89
- JSON.stringify({
90
- data: body,
91
- }),
92
- );
93
- body = formData;
94
- } else {
95
- body = JSON.stringify({
96
- data: body,
97
- });
98
- }
99
- const response = await fetch(
100
- `${this.lobbUrl}/api/collections/${collectionName}`,
101
- {
102
- method: "POST",
103
- headers: this.headers,
104
- body,
105
- },
106
- );
107
- return await this.handleResponse(response);
108
- }
109
-
110
- public async updateOne(collectionName: string, id: string, body: any) {
111
- const response = await fetch(
112
- `${this.lobbUrl}/api/collections/${collectionName}/${id}`,
113
- {
114
- method: "PATCH",
115
- headers: this.headers,
116
- body: JSON.stringify({
117
- data: body,
118
- }),
119
- },
120
- );
121
- return await this.handleResponse(response);
122
- }
123
-
124
- public async readSingleton(
125
- collectionName: string,
126
- ) {
127
- const response = await fetch(
128
- `${this.lobbUrl}/api/collections/${collectionName}/singleton`,
129
- {
130
- method: "GET",
131
- headers: this.headers,
132
- },
133
- );
134
- return await this.handleResponse(response);
135
- }
136
-
137
- public async updateSingleton(
138
- collectionName: string,
139
- body: Record<string, any>
140
- ) {
141
- const response = await fetch(
142
- `${this.lobbUrl}/api/collections/${collectionName}/singleton`,
143
- {
144
- method: "PATCH",
145
- headers: this.headers,
146
- body: JSON.stringify({
147
- data: body,
148
- }),
149
- },
150
- );
151
- return await this.handleResponse(response);
152
- }
153
-
154
- public async deleteOne(collectionName: string, id: string, force = false) {
155
- const response = await fetch(
156
- `${this.lobbUrl}/api/collections/${collectionName}/${id}${force ? "?force" : ""}`,
157
- {
158
- method: "DELETE",
159
- headers: this.headers,
160
- },
161
- );
162
- return await this.handleResponse(response);
163
- }
164
-
165
- public async deleteMany(collectionName: string, filter: any, force = false) {
166
- const response = await fetch(
167
- `${this.lobbUrl}/api/collections/${collectionName}${force ? "?force" : ""}`,
168
- {
169
- method: "DELETE",
170
- headers: this.headers,
171
- body: JSON.stringify({
172
- filter,
173
- }),
174
- },
175
- );
176
- return await this.handleResponse(response);
177
- }
178
-
179
- public async createMany(collectionName: string, body: any) {
180
- body = JSON.stringify({
181
- data: body,
182
- });
183
- const response = await fetch(
184
- `${this.lobbUrl}/api/collections/${collectionName}`,
185
- {
186
- method: "POST",
187
- headers: this.headers,
188
- body,
189
- },
190
- );
191
- return await this.handleResponse(response);
192
- }
193
-
194
- public async updateMany(collectionName: string, body: any, filter: any) {
195
- const response = await fetch(
196
- `${this.lobbUrl}/api/collections/${collectionName}`,
197
- {
198
- method: "PATCH",
199
- headers: this.headers,
200
- body: JSON.stringify({
201
- filter,
202
- data: body,
203
- }),
204
- },
205
- );
206
- return await this.handleResponse(response);
207
- }
208
-
209
- public async transactions(body: any[], rollback?: boolean) {
210
- const response = await fetch(
211
- `${this.lobbUrl}/api/collections/transactions${
212
- rollback ? "?rollback" : ""
213
- }`,
214
- {
215
- method: "POST",
216
- headers: this.headers,
217
- body: JSON.stringify(body),
218
- },
219
- );
220
- return await this.handleResponse(response);
221
- }
222
-
223
- // CUSTOM REQUEST methods
224
- public async request(params: RouteParams) {
225
- const response = await fetch(`${this.lobbUrl}${params.route}`, {
226
- method: params.method,
227
- headers: this.headers,
228
- body: JSON.stringify(params.payload),
229
- });
230
- return await this.handleResponse(response);
231
- }
232
-
233
- // HELPER methods
234
- private async handleResponse(response: Response): Promise<Response> {
235
- for (let index = 0; index < this.onResponseHandlers.length; index++) {
236
- const handler = this.onResponseHandlers[index];
237
- handler(response.clone());
238
- }
239
- return response;
240
- }
241
- }
@@ -1,28 +0,0 @@
1
- import { mount, unmount } from "svelte";
2
- import ConfirmationDialog from "./confirmationDialog.svelte";
3
-
4
- export function showDialog(title: string, description: string): Promise<boolean> {
5
- return new Promise((resolve) => {
6
- const targetElement = document.querySelector('main');
7
-
8
- if (!targetElement) {
9
- throw new Error("main html element doesn't exist for some reason");
10
- }
11
-
12
- const mountedElement = mount(ConfirmationDialog, {
13
- target: targetElement,
14
- props: {
15
- title,
16
- description,
17
- onDecision: async (result: boolean) => {
18
- resolve(result);
19
- await unmount(mountedElement, {
20
- outro: true
21
- });
22
- }
23
- },
24
- });
25
-
26
- console.log("the dialog is mounted man")
27
- });
28
- }
@@ -1,127 +0,0 @@
1
- import type { TableProps } from "./table.svelte";
2
-
3
- import { ctx } from "$lib/store.svelte";
4
- import {
5
- Binary,
6
- Braces,
7
- Brackets,
8
- Calendar,
9
- CalendarClock,
10
- Clock,
11
- Hash,
12
- Key,
13
- Text,
14
- Type,
15
- } from "lucide-svelte/icons";
16
-
17
- export function getCollectionColumns(collectionName: string): TableProps['columns'] {
18
- const collectionFields = getFields(collectionName);
19
- const headers: TableProps['columns'] = [];
20
- for (const fieldName in collectionFields) {
21
- const field = collectionFields[fieldName];
22
- headers.push({
23
- id: field.key,
24
- subtext: field.type,
25
- icon: getFieldIcon(fieldName, collectionName),
26
- });
27
- }
28
- return headers;
29
- }
30
-
31
- export function getFieldIcon(fieldName: string, collectionName: string) {
32
- const field = getField(fieldName, collectionName);
33
- if (fieldName === "id") {
34
- return Key;
35
- } else if (field.type === "string") {
36
- return Type;
37
- } else if (field.type === "text") {
38
- return Text;
39
- } else if (field.type === "object") {
40
- return Braces;
41
- } else if (field.type === "array") {
42
- return Brackets;
43
- } else if (field.type === "bool") {
44
- return Binary;
45
- } else if (field.type === "integer") {
46
- return Hash;
47
- } else if (field.type === "long") {
48
- return Hash;
49
- } else if (field.type === "float") {
50
- return Hash;
51
- } else if (field.type === "decimal") {
52
- return Hash;
53
- } else if (field.type === "date") {
54
- return Calendar;
55
- } else if (field.type === "datetime") {
56
- return CalendarClock;
57
- } else if (field.type === "time") {
58
- return Clock;
59
- }
60
-
61
- throw new Error(`(${field.type}) doesnt have an icon`);
62
- }
63
-
64
- export function getFields(collectionName: string) {
65
- return ctx.meta.collections[collectionName].fields;
66
- }
67
-
68
- export function getField(fieldName: string, collectionName: string) {
69
- return getFields(collectionName)[fieldName];
70
- }
71
-
72
- export function getCollectionPrimaryField(collectionName: string): string | undefined {
73
- const collectionFields =
74
- ctx.meta.collections[collectionName].fields;
75
-
76
- const primaryFieldObject: any = Object.values(collectionFields).find(
77
- (field) => (field as any).type === "string",
78
- );
79
-
80
- if (
81
- primaryFieldObject &&
82
- typeof primaryFieldObject === "object" &&
83
- "key" in primaryFieldObject
84
- ) {
85
- const fieldName = primaryFieldObject.key;
86
- return fieldName;
87
- }
88
- }
89
-
90
- export function getCollectionParamsFields(collectionName: string, allFields = false) {
91
- const relations = ctx.meta.relations;
92
- const foreignFields = relations
93
- .filter((relation) => {
94
- return relation.from.collection === collectionName
95
- })
96
- .map((relation) => {
97
- return {
98
- field: relation.from.field,
99
- collection: relation.to.collection,
100
- };
101
- });
102
-
103
- const columns = [];
104
- for (let index = 0; index < foreignFields.length; index++) {
105
- const foreignField = foreignFields[index];
106
- if (!foreignField.collection) {
107
- continue;
108
- }
109
- columns.push(`${foreignField.field}.id`);
110
-
111
- if (!allFields) {
112
- const primaryField = getCollectionPrimaryField(foreignField.collection)
113
- if (primaryField) {
114
- columns.push(`${foreignField.field}.${primaryField}`);
115
- }
116
- } else {
117
- const fieldNames = Object.keys(ctx.meta.collections[foreignField.collection].fields);
118
- for (let index = 0; index < fieldNames.length; index++) {
119
- const fieldName = fieldNames[index];
120
- columns.push(`${foreignField.field}.${fieldName}`);
121
- }
122
- }
123
- }
124
-
125
- const foreignColumns = columns.join(",");
126
- return `*${foreignColumns ? `,${foreignColumns}` : ""}`;
127
- }
@@ -1,61 +0,0 @@
1
- import type { CreateDetailViewProp } from "./create/createDetailView.svelte";
2
- import type { UpdateDetailViewProp } from "./update/updateDetailView.svelte";
3
- import CreateDetailView from "./create/createDetailView.svelte";
4
- import UpdateDetailView from "./update/updateDetailView.svelte";
5
- import { lobb } from "$lib";
6
- import { getCollectionParamsFields } from "../dataTable/utils";
7
- import { mount, unmount } from "svelte";
8
-
9
- export function openCreateDetailView(props: CreateDetailViewProp) {
10
- const targetElement = document.querySelector('main');
11
-
12
- if (!targetElement) {
13
- throw new Error("main html element doesn't exist for some reason")
14
- }
15
-
16
- const mountedCreateDetailView = mount(CreateDetailView, {
17
- target: targetElement,
18
- props: {
19
- ...props,
20
- onCancel: async () => {
21
- props.onCancel?.()
22
- await unmount(mountedCreateDetailView, {
23
- outro: true
24
- });
25
- }
26
- },
27
- })
28
- }
29
-
30
- export async function openUpdateDetailView(props: UpdateDetailViewProp) {
31
- let params = {
32
- fields: getCollectionParamsFields(props.collectionName, true),
33
- filter: {
34
- id: props.recordId,
35
- },
36
- limit: 1,
37
- };
38
- const response = await lobb.findAll(props.collectionName, params);
39
- const result = await response.json();
40
- const entry = result.data[0];
41
-
42
- const targetElement = document.querySelector('main');
43
-
44
- if (!targetElement) {
45
- throw new Error("main html element doesn't exist for some reason")
46
- }
47
-
48
- const mountedUpdateDetailView = mount(UpdateDetailView, {
49
- target: targetElement,
50
- props: {
51
- ...props,
52
- onCancel: async () => {
53
- props.onCancel?.()
54
- await unmount(mountedUpdateDetailView, {
55
- outro: true
56
- });
57
- },
58
- values: entry,
59
- },
60
- })
61
- }
@@ -1,177 +0,0 @@
1
- import Mustache from "mustache";
2
- import { ctx } from "$lib/store.svelte";
3
- import { getFieldRelation } from "$lib/utils";
4
- import { getField } from "../dataTable/utils";
5
- import type { DetailFormField } from "./detailViewForm.svelte";
6
-
7
- export function getDefaultEntry(fieldNames: string[], collectionName: string, values?: Record<string, any>) {
8
- return Object.fromEntries(
9
- fieldNames.map((fieldName) => {
10
- let value = null;
11
- const field = getField(fieldName, collectionName);
12
- if (values && values[fieldName] !== undefined) {
13
- value = values[fieldName];
14
- } else if (field.pre_processors?.default) {
15
- const defualtValue = field.pre_processors.default;
16
- if (typeof defualtValue === "string") {
17
- value = Mustache.render(defualtValue, {
18
- now: new Date().toISOString(),
19
- });
20
- } else {
21
- value = defualtValue;
22
- }
23
- }
24
- return [fieldName, value];
25
- }),
26
- );
27
- }
28
-
29
- export function serializeEntry(
30
- collectionName: string,
31
- entry: Record<string, any>,
32
- rollback: boolean = false,
33
- ) {
34
- // deep clone the object
35
- entry = { ...entry }
36
-
37
- // serialize the foreign key field's value
38
- for (const [fieldName, fieldValue] of Object.entries(entry)) {
39
- const isRefrenceField = Boolean(getFieldRelation(collectionName, fieldName));
40
- if (isRefrenceField && fieldValue !== null && fieldValue.id !== undefined) {
41
- entry[fieldName] = fieldValue.id;
42
- }
43
- }
44
-
45
- // check for related collections properties and serialize them too
46
- if (!rollback) {
47
- const childrenRelations = ctx.meta.relations.filter((relation) => relation.to.collection === collectionName);
48
- const childrenCollectionNames = childrenRelations.map((relation) => relation.from.collection);
49
- for (let index = 0; index < childrenCollectionNames.length; index++) {
50
- const childrenCollectionName = childrenCollectionNames[index];
51
- const childrenEntries = entry[childrenCollectionName];
52
- if (childrenEntries) {
53
- for (let index = 0; index < childrenEntries.length; index++) {
54
- childrenEntries[index] = serializeEntry(childrenCollectionName, childrenEntries[index]);
55
- }
56
- }
57
- }
58
- }
59
-
60
- return entry;
61
- }
62
-
63
- export function generateTransactionBody(
64
- collectionName: string,
65
- entry: Record<string, any>,
66
- ) {
67
- entry = { ...entry }
68
- function handleEntryRecursive(
69
- transactionBody: any[],
70
- collectionName: string,
71
- entry: Record<string, any>,
72
- parentTransactionIndex?: number,
73
- ) {
74
- const parentCollectionName = parentTransactionIndex !== undefined ? transactionBody[parentTransactionIndex].collection : null;
75
- const foreignKeyFieldName = ctx.meta.relations.find(relation => relation.from.collection === collectionName && relation.to.collection === parentCollectionName)?.from.field;
76
- const collectionFieldNames = Object.keys(ctx.meta.collections[collectionName].fields);
77
- const payload: any = {};
78
- for (let index = 0; index < collectionFieldNames.length; index++) {
79
- const fieldName = collectionFieldNames[index];
80
- const isForeignKeyField = fieldName === foreignKeyFieldName;
81
- if (isForeignKeyField) {
82
- payload[fieldName] = `{{ responses[${parentTransactionIndex}].data.id }}`
83
- continue;
84
- }
85
-
86
- payload[fieldName] = entry[fieldName];
87
- }
88
-
89
- const localTransactionIndex = transactionBody.length;
90
- if (payload.id) {
91
- const localPayload = {
92
- [foreignKeyFieldName]: payload[foreignKeyFieldName],
93
- };
94
- transactionBody.push({
95
- collection: collectionName,
96
- method: "updateMany",
97
- args: [
98
- localPayload,
99
- {
100
- id: payload.id
101
- }
102
- ],
103
- });
104
- } else {
105
- transactionBody.push({
106
- collection: collectionName,
107
- method: "createOne",
108
- args: [payload],
109
- });
110
- }
111
-
112
- const childrenRelations = ctx.meta.relations.filter((relation) => relation.to.collection === collectionName);
113
- const childrenCollectionNames = childrenRelations.map((relation) => relation.from.collection);
114
- for (let index = 0; index < childrenCollectionNames.length; index++) {
115
- const childrenCollectionName = childrenCollectionNames[index];
116
- const childrenEntries = entry[childrenCollectionName];
117
- if (childrenEntries) {
118
- for (let index = 0; index < childrenEntries.length; index++) {
119
- const childrenEntry = childrenEntries[index];
120
- handleEntryRecursive(transactionBody, childrenCollectionName, childrenEntry, localTransactionIndex);
121
- }
122
- }
123
- }
124
- }
125
-
126
- const transactionBody: any[] = [];
127
-
128
- handleEntryRecursive(transactionBody, collectionName, entry);
129
-
130
- return transactionBody
131
- }
132
-
133
- export function parseDetailViewValues(collectionName: string, values: Record<string, any>) {
134
- const forignFieldNames = ctx.meta.relations
135
- .filter((relation) => relation.from.collection === collectionName)
136
- .map((relation) => relation.from.field);
137
- const childCollectionNames = ctx.meta.relations
138
- .filter((relation) => relation.to.collection === collectionName)
139
- .map((relation) => relation.from.collection);
140
-
141
- for (const [key, value] of Object.entries(values)) {
142
- if (forignFieldNames.includes(key)) {
143
- if (typeof value === 'number') {
144
- values[key] = {
145
- id: value,
146
- }
147
- }
148
- } else if (childCollectionNames.includes(key)) {
149
- for (let index = 0; index < values[key].length; index++) {
150
- parseDetailViewValues(key, values[key][index]);
151
- }
152
- }
153
- }
154
- }
155
-
156
- export function getCollectionFields(collectionName: string) {
157
- let returnedData: DetailFormField[] = [];
158
-
159
- const collectionFields = ctx.meta.collections[collectionName].fields;
160
- const isSingleton = ctx.meta.collections[collectionName].singleton;
161
- for (const [fieldName, value] of Object.entries(collectionFields)) {
162
-
163
- if (isSingleton && fieldName === "id") {
164
- continue;
165
- }
166
-
167
- returnedData.push({
168
- type: "input",
169
- key: fieldName,
170
- label: fieldName,
171
- disabled: fieldName == "id",
172
- placeholder: fieldName == "id" ? "AUTO_GENERATED" : "",
173
- })
174
- }
175
-
176
- return returnedData;
177
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * TODO
3
- *
4
- * this file shows an example of downloading the types files of a library from npm to use them in adding type support of that library in the vscode editor
5
- * so the whole point is that for users to be able to paste a url from npm or jsr of a library and have all ts support from its types
6
- */
7
-
8
- import { gunzipSync } from "fflate";
9
- import { untar } from "@andrewbranch/untar.js";
10
-
11
- async function extractTgz(buffer: ArrayBuffer) {
12
- const tarBuffer = gunzipSync(new Uint8Array(buffer));
13
-
14
- const cleanBuffer = tarBuffer.buffer.slice(
15
- tarBuffer.byteOffset,
16
- tarBuffer.byteOffset + tarBuffer.byteLength,
17
- );
18
- const files = await untar(cleanBuffer as ArrayBuffer);
19
-
20
- const dtsFiles = [];
21
-
22
- for (const file of files) {
23
- if (file.filename.endsWith(".d.ts")) {
24
- const content = new TextDecoder().decode(file.fileData);
25
- dtsFiles.push({ name: file.filename, content });
26
- }
27
- }
28
-
29
- return dtsFiles;
30
- }
31
-
32
- const tgzURL = "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz";
33
- const response = await fetch(tgzURL);
34
- const arrayBuffer = await response.arrayBuffer();
35
-
36
- const files = await extractTgz(arrayBuffer);