@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
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { RangeCalendar as RangeCalendarPrimitive, type WithoutChildrenOrChild } from "bits-ui";
3
3
  import * as RangeCalendar from "./index.js";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,5 @@
1
+ import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
2
+ import * as RangeCalendar from "./index.js";
3
+ declare const RangeCalendar: import("svelte").Component<Omit<Omit<RangeCalendarPrimitive.RootProps, "child">, "children">, {}, "value" | "placeholder" | "ref">;
4
+ type RangeCalendar = ReturnType<typeof RangeCalendar>;
5
+ export default RangeCalendar;
@@ -0,0 +1,11 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ import GroupHeading from "./select-group-heading.svelte";
3
+ import Item from "./select-item.svelte";
4
+ import Content from "./select-content.svelte";
5
+ import Trigger from "./select-trigger.svelte";
6
+ import Separator from "./select-separator.svelte";
7
+ import ScrollDownButton from "./select-scroll-down-button.svelte";
8
+ import ScrollUpButton from "./select-scroll-up-button.svelte";
9
+ declare const Root: import("svelte").Component<import("bits-ui").ComboboxRootPropsWithoutHTML, {}, "open" | "value">;
10
+ declare const Group: import("svelte").Component<SelectPrimitive.GroupProps, {}, "ref">;
11
+ export { Root, Item, Group, GroupHeading, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton, Root as Select, Item as SelectItem, Group as SelectGroup, GroupHeading as SelectGroupHeading, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, };
@@ -0,0 +1,13 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ import GroupHeading from "./select-group-heading.svelte";
3
+ import Item from "./select-item.svelte";
4
+ import Content from "./select-content.svelte";
5
+ import Trigger from "./select-trigger.svelte";
6
+ import Separator from "./select-separator.svelte";
7
+ import ScrollDownButton from "./select-scroll-down-button.svelte";
8
+ import ScrollUpButton from "./select-scroll-up-button.svelte";
9
+ var Root = SelectPrimitive.Root;
10
+ var Group = SelectPrimitive.Group;
11
+ export { Root, Item, Group, GroupHeading, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton,
12
+ //
13
+ Root as Select, Item as SelectItem, Group as SelectGroup, GroupHeading as SelectGroupHeading, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, };
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
3
3
  import * as Select from "./index.js";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,7 @@
1
+ import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
2
+ type $$ComponentProps = WithoutChild<SelectPrimitive.ContentProps> & {
3
+ portalProps?: SelectPrimitive.PortalProps;
4
+ };
5
+ declare const SelectContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
6
+ type SelectContent = ReturnType<typeof SelectContent>;
7
+ export default SelectContent;
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { Select as SelectPrimitive } from "bits-ui";
3
- import { cn } from "$lib/utils.js";
3
+ import { cn } from "../../../utils.js";
4
4
 
5
5
  let {
6
6
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectGroupHeading: import("svelte").Component<SelectPrimitive.GroupHeadingProps, {}, "ref">;
3
+ type SelectGroupHeading = ReturnType<typeof SelectGroupHeading>;
4
+ export default SelectGroupHeading;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
3
3
  import Check from "@lucide/svelte/icons/check";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectItem: import("svelte").Component<Omit<SelectPrimitive.ItemProps, "child">, {}, "ref">;
3
+ type SelectItem = ReturnType<typeof SelectItem>;
4
+ export default SelectItem;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import ChevronDown from "@lucide/svelte/icons/chevron-down";
3
3
  import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectScrollDownButton: import("svelte").Component<Omit<Omit<SelectPrimitive.ScrollDownButtonProps, "child">, "children">, {}, "ref">;
3
+ type SelectScrollDownButton = ReturnType<typeof SelectScrollDownButton>;
4
+ export default SelectScrollDownButton;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import ChevronUp from "@lucide/svelte/icons/chevron-up";
3
3
  import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectScrollUpButton: import("svelte").Component<Omit<Omit<SelectPrimitive.ScrollDownButtonProps, "child">, "children">, {}, "ref">;
3
+ type SelectScrollUpButton = ReturnType<typeof SelectScrollUpButton>;
4
+ export default SelectScrollUpButton;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import type { Separator as SeparatorPrimitive } from "bits-ui";
3
- import { Separator } from "$lib/components/ui/separator/index.js";
4
- import { cn } from "$lib/utils.js";
3
+ import { Separator } from "../separator/index.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import type { Separator as SeparatorPrimitive } from "bits-ui";
2
+ declare const SelectSeparator: import("svelte").Component<SeparatorPrimitive.RootProps, {}, "ref">;
3
+ type SelectSeparator = ReturnType<typeof SelectSeparator>;
4
+ export default SelectSeparator;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
3
3
  import ChevronDown from "@lucide/svelte/icons/chevron-down";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Select as SelectPrimitive } from "bits-ui";
