@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
@@ -0,0 +1,405 @@
1
+ # HKdigital Design System
2
+
3
+ A comprehensive, responsive design system built for SvelteKit applications. This system provides consistent scaling, typography, spacing, and theming across all screen sizes using CSS custom properties and Tailwind CSS.
4
+
5
+ ## Quick Start
6
+
7
+ ### Basic Usage
8
+
9
+ ```javascript
10
+ // tailwind.config.js
11
+ import {
12
+ spacing,
13
+ fontSize,
14
+ borderRadius,
15
+ customUtilitiesPlugin
16
+ } from '@hkdigital/lib-core/design/index.js';
17
+
18
+ export default {
19
+ theme: {
20
+ extend: {
21
+ spacing,
22
+ fontSize,
23
+ borderRadius
24
+ }
25
+ },
26
+ plugins: [
27
+ customUtilitiesPlugin
28
+ ]
29
+ };
30
+ ```
31
+
32
+ ```svelte
33
+ <!-- +layout.svelte -->
34
+ <script>
35
+ import { DESIGN, CLAMPING, rootDesignVarsHTML } from '@hkdigital/lib-core/design';
36
+ </script>
37
+
38
+ <svelte:head>
39
+ {@html rootDesignVarsHTML(DESIGN, CLAMPING)}
40
+ </svelte:head>
41
+
42
+ {@render children()}
43
+ ```
44
+
45
+ ## Core Concepts
46
+
47
+ ### Responsive Scaling System
48
+
49
+ The design system is built around a **1024×768 design reference** that automatically scales to any screen size with sensible minimum and maximum bounds.
50
+
51
+ #### CSS Variables Created:
52
+ - `--scale-ui`: Clamped UI scaling (0.3× to 2×)
53
+ - `--scale-text-base`: Base text scaling (0.75× to 1.5×)
54
+ - `--scale-text-heading`: Heading text scaling (0.75× to 2.25×)
55
+ - `--scale-text-ui`: UI text scaling (0.5× to 1.25×)
56
+
57
+ ## Spacing Classes
58
+
59
+ ### UI Points
60
+ **Primary method for UI element spacing:**
61
+
62
+ ```html
63
+ <div class="p-20up m-10up">
64
+ <!-- 20px padding, 10px margin at design size -->
65
+ <!-- Automatically scales with viewport -->
66
+ </div>
67
+ ```
68
+
69
+ Available: `1up`, `2up`, `4up`, `5up`, `6up`, `10up`, `20up`, `30up`, `40up`, `50up`, `60up`, `70up`, `80up`, `90up`, `100up`, `120up`, `140up`, `160up`, `180up`, `200up`
70
+
71
+ ### Text-Based Spacing
72
+ **For spacing relative to text size:**
73
+
74
+ ```html
75
+ <div class="mb-16bt"> <!-- Base text spacing -->
76
+ <div class="p-12ut"> <!-- UI text spacing -->
77
+ <div class="mt-24ht"> <!-- Heading text spacing -->
78
+ ```
79
+
80
+ Available for all text point sizes: `1ut/bt/ht`, `2ut/bt/ht`, `4ut/bt/ht`, `6ut/bt/ht`, `8ut/bt/ht`, `10ut/bt/ht`, `11ut/bt/ht`, `12ut/bt/ht`, `16ut/bt/ht`, `20ut/bt/ht`, `24ut/bt/ht`, `28ut/bt/ht`, `32ut/bt/ht`, `36ut/bt/ht`, `50ut/bt/ht`
81
+
82
+ ### Alternative Viewport Units
83
+ ```html
84
+ <div class="w-100wp h-50hp"> <!-- Width/height points -->
85
+ ```
86
+
87
+ ## Typography Classes
88
+
89
+ ### Complete Typography Styles
90
+ **Use `type-` classes for complete text styling:**
91
+
92
+ ```html
93
+ <h1 class="type-heading-h1">Main Title</h1>
94
+ <h2 class="type-heading-h2">Section Title</h2>
95
+ <h3 class="type-heading-h3">Subsection</h3>
96
+ <p class="type-base-md">Body paragraph text</p>
97
+ <span class="type-ui-sm">Interface text</span>
98
+
99
+ <!-- Dark mode variants -->
100
+ <h1 class="type-heading-h1-dark">Dark mode title</h1>
101
+ <p class="type-base-md-dark">Dark mode paragraph</p>
102
+ ```
103
+
104
+ **Available Typography Classes:**
105
+ - **Headings**: `type-heading-h1`, `type-heading-h2`, `type-heading-h3`, `type-heading-h4`, `type-heading-h5`
106
+ - **Body Text**: `type-base-sm`, `type-base-md`, `type-base-lg`
107
+ - **UI Text**: `type-ui-sm`, `type-ui-md`, `type-ui-lg`
108
+ - **Dark Variants**: Add `-dark` suffix to any class
109
+
110
+ ### Font Size Only
111
+ **Use `text-` classes for font size only:**
112
+
113
+ ```html
114
+ <p class="text-base-md">16px scaled base text</p>
115
+ <h2 class="text-heading-h2">28px scaled heading</h2>
116
+ ```
117
+
118
+ ## Border & Radius Classes
119
+
120
+ ### Border Radius
121
+ ```html
122
+ <div class="rounded-xs"> <!-- 5px scaled -->
123
+ <div class="rounded-sm"> <!-- 10px scaled -->
124
+ <div class="rounded-md"> <!-- 25px scaled -->
125
+ <div class="rounded-lg"> <!-- 35px scaled -->
126
+ <div class="rounded-none"> <!-- 0px -->
127
+ <div class="rounded-full"> <!-- 9999px -->
128
+ ```
129
+
130
+ ### Border & Stroke Width
131
+ ```html
132
+ <div class="border-width-thin"> <!-- 1px scaled -->
133
+ <div class="border-width-normal"> <!-- 2px scaled -->
134
+ <div class="border-width-thick"> <!-- 4px scaled -->
135
+
136
+ <svg class="stroke-normal"> <!-- 2px scaled stroke -->
137
+ <div class="outline-thick"> <!-- 4px scaled outline -->
138
+ ```
139
+
140
+ ## Colors (Theme hkdev)
141
+
142
+ ### Brand Colors
143
+ ```html
144
+ <div class="bg-primary-500 text-primary-contrast-500">
145
+ <div class="bg-secondary-600 text-secondary-contrast-600">
146
+ <div class="bg-tertiary-400 text-tertiary-contrast-400">
147
+ ```
148
+
149
+ ### Surface Colors (Neutrals)
150
+ ```html
151
+ <div class="bg-surface-50"> <!-- Lightest -->
152
+ <div class="bg-surface-500"> <!-- Medium -->
153
+ <div class="bg-surface-950"> <!-- Darkest -->
154
+ ```
155
+
156
+ ### Status Colors
157
+ ```html
158
+ <div class="bg-success-500 text-success-contrast-500">
159
+ <div class="bg-warning-500 text-warning-contrast-500">
160
+ <div class="bg-error-500 text-error-contrast-500">
161
+ ```
162
+
163
+ **Auto Contrast**: Each color includes automatic contrast colors for accessibility. Use `text-{color}-contrast-{shade}` for optimal readability.
164
+
165
+ ## Component Styling
166
+
167
+ Components use `data-` attributes with CSS custom properties:
168
+
169
+ ```html
170
+ <button data-component="button" data-role="primary">
171
+ Primary Button
172
+ </button>
173
+
174
+ <button data-component="button" data-role="secondary">
175
+ Secondary Button
176
+ </button>
177
+ ```
178
+
179
+ ## Utility Functions
180
+
181
+ ### CSS Variable Utilities
182
+
183
+ ```javascript
184
+ import {
185
+ getRootCssDesignWidth,
186
+ getRootCssDesignHeight,
187
+ getAllRootScalingVars
188
+ } from '@hkdigital/lib-core/design';
189
+
190
+ // Get current design dimensions
191
+ const designWidth = getRootCssDesignWidth(); // 1024
192
+ const designHeight = getRootCssDesignHeight(); // 768
193
+
194
+ // Get all current scaling factors
195
+ const scales = getAllRootScalingVars();
196
+ // Returns: { scaleW, scaleH, scaleViewport, scaleUI, scaleTextBase, scaleTextHeading, scaleTextUI }
197
+ ```
198
+
199
+ ### Clamp Utilities
200
+
201
+ ```javascript
202
+ import { clamp, getClampParams } from '@hkdigital/lib-core/design';
203
+
204
+ // Mathematical clamp function
205
+ const value = clamp(0.5, 0.3, 2.0); // Returns 0.5 (clamped between 0.5 and 2.0)
206
+
207
+ // Extract clamp parameters from CSS variables
208
+ const params = getClampParams('scale-ui');
209
+ // Returns: { min: 0.3, max: 2.0 }
210
+ ```
211
+
212
+ ### Component State Classes
213
+
214
+ ```javascript
215
+ import { toStateClasses } from '@hkdigital/lib-core/design';
216
+
217
+ // Generate state classes from object
218
+ const classes = toStateClasses({
219
+ selected: true,
220
+ loading: false,
221
+ error: true,
222
+ disabled: false
223
+ });
224
+ // Returns: "state-selected state-error"
225
+ ```
226
+
227
+ ```html
228
+ <!-- Usage in components -->
229
+ <button class={toStateClasses({ selected, disabled, loading })}>
230
+ Button Text
231
+ </button>
232
+ ```
233
+
234
+ ### Responsive Scaling
235
+
236
+ #### Viewport-Based Scaling
237
+
238
+ ```javascript
239
+ import { enableScalingUI } from '@hkdigital/lib-core/design';
240
+
241
+ // Enable automatic viewport scaling
242
+ const cleanup = enableScalingUI(DESIGN, CLAMPING);
243
+
244
+ // Call cleanup when component is destroyed
245
+ onDestroy(cleanup);
246
+ ```
247
+
248
+ #### Container-Based Scaling
249
+
250
+ ```javascript
251
+ import { enableContainerScaling } from '@hkdigital/lib-core/design';
252
+
253
+ let containerElement;
254
+
255
+ // Enable scaling for specific container
256
+ const cleanup = enableContainerScaling({
257
+ container: containerElement,
258
+ design: DESIGN,
259
+ clamping: CLAMPING,
260
+ useResizeObserver: true
261
+ });
262
+
263
+ // Optional custom dimension getter
264
+ const cleanupCustom = enableContainerScaling({
265
+ container: containerElement,
266
+ design: DESIGN,
267
+ clamping: CLAMPING,
268
+ getDimensions: () => ({ width: 800, height: 600 })
269
+ });
270
+ ```
271
+
272
+ ```svelte
273
+ <!-- Svelte component example -->
274
+ <script>
275
+ import { onMount, onDestroy } from 'svelte';
276
+ import { enableContainerScaling, DESIGN, CLAMPING } from '@hkdigital/lib-core/design';
277
+
278
+ let containerElement;
279
+ let cleanup;
280
+
281
+ onMount(() => {
282
+ cleanup = enableContainerScaling({
283
+ container: containerElement,
284
+ design: DESIGN,
285
+ clamping: CLAMPING
286
+ });
287
+ });
288
+
289
+ onDestroy(() => {
290
+ cleanup?.();
291
+ });
292
+ </script>
293
+
294
+ <div bind:this={containerElement} class="scaled-container">
295
+ <!-- Content that scales with container -->
296
+ <div class="p-20up text-base-md">Responsive content</div>
297
+ </div>
298
+ ```
299
+
300
+ ## Advanced Usage
301
+
302
+ ### Custom Design Configuration
303
+
304
+ ```javascript
305
+ // your-project/src/lib/design/design-config.js
306
+ import {
307
+ generateTextBasedSpacing,
308
+ generateTextStyles
309
+ } from '@hkdigital/lib-core/design';
310
+
311
+ // Custom design dimensions
312
+ export const CUSTOM_DESIGN = {
313
+ width: 1440,
314
+ height: 900
315
+ };
316
+
317
+ // Custom text sizes
318
+ export const CUSTOM_TEXT_SIZES = {
319
+ sm: { size: 12, lineHeight: 1.4 },
320
+ md: { size: 16, lineHeight: 1.4 },
321
+ lg: { size: 20, lineHeight: 1.4 }
322
+ };
323
+
324
+ // Generate custom extensions
325
+ export const customSpacing = generateTextBasedSpacing([8, 12, 16, 24, 32]);
326
+ export const customFontSize = generateTextStyles(CUSTOM_TEXT_SIZES, 'base');
327
+ ```
328
+
329
+ ### Available Generator Functions
330
+
331
+ ```javascript
332
+ import {
333
+ generateTextBasedSpacing, // ut/bt/ht spacing units
334
+ generateViewportBasedSpacing, // up/wp/hp spacing units
335
+ generateTextStyles, // Complete typography styles
336
+ generateBorderRadiusStyles, // Border radius with scaling
337
+ generateWidthStyles // Border/stroke width with scaling
338
+ } from '@hkdigital/lib-core/design';
339
+ ```
340
+
341
+ ### Configuration Objects
342
+
343
+ All configuration objects are exported for customization:
344
+
345
+ ```javascript
346
+ import {
347
+ DESIGN, // { width: 1024, height: 768 }
348
+ CLAMPING, // Min/max scale bounds
349
+ TEXT_POINT_SIZES, // [1, 2, 4, 6, 8, 10, ...]
350
+ VIEWPORT_POINT_SIZES, // [1, 2, 4, 5, 6, 10, ...]
351
+ TEXT_BASE_SIZES, // { sm: {...}, md: {...}, lg: {...} }
352
+ TEXT_HEADING_SIZES, // { h1: {...}, h2: {...}, ... }
353
+ TEXT_UI_SIZES, // { sm: {...}, md: {...}, lg: {...} }
354
+ RADIUS_SIZES, // Border radius configurations
355
+ BORDER_WIDTH_SIZES, // Border width configurations
356
+ STROKE_WIDTH_SIZES // Stroke width configurations
357
+ } from '@hkdigital/lib-core/design';
358
+ ```
359
+
360
+ ## Best practices
361
+
362
+ ### Do's ✅
363
+ - Use `up` units for UI spacing: `p-20up`, `m-10up`
364
+ - Use `type-` classes for complete typography: `type-base-md`
365
+ - Use `ut/bt/ht` for text-related spacing: `mb-16bt`
366
+ - Use contrast colors for accessibility: `text-primary-contrast-500`
367
+ - Test across multiple screen sizes
368
+
369
+ ### Don'ts ❌
370
+ - Don't use hardcoded pixel values: `p-4` → use `p-4up`
371
+ - Don't forget dark mode variants: add `-dark` classes
372
+ - Don't use `text-` classes when you need complete typography styling
373
+
374
+ ## Themes
375
+
376
+ The system includes the complete **theme hkdev** with:
377
+ - Color palette (primary, secondary, tertiary, status, surface)
378
+ - Component styles (buttons, panels, inputs, etc.)
379
+ - Typography settings (fonts, weights, spacing)
380
+ - Responsive behavior
381
+
382
+ Themes are public and can be extended or customized by other projects.
383
+
384
+ ## Browser Support
385
+
386
+ - Modern browsers with CSS custom properties support
387
+ - CSS `clamp()` function support
388
+ - Viewport units (`vw`, `vh`) support
389
+
390
+ ## Migration Guide
391
+
392
+ If migrating from the old structure:
393
+
394
+ ```javascript
395
+ // OLD
396
+ import { DESIGN } from '$lib/design/design-config.js';
397
+ import { customUtilitiesPlugin } from '$lib/design/skeleton.js';
398
+
399
+ // NEW
400
+ import { DESIGN, customUtilitiesPlugin } from '@hkdigital/lib-core/design';
401
+ ```
402
+
403
+ ---
404
+
405
+ For more examples and advanced usage, see the `/examples` routes in this library.
@@ -0,0 +1,8 @@
1
+ export { customUtilitiesPlugin } from "./plugins/skeleton.js";
2
+ export { toStateClasses } from "./utils/states.js";
3
+ export { DESIGN, CLAMPING, TEXT_POINT_SIZES, VIEWPORT_POINT_SIZES, TEXT_BASE_SIZES, TEXT_HEADING_SIZES, TEXT_UI_SIZES, RADIUS_SIZES, BORDER_WIDTH_SIZES, STROKE_WIDTH_SIZES } from "./config/design-config.js";
4
+ export { generateTextBasedSpacing, generateViewportBasedSpacing, generateTextStyles, generateBorderRadiusStyles, generateWidthStyles } from "./generators/index.js";
5
+ export { spacing, fontSize, borderRadius, borderWidth, strokeWidth, outlineWidth, outlineOffset } from "./tailwind-theme-extend.js";
6
+ export { rootDesignVarsHTML, getRootCssDesignWidth, getRootCssDesignHeight, getAllRootScalingVars } from "./utils/root-vars.js";
7
+ export { getClampParams, clamp } from "./utils/clamp.js";
8
+ export { enableContainerScaling, enableScalingUI } from "./utils/scaling.js";
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @fileoverview HKdigital Core Design System
3
+ *
4
+ * This module provides a comprehensive design system for building consistent,
5
+ * responsive interfaces. It includes configuration objects, generator functions,
6
+ * and ready-to-use Tailwind theme extensions.
7
+ *
8
+ * @example Basic usage in tailwind.config.js
9
+ * ```javascript
10
+ * import { spacing, fontSize, customUtilitiesPlugin } from '@hkdigital/lib-core/design';
11
+ *
12
+ * export default {
13
+ * theme: {
14
+ * extend: { spacing, fontSize }
15
+ * },
16
+ * plugins: [customUtilitiesPlugin]
17
+ * };
18
+ * ```
19
+ *
20
+ * @example Advanced customization
21
+ * ```javascript
22
+ * import {
23
+ * generateTextBasedSpacing,
24
+ * DESIGN,
25
+ * TEXT_POINT_SIZES
26
+ * } from '@hkdigital/lib-core/design';
27
+ *
28
+ * const customSpacing = generateTextBasedSpacing([8, 12, 16, 24]);
29
+ * ```
30
+ */
31
+
32
+ // === Configuration Objects ===
33
+ // Projects can import and customize these for their own design systems
34
+
35
+ export {
36
+ DESIGN,
37
+ CLAMPING,
38
+ TEXT_POINT_SIZES,
39
+ VIEWPORT_POINT_SIZES,
40
+ TEXT_BASE_SIZES,
41
+ TEXT_HEADING_SIZES,
42
+ TEXT_UI_SIZES,
43
+ RADIUS_SIZES,
44
+ BORDER_WIDTH_SIZES,
45
+ STROKE_WIDTH_SIZES
46
+ } from './config/design-config.js';
47
+
48
+ // === Generator Functions ===
49
+ // Essential tools for projects to build custom Tailwind extensions
50
+
51
+ export {
52
+ generateTextBasedSpacing,
53
+ generateViewportBasedSpacing,
54
+ generateTextStyles,
55
+ generateBorderRadiusStyles,
56
+ generateWidthStyles
57
+ } from './generators/index.js';
58
+
59
+ // === Ready-to-use Tailwind Extensions ===
60
+ // Built using default configuration - projects can use directly or as reference
61
+
62
+ export {
63
+ spacing,
64
+ fontSize,
65
+ borderRadius,
66
+ borderWidth,
67
+ strokeWidth,
68
+ outlineWidth,
69
+ outlineOffset
70
+ } from './tailwind-theme-extend.js';
71
+
72
+ // === Plugins & Utilities ===
73
+ // Framework integration tools
74
+
75
+ export { customUtilitiesPlugin } from './plugins/skeleton.js';
76
+
77
+ // === Utilities ===
78
+ // Essential utility functions for design system implementation
79
+
80
+ export {
81
+ rootDesignVarsHTML,
82
+ getRootCssDesignWidth,
83
+ getRootCssDesignHeight,
84
+ getAllRootScalingVars
85
+ } from './utils/root-vars.js';
86
+
87
+ export {
88
+ getClampParams,
89
+ clamp
90
+ } from './utils/clamp.js';
91
+
92
+ export { toStateClasses } from './utils/states.js';
93
+
94
+ export {
95
+ enableContainerScaling,
96
+ enableScalingUI
97
+ } from './utils/scaling.js';
@@ -16,10 +16,10 @@
16
16
  * let { children } = $props();
