@hkdigital/lib-core 0.3.10 → 0.3.12

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 (362) hide show
  1. package/README.md +36 -12
  2. package/dist/assets/autospuiten/car-paint-picker.d.ts +7 -7
  3. package/dist/classes/data/IterableTree.d.ts +13 -6
  4. package/dist/classes/data/IterableTree.js +18 -5
  5. package/dist/classes/promise/HkPromise.d.ts +18 -17
  6. package/dist/classes/promise/HkPromise.js +135 -128
  7. package/dist/classes/streams/ServerEventsStore.d.ts +2 -3
  8. package/dist/classes/streams/ServerEventsStore.js +5 -4
  9. package/dist/classes/svelte/index.d.ts +0 -8
  10. package/dist/classes/svelte/index.js +0 -13
  11. package/dist/config/README.md +197 -0
  12. package/dist/config/generators/vite.d.ts +47 -0
  13. package/dist/config/generators/vite.js +148 -0
  14. package/dist/config/imagetools.d.ts +2 -2
  15. package/dist/config/vite.d.ts +1 -0
  16. package/dist/config/vite.js +5 -0
  17. package/dist/constants/regexp/README.md +96 -0
  18. package/dist/constants/regexp/index.d.ts +1 -1
  19. package/dist/constants/regexp/index.js +2 -2
  20. package/dist/constants/regexp/text.d.ts +6 -6
  21. package/dist/constants/regexp/text.js +6 -6
  22. package/dist/constants/regexp/url.d.ts +1 -0
  23. package/dist/constants/regexp/url.js +3 -0
  24. package/dist/constants/regexp/user.d.ts +0 -1
  25. package/dist/constants/regexp/user.js +6 -10
  26. package/dist/design/README.md +405 -0
  27. package/dist/design/index.d.ts +8 -0
  28. package/dist/design/index.js +97 -0
  29. package/dist/design/tailwind-theme-extend.js +4 -4
  30. package/dist/design/themes/README.md +103 -0
  31. package/dist/{themes → design/themes}/hkdev/theme-ext.js +1 -1
  32. package/dist/{util/design-system/css → design/utils}/clamp.js +1 -1
  33. package/dist/{util/design-system/css/root-design-vars.d.ts → design/utils/root-vars.d.ts} +2 -2
  34. package/dist/{util/design-system/css/root-design-vars.js → design/utils/root-vars.js} +3 -3
  35. package/dist/{util/design-system/layout → design/utils}/scaling.js +1 -1
  36. package/dist/errors/index.d.ts +1 -0
  37. package/dist/errors/index.js +1 -0
  38. package/dist/errors/promise.d.ts +27 -0
  39. package/dist/errors/promise.js +26 -0
  40. package/dist/logging/README.md +158 -0
  41. package/dist/logging/index.d.ts +3 -1
  42. package/dist/logging/index.js +6 -2
  43. package/dist/logging/internal/adapters/console.js +1 -1
  44. package/dist/logging/internal/adapters/pino.js +29 -11
  45. package/dist/logging/internal/factories/client.d.ts +1 -1
  46. package/dist/logging/internal/factories/client.js +2 -2
  47. package/dist/logging/internal/factories/server.d.ts +1 -1
  48. package/dist/logging/internal/factories/server.js +2 -2
  49. package/dist/logging/internal/factories/universal.d.ts +2 -2
  50. package/dist/logging/internal/factories/universal.js +1 -1
  51. package/dist/logging/internal/{unified-logger → logger}/Logger.d.ts +2 -2
  52. package/dist/logging/internal/{unified-logger → logger}/Logger.js +3 -3
  53. package/dist/logging/internal/logger/index.d.ts +1 -0
  54. package/dist/logging/internal/logger/index.js +1 -0
  55. package/dist/logging/internal/{unified-logger/typedef.d.ts → typedef.d.ts} +2 -1
  56. package/dist/logging/internal/{unified-logger/typedef.js → typedef.js} +5 -1
  57. package/dist/network/README.md +173 -0
  58. package/dist/network/cache.d.ts +3 -0
  59. package/dist/network/cache.js +4 -0
  60. package/dist/{util → network}/http/caching.js +3 -5
  61. package/dist/{util → network}/http/errors.js +1 -1
  62. package/dist/{util → network}/http/headers.js +1 -1
  63. package/dist/{util → network}/http/http-request.js +2 -2
  64. package/dist/{util → network}/http/json-request.js +1 -1
  65. package/dist/{util → network}/http/response.js +1 -1
  66. package/dist/network/http.d.ts +6 -0
  67. package/dist/network/http.js +6 -0
  68. package/dist/network/loaders/README.md +255 -0
  69. package/dist/{classes/svelte → network/loaders}/audio/AudioLoader.svelte.d.ts +1 -1
  70. package/dist/{classes/svelte → network/loaders}/audio/AudioLoader.svelte.js +1 -1
  71. package/dist/{classes/svelte → network/loaders}/audio/AudioScene.svelte.js +1 -1
  72. package/dist/network/loaders/audio.d.ts +2 -0
  73. package/dist/network/loaders/audio.js +2 -0
  74. package/dist/{classes/svelte → network/loaders}/image/ImageLoader.svelte.d.ts +3 -6
  75. package/dist/{classes/svelte → network/loaders}/image/ImageLoader.svelte.js +5 -6
  76. package/dist/{classes/svelte → network/loaders}/image/ImageScene.svelte.d.ts +5 -7
  77. package/dist/{classes/svelte → network/loaders}/image/ImageScene.svelte.js +8 -9
  78. package/dist/{classes/svelte → network/loaders}/image/ImageVariantsLoader.svelte.d.ts +4 -4
  79. package/dist/{classes/svelte → network/loaders}/image/ImageVariantsLoader.svelte.js +3 -5
  80. package/dist/{util/image → network/loaders/image/utils}/index.d.ts +2 -2
  81. package/dist/{util/image → network/loaders/image/utils}/index.js +10 -10
  82. package/dist/network/loaders/image.d.ts +5 -0
  83. package/dist/network/loaders/image.js +8 -0
  84. package/dist/network/loaders.d.ts +2 -0
  85. package/dist/network/loaders.js +2 -0
  86. package/dist/{classes/svelte/network-loader → network/states}/NetworkLoader.svelte.d.ts +1 -1
  87. package/dist/{classes/svelte/network-loader → network/states}/NetworkLoader.svelte.js +4 -4
  88. package/dist/{classes/svelte/network-loader → network/states}/mocks.js +2 -2
  89. package/dist/network/typedef.d.ts +4 -0
  90. package/dist/network/typedef.js +10 -0
  91. package/dist/services/README.md +200 -0
  92. package/dist/services/index.d.ts +6 -1
  93. package/dist/services/index.js +8 -1
  94. package/dist/services/{internal/service-base → service-base}/ServiceBase.d.ts +2 -2
  95. package/dist/services/{internal/service-base → service-base}/ServiceBase.js +2 -2
  96. package/dist/services/{internal/service-base → service-base}/constants.d.ts +0 -12
  97. package/dist/services/{internal/service-base → service-base}/constants.js +0 -12
  98. package/dist/services/{internal/service-base → service-base}/typedef.d.ts +1 -1
  99. package/dist/services/{internal/service-base → service-base}/typedef.js +1 -1
  100. package/dist/services/{internal/service-manager → service-manager}/ServiceManager.d.ts +2 -2
  101. package/dist/services/{internal/service-manager → service-manager}/ServiceManager.js +2 -2
  102. package/dist/typedef/index.d.ts +0 -1
  103. package/dist/typedef/index.js +1 -1
  104. package/dist/{components → ui/components}/button-group/ButtonGroup.svelte +1 -1
  105. package/dist/{components → ui/components}/game-box/GameBox.svelte +1 -1
  106. package/dist/ui/components/hk-app-layout/HkAppLayout.state.svelte.d.ts +6 -0
  107. package/dist/{components → ui/components}/hk-app-layout/HkAppLayout.state.svelte.js +1 -1
  108. package/dist/{components → ui/components}/hk-app-layout/HkAppLayout.svelte +1 -1
  109. package/dist/{components → ui/components}/image-box/ImageBox.svelte +14 -14
  110. package/dist/{components → ui/components}/image-box/ImageBox.svelte.d.ts +6 -6
  111. package/dist/{components → ui/components}/image-box/index.js +1 -1
  112. package/dist/{components → ui/components}/presenter/ImageSlide.svelte +2 -2
  113. package/dist/{components → ui/components}/presenter/ImageSlide.svelte.d.ts +2 -2
  114. package/dist/{components → ui/components}/presenter/Presenter.state.svelte.d.ts +1 -1
  115. package/dist/{components → ui/components}/presenter/Presenter.state.svelte.js +2 -2
  116. package/dist/{components → ui/components}/presenter/util.js +2 -2
  117. package/dist/{components → ui/components}/virtual-viewport/VirtualViewport.svelte +1 -1
  118. package/dist/{primitives → ui/primitives}/buttons/button/Button.svelte +1 -1
  119. package/dist/{primitives → ui/primitives}/buttons/button/Button.svelte.d.ts +1 -1
  120. package/dist/{primitives → ui/primitives}/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte +2 -2
  121. package/dist/{primitives → ui/primitives}/drag-drop/DragDropContext.svelte +1 -1
  122. package/dist/{primitives → ui/primitives}/drag-drop/DragDropContext.svelte.d.ts +1 -1
  123. package/dist/{primitives → ui/primitives}/drag-drop/Draggable.svelte +4 -4
  124. package/dist/{primitives → ui/primitives}/drag-drop/Draggable.svelte.d.ts +1 -1
  125. package/dist/{primitives → ui/primitives}/drag-drop/DropZone.svelte +6 -6
  126. package/dist/{primitives → ui/primitives}/drag-drop/DropZone.svelte.d.ts +3 -3
  127. package/dist/{primitives → ui/primitives}/drag-drop/DropZoneArea.svelte +3 -3
  128. package/dist/{primitives → ui/primitives}/drag-drop/DropZoneArea.svelte.d.ts +3 -3
  129. package/dist/{primitives → ui/primitives}/drag-drop/DropZoneList.svelte +3 -3
  130. package/dist/{primitives → ui/primitives}/drag-drop/DropZoneList.svelte.d.ts +3 -3
  131. package/dist/{primitives → ui/primitives}/drag-drop/drag-state.svelte.d.ts +11 -11
  132. package/dist/{primitives → ui/primitives}/drag-drop/drag-state.svelte.js +5 -5
  133. package/dist/{primitives → ui/primitives}/inputs/text-input/TextInput.svelte +1 -1
  134. package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.state.svelte.d.ts +3 -3
  135. package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.state.svelte.js +2 -2
  136. package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.state.svelte.d.ts +3 -3
  137. package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.state.svelte.js +2 -2
  138. package/dist/util/exceptions/index.d.ts +4 -3
  139. package/dist/util/exceptions/index.js +9 -6
  140. package/dist/util/expect/url.d.ts +6 -6
  141. package/dist/util/expect/url.js +17 -17
  142. package/dist/util/iterate/index.d.ts +4 -4
  143. package/dist/util/iterate/index.js +2 -2
  144. package/dist/valibot/README.md +61 -0
  145. package/dist/valibot/index.d.ts +4 -4
  146. package/dist/valibot/index.js +4 -5
  147. package/dist/valibot/parsers/email.d.ts +12 -0
  148. package/dist/valibot/parsers/email.js +34 -0
  149. package/dist/valibot/{url.d.ts → parsers/url.d.ts} +13 -5
  150. package/dist/valibot/{url.js → parsers/url.js} +22 -6
  151. package/dist/valibot/{user.js → parsers/user.js} +2 -2
  152. package/dist/valibot/parsers.d.ts +2 -0
  153. package/dist/valibot/parsers.js +4 -0
  154. package/package.json +3 -5
  155. package/dist/components/hk-app-layout/HkAppLayout.state.svelte.d.ts +0 -6
  156. package/dist/constants/regexp/web.d.ts +0 -1
  157. package/dist/constants/regexp/web.js +0 -3
  158. package/dist/logging/internal/unified-logger/index.d.ts +0 -3
  159. package/dist/logging/internal/unified-logger/index.js +0 -6
  160. package/dist/schemas/index.d.ts +0 -1
  161. package/dist/schemas/index.js +0 -1
  162. package/dist/schemas/validate-url.d.ts +0 -30
  163. package/dist/schemas/validate-url.js +0 -180
  164. package/dist/services/internal/index.d.ts +0 -6
  165. package/dist/services/internal/index.js +0 -8
  166. package/dist/themes/index.d.ts +0 -1
  167. package/dist/themes/index.js +0 -1
  168. package/dist/util/design-system/index.d.ts +0 -5
  169. package/dist/util/design-system/index.js +0 -5
  170. package/dist/zod/all.d.ts +0 -6
  171. package/dist/zod/all.js +0 -33
  172. package/dist/zod/generic.d.ts +0 -6
  173. package/dist/zod/generic.js +0 -11
  174. package/dist/zod/javascript.d.ts +0 -8
  175. package/dist/zod/javascript.js +0 -32
  176. package/dist/zod/user.d.ts +0 -9
  177. package/dist/zod/user.js +0 -16
  178. package/dist/zod/web.d.ts +0 -21
  179. package/dist/zod/web.js +0 -52
  180. /package/dist/config/{imagetools-config.d.ts → generators/imagetools.d.ts} +0 -0
  181. /package/dist/config/{imagetools-config.js → generators/imagetools.js} +0 -0
  182. /package/dist/design/{design-config.d.ts → config/design-config.d.ts} +0 -0
  183. /package/dist/design/{design-config.js → config/design-config.js} +0 -0
  184. /package/dist/{util/design-system/tailwind.d.ts → design/generators/index.d.ts} +0 -0
  185. /package/dist/{util/design-system/tailwind.js → design/generators/index.js} +0 -0
  186. /package/dist/{util/design-system → design/plugins}/skeleton.d.ts +0 -0
  187. /package/dist/{util/design-system → design/plugins}/skeleton.js +0 -0
  188. /package/dist/{themes → design/themes}/hkdev/components/blocks/text-block.css +0 -0
  189. /package/dist/{themes → design/themes}/hkdev/components/boxes/game-box.css +0 -0
  190. /package/dist/{themes → design/themes}/hkdev/components/buttons/button-icon-steeze.css +0 -0
  191. /package/dist/{themes → design/themes}/hkdev/components/buttons/button-text.css +0 -0
  192. /package/dist/{themes → design/themes}/hkdev/components/buttons/button.css +0 -0
  193. /package/dist/{themes → design/themes}/hkdev/components/buttons/skip-button.css +0 -0
  194. /package/dist/{themes → design/themes}/hkdev/components/drag-drop/draggable.css +0 -0
  195. /package/dist/{themes → design/themes}/hkdev/components/drag-drop/drop-zone.css +0 -0
  196. /package/dist/{themes → design/themes}/hkdev/components/icons/icon-steeze.css +0 -0
  197. /package/dist/{themes → design/themes}/hkdev/components/inputs/text-input.css +0 -0
  198. /package/dist/{themes → design/themes}/hkdev/components/panels/panel.css +0 -0
  199. /package/dist/{themes → design/themes}/hkdev/components/rows/panel-grid-row.css +0 -0
  200. /package/dist/{themes → design/themes}/hkdev/components/rows/panel-row-2.css +0 -0
  201. /package/dist/{themes → design/themes}/hkdev/components.css +0 -0
  202. /package/dist/{themes → design/themes}/hkdev/debug.css +0 -0
  203. /package/dist/{themes → design/themes}/hkdev/global/layout.css +0 -0
  204. /package/dist/{themes → design/themes}/hkdev/global/on-colors.css +0 -0
  205. /package/dist/{themes → design/themes}/hkdev/globals.css +0 -0
  206. /package/dist/{themes → design/themes}/hkdev/responsive.css +0 -0
  207. /package/dist/{themes → design/themes}/hkdev/theme-ext.d.ts +0 -0
  208. /package/dist/{themes → design/themes}/hkdev/theme.css +0 -0
  209. /package/dist/{util/design-system/css → design/utils}/clamp.d.ts +0 -0
  210. /package/dist/{util/design-system/layout → design/utils}/scaling.d.ts +0 -0
  211. /package/dist/{util/design-system/components → design/utils}/states.d.ts +0 -0
  212. /package/dist/{util/design-system/components → design/utils}/states.js +0 -0
  213. /package/dist/logging/internal/{unified-logger/constants.d.ts → constants.d.ts} +0 -0
  214. /package/dist/logging/internal/{unified-logger/constants.js → constants.js} +0 -0
  215. /package/dist/{classes → network}/cache/IndexedDbCache.d.ts +0 -0
  216. /package/dist/{classes → network}/cache/IndexedDbCache.js +0 -0
  217. /package/dist/{classes → network}/cache/MemoryResponseCache.d.ts +0 -0
  218. /package/dist/{classes → network}/cache/MemoryResponseCache.js +0 -0
  219. /package/dist/{classes → network}/cache/index.d.ts +0 -0
  220. /package/dist/{classes → network}/cache/index.js +0 -0
  221. /package/dist/{classes → network}/cache/typedef.d.ts +0 -0
  222. /package/dist/{classes → network}/cache/typedef.js +0 -0
  223. /package/dist/{util → network}/http/caching.d.ts +0 -0
  224. /package/dist/{util → network}/http/errors.d.ts +0 -0
  225. /package/dist/{util → network}/http/headers.d.ts +0 -0
  226. /package/dist/{util → network}/http/http-request.d.ts +0 -0
  227. /package/dist/{util → network}/http/index.d.ts +0 -0
  228. /package/dist/{util → network}/http/index.js +0 -0
  229. /package/dist/{util → network}/http/json-request.d.ts +0 -0
  230. /package/dist/{util → network}/http/mocks.d.ts +0 -0
  231. /package/dist/{util → network}/http/mocks.js +0 -0
  232. /package/dist/{util → network}/http/response.d.ts +0 -0
  233. /package/dist/{util → network}/http/test-data__/content-length-test-hkdigital-small.V4HfZyBQ.avif +0 -0
  234. /package/dist/{util → network}/http/typedef.d.ts +0 -0
  235. /package/dist/{util → network}/http/typedef.js +0 -0
  236. /package/dist/{util → network}/http/url.d.ts +0 -0
  237. /package/dist/{util → network}/http/url.js +0 -0
  238. /package/dist/{classes/svelte → network/loaders}/audio/AudioScene.svelte.d.ts +0 -0
  239. /package/dist/{classes/svelte → network/loaders}/audio/mocks.d.ts +0 -0
  240. /package/dist/{classes/svelte → network/loaders}/audio/mocks.js +0 -0
  241. /package/dist/{classes/svelte → network/loaders}/image/index.d.ts +0 -0
  242. /package/dist/{classes/svelte → network/loaders}/image/index.js +0 -0
  243. /package/dist/{classes/svelte → network/loaders}/image/mocks.d.ts +0 -0
  244. /package/dist/{classes/svelte → network/loaders}/image/mocks.js +0 -0
  245. /package/dist/{classes/svelte → network/loaders}/image/typedef.d.ts +0 -0
  246. /package/dist/{classes/svelte → network/loaders}/image/typedef.js +0 -0
  247. /package/dist/{typedef/image.d.ts → network/loaders/typedef.d.ts} +0 -0
  248. /package/dist/{typedef/image.js → network/loaders/typedef.js} +0 -0
  249. /package/dist/{classes/svelte/network-loader → network/states}/constants.d.ts +0 -0
  250. /package/dist/{classes/svelte/network-loader → network/states}/constants.js +0 -0
  251. /package/dist/{classes/svelte/network-loader → network/states}/index.d.ts +0 -0
  252. /package/dist/{classes/svelte/network-loader → network/states}/index.js +0 -0
  253. /package/dist/{classes/svelte/network-loader → network/states}/mocks.d.ts +0 -0
  254. /package/dist/{classes/svelte/network-loader → network/states}/typedef.d.ts +0 -0
  255. /package/dist/{classes/svelte/network-loader → network/states}/typedef.js +0 -0
  256. /package/dist/services/{internal/service-base → service-base}/index.d.ts +0 -0
  257. /package/dist/services/{internal/service-base → service-base}/index.js +0 -0
  258. /package/dist/services/{internal/service-manager → service-manager}/constants.d.ts +0 -0
  259. /package/dist/services/{internal/service-manager → service-manager}/constants.js +0 -0
  260. /package/dist/services/{internal/service-manager → service-manager}/typedef.d.ts +0 -0
  261. /package/dist/services/{internal/service-manager → service-manager}/typedef.js +0 -0
  262. /package/dist/{components → ui/components}/button-group/ButtonGroup.svelte.d.ts +0 -0
  263. /package/dist/{components → ui/components}/button-group/typedef.d.ts +0 -0
  264. /package/dist/{components → ui/components}/button-group/typedef.js +0 -0
  265. /package/dist/{components → ui/components}/compare-left-right/CompareLeftRight.svelte +0 -0
  266. /package/dist/{components → ui/components}/compare-left-right/CompareLeftRight.svelte.d.ts +0 -0
  267. /package/dist/{components → ui/components}/compare-left-right/index.d.ts +0 -0
  268. /package/dist/{components → ui/components}/compare-left-right/index.js +0 -0
  269. /package/dist/{components → ui/components}/game-box/GameBox.svelte.d.ts +0 -0
  270. /package/dist/{components → ui/components}/game-box/gamebox.util.d.ts +0 -0
  271. /package/dist/{components → ui/components}/game-box/gamebox.util.js +0 -0
  272. /package/dist/{components → ui/components}/hk-app-layout/HkAppLayout.svelte.d.ts +0 -0
  273. /package/dist/{components → ui/components}/image-box/index.d.ts +0 -0
  274. /package/dist/{components → ui/components}/image-box/typedef.d.ts +0 -0
  275. /package/dist/{components → ui/components}/image-box/typedef.js +0 -0
  276. /package/dist/{components → ui/components}/index.d.ts +0 -0
  277. /package/dist/{components → ui/components}/index.js +0 -0
  278. /package/dist/{components → ui/components}/presenter/Presenter.svelte +0 -0
  279. /package/dist/{components → ui/components}/presenter/Presenter.svelte.d.ts +0 -0
  280. /package/dist/{components → ui/components}/presenter/constants.d.ts +0 -0
  281. /package/dist/{components → ui/components}/presenter/constants.js +0 -0
  282. /package/dist/{components → ui/components}/presenter/index.d.ts +0 -0
  283. /package/dist/{components → ui/components}/presenter/index.js +0 -0
  284. /package/dist/{components → ui/components}/presenter/typedef.d.ts +0 -0
  285. /package/dist/{components → ui/components}/presenter/typedef.js +0 -0
  286. /package/dist/{components → ui/components}/presenter/util.d.ts +0 -0
  287. /package/dist/{components → ui/components}/virtual-viewport/VirtualViewport.svelte.d.ts +0 -0
  288. /package/dist/{primitives → ui/primitives}/area/HkArea.svelte +0 -0
  289. /package/dist/{primitives → ui/primitives}/area/HkArea.svelte.d.ts +0 -0
  290. /package/dist/{primitives → ui/primitives}/area/HkGridArea.svelte +0 -0
  291. /package/dist/{primitives → ui/primitives}/area/HkGridArea.svelte.d.ts +0 -0
  292. /package/dist/{primitives → ui/primitives}/area/index.d.ts +0 -0
  293. /package/dist/{primitives → ui/primitives}/area/index.js +0 -0
  294. /package/dist/{primitives → ui/primitives}/buttons/button-icon-steeze/SteezeIconButton.svelte +0 -0
  295. /package/dist/{primitives → ui/primitives}/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts +0 -0
  296. /package/dist/{primitives → ui/primitives}/buttons/button-text/TextButton.svelte +0 -0
  297. /package/dist/{primitives → ui/primitives}/buttons/button-text/TextButton.svelte.d.ts +0 -0
  298. /package/dist/{primitives → ui/primitives}/buttons/index.d.ts +0 -0
  299. /package/dist/{primitives → ui/primitives}/buttons/index.js +0 -0
  300. /package/dist/{primitives → ui/primitives}/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte.d.ts +0 -0
  301. /package/dist/{primitives → ui/primitives}/debug/index.d.ts +0 -0
  302. /package/dist/{primitives → ui/primitives}/debug/index.js +0 -0
  303. /package/dist/{primitives → ui/primitives}/drag-drop/DragController.d.ts +0 -0
  304. /package/dist/{primitives → ui/primitives}/drag-drop/DragController.js +0 -0
  305. /package/dist/{primitives → ui/primitives}/drag-drop/actions.d.ts +0 -0
  306. /package/dist/{primitives → ui/primitives}/drag-drop/actions.js +0 -0
  307. /package/dist/{primitives → ui/primitives}/drag-drop/index.d.ts +0 -0
  308. /package/dist/{primitives → ui/primitives}/drag-drop/index.js +0 -0
  309. /package/dist/{primitives → ui/primitives}/drag-drop/util.d.ts +0 -0
  310. /package/dist/{primitives → ui/primitives}/drag-drop/util.js +0 -0
  311. /package/dist/{primitives → ui/primitives}/hkdev/blocks/TextBlock.svelte +0 -0
  312. /package/dist/{primitives → ui/primitives}/hkdev/blocks/TextBlock.svelte.d.ts +0 -0
  313. /package/dist/{primitives → ui/primitives}/hkdev/buttons/CheckButton.svelte +0 -0
  314. /package/dist/{primitives → ui/primitives}/hkdev/buttons/CheckButton.svelte.d.ts +0 -0
  315. /package/dist/{primitives → ui/primitives}/icons/HkIcon.svelte +0 -0
  316. /package/dist/{primitives → ui/primitives}/icons/HkIcon.svelte.d.ts +0 -0
  317. /package/dist/{primitives → ui/primitives}/icons/HkTabIcon.svelte +0 -0
  318. /package/dist/{primitives → ui/primitives}/icons/HkTabIcon.svelte.d.ts +0 -0
  319. /package/dist/{primitives → ui/primitives}/icons/SteezeIcon.svelte +0 -0
  320. /package/dist/{primitives → ui/primitives}/icons/SteezeIcon.svelte.d.ts +0 -0
  321. /package/dist/{primitives → ui/primitives}/icons/index.d.ts +0 -0
  322. /package/dist/{primitives → ui/primitives}/icons/index.js +0 -0
  323. /package/dist/{primitives → ui/primitives}/icons/typedef.d.ts +0 -0
  324. /package/dist/{primitives → ui/primitives}/icons/typedef.js +0 -0
  325. /package/dist/{primitives → ui/primitives}/index.d.ts +0 -0
  326. /package/dist/{primitives → ui/primitives}/index.js +0 -0
  327. /package/dist/{primitives → ui/primitives}/inputs/index.d.ts +0 -0
  328. /package/dist/{primitives → ui/primitives}/inputs/index.js +0 -0
  329. /package/dist/{primitives → ui/primitives}/inputs/text-input/TestTextInput.svelte__ +0 -0
  330. /package/dist/{primitives → ui/primitives}/inputs/text-input/TextInput.svelte.d.ts +0 -0
  331. /package/dist/{primitives → ui/primitives}/inputs/text-input/TextInput.svelte___ +0 -0
  332. /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconInvalid.svelte +0 -0
  333. /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconInvalid.svelte.d.ts +0 -0
  334. /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconValid.svelte +0 -0
  335. /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconValid.svelte.d.ts +0 -0
  336. /package/dist/{primitives → ui/primitives}/layout/grid-layers/GridLayers.svelte +0 -0
  337. /package/dist/{primitives → ui/primitives}/layout/grid-layers/GridLayers.svelte.d.ts +0 -0
  338. /package/dist/{primitives → ui/primitives}/layout/grid-layers/GridLayers.svelte__heightFrom__ +0 -0
  339. /package/dist/{primitives → ui/primitives}/layout/grid-layers/util.d.ts +0 -0
  340. /package/dist/{primitives → ui/primitives}/layout/grid-layers/util.js +0 -0
  341. /package/dist/{primitives → ui/primitives}/layout/index.d.ts +0 -0
  342. /package/dist/{primitives → ui/primitives}/layout/index.js +0 -0
  343. /package/dist/{primitives → ui/primitives}/panels/index.d.ts +0 -0
  344. /package/dist/{primitives → ui/primitives}/panels/index.js +0 -0
  345. /package/dist/{primitives → ui/primitives}/panels/panel/Panel.svelte +0 -0
  346. /package/dist/{primitives → ui/primitives}/panels/panel/Panel.svelte.d.ts +0 -0
  347. /package/dist/{primitives → ui/primitives}/rows/index.d.ts +0 -0
  348. /package/dist/{primitives → ui/primitives}/rows/index.js +0 -0
  349. /package/dist/{primitives → ui/primitives}/rows/panel-grid-row/PanelGridRow.svelte +0 -0
  350. /package/dist/{primitives → ui/primitives}/rows/panel-grid-row/PanelGridRow.svelte.d.ts +0 -0
  351. /package/dist/{primitives → ui/primitives}/rows/panel-row-2/PanelRow2.svelte +0 -0
  352. /package/dist/{primitives → ui/primitives}/rows/panel-row-2/PanelRow2.svelte.d.ts +0 -0
  353. /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.svelte +0 -0
  354. /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.svelte.d.ts +0 -0
  355. /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.svelte +0 -0
  356. /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.svelte.d.ts +0 -0
  357. /package/dist/{primitives → ui/primitives}/tab-bar/index.d.ts +0 -0
  358. /package/dist/{primitives → ui/primitives}/tab-bar/index.js +0 -0
  359. /package/dist/{primitives → ui/primitives}/tab-bar/typedef.d.ts +0 -0
  360. /package/dist/{primitives → ui/primitives}/tab-bar/typedef.js +0 -0
  361. /package/dist/valibot/{date.js__ → parsers/date.js__} +0 -0
  362. /package/dist/valibot/{user.d.ts → parsers/user.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { toStateClasses } from '../../../util/design-system/index.js';
2
+ import { toStateClasses } from '../../../../design/index.js';
3
3
 
4
4
  /**
5
5
  * @type {{
@@ -41,4 +41,4 @@ declare const Button: import("svelte").Component<{
41
41
  snippetLoading?: import("svelte").Snippet;
42
42
  snippetError?: import("svelte").Snippet;
43
43
  children: import("svelte").Snippet;
44
- }, {}, "error" | "loading" | "selected" | "disabled" | "active">;
44
+ }, {}, "error" | "loading" | "disabled" | "selected" | "active">;
@@ -1,10 +1,10 @@
1
1
  <script>
2
2
  import { onMount } from 'svelte';
3
- import { DESIGN, CLAMPING } from '../../../design/design-config.js';
3
+ import { DESIGN, CLAMPING } from '../../../../design/config/design-config.js';
4
4
  import {
5
5
  enableScalingUI,
6
6
  getAllRootScalingVars
7
- } from '../../../util/design-system/index.js';
7
+ } from '../../../../design/index.js';
8
8
 
9
9
  /**
10
10
  * Holds the current scaling values for the debug panel
@@ -5,7 +5,7 @@
5
5
 
6
6
  /**
7
7
  * @type {{
8
- * contextKey?: import('../../typedef').ContextKey,
8
+ * contextKey?: import('../../../typedef').ContextKey,
9
9
  * base?: string,
10
10
  * classes?: string,
11
11
  * children: import('svelte').Snippet,
@@ -11,7 +11,7 @@ type DragDropContext = {
11
11
  };
12
12
  declare const DragDropContext: import("svelte").Component<{
13
13
  [key: string]: any;
14
- contextKey?: import("../../typedef").ContextKey;
14
+ contextKey?: import("../../../typedef").ContextKey;
15
15
  base?: string;
16
16
  classes?: string;
17
17
  children: import("svelte").Snippet;
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import { browser } from '$app/environment';
3
3
 
4
- import { toStateClasses } from '../../util/design-system/index.js';
4
+ import { toStateClasses } from '../../../design/index.js';
5
5
  import { createOrGetDragState } from './drag-state.svelte.js';
6
6
  import { DragController } from './DragController.js';
7
7
  import { onDestroy } from 'svelte';
@@ -10,9 +10,9 @@
10
10
  DRAGGING,
11
11
  DRAG_PREVIEW,
12
12
  DROPPING
13
- } from '../../constants/states/drag.js';
13
+ } from '../../../constants/states/drag.js';
14
14
 
15
- /** @typedef {import('../../typedef').SimulatedDragEvent} SimulatedDragEvent */
15
+ /** @typedef {import('../../../typedef').SimulatedDragEvent} SimulatedDragEvent */
16
16
 
17
17
  /**
18
18
  * @type {{
@@ -32,7 +32,7 @@
32
32
  * element: HTMLElement,
33
33
  * rect: DOMRect
34
34
  * }]>,
35
- * contextKey?: import('../../typedef').ContextKey,
35
+ * contextKey?: import('../../../typedef').ContextKey,
36
36
  * isDragging?: boolean,
37
37
  * isDropping?: boolean,
38
38
  * isDragPreview?: boolean,
@@ -65,7 +65,7 @@ declare const Draggable: import("svelte").Component<{
65
65
  element: HTMLElement;
66
66
  rect: DOMRect;
67
67
  }]>;
68
- contextKey?: import("../../typedef").ContextKey;
68
+ contextKey?: import("../../../typedef").ContextKey;
69
69
  isDragging?: boolean;
70
70
  isDropping?: boolean;
71
71
  isDragPreview?: boolean;
@@ -1,17 +1,17 @@
1
1
  <script>
2
- import { toStateClasses } from '../../util/design-system/index.js';
2
+ import { toStateClasses } from '../../../design/index.js';
3
3
  import { createOrGetDragState } from './drag-state.svelte.js';
4
4
  import { GridLayers } from '../layout';
5
- import { generateLocalId } from '../../util/unique';
5
+ import { generateLocalId } from '../../../util/unique';
6
6
  import {
7
7
  READY,
8
8
  DRAG_OVER,
9
9
  CAN_DROP,
10
10
  CANNOT_DROP
11
- } from '../../constants/states/drop.js';
11
+ } from '../../../constants/states/drop.js';
12
12
 
13
- /** @typedef {import('../../typedef').DragData} DragData */
14
- /** @typedef {import('../../typedef').DropData} DropData */
13
+ /** @typedef {import('../../../typedef').DragData} DragData */
14
+ /** @typedef {import('../../../typedef').DropData} DropData */
15
15
 
16
16
  /**
17
17
  * @type {{
@@ -25,7 +25,7 @@
25
25
  * maxHeight?: string,
26
26
  * heightMode?: 'fixed' | 'flexible' | 'fill',
27
27
  * children?: import('svelte').Snippet,
28
- * contextKey?: import('../../typedef').ContextKey,
28
+ * contextKey?: import('../../../typedef').ContextKey,
29
29
  * dropPreviewSnippet?: import('svelte').Snippet<[DragData]>,
30
30
  * isDragOver?: boolean,
31
31
  * canDrop?: boolean,
@@ -63,8 +63,8 @@ declare const DropZone: import("svelte").Component<{
63
63
  maxHeight?: string;
64
64
  heightMode?: "fixed" | "flexible" | "fill";
65
65
  children?: import("svelte").Snippet;
66
- contextKey?: import("../../typedef").ContextKey;
67
- dropPreviewSnippet?: import("svelte").Snippet<[import("../../typedef").DragData]>;
66
+ contextKey?: import("../../../typedef").ContextKey;
67
+ dropPreviewSnippet?: import("svelte").Snippet<[import("../../../typedef").DragData]>;
68
68
  isDragOver?: boolean;
69
69
  canDrop?: boolean;
70
70
  onDragEnter?: (detail: {
@@ -80,7 +80,7 @@ declare const DropZone: import("svelte").Component<{
80
80
  event: DragEvent;
81
81
  zone: string;
82
82
  }) => void;
83
- onDrop?: (detail: import("../../typedef").DropData) => any | Promise<any>;
83
+ onDrop?: (detail: import("../../../typedef").DropData) => any | Promise<any>;
84
84
  onDropStart?: (detail: {
85
85
  event: DragEvent;
86
86
  zone: string;
@@ -13,8 +13,8 @@
13
13
  * base?: string,
14
14
  * classes?: string,
15
15
  * children?: import('svelte').Snippet,
16
- * contextKey?: import('../../typedef').ContextKey,
17
- * dropPreviewSnippet?: import('svelte').Snippet<[import('../../typedef').DragData]>,
16
+ * contextKey?: import('../../../typedef').ContextKey,
17
+ * dropPreviewSnippet?: import('svelte').Snippet<[import('../../../typedef').DragData]>,
18
18
  * isDragOver?: boolean,
19
19
  * canDrop?: boolean,
20
20
  * onDragEnter?: (detail: {
@@ -30,7 +30,7 @@
30
30
  * event: DragEvent,
31
31
  * zone: string
32
32
  * }) => void,
33
- * onDrop?: (detail: import('../../typedef').DropData) => any | Promise<any>,
33
+ * onDrop?: (detail: import('../../../typedef').DropData) => any | Promise<any>,
34
34
  * onDropStart?: (detail: {
35
35
  * event: DragEvent,
36
36
  * zone: string,
@@ -57,8 +57,8 @@ declare const DropZoneArea: import("svelte").Component<{
57
57
  base?: string;
58
58
  classes?: string;
59
59
  children?: import("svelte").Snippet;
60
- contextKey?: import("../../typedef").ContextKey;
61
- dropPreviewSnippet?: import("svelte").Snippet<[import("../../typedef").DragData]>;
60
+ contextKey?: import("../../../typedef").ContextKey;
61
+ dropPreviewSnippet?: import("svelte").Snippet<[import("../../../typedef").DragData]>;
62
62
  isDragOver?: boolean;
63
63
  canDrop?: boolean;
64
64
  onDragEnter?: (detail: {
@@ -74,7 +74,7 @@ declare const DropZoneArea: import("svelte").Component<{
74
74
  event: DragEvent;
75
75
  zone: string;
76
76
  }) => void;
77
- onDrop?: (detail: import("../../typedef").DropData) => any | Promise<any>;
77
+ onDrop?: (detail: import("../../../typedef").DropData) => any | Promise<any>;
78
78
  onDropStart?: (detail: {
79
79
  event: DragEvent;
80
80
  zone: string;
@@ -14,8 +14,8 @@
14
14
  * base?: string,
15
15
  * classes?: string,
16
16
  * children?: import('svelte').Snippet,
17
- * contextKey?: import('../../typedef').ContextKey,
18
- * dropPreviewSnippet?: import('svelte').Snippet<[import('../../typedef').DragData]>,
17
+ * contextKey?: import('../../../typedef').ContextKey,
18
+ * dropPreviewSnippet?: import('svelte').Snippet<[import('../../../typedef').DragData]>,
19
19
  * isDragOver?: boolean,
20
20
  * canDrop?: boolean,
21
21
  * onDragEnter?: (detail: {
@@ -31,7 +31,7 @@
31
31
  * event: DragEvent,
32
32
  * zone: string
33
33
  * }) => void,
34
- * onDrop?: (detail: import('../../typedef').DropData) => any | Promise<any>,
34
+ * onDrop?: (detail: import('../../../typedef').DropData) => any | Promise<any>,
35
35
  * onDropStart?: (detail: {
36
36
  * event: DragEvent,
37
37
  * zone: string,
@@ -59,8 +59,8 @@ declare const DropZoneList: import("svelte").Component<{
59
59
  base?: string;
60
60
  classes?: string;
61
61
  children?: import("svelte").Snippet;
62
- contextKey?: import("../../typedef").ContextKey;
63
- dropPreviewSnippet?: import("svelte").Snippet<[import("../../typedef").DragData]>;
62
+ contextKey?: import("../../../typedef").ContextKey;
63
+ dropPreviewSnippet?: import("svelte").Snippet<[import("../../../typedef").DragData]>;
64
64
  isDragOver?: boolean;
65
65
  canDrop?: boolean;
66
66
  onDragEnter?: (detail: {
@@ -76,7 +76,7 @@ declare const DropZoneList: import("svelte").Component<{
76
76
  event: DragEvent;
77
77
  zone: string;
78
78
  }) => void;
79
- onDrop?: (detail: import("../../typedef").DropData) => any | Promise<any>;
79
+ onDrop?: (detail: import("../../../typedef").DropData) => any | Promise<any>;
80
80
  onDropStart?: (detail: {
81
81
  event: DragEvent;
82
82
  zone: string;
@@ -1,8 +1,8 @@
1
- export const createOrGetDragState: (contextKey?: import("../../typedef").ContextKey) => DragState;
2
- export const createDragState: (contextKey?: import("../../typedef").ContextKey) => DragState;
3
- export const getDragState: (contextKey?: import("../../typedef").ContextKey) => DragState;
4
- export type SimulatedDragEvent = import("../../typedef").SimulatedDragEvent;
5
- /** @typedef {import('../../typedef').SimulatedDragEvent} SimulatedDragEvent */
1
+ export const createOrGetDragState: (contextKey?: import("../../../typedef").ContextKey) => DragState;
2
+ export const createDragState: (contextKey?: import("../../../typedef").ContextKey) => DragState;
3
+ export const getDragState: (contextKey?: import("../../../typedef").ContextKey) => DragState;
4
+ export type SimulatedDragEvent = import("../../../typedef").SimulatedDragEvent;
5
+ /** @typedef {import('../../../typedef').SimulatedDragEvent} SimulatedDragEvent */
6
6
  declare class DragState {
7
7
  draggables: Map<any, any>;
8
8
  draggableIdCount: number;
@@ -61,9 +61,9 @@ declare class DragState {
61
61
  handleDropAtPoint(x: number, y: number, event: DragEvent | SimulatedDragEvent): void;
62
62
  /**
63
63
  * @param {string} draggableId
64
- * @param {import('../../typedef/drag.js').DragData} dragData
64
+ * @param {import('../../../typedef/drag.js').DragData} dragData
65
65
  */
66
- start(draggableId: string, dragData: import("../../typedef/drag.js").DragData): void;
66
+ start(draggableId: string, dragData: import("../../../typedef/drag.js").DragData): void;
67
67
  /**
68
68
  * @param {string} draggableId
69
69
  */
@@ -73,9 +73,9 @@ declare class DragState {
73
73
  * Get a drag data by draggable id
74
74
  *
75
75
  * @param {string} draggableId
76
- * @returns {import('../../typedef/drag.js').DragData|undefined}
76
+ * @returns {import('../../../typedef/drag.js').DragData|undefined}
77
77
  */
78
- getDraggableById(draggableId: string): import("../../typedef/drag.js").DragData | undefined;
78
+ getDraggableById(draggableId: string): import("../../../typedef/drag.js").DragData | undefined;
79
79
  /**
80
80
  * Get a drag data. Extracts draggable id from the supplied DragEvent
81
81
  *
@@ -86,9 +86,9 @@ declare class DragState {
86
86
  getDraggable(event: DragEvent | SimulatedDragEvent): any | null;
87
87
  /**
88
88
  * Get the most recently started drag operation (convenience method)
89
- * @returns {import('../../typedef/drag.js').DragData|undefined}
89
+ * @returns {import('../../../typedef/drag.js').DragData|undefined}
90
90
  */
91
- get current(): import("../../typedef/drag.js").DragData | undefined;
91
+ get current(): import("../../../typedef/drag.js").DragData | undefined;
92
92
  /**
93
93
  * @returns {boolean}
94
94
  */
@@ -1,7 +1,7 @@
1
1
  // drag-state.svelte.js
2
- import { defineStateContext } from '../../util/svelte/state-context/index.js';
2
+ import { defineStateContext } from '../../../util/svelte/state-context/index.js';
3
3
 
4
- /** @typedef {import('../../typedef').SimulatedDragEvent} SimulatedDragEvent */
4
+ /** @typedef {import('../../../typedef').SimulatedDragEvent} SimulatedDragEvent */
5
5
 
6
6
  class DragState {
7
7
  // Existing draggables map
@@ -216,7 +216,7 @@ class DragState {
216
216
 
217
217
  /**
218
218
  * @param {string} draggableId
219
- * @param {import('../../typedef/drag.js').DragData} dragData
219
+ * @param {import('../../../typedef/drag.js').DragData} dragData
220
220
  */
221
221
  start(draggableId, dragData) {
222
222
  // console.debug('DragState.start called:', draggableId, dragData);
@@ -257,7 +257,7 @@ class DragState {
257
257
  * Get a drag data by draggable id
258
258
  *
259
259
  * @param {string} draggableId
260
- * @returns {import('../../typedef/drag.js').DragData|undefined}
260
+ * @returns {import('../../../typedef/drag.js').DragData|undefined}
261
261
  */
262
262
  getDraggableById(draggableId) {
263
263
  return this.draggables.get(draggableId);
@@ -303,7 +303,7 @@ class DragState {
303
303
 
304
304
  /**
305
305
  * Get the most recently started drag operation (convenience method)
306
- * @returns {import('../../typedef/drag.js').DragData|undefined}
306
+ * @returns {import('../../../typedef/drag.js').DragData|undefined}
307
307
  */
308
308
  get current() {
309
309
  const entries = Array.from(this.draggables.entries());
@@ -15,7 +15,7 @@
15
15
  INVALID,
16
16
  REQUIRED,
17
17
  DISABLED
18
- } from '../../../constants/states/input.js';
18
+ } from '../../../../constants/states/input.js';
19
19
 
20
20
  /**
21
21
  * @type {{
@@ -48,7 +48,7 @@ export class HkTabBarState {
48
48
  */
49
49
  linkTab(index: number, tabElement: HTMLElement): void;
50
50
  }
51
- export const createOrGetState: (contextKey?: import("../../typedef/context.js").ContextKey) => HkTabBarState;
52
- export const createState: (contextKey?: import("../../typedef/context.js").ContextKey) => HkTabBarState;
53
- export const getState: (contextKey?: import("../../typedef/context.js").ContextKey) => HkTabBarState;
51
+ export const createOrGetState: (contextKey?: import("../../../typedef/context.js").ContextKey) => HkTabBarState;
52
+ export const createState: (contextKey?: import("../../../typedef/context.js").ContextKey) => HkTabBarState;
53
+ export const getState: (contextKey?: import("../../../typedef/context.js").ContextKey) => HkTabBarState;
54
54
  export type Tab = import("./typedef.js").Tab;
@@ -1,5 +1,5 @@
1
- import { defineStateContext } from '../../util/svelte/state-context/index.js';
2
- import { nav } from '../../states/navigation.svelte.js';
1
+ import { defineStateContext } from '../../../util/svelte/state-context/index.js';
2
+ import { nav } from '../../../states/navigation.svelte.js';
3
3
 
4
4
  import { goto } from '$app/navigation';
5
5
 
@@ -14,6 +14,6 @@ export class HkTabBarSelectorState {
14
14
  tabBarState: any;
15
15
  #private;
16
16
  }
17
- export const createOrGetState: (contextKey?: import("../../typedef/context.js").ContextKey) => HkTabBarSelectorState;
18
- export const createState: (contextKey?: import("../../typedef/context.js").ContextKey) => HkTabBarSelectorState;
19
- export const getState: (contextKey?: import("../../typedef/context.js").ContextKey) => HkTabBarSelectorState;
17
+ export const createOrGetState: (contextKey?: import("../../../typedef").ContextKey) => HkTabBarSelectorState;
18
+ export const createState: (contextKey?: import("../../../typedef").ContextKey) => HkTabBarSelectorState;
19
+ export const getState: (contextKey?: import("../../../typedef").ContextKey) => HkTabBarSelectorState;
@@ -1,6 +1,6 @@
1
- import { defineStateContext } from '../../util/svelte/state-context/index.js';
1
+ import { defineStateContext } from '../../../util/svelte/state-context/index.js';
2
2
 
3
- import { useResizeObserver } from '../../util/svelte/observe/index.js';
3
+ import { useResizeObserver } from '../../../util/svelte/observe/index.js';
4
4
 
5
5
  /* ------------------------------------------------------- Define state class */
6
6
 
@@ -3,13 +3,14 @@
3
3
  * to the originating Error
4
4
  * - The originating Error is set as `cause` property
5
5
  *
6
- * @param {string} message - Additional message to prepend
7
- * @param {Error|string} error - Original error
6
+ * @param {string} message - New error message
7
+ * @param {Error|string} originalError
8
8
  * @param {string|Object.<string, any>|null} [details]
9
+ * New error details (a DetailError will be thrown)
9
10
  *
10
11
  * @throws {DetailedError}
11
12
  * @returns {never} This function never returns
12
13
  */
13
- export function rethrow(message: string, error: Error | string, details?: string | {
14
+ export function rethrow(message: string, originalError: Error | string, details?: string | {
14
15
  [x: string]: any;
15
16
  } | null): never;
@@ -6,18 +6,21 @@ import { DetailedError } from "../../errors/generic.js";
6
6
  * to the originating Error
7
7
  * - The originating Error is set as `cause` property
8
8
  *
9
- * @param {string} message - Additional message to prepend
10
- * @param {Error|string} error - Original error
9
+ * @param {string} message - New error message
10
+ * @param {Error|string} originalError
11
11
  * @param {string|Object.<string, any>|null} [details]
12
+ * New error details (a DetailError will be thrown)
12
13
  *
13
14
  * @throws {DetailedError}
14
15
  * @returns {never} This function never returns
15
16
  */
16
- export function rethrow(message, error, details ) {
17
- if (!(error instanceof Error)) {
17
+ export function rethrow(message, originalError, details ) {
18
+ let error;
19
+
20
+ if (!(originalError instanceof Error)) {
18
21
  // Convert non-Error values to Error objects
19
- error = new Error(String(error));
22
+ error = new Error(String(originalError));
20
23
  }
21
24
 
22
- throw new DetailedError(message, details, error );
25
+ throw new DetailedError(message, details, error ?? originalError );
23
26
  }
@@ -1,31 +1,31 @@
1
1
  /**
2
- * Throws a validation error if value is not an url
2
+ * Throws a parse error if value is not a URL
3
3
  *
4
4
  * @param {any} value
5
5
  */
6
6
  export function url(value: any): void;
7
7
  /**
8
- * Throws a validation error if value is not an url or
8
+ * Throws a parse error if value is not a URL or
9
9
  * an empty string
10
10
  *
11
11
  * @param {any} value
12
12
  */
13
13
  export function urlOrEmptyString(value: any): void;
14
14
  /**
15
- * Throws a validation error if value is not a relative url
15
+ * Throws a parse error if value is not a URL path
16
16
  *
17
17
  * @param {any} value
18
18
  */
19
19
  export function urlPath(value: any): void;
20
20
  /**
21
- * Throws a validation error if value is not a relative url
21
+ * Throws a parse error if value is not a relative URL
22
22
  *
23
23
  * @param {any} value
24
24
  */
25
25
  export function relativeUrl(value: any): void;
26
26
  /**
27
- * Throws a validation error if value is not an absolute
28
- * or relative url
27
+ * Throws a parse error if value is not an absolute
28
+ * or relative URL
29
29
  *
30
30
  * @param {any} value
31
31
  */
@@ -3,58 +3,58 @@
3
3
  import * as v from 'valibot';
4
4
 
5
5
  import {
6
- ValidateUrl,
7
- ValidateUrlOrEmptyString,
8
- ValidateUrlPath,
9
- ValidateRelativeUrl,
10
- ValidateAbsOrRelUrl
11
- } from '../../schemas/validate-url.js';
6
+ HumanUrl,
7
+ UrlOrEmptyString,
8
+ UrlPath,
9
+ RelativeUrl,
10
+ AbsOrRelUrl
11
+ } from '../../valibot/parsers.js';
12
12
 
13
13
  // > Exports
14
14
 
15
15
  /**
16
- * Throws a validation error if value is not an url
16
+ * Throws a parse error if value is not a URL
17
17
  *
18
18
  * @param {any} value
19
19
  */
20
20
  export function url(value) {
21
- v.parse(ValidateUrl, value);
21
+ v.parse(HumanUrl, value);
22
22
  }
23
23
 
24
24
  /**
25
- * Throws a validation error if value is not an url or
25
+ * Throws a parse error if value is not a URL or
26
26
  * an empty string
27
27
  *
28
28
  * @param {any} value
29
29
  */
30
30
  export function urlOrEmptyString(value) {
31
- v.parse(ValidateUrlOrEmptyString, value);
31
+ v.parse(UrlOrEmptyString, value);
32
32
  }
33
33
 
34
34
  /**
35
- * Throws a validation error if value is not a relative url
35
+ * Throws a parse error if value is not a URL path
36
36
  *
37
37
  * @param {any} value
38
38
  */
39
39
  export function urlPath(value) {
40
- v.parse(ValidateUrlPath, value);
40
+ v.parse(UrlPath, value);
41
41
  }
42
42
 
43
43
  /**
44
- * Throws a validation error if value is not a relative url
44
+ * Throws a parse error if value is not a relative URL
45
45
  *
46
46
  * @param {any} value
47
47
  */
48
48
  export function relativeUrl(value) {
49
- v.parse(ValidateRelativeUrl, value);
49
+ v.parse(RelativeUrl, value);
50
50
  }
51
51
 
52
52
  /**
53
- * Throws a validation error if value is not an absolute
54
- * or relative url
53
+ * Throws a parse error if value is not an absolute
54
+ * or relative URL
55
55
  *
56
56
  * @param {any} value
57
57
  */
58
58
  export function absOrRelUrl(value) {
59
- v.parse(ValidateAbsOrRelUrl, value);
59
+ v.parse(AbsOrRelUrl, value);
60
60
  }
@@ -61,11 +61,11 @@ export function iterateObjectEntries(obj: object, options?: {
61
61
  * @param {object} obj - Object to iterate
62
62
  * @param {IterableTreeOptions & { depthFirst: boolean}} [options]
63
63
  *
64
- * @return {Iterator} iterator object
64
+ * @return {Iterable<string[]>} iterable object that yields path arrays
65
65
  */
66
66
  export function iterateObjectPaths(obj: object, options?: IterableTreeOptions & {
67
67
  depthFirst: boolean;
68
- }): Iterator<any, any, any>;
68
+ }): Iterable<string[]>;
69
69
  /**
70
70
  * Get an Iterator object that can be used to iterate over all values in
71
71
  * the object (at the leaves of the object tree)
@@ -73,9 +73,9 @@ export function iterateObjectPaths(obj: object, options?: IterableTreeOptions &
73
73
  * @param {object} obj - Object to iterate
74
74
  * @param {IterableTreeOptions} [options] - Iteration options
75
75
  *
76
- * @return {Iterator} iterator object
76
+ * @return {Iterable<any>} iterator object
77
77
  */
78
- export function iterateObjectValues(obj: object, options?: IterableTreeOptions): Iterator<any, any, any>;
78
+ export function iterateObjectValues(obj: object, options?: IterableTreeOptions): Iterable<any>;
79
79
  /**
80
80
  * Get a list of objects returned by an iterator in sorted order
81
81
  *
@@ -110,7 +110,7 @@ export function iterateObjectEntries(obj, options = {}) {
110
110
  * @param {object} obj - Object to iterate
111
111
  * @param {IterableTreeOptions & { depthFirst: boolean}} [options]
112
112
  *
113
- * @return {Iterator} iterator object
113
+ * @return {Iterable<string[]>} iterable object that yields path arrays
114
114
  */
115
115
  export function iterateObjectPaths(obj, options) {
116
116
  let objectIterator;
@@ -140,7 +140,7 @@ export function iterateObjectPaths(obj, options) {
140
140
  * @param {object} obj - Object to iterate
141
141
  * @param {IterableTreeOptions} [options] - Iteration options
142
142
  *
143
- * @return {Iterator} iterator object
143
+ * @return {Iterable<any>} iterator object
144
144
  */
145
145
  export function iterateObjectValues(obj, options) {
146
146
  const objectIterator = new IterableTree(obj, options);
@@ -0,0 +1,61 @@
1
+ # Valibot Parsers
2
+
3
+ Collection of Valibot validation parsers for common data types and formats.
4
+
5
+ ## Overview
6
+
7
+ This module provides pre-configured Valibot parsers for validating and transforming common data types like URLs, emails, and user information.
8
+
9
+ ## Parsers
10
+
11
+ ### URL Parsers
12
+
13
+ - `UrlOrEmptyString` - Validates URL or allows empty string
14
+ - `HumanUrl` - Validates URL with automatic `https://` prefix for protocol-less URLs
15
+ - `UrlPath` - Extracts and validates URL pathname
16
+ - `RelativeUrl` - Validates relative URLs with path, search, and hash
17
+ - `AbsOrRelUrl` - Validates absolute or relative URLs
18
+
19
+ ### Email Parsers
20
+
21
+ - `Email` - Validates email addresses with normalization (trim and lowercase)
22
+ - `LatinEmail` - Validates email addresses with Latin characters only (trim and lowercase)
23
+
24
+ ### User Parsers
25
+
26
+ - `Name` - Validates user names
27
+ - `Fullname` - Validates full names
28
+ - `Username` - Validates usernames
29
+ - `Surname` - Validates surnames
30
+ - `PhoneNumber` - Validates phone numbers
31
+
32
+ ## Usage
33
+
34
+ ```js
35
+ import { v, HumanUrl, Email, LatinEmail, Name } from '$lib/valibot/index.js';
36
+
37
+ // Validates and transforms URL (throws error if invalid)
38
+ const result = v.parse(HumanUrl, 'example.com'); // Returns 'https://example.com'
39
+
40
+ // Validates and normalizes email (throws error if invalid)
41
+ const emailResult = v.parse(Email, ' TEST@Example.COM '); // Returns 'test@example.com'
42
+
43
+ // Validates Latin-only email (throws error if invalid or contains non-Latin chars)
44
+ const latinEmailResult = v.parse(LatinEmail, 'User@Domain.ORG'); // Returns 'user@domain.org'
45
+
46
+ // Validates name (throws error if invalid)
47
+ const nameResult = v.parse(Name, 'John');
48
+
49
+ // Use safeParse to avoid exceptions
50
+ const safeResult = v.safeParse(HumanUrl, 'invalid-url');
51
+ if (safeResult.success) {
52
+ console.log(safeResult.output);
53
+ } else {
54
+ console.log(safeResult.issues); // Array of issue objects
55
+ }
56
+ ```
57
+
58
+ ## References
59
+
60
+ - [SafeParseResult API](https://valibot.dev/api/SafeParseResult/)
61
+ - [BaseIssue API](https://valibot.dev/api/BaseIssue/)