2
+ declare const SelectTrigger: import("svelte").Component<Omit<SelectPrimitive.TriggerProps, "child">, {}, "ref">;
3
+ type SelectTrigger = ReturnType<typeof SelectTrigger>;
4
+ export default SelectTrigger;
@@ -0,0 +1,2 @@
1
+ import Root from "./separator.svelte";
2
+ export { Root, Root as Separator, };
@@ -0,0 +1,4 @@
1
+ import Root from "./separator.svelte";
2
+ export { Root,
3
+ //
4
+ Root as Separator, };
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { Separator as SeparatorPrimitive } from "bits-ui";
3
- import { cn } from "$lib/utils.js";
3
+ import { cn } from "../../../utils.js";
4
4
 
5
5
  let {
6
6
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Separator as SeparatorPrimitive } from "bits-ui";
2
+ declare const Separator: import("svelte").Component<SeparatorPrimitive.RootProps, {}, "ref">;
3
+ type Separator = ReturnType<typeof Separator>;
4
+ export default Separator;
@@ -0,0 +1,2 @@
1
+ import Root from "./skeleton.svelte";
2
+ export { Root, Root as Skeleton, };
@@ -0,0 +1,4 @@
1
+ import Root from "./skeleton.svelte";
2
+ export { Root,
3
+ //
4
+ Root as Skeleton, };
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import type { WithElementRef, WithoutChildren } from "bits-ui";
3
3
  import type { HTMLAttributes } from "svelte/elements";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,5 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ declare const Skeleton: import("svelte").Component<Omit<WithElementRef<HTMLAttributes<HTMLDivElement>>, "children">, {}, "ref">;
4
+ type Skeleton = ReturnType<typeof Skeleton>;
5
+ export default Skeleton;
@@ -0,0 +1 @@
1
+ export { default as Toaster } from "./sonner.svelte";
@@ -0,0 +1,4 @@
1
+ import { Toaster as Sonner, type ToasterProps as SonnerProps } from "svelte-sonner";
2
+ declare const Sonner: import("svelte").Component<SonnerProps, {}, "">;
3
+ type Sonner = ReturnType<typeof Sonner>;
4
+ export default Sonner;
@@ -0,0 +1,2 @@
1
+ import Root from "./switch.svelte";
2
+ export { Root, Root as Switch, };
@@ -0,0 +1,4 @@
1
+ import Root from "./switch.svelte";
2
+ export { Root,
3
+ //
4
+ Root as Switch, };
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { Switch as SwitchPrimitive, type WithoutChildrenOrChild } from "bits-ui";
3
- import { cn } from "$lib/utils.js";
3
+ import { cn } from "../../../utils.js";
4
4
 