17
17
  *
18
18
  * import { DESIGN, CLAMPING }
19
- * from './design-config.js';
19
+ * from './config/design-config.js';
20
20
  *
21
21
  * import { rootDesignVarsHTML }
22
- * from '@hkdigital/lib-sveltekit/util/design-system/index.js';
22
+ * from '@hkdigital/lib-core/design/utils/root-vars.js';
23
23
  * </script>
24
24
  *
25
25
  * <svelte:head>
@@ -93,7 +93,7 @@ import {
93
93
  generateTextStyles,
94
94
  generateBorderRadiusStyles,
95
95
  generateWidthStyles
96
- } from '../util/design-system/tailwind.js';
96
+ } from './generators/index.js';
97
97
 
98
98
  import {
99
99
  TEXT_POINT_SIZES,
@@ -104,7 +104,7 @@ import {
104
104
  RADIUS_SIZES,
105
105
  BORDER_WIDTH_SIZES,
106
106
  STROKE_WIDTH_SIZES
107
- } from './design-config.js';
107
+ } from './config/design-config.js';
108
108
 
109
109
  /* == Internals */
110
110
 
@@ -0,0 +1,103 @@
1
+ # Themes
2
+
3
+ This folder contains theme configurations for the SvelteKit library, built on top of Skeleton.dev's theming system.
4
+
5
+ ## Current Themes
6
+
7
+ ### hkdev
8
+ The main theme for this project, containing:
9
+ - `theme.css` - Skeleton.dev generated theme file with CSS custom properties
10
+ - `globals.css` - Global styles and utilities
11
+ - `components.css` - Component-specific styles
12
+ - `responsive.css` - Responsive design adjustments
13
+ - `debug.css` - Debug styles for development (commented out by default)
14
+
15
+ ## How to Use Themes
16
+
17
+ Themes are imported and configured in `src/app.css`. The current setup imports the hkdev theme:
18
+
19
+ ```css
20
+ /* Import theme classes and styles */
21
+ @import './lib/themes/hkdev/theme.css' layer(theme);
22
+
23
+ /* Import additional theme files */
24
+ @import '$lib/design/themes/hkdev/globals.css';
25
+ @import '$lib/design/themes/hkdev/components.css' layer(components);
26
+ @import '$lib/design/themes/hkdev/responsive.css';
27
+ ```
28
+
29
+ ### Applying Themes
30
+
31
+ To activate a theme, set the `data-theme` attribute on your HTML element:
32
+
33
+ ```html
34
+ <html data-theme="hkdev">
35
+ ```
36
+
37
+ Or dynamically with JavaScript:
38
+ ```javascript
39
+ document.documentElement.setAttribute('data-theme', 'hkdev');
40
+ ```
41
+
42
+ ## Creating New Themes
43
+
44
+ ### Using Skeleton.dev Theme Generator
45
+
46
+ 1. **Visit the Theme Generator**: Go to [themes.skeleton.dev/themes/create](https://themes.skeleton.dev/themes/create)
47
+
48
+ 2. **Customize Your Theme**:
49
+ - Choose color palettes
50
+ - Set font styles for base text, headings, and anchors
51
+ - Configure background options
52
+ - Preview changes in real-time
53
+
54
+ 3. **Generate and Download**:
55
+ - The generator creates a CSS file with CSS custom properties
56
+ - Download the generated `theme.css` file
57
+
58
+ 4. **Integration Steps**:
59
+ - Create a new folder in `src/lib/design/themes/[your-theme-name]/`
60
+ - Place the downloaded `theme.css` file in the new folder
61
+ - Create additional files as needed:
62
+ - `globals.css` - Global styles
63
+ - `components.css` - Component styles
64
+ - `responsive.css` - Responsive adjustments
65
+ - Update `src/app.css` to import your new theme files
66
+
67
+ ### Theme Structure
68
+
69
+ Each theme folder should follow this structure:
70
+ ```
71
+ themes/
72
+ └── [theme-name]/
73
+ ├── theme.css # Skeleton.dev generated theme
74
+ ├── globals.css # Global styles and utilities
75
+ ├── components.css # Component-specific styles
76
+ ├── responsive.css # Responsive design rules
77
+ └── components/ # Individual component styles
78
+ ├── buttons/
79
+ ├── inputs/
80
+ ├── panels/
81
+ └── ...
82
+ ```
83
+
84
+ ## Theme System Features
85
+
86
+ - **CSS Custom Properties**: Themes use CSS variables for easy customization
87
+ - **Layer Support**: Organized with CSS layers (theme, base, components, utilities)
88
+ - **Light/Dark Mode**: Automatic support for light and dark variants
89
+ - **Component Isolation**: Individual component styles in separate files
90
+ - **Responsive Design**: Mobile-first responsive adjustments
91
+
92
+ ## Documentation
93
+
94
+ For more information about Skeleton.dev themes:
95
+ - [Skeleton.dev Theme Documentation](https://www.skeleton.dev/docs/design/themes)
96
+ - [Theme Generator](https://themes.skeleton.dev/themes/create)
97
+ - [Skeleton.dev GitHub](https://github.com/skeletonlabs/skeleton)
98
+
99
+ ## Notes
100
+
101
+ - The theme generator is not available for small screens - use a tablet or desktop
102
+ - Themes can be imported and modified for advanced customization
103
+ - All themes should be compatible with Skeleton.dev v3 components
@@ -1,4 +1,4 @@
1
- import { theme as themeStore } from '../../stores/index.js';
1
+ import { theme as themeStore } from '../../../stores/index.js';
2
2
 
3
3
  /**
4
4
  * Set meta them color for the current theme
@@ -1,4 +1,4 @@
1
- import { getRootCssVar } from '../../css/index.js';
1
+ import { getRootCssVar } from '../../util/css/index.js';
2
2
 
3
3
  /**
4
4
  * Cache to that ensures we parse CSS clamp parameters only once
@@ -24,9 +24,9 @@
24
24
  * @example
25
25
  * // +layout.svelte
26
26
  * <script>
27
- * import { DESIGN, CLAMPING } from '../../../tailwind/extend/clamping/config.js';
27
+ * import { DESIGN, CLAMPING } from '../config/design-config.js';
28
28
  *
29
- * import { rootDesignVarsHTML } from '../index.js';
29
+ * import { rootDesignVarsHTML } from './root-vars.js';
30
30
  * </script>
31
31
  *
32
32
  * <svelte:head>
@@ -1,4 +1,4 @@
1
- import { getRootCssVar } from '../../css/css-vars.js';
1
+ import { getRootCssVar } from '../../util/css/css-vars.js';
2
2
 
3
3
  /**
4
4
  * Generates a complete HTML style tag with CSS custom properties for
@@ -26,9 +26,9 @@ import { getRootCssVar } from '../../css/css-vars.js';
26
26
  * @example
27
27
  * // +layout.svelte
28
28
  * <script>
29
- * import { DESIGN, CLAMPING } from '../../../tailwind/extend/clamping/config.js';
29
+ * import { DESIGN, CLAMPING } from '../config/design-config.js';
30
30
  *
31
- * import { rootDesignVarsHTML } from '../index.js';
31
+ * import { rootDesignVarsHTML } from './root-vars.js';
32
32
  * </script>
33
33
  *
34
34
  * <svelte:head>
@@ -1,4 +1,4 @@
1
- import { clamp } from '../css/clamp.js';
1
+ import { clamp } from './clamp.js';
2
2
 
3
3
  /**
4
4
  * Manages responsive design scaling by calculating and applying scale factors