@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.
- package/README.md +36 -12
- package/dist/assets/autospuiten/car-paint-picker.d.ts +7 -7
- package/dist/classes/data/IterableTree.d.ts +13 -6
- package/dist/classes/data/IterableTree.js +18 -5
- package/dist/classes/promise/HkPromise.d.ts +18 -17
- package/dist/classes/promise/HkPromise.js +135 -128
- package/dist/classes/streams/ServerEventsStore.d.ts +2 -3
- package/dist/classes/streams/ServerEventsStore.js +5 -4
- package/dist/classes/svelte/index.d.ts +0 -8
- package/dist/classes/svelte/index.js +0 -13
- package/dist/config/README.md +197 -0
- package/dist/config/generators/vite.d.ts +47 -0
- package/dist/config/generators/vite.js +148 -0
- package/dist/config/imagetools.d.ts +2 -2
- package/dist/config/vite.d.ts +1 -0
- package/dist/config/vite.js +5 -0
- package/dist/constants/regexp/README.md +96 -0
- package/dist/constants/regexp/index.d.ts +1 -1
- package/dist/constants/regexp/index.js +2 -2
- package/dist/constants/regexp/text.d.ts +6 -6
- package/dist/constants/regexp/text.js +6 -6
- package/dist/constants/regexp/url.d.ts +1 -0
- package/dist/constants/regexp/url.js +3 -0
- package/dist/constants/regexp/user.d.ts +0 -1
- package/dist/constants/regexp/user.js +6 -10
- package/dist/design/README.md +405 -0
- package/dist/design/index.d.ts +8 -0
- package/dist/design/index.js +97 -0
- package/dist/design/tailwind-theme-extend.js +4 -4
- package/dist/design/themes/README.md +103 -0
- package/dist/{themes → design/themes}/hkdev/theme-ext.js +1 -1
- package/dist/{util/design-system/css → design/utils}/clamp.js +1 -1
- package/dist/{util/design-system/css/root-design-vars.d.ts → design/utils/root-vars.d.ts} +2 -2
- package/dist/{util/design-system/css/root-design-vars.js → design/utils/root-vars.js} +3 -3
- package/dist/{util/design-system/layout → design/utils}/scaling.js +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/errors/promise.d.ts +27 -0
- package/dist/errors/promise.js +26 -0
- package/dist/logging/README.md +158 -0
- package/dist/logging/index.d.ts +3 -1
- package/dist/logging/index.js +6 -2
- package/dist/logging/internal/adapters/console.js +1 -1
- package/dist/logging/internal/adapters/pino.js +29 -11
- package/dist/logging/internal/factories/client.d.ts +1 -1
- package/dist/logging/internal/factories/client.js +2 -2
- package/dist/logging/internal/factories/server.d.ts +1 -1
- package/dist/logging/internal/factories/server.js +2 -2
- package/dist/logging/internal/factories/universal.d.ts +2 -2
- package/dist/logging/internal/factories/universal.js +1 -1
- package/dist/logging/internal/{unified-logger → logger}/Logger.d.ts +2 -2
- package/dist/logging/internal/{unified-logger → logger}/Logger.js +3 -3
- package/dist/logging/internal/logger/index.d.ts +1 -0
- package/dist/logging/internal/logger/index.js +1 -0
- package/dist/logging/internal/{unified-logger/typedef.d.ts → typedef.d.ts} +2 -1
- package/dist/logging/internal/{unified-logger/typedef.js → typedef.js} +5 -1
- package/dist/network/README.md +173 -0
- package/dist/network/cache.d.ts +3 -0
- package/dist/network/cache.js +4 -0
- package/dist/{util → network}/http/caching.js +3 -5
- package/dist/{util → network}/http/errors.js +1 -1
- package/dist/{util → network}/http/headers.js +1 -1
- package/dist/{util → network}/http/http-request.js +2 -2
- package/dist/{util → network}/http/json-request.js +1 -1
- package/dist/{util → network}/http/response.js +1 -1
- package/dist/network/http.d.ts +6 -0
- package/dist/network/http.js +6 -0
- package/dist/network/loaders/README.md +255 -0
- package/dist/{classes/svelte → network/loaders}/audio/AudioLoader.svelte.d.ts +1 -1
- package/dist/{classes/svelte → network/loaders}/audio/AudioLoader.svelte.js +1 -1
- package/dist/{classes/svelte → network/loaders}/audio/AudioScene.svelte.js +1 -1
- package/dist/network/loaders/audio.d.ts +2 -0
- package/dist/network/loaders/audio.js +2 -0
- package/dist/{classes/svelte → network/loaders}/image/ImageLoader.svelte.d.ts +3 -6
- package/dist/{classes/svelte → network/loaders}/image/ImageLoader.svelte.js +5 -6
- package/dist/{classes/svelte → network/loaders}/image/ImageScene.svelte.d.ts +5 -7
- package/dist/{classes/svelte → network/loaders}/image/ImageScene.svelte.js +8 -9
- package/dist/{classes/svelte → network/loaders}/image/ImageVariantsLoader.svelte.d.ts +4 -4
- package/dist/{classes/svelte → network/loaders}/image/ImageVariantsLoader.svelte.js +3 -5
- package/dist/{util/image → network/loaders/image/utils}/index.d.ts +2 -2
- package/dist/{util/image → network/loaders/image/utils}/index.js +10 -10
- package/dist/network/loaders/image.d.ts +5 -0
- package/dist/network/loaders/image.js +8 -0
- package/dist/network/loaders.d.ts +2 -0
- package/dist/network/loaders.js +2 -0
- package/dist/{classes/svelte/network-loader → network/states}/NetworkLoader.svelte.d.ts +1 -1
- package/dist/{classes/svelte/network-loader → network/states}/NetworkLoader.svelte.js +4 -4
- package/dist/{classes/svelte/network-loader → network/states}/mocks.js +2 -2
- package/dist/network/typedef.d.ts +4 -0
- package/dist/network/typedef.js +10 -0
- package/dist/services/README.md +200 -0
- package/dist/services/index.d.ts +6 -1
- package/dist/services/index.js +8 -1
- package/dist/services/{internal/service-base → service-base}/ServiceBase.d.ts +2 -2
- package/dist/services/{internal/service-base → service-base}/ServiceBase.js +2 -2
- package/dist/services/{internal/service-base → service-base}/constants.d.ts +0 -12
- package/dist/services/{internal/service-base → service-base}/constants.js +0 -12
- package/dist/services/{internal/service-base → service-base}/typedef.d.ts +1 -1
- package/dist/services/{internal/service-base → service-base}/typedef.js +1 -1
- package/dist/services/{internal/service-manager → service-manager}/ServiceManager.d.ts +2 -2
- package/dist/services/{internal/service-manager → service-manager}/ServiceManager.js +2 -2
- package/dist/typedef/index.d.ts +0 -1
- package/dist/typedef/index.js +1 -1
- package/dist/{components → ui/components}/button-group/ButtonGroup.svelte +1 -1
- package/dist/{components → ui/components}/game-box/GameBox.svelte +1 -1
- package/dist/ui/components/hk-app-layout/HkAppLayout.state.svelte.d.ts +6 -0
- package/dist/{components → ui/components}/hk-app-layout/HkAppLayout.state.svelte.js +1 -1
- package/dist/{components → ui/components}/hk-app-layout/HkAppLayout.svelte +1 -1
- package/dist/{components → ui/components}/image-box/ImageBox.svelte +14 -14
- package/dist/{components → ui/components}/image-box/ImageBox.svelte.d.ts +6 -6
- package/dist/{components → ui/components}/image-box/index.js +1 -1
- package/dist/{components → ui/components}/presenter/ImageSlide.svelte +2 -2
- package/dist/{components → ui/components}/presenter/ImageSlide.svelte.d.ts +2 -2
- package/dist/{components → ui/components}/presenter/Presenter.state.svelte.d.ts +1 -1
- package/dist/{components → ui/components}/presenter/Presenter.state.svelte.js +2 -2
- package/dist/{components → ui/components}/presenter/util.js +2 -2
- package/dist/{components → ui/components}/virtual-viewport/VirtualViewport.svelte +1 -1
- package/dist/{primitives → ui/primitives}/buttons/button/Button.svelte +1 -1
- package/dist/{primitives → ui/primitives}/buttons/button/Button.svelte.d.ts +1 -1
- package/dist/{primitives → ui/primitives}/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte +2 -2
- package/dist/{primitives → ui/primitives}/drag-drop/DragDropContext.svelte +1 -1
- package/dist/{primitives → ui/primitives}/drag-drop/DragDropContext.svelte.d.ts +1 -1
- package/dist/{primitives → ui/primitives}/drag-drop/Draggable.svelte +4 -4
- package/dist/{primitives → ui/primitives}/drag-drop/Draggable.svelte.d.ts +1 -1
- package/dist/{primitives → ui/primitives}/drag-drop/DropZone.svelte +6 -6
- package/dist/{primitives → ui/primitives}/drag-drop/DropZone.svelte.d.ts +3 -3
- package/dist/{primitives → ui/primitives}/drag-drop/DropZoneArea.svelte +3 -3
- package/dist/{primitives → ui/primitives}/drag-drop/DropZoneArea.svelte.d.ts +3 -3
- package/dist/{primitives → ui/primitives}/drag-drop/DropZoneList.svelte +3 -3
- package/dist/{primitives → ui/primitives}/drag-drop/DropZoneList.svelte.d.ts +3 -3
- package/dist/{primitives → ui/primitives}/drag-drop/drag-state.svelte.d.ts +11 -11
- package/dist/{primitives → ui/primitives}/drag-drop/drag-state.svelte.js +5 -5
- package/dist/{primitives → ui/primitives}/inputs/text-input/TextInput.svelte +1 -1
- package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.state.svelte.d.ts +3 -3
- package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.state.svelte.js +2 -2
- package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.state.svelte.d.ts +3 -3
- package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.state.svelte.js +2 -2
- package/dist/util/exceptions/index.d.ts +4 -3
- package/dist/util/exceptions/index.js +9 -6
- package/dist/util/expect/url.d.ts +6 -6
- package/dist/util/expect/url.js +17 -17
- package/dist/util/iterate/index.d.ts +4 -4
- package/dist/util/iterate/index.js +2 -2
- package/dist/valibot/README.md +61 -0
- package/dist/valibot/index.d.ts +4 -4
- package/dist/valibot/index.js +4 -5
- package/dist/valibot/parsers/email.d.ts +12 -0
- package/dist/valibot/parsers/email.js +34 -0
- package/dist/valibot/{url.d.ts → parsers/url.d.ts} +13 -5
- package/dist/valibot/{url.js → parsers/url.js} +22 -6
- package/dist/valibot/{user.js → parsers/user.js} +2 -2
- package/dist/valibot/parsers.d.ts +2 -0
- package/dist/valibot/parsers.js +4 -0
- package/package.json +3 -5
- package/dist/components/hk-app-layout/HkAppLayout.state.svelte.d.ts +0 -6
- package/dist/constants/regexp/web.d.ts +0 -1
- package/dist/constants/regexp/web.js +0 -3
- package/dist/logging/internal/unified-logger/index.d.ts +0 -3
- package/dist/logging/internal/unified-logger/index.js +0 -6
- package/dist/schemas/index.d.ts +0 -1
- package/dist/schemas/index.js +0 -1
- package/dist/schemas/validate-url.d.ts +0 -30
- package/dist/schemas/validate-url.js +0 -180
- package/dist/services/internal/index.d.ts +0 -6
- package/dist/services/internal/index.js +0 -8
- package/dist/themes/index.d.ts +0 -1
- package/dist/themes/index.js +0 -1
- package/dist/util/design-system/index.d.ts +0 -5
- package/dist/util/design-system/index.js +0 -5
- package/dist/zod/all.d.ts +0 -6
- package/dist/zod/all.js +0 -33
- package/dist/zod/generic.d.ts +0 -6
- package/dist/zod/generic.js +0 -11
- package/dist/zod/javascript.d.ts +0 -8
- package/dist/zod/javascript.js +0 -32
- package/dist/zod/user.d.ts +0 -9
- package/dist/zod/user.js +0 -16
- package/dist/zod/web.d.ts +0 -21
- package/dist/zod/web.js +0 -52
- /package/dist/config/{imagetools-config.d.ts → generators/imagetools.d.ts} +0 -0
- /package/dist/config/{imagetools-config.js → generators/imagetools.js} +0 -0
- /package/dist/design/{design-config.d.ts → config/design-config.d.ts} +0 -0
- /package/dist/design/{design-config.js → config/design-config.js} +0 -0
- /package/dist/{util/design-system/tailwind.d.ts → design/generators/index.d.ts} +0 -0
- /package/dist/{util/design-system/tailwind.js → design/generators/index.js} +0 -0
- /package/dist/{util/design-system → design/plugins}/skeleton.d.ts +0 -0
- /package/dist/{util/design-system → design/plugins}/skeleton.js +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/blocks/text-block.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/boxes/game-box.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/buttons/button-icon-steeze.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/buttons/button-text.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/buttons/button.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/buttons/skip-button.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/drag-drop/draggable.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/drag-drop/drop-zone.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/icons/icon-steeze.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/inputs/text-input.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/panels/panel.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/rows/panel-grid-row.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components/rows/panel-row-2.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/components.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/debug.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/global/layout.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/global/on-colors.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/globals.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/responsive.css +0 -0
- /package/dist/{themes → design/themes}/hkdev/theme-ext.d.ts +0 -0
- /package/dist/{themes → design/themes}/hkdev/theme.css +0 -0
- /package/dist/{util/design-system/css → design/utils}/clamp.d.ts +0 -0
- /package/dist/{util/design-system/layout → design/utils}/scaling.d.ts +0 -0
- /package/dist/{util/design-system/components → design/utils}/states.d.ts +0 -0
- /package/dist/{util/design-system/components → design/utils}/states.js +0 -0
- /package/dist/logging/internal/{unified-logger/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/logging/internal/{unified-logger/constants.js → constants.js} +0 -0
- /package/dist/{classes → network}/cache/IndexedDbCache.d.ts +0 -0
- /package/dist/{classes → network}/cache/IndexedDbCache.js +0 -0
- /package/dist/{classes → network}/cache/MemoryResponseCache.d.ts +0 -0
- /package/dist/{classes → network}/cache/MemoryResponseCache.js +0 -0
- /package/dist/{classes → network}/cache/index.d.ts +0 -0
- /package/dist/{classes → network}/cache/index.js +0 -0
- /package/dist/{classes → network}/cache/typedef.d.ts +0 -0
- /package/dist/{classes → network}/cache/typedef.js +0 -0
- /package/dist/{util → network}/http/caching.d.ts +0 -0
- /package/dist/{util → network}/http/errors.d.ts +0 -0
- /package/dist/{util → network}/http/headers.d.ts +0 -0
- /package/dist/{util → network}/http/http-request.d.ts +0 -0
- /package/dist/{util → network}/http/index.d.ts +0 -0
- /package/dist/{util → network}/http/index.js +0 -0
- /package/dist/{util → network}/http/json-request.d.ts +0 -0
- /package/dist/{util → network}/http/mocks.d.ts +0 -0
- /package/dist/{util → network}/http/mocks.js +0 -0
- /package/dist/{util → network}/http/response.d.ts +0 -0
- /package/dist/{util → network}/http/test-data__/content-length-test-hkdigital-small.V4HfZyBQ.avif +0 -0
- /package/dist/{util → network}/http/typedef.d.ts +0 -0
- /package/dist/{util → network}/http/typedef.js +0 -0
- /package/dist/{util → network}/http/url.d.ts +0 -0
- /package/dist/{util → network}/http/url.js +0 -0
- /package/dist/{classes/svelte → network/loaders}/audio/AudioScene.svelte.d.ts +0 -0
- /package/dist/{classes/svelte → network/loaders}/audio/mocks.d.ts +0 -0
- /package/dist/{classes/svelte → network/loaders}/audio/mocks.js +0 -0
- /package/dist/{classes/svelte → network/loaders}/image/index.d.ts +0 -0
- /package/dist/{classes/svelte → network/loaders}/image/index.js +0 -0
- /package/dist/{classes/svelte → network/loaders}/image/mocks.d.ts +0 -0
- /package/dist/{classes/svelte → network/loaders}/image/mocks.js +0 -0
- /package/dist/{classes/svelte → network/loaders}/image/typedef.d.ts +0 -0
- /package/dist/{classes/svelte → network/loaders}/image/typedef.js +0 -0
- /package/dist/{typedef/image.d.ts → network/loaders/typedef.d.ts} +0 -0
- /package/dist/{typedef/image.js → network/loaders/typedef.js} +0 -0
- /package/dist/{classes/svelte/network-loader → network/states}/constants.d.ts +0 -0
- /package/dist/{classes/svelte/network-loader → network/states}/constants.js +0 -0
- /package/dist/{classes/svelte/network-loader → network/states}/index.d.ts +0 -0
- /package/dist/{classes/svelte/network-loader → network/states}/index.js +0 -0
- /package/dist/{classes/svelte/network-loader → network/states}/mocks.d.ts +0 -0
- /package/dist/{classes/svelte/network-loader → network/states}/typedef.d.ts +0 -0
- /package/dist/{classes/svelte/network-loader → network/states}/typedef.js +0 -0
- /package/dist/services/{internal/service-base → service-base}/index.d.ts +0 -0
- /package/dist/services/{internal/service-base → service-base}/index.js +0 -0
- /package/dist/services/{internal/service-manager → service-manager}/constants.d.ts +0 -0
- /package/dist/services/{internal/service-manager → service-manager}/constants.js +0 -0
- /package/dist/services/{internal/service-manager → service-manager}/typedef.d.ts +0 -0
- /package/dist/services/{internal/service-manager → service-manager}/typedef.js +0 -0
- /package/dist/{components → ui/components}/button-group/ButtonGroup.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/button-group/typedef.d.ts +0 -0
- /package/dist/{components → ui/components}/button-group/typedef.js +0 -0
- /package/dist/{components → ui/components}/compare-left-right/CompareLeftRight.svelte +0 -0
- /package/dist/{components → ui/components}/compare-left-right/CompareLeftRight.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/compare-left-right/index.d.ts +0 -0
- /package/dist/{components → ui/components}/compare-left-right/index.js +0 -0
- /package/dist/{components → ui/components}/game-box/GameBox.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/game-box/gamebox.util.d.ts +0 -0
- /package/dist/{components → ui/components}/game-box/gamebox.util.js +0 -0
- /package/dist/{components → ui/components}/hk-app-layout/HkAppLayout.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/image-box/index.d.ts +0 -0
- /package/dist/{components → ui/components}/image-box/typedef.d.ts +0 -0
- /package/dist/{components → ui/components}/image-box/typedef.js +0 -0
- /package/dist/{components → ui/components}/index.d.ts +0 -0
- /package/dist/{components → ui/components}/index.js +0 -0
- /package/dist/{components → ui/components}/presenter/Presenter.svelte +0 -0
- /package/dist/{components → ui/components}/presenter/Presenter.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/presenter/constants.d.ts +0 -0
- /package/dist/{components → ui/components}/presenter/constants.js +0 -0
- /package/dist/{components → ui/components}/presenter/index.d.ts +0 -0
- /package/dist/{components → ui/components}/presenter/index.js +0 -0
- /package/dist/{components → ui/components}/presenter/typedef.d.ts +0 -0
- /package/dist/{components → ui/components}/presenter/typedef.js +0 -0
- /package/dist/{components → ui/components}/presenter/util.d.ts +0 -0
- /package/dist/{components → ui/components}/virtual-viewport/VirtualViewport.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/area/HkArea.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/area/HkArea.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/area/HkGridArea.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/area/HkGridArea.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/area/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/area/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/buttons/button-icon-steeze/SteezeIconButton.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/buttons/button-text/TextButton.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/buttons/button-text/TextButton.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/buttons/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/buttons/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/debug/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/debug/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/DragController.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/DragController.js +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/actions.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/actions.js +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/util.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/drag-drop/util.js +0 -0
- /package/dist/{primitives → ui/primitives}/hkdev/blocks/TextBlock.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/hkdev/blocks/TextBlock.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/hkdev/buttons/CheckButton.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/hkdev/buttons/CheckButton.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/icons/HkIcon.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/icons/HkIcon.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/icons/HkTabIcon.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/icons/HkTabIcon.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/icons/SteezeIcon.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/icons/SteezeIcon.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/icons/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/icons/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/icons/typedef.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/icons/typedef.js +0 -0
- /package/dist/{primitives → ui/primitives}/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/text-input/TestTextInput.svelte__ +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/text-input/TextInput.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/text-input/TextInput.svelte___ +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconInvalid.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconInvalid.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconValid.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/inputs/text-input/assets/IconValid.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/layout/grid-layers/GridLayers.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/layout/grid-layers/GridLayers.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/layout/grid-layers/GridLayers.svelte__heightFrom__ +0 -0
- /package/dist/{primitives → ui/primitives}/layout/grid-layers/util.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/layout/grid-layers/util.js +0 -0
- /package/dist/{primitives → ui/primitives}/layout/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/layout/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/panels/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/panels/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/panels/panel/Panel.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/panels/panel/Panel.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/rows/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/rows/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/rows/panel-grid-row/PanelGridRow.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/rows/panel-grid-row/PanelGridRow.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/rows/panel-row-2/PanelRow2.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/rows/panel-row-2/PanelRow2.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBar.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.svelte +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/HkTabBarSelector.svelte.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/index.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/index.js +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/typedef.d.ts +0 -0
- /package/dist/{primitives → ui/primitives}/tab-bar/typedef.js +0 -0
- /package/dist/valibot/{date.js__ → parsers/date.js__} +0 -0
- /package/dist/valibot/{user.d.ts → parsers/user.d.ts} +0 -0
|
@@ -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" | "
|
|
44
|
+
}, {}, "error" | "loading" | "disabled" | "selected" | "active">;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
|
-
import { DESIGN, CLAMPING } from '
|
|
3
|
+
import { DESIGN, CLAMPING } from '../../../../design/config/design-config.js';
|
|
4
4
|
import {
|
|
5
5
|
enableScalingUI,
|
|
6
6
|
getAllRootScalingVars
|
|
7
|
-
} from '
|
|
7
|
+
} from '../../../../design/index.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Holds the current scaling values for the debug panel
|
|
@@ -11,7 +11,7 @@ type DragDropContext = {
|
|
|
11
11
|
};
|
|
12
12
|
declare const DragDropContext: import("svelte").Component<{
|
|
13
13
|
[key: string]: any;
|
|
14
|
-
contextKey?: import("
|
|
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 '
|
|
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 '
|
|
13
|
+
} from '../../../constants/states/drag.js';
|
|
14
14
|
|
|
15
|
-
/** @typedef {import('
|
|
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('
|
|
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("
|
|
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 '
|
|
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 '
|
|
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 '
|
|
11
|
+
} from '../../../constants/states/drop.js';
|
|
12
12
|
|
|
13
|
-
/** @typedef {import('
|
|
14
|
-
/** @typedef {import('
|
|
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('
|
|
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("
|
|
67
|
-
dropPreviewSnippet?: import("svelte").Snippet<[import("
|
|
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("
|
|
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('
|
|
17
|
-
* dropPreviewSnippet?: import('svelte').Snippet<[import('
|
|
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('
|
|
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("
|
|
61
|
-
dropPreviewSnippet?: import("svelte").Snippet<[import("
|
|
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("
|
|
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('
|
|
18
|
-
* dropPreviewSnippet?: import('svelte').Snippet<[import('
|
|
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('
|
|
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("
|
|
63
|
-
dropPreviewSnippet?: import("svelte").Snippet<[import("
|
|
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("
|
|
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("
|
|
2
|
-
export const createDragState: (contextKey?: import("
|
|
3
|
-
export const getDragState: (contextKey?: import("
|
|
4
|
-
export type SimulatedDragEvent = import("
|
|
5
|
-
/** @typedef {import('
|
|
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('
|
|
64
|
+
* @param {import('../../../typedef/drag.js').DragData} dragData
|
|
65
65
|
*/
|
|
66
|
-
start(draggableId: string, dragData: import("
|
|
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('
|
|
76
|
+
* @returns {import('../../../typedef/drag.js').DragData|undefined}
|
|
77
77
|
*/
|
|
78
|
-
getDraggableById(draggableId: string): import("
|
|
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('
|
|
89
|
+
* @returns {import('../../../typedef/drag.js').DragData|undefined}
|
|
90
90
|
*/
|
|
91
|
-
get current(): import("
|
|
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 '
|
|
2
|
+
import { defineStateContext } from '../../../util/svelte/state-context/index.js';
|
|
3
3
|
|
|
4
|
-
/** @typedef {import('
|
|
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('
|
|
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('
|
|
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('
|
|
306
|
+
* @returns {import('../../../typedef/drag.js').DragData|undefined}
|
|
307
307
|
*/
|
|
308
308
|
get current() {
|
|
309
309
|
const entries = Array.from(this.draggables.entries());
|
|
@@ -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("
|
|
52
|
-
export const createState: (contextKey?: import("
|
|
53
|
-
export const getState: (contextKey?: import("
|
|
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 '
|
|
2
|
-
import { nav } from '
|
|
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("
|
|
18
|
-
export const createState: (contextKey?: import("
|
|
19
|
-
export const getState: (contextKey?: import("
|
|
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 '
|
|
1
|
+
import { defineStateContext } from '../../../util/svelte/state-context/index.js';
|
|
2
2
|
|
|
3
|
-
import { useResizeObserver } from '
|
|
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 -
|
|
7
|
-
* @param {Error|string}
|
|
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,
|
|
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 -
|
|
10
|
-
* @param {Error|string}
|
|
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,
|
|
17
|
-
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
28
|
-
* or relative
|
|
27
|
+
* Throws a parse error if value is not an absolute
|
|
28
|
+
* or relative URL
|
|
29
29
|
*
|
|
30
30
|
* @param {any} value
|
|
31
31
|
*/
|
package/dist/util/expect/url.js
CHANGED
|
@@ -3,58 +3,58 @@
|
|
|
3
3
|
import * as v from 'valibot';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from '../../
|
|
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
|
|
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(
|
|
21
|
+
v.parse(HumanUrl, value);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Throws a
|
|
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(
|
|
31
|
+
v.parse(UrlOrEmptyString, value);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Throws a
|
|
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(
|
|
40
|
+
v.parse(UrlPath, value);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* Throws a
|
|
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(
|
|
49
|
+
v.parse(RelativeUrl, value);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* Throws a
|
|
54
|
-
* or relative
|
|
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(
|
|
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 {
|
|
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
|
-
}):
|
|
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 {
|
|
76
|
+
* @return {Iterable<any>} iterator object
|
|
77
77
|
*/
|
|
78
|
-
export function iterateObjectValues(obj: object, options?: IterableTreeOptions):
|
|
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 {
|
|
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 {
|
|
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/)
|