5
5
  let {
6
6
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Switch as SwitchPrimitive } from "bits-ui";
2
+ declare const Switch: import("svelte").Component<Omit<Omit<SwitchPrimitive.RootProps, "child">, "children">, {}, "checked" | "ref">;
3
+ type Switch = ReturnType<typeof Switch>;
4
+ export default Switch;
@@ -0,0 +1,2 @@
1
+ import Root from "./textarea.svelte";
2
+ export { Root, Root as Textarea, };
@@ -0,0 +1,4 @@
1
+ import Root from "./textarea.svelte";
2
+ export { Root,
3
+ //
4
+ Root as Textarea, };
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import type { WithElementRef, WithoutChildren } from "bits-ui";
3
3
  import type { HTMLTextareaAttributes } from "svelte/elements";
4
- import { cn } from "$lib/utils.js";
4
+ import { cn } from "../../../utils.js";
5
5
 
6
6
  let {
7
7
  ref = $bindable(null),
@@ -0,0 +1,5 @@
1
+ import type { WithElementRef } from "bits-ui";
2
+ import type { HTMLTextareaAttributes } from "svelte/elements";
3
+ declare const Textarea: import("svelte").Component<Omit<WithElementRef<HTMLTextareaAttributes>, "children">, {}, "value" | "ref">;
4
+ type Textarea = ReturnType<typeof Textarea>;
5
+ export default Textarea;
@@ -0,0 +1,6 @@
1
+ import { Tooltip as TooltipPrimitive } from "bits-ui";
2
+ import Content from "./tooltip-content.svelte";
3
+ declare const Root: import("svelte").Component<TooltipPrimitive.RootProps, {}, "open">;
4
+ declare const Trigger: import("svelte").Component<TooltipPrimitive.TriggerProps, {}, "ref">;
5
+ declare const Provider: import("svelte").Component<TooltipPrimitive.ProviderProps, {}, "">;
6
+ export { Root, Trigger, Content, Provider, Root as Tooltip, Content as TooltipContent, Trigger as TooltipTrigger, Provider as TooltipProvider, };
@@ -0,0 +1,8 @@
1
+ import { Tooltip as TooltipPrimitive } from "bits-ui";
2
+ import Content from "./tooltip-content.svelte";
3
+ var Root = TooltipPrimitive.Root;
4
+ var Trigger = TooltipPrimitive.Trigger;
5
+ var Provider = TooltipPrimitive.Provider;
6
+ export { Root, Trigger, Content, Provider,
7
+ //
8
+ Root as Tooltip, Content as TooltipContent, Trigger as TooltipTrigger, Provider as TooltipProvider, };
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { Tooltip as TooltipPrimitive } from "bits-ui";
3
- import { cn } from "$lib/utils.js";
3
+ import { cn } from "../../../utils.js";
4
4
 
5
5
  let {
6
6
  ref = $bindable(null),
@@ -0,0 +1,4 @@
1
+ import { Tooltip as TooltipPrimitive } from "bits-ui";
2
+ declare const TooltipContent: import("svelte").Component<TooltipPrimitive.ContentProps, {}, "ref">;
3
+ type TooltipContent = ReturnType<typeof TooltipContent>;
4
+ export default TooltipContent;
@@ -11,11 +11,11 @@
11
11
  </script>
12
12
 
13
13
  <script lang="ts">
14
- import { lobb } from "$lib";
15
- import MonacoEditor from "$lib/components/monacoEditor.svelte";
16
- import Button from "$lib/components/ui/button/button.svelte";
17
- import Input from "$lib/components/ui/input/input.svelte";
18
- import { ctx } from "$lib/store.svelte";
14
+ import { lobb } from "..";
15
+ import MonacoEditor from "./monacoEditor.svelte";
16
+ import Button from "./ui/button/button.svelte";
17
+ import Input from "./ui/input/input.svelte";
18
+ import { ctx } from "../store.svelte";
19
19
  import { location } from "@wjfe/n-savant";
20
20
  import { Edit, Plus } from "lucide-svelte";
21
21
  import { toast } from "svelte-sonner";
@@ -0,0 +1,16 @@
1
+ export interface WorkflowEntry {
2
+ id?: string;
3
+ name: string;
4
+ directory: string;
5
+ event_name: string;
6
+ input_schema?: string;
7
+ output_schema?: string;
8
+ handler?: string;
9
+ }
10
+ interface Props {
11
+ workflow: WorkflowEntry;
12
+ refreshSidebar: () => Promise<void>;
13
+ }
14
+ declare const WorkflowEditor: import("svelte").Component<Props, {}, "workflow">;
15
+ type WorkflowEditor = ReturnType<typeof WorkflowEditor>;
16
+ export default WorkflowEditor;
package/package.json CHANGED
@@ -1,18 +1,24 @@
1
1
  {
2
2
  "name": "@lobb-js/studio",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
+ "files": [
9
+ "dist",
10
+ "vite-plugins"
11
+ ],
8
12
  "exports": {
9
- ".": "./src/Studio.svelte",
10
- "./vite-plugin": "./vite-plugin-contextual-lib.js",
13
+ ".": "./src/lib/components/Studio.svelte",
14
+ "./*": "./src/lib/components/*",
15
+ "./vite-plugins": "./vite-plugins/index.js",
11
16
  "./components": "./src/components-export.ts"
12
17
  },
13
18
  "scripts": {
14
19
  "dev": "vite",
15
20
  "build": "rm -rf dist && vite build --config vite.build.svelte.config.ts && vite build",
21
+ "package": "svelte-package --input src/lib/components",
16
22
  "preview": "vite preview",
17
23
  "check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json",
18
24
  "build_extension": "vite build --config vite.extension.config.ts",
@@ -23,12 +29,12 @@
23
29
  },
24
30
  "devDependencies": {
25
31
  "@chromatic-com/storybook": "^4.1.2",
26
- "@lucide/svelte": "^0.563.1",
27
32
  "@storybook/addon-a11y": "^10.0.1",
28
33
  "@storybook/addon-docs": "^10.0.1",
29
34
  "@storybook/addon-svelte-csf": "^5.0.10",
30
35
  "@storybook/addon-vitest": "^10.0.1",
31
36
  "@storybook/svelte-vite": "^10.0.1",
37
+ "@sveltejs/package": "^2.5.7",
32
38
  "@sveltejs/vite-plugin-svelte": "6.2.1",
33
39
  "@tsconfig/svelte": "^5.0.4",
34
40
  "@types/lodash": "^4.17.17",
@@ -39,22 +45,14 @@
39
45
  "@vitest/browser-playwright": "^4.0.5",
40
46
  "@vitest/coverage-v8": "^4.0.5",
41
47
  "autoprefixer": "^10.4.20",
42
- "bits-ui": "^1.6.0",
43
48
  "browser-fs-access": "^0.35.0",
44
- "clsx": "^2.1.1",
45
49
  "dts-bundle-generator": "^9.5.1",
46
- "lucide-svelte": "^0.488.0",
47
- "mode-watcher": "^0.5.1",
48
- "monaco-editor": "^0.52.2",
49
50
  "playwright": "^1.56.1",
50
- "qs": "^6.14.0",
51
+ "qs": "^6.14.1",
51
52
  "sortablejs": "^1.15.6",
52
53
  "storybook": "^10.0.1",
53
54
  "svelte": "5.39.8",
54
55
  "svelte-check": "^4.1.4",
55
- "svelte-sonner": "^0.3.28",
56
- "tailwind-merge": "^3.4.0",
57
- "tailwind-variants": "^3.2.2",
58
56
  "tailwindcss": "^4.1.18",
59
57
  "tailwindcss-animate": "^1.0.7",
60
58
  "tw-animate-css": "^1.4.0",
@@ -63,15 +61,27 @@
63
61
  "vite-plugin-css-injected-by-js": "^3.5.2",
64
62
  "vitest": "^4.0.5"
65
63
  },
64
+ "peerDependencies": {
65
+ "svelte": "^5.0.0"
66
+ },
66
67
  "dependencies": {
67
68
  "@andrewbranch/untar.js": "^1.0.3",
68
69
  "@dagrejs/dagre": "^1.1.5",
70
+ "@lucide/svelte": "^0.563.1",
69
71
  "@tailwindcss/vite": "^4.1.18",
70
72
  "@wjfe/n-savant": "^0.3.0",
71
73
  "@xyflow/svelte": "^1.2.0",
74
+ "bits-ui": "^1.8.0",
75
+ "clsx": "^2.1.1",
72
76
  "fflate": "^0.8.2",
73
77
  "json-stable-stringify": "^1.3.0",
74
78
  "lodash": "^4.17.21",
75
- "mustache": "^4.2.0"
79
+ "lucide-svelte": "^0.488.0",
80
+ "mode-watcher": "^0.5.1",
81
+ "monaco-editor": "^0.52.2",
82
+ "mustache": "^4.2.0",
83
+ "svelte-sonner": "^0.3.28",
84
+ "tailwind-merge": "^3.4.0",
85
+ "tailwind-variants": "^3.2.2"
76
86
  }
77
87
  }
@@ -14,14 +14,12 @@ const __dirname = path.dirname(__filename);
14
14
  * This allows shadcn components to work in both the Studio package and consuming projects
15
15
  * without conflicts.
16
16
  *
17
- * @param {Object} options - Plugin options
18
- * @param {string} [options.studioLibPath] - The path to the studio's src/lib directory (used for external imports)
19
17
  * @returns {import('vite').Plugin}
20
18
  */
21
- export function contextualLibAlias(options = {}) {
19
+ export function contextualLibAlias() {
22
20
  let projectRoot;
23
21
  let localLibPath;
24
- let studioLibPath;
22
+ const studioLibPath = path.resolve(__dirname, "../src/lib");
25
23
 
26
24
  return {
27
25
  name: "contextual-lib-alias",
@@ -30,9 +28,6 @@ export function contextualLibAlias(options = {}) {
30
28
  configResolved(config) {
31
29
  projectRoot = config.root;
32
30
  localLibPath = path.resolve(projectRoot, "./src/lib");
33
-
34
- // Use provided studioLibPath or default to this package's src/lib
35
- studioLibPath = options.studioLibPath || path.resolve(__dirname, "./src/lib");
36
31
  },
37
32
 
38
33
  async resolveId(source, importer, options) {
@@ -0,0 +1,21 @@
1
+ import { contextualLibAlias } from "./contextual-lib-alias.js";
2
+ import { studioSourceResolver } from "./studio-source-resolver.js";
3
+
4
+ /**
5
+ * Returns an array of Vite plugins needed for Lobb Studio integration.
6
+ *
7
+ * Includes:
8
+ * - contextualLibAlias: Resolves $lib imports contextually
9
+ * - studioSourceResolver: Resolves @lobb-js/studio to source (monorepo) or dist (standalone)
10
+ *
11
+ * @returns {import('vite').Plugin[]}
12
+ */
13
+ export function lobbStudioPlugins() {
14
+ return [
15
+ studioSourceResolver(),
16
+ contextualLibAlias(),
17
+ ];
18
+ }
19
+
20
+ // Also export individual plugins for advanced usage
21
+ export { contextualLibAlias, studioSourceResolver };
@@ -0,0 +1,41 @@
1
+ import path from "path";
2
+ import fs from "fs";
3
+ import { fileURLToPath } from "url";
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = path.dirname(__filename);
7
+
8
+ /**
9
+ * Vite plugin that resolves @lobb-js/studio imports contextually.
10
+ *
11
+ * - Inside monorepo: Resolve to source files (./src/Studio.svelte) for HMR
12
+ * - Outside monorepo (from node_modules): Resolve to built files (./dist/studio.js)
13
+ *
14
+ * This allows lobb-skeleton to work identically both inside and outside the monorepo
15
+ * without any code changes.
16
+ *
17
+ * @returns {import('vite').Plugin}
18
+ */
19
+ export function studioSourceResolver() {
20
+ const studioSourcePath = path.resolve(__dirname, "../src/lib/Studio.svelte");
21
+ const studioPackagePath = path.resolve(__dirname, "..");
22
+
23
+ return {
24
+ name: "studio-source-resolver",
25
+ enforce: "pre",
26
+
27
+ async resolveId(source, importer, options) {
28
+ // Only handle @lobb-js/studio main import
29
+ if (source !== "@lobb-js/studio") return null;
30
+
31
+ // Check if we're in a monorepo context by looking for the source file
32
+ if (fs.existsSync(studioSourcePath)) {
33
+ // We're in monorepo - resolve to source for HMR
34
+ return this.resolve(studioSourcePath, importer, { skipSelf: true, ...options });
35
+ }
36
+
37
+ // Not in monorepo - let default resolution handle it (will use dist/ from node_modules)
38
+ return null;
39
+ }
40
+ };
41
+ }
package/.env.example DELETED
@@ -1 +0,0 @@
1
- LOBB_URL=http://localhost:3000
@@ -1,31 +0,0 @@
1
- import type { StorybookConfig } from '@storybook/svelte-vite';
2
-
3
- import { dirname } from "path"
4
-
5
- import { fileURLToPath } from "url"
6
-
7
- /**
8
- * This function is used to resolve the absolute path of a package.
9
- * It is needed in projects that use Yarn PnP or are set up within a monorepo.
10
- */
11
- function getAbsolutePath(value: string): any {
12
- return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)))
13
- }
14
- const config: StorybookConfig = {
15
- "stories": [
16
- "../src/**/*.mdx",
17
- "../src/**/*.stories.@(js|ts|svelte)"
18
- ],
19
- "addons": [
20
- getAbsolutePath('@storybook/addon-svelte-csf'),
21
- getAbsolutePath('@chromatic-com/storybook'),
22
- getAbsolutePath('@storybook/addon-docs'),
23
- getAbsolutePath("@storybook/addon-a11y"),
24
- getAbsolutePath("@storybook/addon-vitest")
25
- ],
26
- "framework": {
27
- "name": getAbsolutePath('@storybook/svelte-vite'),
28
- "options": {}
29
- }
30
- };
31
- export default config;
@@ -1,21 +0,0 @@
1
- import type { Preview } from '@storybook/svelte-vite'
2
-
3
- const preview: Preview = {
4
- parameters: {
5
- controls: {
6
- matchers: {
7
- color: /(background|color)$/i,
8
- date: /Date$/i,
9
- },
10
- },
11
-
12
- a11y: {
13
- // 'todo' - show a11y violations in the test UI only
14
- // 'error' - fail CI on a11y violations
15
- // 'off' - skip a11y checks entirely
16
- test: 'todo'
17
- }
18
- },
19
- };
20
-
21
- export default preview;
@@ -1,7 +0,0 @@
1
- import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview";
2
- import { setProjectAnnotations } from '@storybook/svelte-vite';
3
- import * as projectAnnotations from './preview';
4
-
5
- // This is an important step to apply the right configuration when testing your stories.
6
- // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
7
- setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]);
package/components.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://shadcn-svelte.com/schema.json",
3
- "tailwind": {
4
- "css": "src/app.css",
5
- "baseColor": "slate"
6
- },
7
- "aliases": {
8
- "components": "$lib/components",
9
- "utils": "$lib/utils",
10
- "ui": "$lib/components/ui",
11
- "hooks": "$lib/hooks",
12
- "lib": "$lib"
13
- },
14
- "typescript": true,
15
- "registry": "https://shadcn-svelte.com/registry"
16
- }
@@ -1,7 +0,0 @@
1
- #!/bin/sh
2
-
3
- # insert ENV to the html
4
- find /app/dist -name "*.html" -exec sed -i "s|%LOBB_URL%|${LOBB_URL}|g" {} +
5
-
6
- # Start the server
7
- exec sirv dist --single --port 3000 --host