@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
package/dist/valibot/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export
|
|
3
|
-
export default
|
|
4
|
-
import * as
|
|
1
|
+
export * from "./parsers.js";
|
|
2
|
+
export { valibot as v };
|
|
3
|
+
export default valibot;
|
|
4
|
+
import * as valibot from 'valibot';
|
package/dist/valibot/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as valibot from 'valibot';
|
|
2
2
|
|
|
3
3
|
// export * from './date.js';
|
|
4
4
|
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './parsers.js';
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
export default v;
|
|
7
|
+
export { valibot as v };
|
|
8
|
+
export default valibot;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser for email addresses with normalization.
|
|
3
|
+
* Trims whitespace and converts to lowercase.
|
|
4
|
+
*/
|
|
5
|
+
export const Email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.ToLowerCaseAction, v.EmailAction<string, undefined>]>;
|
|
6
|
+
/**
|
|
7
|
+
* Parser for email addresses with Latin characters only.
|
|
8
|
+
* Trims whitespace, converts to lowercase, and validates email format.
|
|
9
|
+
* Restricts to Latin characters and numbers for international compatibility.
|
|
10
|
+
*/
|
|
11
|
+
export const LatinEmail: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.ToLowerCaseAction, v.RegexAction<string, "Email address contains non-Latin characters">, v.EmailAction<string, undefined>]>;
|
|
12
|
+
import * as v from 'valibot';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// > Imports
|
|
2
|
+
|
|
3
|
+
import * as v from 'valibot';
|
|
4
|
+
|
|
5
|
+
import { LCHAR_LNUMBER } from '../../constants/regexp/index.js';
|
|
6
|
+
|
|
7
|
+
// > Email Parsers
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Parser for email addresses with normalization.
|
|
11
|
+
* Trims whitespace and converts to lowercase.
|
|
12
|
+
*/
|
|
13
|
+
export const Email = v.pipe(
|
|
14
|
+
v.string(),
|
|
15
|
+
v.trim(),
|
|
16
|
+
v.toLowerCase(),
|
|
17
|
+
v.email()
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Parser for email addresses with Latin characters only.
|
|
22
|
+
* Trims whitespace, converts to lowercase, and validates email format.
|
|
23
|
+
* Restricts to Latin characters and numbers for international compatibility.
|
|
24
|
+
*/
|
|
25
|
+
export const LatinEmail = v.pipe(
|
|
26
|
+
v.string(),
|
|
27
|
+
v.trim(),
|
|
28
|
+
v.toLowerCase(),
|
|
29
|
+
v.regex(
|
|
30
|
+
new RegExp(`^(?:${LCHAR_LNUMBER}|[\\._%+\\-])+@(?:${LCHAR_LNUMBER}|[.\\-])+\\.(?:${LCHAR_LNUMBER}){2,}$`, 'v'),
|
|
31
|
+
'Email address contains non-Latin characters'
|
|
32
|
+
),
|
|
33
|
+
v.email()
|
|
34
|
+
);
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Parser for URL or empty string.
|
|
3
3
|
*/
|
|
4
4
|
export const UrlOrEmptyString: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.UnionSchema<[v.LiteralSchema<"", undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>], undefined>]>;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Parser for URL that may miss the protocol part
|
|
7
7
|
*
|
|
8
8
|
* @note an empty string is not allowed!
|
|
9
9
|
*/
|
|
10
10
|
export const HumanUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.TransformAction<string, string>, v.UrlAction<string, undefined>]>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Parser for URL path, without a search and hash part
|
|
13
13
|
*/
|
|
14
14
|
export const UrlPath: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, URL>, v.CustomSchema<URL, "Invalid URL pathname">, v.TransformAction<URL, string>]>;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Parser for URL path, which consists of
|
|
17
17
|
* a path and optionally search and hash parts
|
|
18
18
|
*/
|
|
19
19
|
export const RelativeUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, URL>, v.CustomSchema<URL, "Invalid URL pathname or search part">, v.TransformAction<URL, string>]>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Parser for absolute or relative URL
|
|
22
22
|
*
|
|
23
23
|
* @note an empty string is not allowed!
|
|
24
24
|
*/
|
|
25
25
|
export const AbsOrRelUrl: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, URL>, v.CustomSchema<URL, "Invalid URL pathname or search part">, v.TransformAction<URL, string>]>]>], undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Parser for URL slug (e.g., "my-blog-post", "user-123")
|
|
28
|
+
*
|
|
29
|
+
* @note Must start and end with Latin characters or numbers
|
|
30
|
+
* @note Hyphens are allowed between character groups
|
|
31
|
+
* @note Automatically converts to lowercase
|
|
32
|
+
*/
|
|
33
|
+
export const Slug: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.ToLowerCaseAction, v.RegexAction<string, "Must be a valid URL slug">]>;
|
|
26
34
|
import * as v from 'valibot';
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import * as v from 'valibot';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { URL_SLUG } from '../../constants/regexp/index.js';
|
|
6
|
+
|
|
7
|
+
// > URL Parsers
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
10
|
+
* Parser for URL or empty string.
|
|
9
11
|
*/
|
|
10
12
|
export const UrlOrEmptyString = v.pipe(
|
|
11
13
|
v.pipe(v.string(), v.trim()),
|
|
@@ -13,7 +15,7 @@ export const UrlOrEmptyString = v.pipe(
|
|
|
13
15
|
);
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
18
|
+
* Parser for URL that may miss the protocol part
|
|
17
19
|
*
|
|
18
20
|
* @note an empty string is not allowed!
|
|
19
21
|
*/
|
|
@@ -32,7 +34,7 @@ export const HumanUrl = v.pipe(
|
|
|
32
34
|
);
|
|
33
35
|
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
37
|
+
* Parser for URL path, without a search and hash part
|
|
36
38
|
*/
|
|
37
39
|
export const UrlPath = v.pipe(
|
|
38
40
|
v.string(),
|
|
@@ -56,7 +58,7 @@ export const UrlPath = v.pipe(
|
|
|
56
58
|
);
|
|
57
59
|
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
61
|
+
* Parser for URL path, which consists of
|
|
60
62
|
* a path and optionally search and hash parts
|
|
61
63
|
*/
|
|
62
64
|
export const RelativeUrl = v.pipe(
|
|
@@ -85,7 +87,7 @@ export const RelativeUrl = v.pipe(
|
|
|
85
87
|
);
|
|
86
88
|
|
|
87
89
|
/**
|
|
88
|
-
*
|
|
90
|
+
* Parser for absolute or relative URL
|
|
89
91
|
*
|
|
90
92
|
* @note an empty string is not allowed!
|
|
91
93
|
*/
|
|
@@ -93,3 +95,17 @@ export const AbsOrRelUrl = v.union([
|
|
|
93
95
|
v.pipe(v.string(), v.trim(), v.url()),
|
|
94
96
|
v.pipe(v.string(), v.nonEmpty(), RelativeUrl)
|
|
95
97
|
]);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Parser for URL slug (e.g., "my-blog-post", "user-123")
|
|
101
|
+
*
|
|
102
|
+
* @note Must start and end with Latin characters or numbers
|
|
103
|
+
* @note Hyphens are allowed between character groups
|
|
104
|
+
* @note Automatically converts to lowercase
|
|
105
|
+
*/
|
|
106
|
+
export const Slug = v.pipe(
|
|
107
|
+
v.string(),
|
|
108
|
+
v.trim(),
|
|
109
|
+
v.toLowerCase(),
|
|
110
|
+
v.regex(new RegExp(URL_SLUG, 'v'), 'Must be a valid URL slug')
|
|
111
|
+
);
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
RE_USERNAME,
|
|
9
9
|
RE_SURNAME,
|
|
10
10
|
RE_PHONENUMBER
|
|
11
|
-
} from '
|
|
11
|
+
} from '../../constants/regexp/index.js';
|
|
12
12
|
|
|
13
|
-
// >
|
|
13
|
+
// > User Parsers
|
|
14
14
|
|
|
15
15
|
export const Name = v.pipe(v.string(), v.trim(), v.regex(RE_NAME));
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hkdigital/lib-core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "HKdigital",
|
|
6
6
|
"url": "https://hkdigital.nl"
|
|
@@ -82,8 +82,7 @@
|
|
|
82
82
|
"runed": "^0.23.1",
|
|
83
83
|
"svelte": "^5.33.16",
|
|
84
84
|
"svelte-preprocess": "^6.0.3",
|
|
85
|
-
"valibot": "^1.1.0"
|
|
86
|
-
"zod": "^3.24.2"
|
|
85
|
+
"valibot": "^1.1.0"
|
|
87
86
|
},
|
|
88
87
|
"devDependencies": {
|
|
89
88
|
"@eslint/js": "^9.28.0",
|
|
@@ -124,8 +123,7 @@
|
|
|
124
123
|
"typescript": "^5.8.3",
|
|
125
124
|
"vite": "^6.3.5",
|
|
126
125
|
"vite-imagetools": "^7.1.0",
|
|
127
|
-
"vitest": "^3.2.2"
|
|
128
|
-
"zod": "^3.24.2"
|
|
126
|
+
"vitest": "^3.2.2"
|
|
129
127
|
},
|
|
130
128
|
"dependencies": {
|
|
131
129
|
"@tailwindcss/postcss": "^4.1.11"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export class AppLayoutState {
|
|
2
|
-
landscapeOnSmallScreen: boolean;
|
|
3
|
-
}
|
|
4
|
-
export const createOrGetState: (contextKey?: import("../../typedef").ContextKey) => AppLayoutState;
|
|
5
|
-
export const createState: (contextKey?: import("../../typedef").ContextKey) => AppLayoutState;
|
|
6
|
-
export const getState: (contextKey?: import("../../typedef").ContextKey) => AppLayoutState;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const URL_SLUG: "^[\\p{Script=Latin}\\p{Nd}]+([-]{0,1}[\\p{Script=Latin}\\p{Nd}]+)*$";
|
package/dist/schemas/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./validate-url.js";
|
package/dist/schemas/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './validate-url.js';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Schema to validate an URL
|
|
3
|
-
*/
|
|
4
|
-
export const ValidateUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.CustomSchema<any, undefined>]>;
|
|
5
|
-
/**
|
|
6
|
-
* Schema to validate an URL or empty string.
|
|
7
|
-
*/
|
|
8
|
-
export const ValidateUrlOrEmptyString: v.UnionSchema<[v.LiteralSchema<"", undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>], undefined>;
|
|
9
|
-
/**
|
|
10
|
-
* Schema to validate an URL path
|
|
11
|
-
*/
|
|
12
|
-
export const ValidateUrlPath: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CustomSchema<any, undefined>, v.TransformAction<any, {
|
|
13
|
-
url: URL;
|
|
14
|
-
value: any;
|
|
15
|
-
}>, v.CustomSchema<{
|
|
16
|
-
url: URL;
|
|
17
|
-
value: any;
|
|
18
|
-
}, "Value should not contain search path">, v.CustomSchema<{
|
|
19
|
-
url: URL;
|
|
20
|
-
value: any;
|
|
21
|
-
}, "Value should not contain hash path">, v.TransformAction<{
|
|
22
|
-
url: URL;
|
|
23
|
-
value: any;
|
|
24
|
-
}, string>]>;
|
|
25
|
-
/**
|
|
26
|
-
* Schema to validate a relative URL
|
|
27
|
-
*/
|
|
28
|
-
export const ValidateRelativeUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CustomSchema<any, undefined>, v.CustomSchema<any, undefined>]>;
|
|
29
|
-
export const ValidateAbsOrRelUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CustomSchema<any, undefined>, v.CustomSchema<any, undefined>]>;
|
|
30
|
-
import * as v from 'valibot';
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
// > Imports
|
|
2
|
-
|
|
3
|
-
import * as v from 'valibot';
|
|
4
|
-
// import { UrlOrEmptyString } from '../valibot/url.js';
|
|
5
|
-
|
|
6
|
-
const ValidateTrim = v.custom((value) => {
|
|
7
|
-
if (/^\s|\s$/.test(value)) {
|
|
8
|
-
throw new Error('Should not start or end with whitespace');
|
|
9
|
-
}
|
|
10
|
-
return true;
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// > Exports
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Schema to validate an URL
|
|
17
|
-
*/
|
|
18
|
-
export const ValidateUrl = v.pipe(v.string(), v.url(), ValidateTrim);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Schema to validate an URL or empty string.
|
|
22
|
-
*/
|
|
23
|
-
export const ValidateUrlOrEmptyString = v.union([v.literal(''), v.pipe(v.string(), v.url())]);
|
|
24
|
-
|
|
25
|
-
// export const ValidateHumanUrl
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Schema to validate an URL path
|
|
29
|
-
*/
|
|
30
|
-
export const ValidateUrlPath = v.pipe(
|
|
31
|
-
v.string(),
|
|
32
|
-
ValidateTrim,
|
|
33
|
-
v.transform((value) => {
|
|
34
|
-
return {
|
|
35
|
-
url: new URL(value, 'http://localhost'),
|
|
36
|
-
value
|
|
37
|
-
};
|
|
38
|
-
}),
|
|
39
|
-
v.custom(({ url }) => {
|
|
40
|
-
if (url.search) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
return true;
|
|
44
|
-
}, 'Value should not contain search path'),
|
|
45
|
-
v.custom(({ url }) => {
|
|
46
|
-
if (url.hash) {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
return true;
|
|
50
|
-
}, 'Value should not contain hash path'),
|
|
51
|
-
v.transform(({ url }) => {
|
|
52
|
-
return url.pathname;
|
|
53
|
-
})
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Schema to validate a relative URL
|
|
58
|
-
*/
|
|
59
|
-
export const ValidateRelativeUrl = v.pipe(
|
|
60
|
-
v.string(),
|
|
61
|
-
ValidateTrim,
|
|
62
|
-
v.custom((value) => {
|
|
63
|
-
try {
|
|
64
|
-
return new URL(value, 'http://localhost');
|
|
65
|
-
|
|
66
|
-
// eslint-disable-next-line no-unused-vars
|
|
67
|
-
} catch (e) {
|
|
68
|
-
throw new Error('Invalid relative URL');
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
export const ValidateAbsOrRelUrl = v.pipe(
|
|
74
|
-
v.string(),
|
|
75
|
-
ValidateTrim,
|
|
76
|
-
v.custom((value) => {
|
|
77
|
-
try {
|
|
78
|
-
if (/^https?:\/\//.test(value)) {
|
|
79
|
-
// Absolute url using protocol http(s)
|
|
80
|
-
return new URL(value);
|
|
81
|
-
} else {
|
|
82
|
-
// Relative URL
|
|
83
|
-
return new URL(value, 'http://localhost');
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// eslint-disable-next-line no-unused-vars
|
|
87
|
-
} catch (e) {
|
|
88
|
-
throw new Error('Invalid relative URL');
|
|
89
|
-
}
|
|
90
|
-
})
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Schema to validate an url that may miss the protocol part
|
|
95
|
-
*
|
|
96
|
-
* @note an empty string is not allowed!
|
|
97
|
-
*/
|
|
98
|
-
// export const HumanUrl = v.pipe(
|
|
99
|
-
// v.custom( ( value ) => {
|
|
100
|
-
// if( value.includes('://') )
|
|
101
|
-
// {
|
|
102
|
-
// v.parse( Url, value );
|
|
103
|
-
// return true;
|
|
104
|
-
// }
|
|
105
|
-
// } )
|
|
106
|
-
// );
|
|
107
|
-
|
|
108
|
-
// // v.transform((value) => {
|
|
109
|
-
// // if (!value.length || value.includes('://')) {
|
|
110
|
-
// // return value;
|
|
111
|
-
// // } else {
|
|
112
|
-
// // // Prefix 'url' with 'https://'
|
|
113
|
-
// // return `https://${value}`;
|
|
114
|
-
// // }
|
|
115
|
-
// // }),
|
|
116
|
-
// // v.url()
|
|
117
|
-
// );
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Schema to validate url path, without a search and hash part
|
|
121
|
-
*/
|
|
122
|
-
// export const UrlPath = v.pipe(
|
|
123
|
-
// v.string(),
|
|
124
|
-
// v.transform((value) => {
|
|
125
|
-
// // Convert relative url to URL object
|
|
126
|
-
// // @note removes ../../ parts
|
|
127
|
-
// try {
|
|
128
|
-
// return new URL(value, 'http://localhost');
|
|
129
|
-
|
|
130
|
-
// // eslint-disable-next-line no-unused-vars
|
|
131
|
-
// } catch (e) {
|
|
132
|
-
// return null;
|
|
133
|
-
// }
|
|
134
|
-
// }),
|
|
135
|
-
// v.custom((urlOrNull) => {
|
|
136
|
-
// return urlOrNull ? true : false;
|
|
137
|
-
// }, 'Invalid URL pathname'),
|
|
138
|
-
// v.transform((url) => {
|
|
139
|
-
// return url.pathname;
|
|
140
|
-
// })
|
|
141
|
-
// );
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Schema to validate a url path, which consists of
|
|
145
|
-
* a path and optionally search and hash parts
|
|
146
|
-
*/
|
|
147
|
-
// export const RelativeUrl = v.pipe(
|
|
148
|
-
// v.string(),
|
|
149
|
-
// v.transform((value) => {
|
|
150
|
-
// // Convert relative url to URL object
|
|
151
|
-
// // @note removes ../../ parts
|
|
152
|
-
// try {
|
|
153
|
-
// return new URL(value, 'http://localhost');
|
|
154
|
-
|
|
155
|
-
// // eslint-disable-next-line no-unused-vars
|
|
156
|
-
// } catch (e) {
|
|
157
|
-
// return null;
|
|
158
|
-
// }
|
|
159
|
-
// }),
|
|
160
|
-
// v.custom((urlOrNull) => {
|
|
161
|
-
// return urlOrNull ? true : false;
|
|
162
|
-
// }, 'Invalid URL pathname or search part'),
|
|
163
|
-
// v.transform((url) => {
|
|
164
|
-
// return (
|
|
165
|
-
// `${url.pathname}` +
|
|
166
|
-
// `${url.search.length <= 1 ? '' : url.search}` +
|
|
167
|
-
// `${url.hash.length <= 1 ? '' : url.hash}`
|
|
168
|
-
// );
|
|
169
|
-
// })
|
|
170
|
-
// );
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Schema to validate an absolute or relative url
|
|
174
|
-
*
|
|
175
|
-
* @note an empty string is not allowed!
|
|
176
|
-
*/
|
|
177
|
-
// export const AbsOrRelUrl = v.union([
|
|
178
|
-
// v.pipe(v.string(), v.trim(), v.url()),
|
|
179
|
-
// v.pipe(v.string(), v.nonEmpty(), RelativeUrl)
|
|
180
|
-
// ]);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as ServiceBase } from "./service-base/ServiceBase.js";
|
|
2
|
-
export { default as ServiceManager } from "./service-manager/ServiceManager.js";
|
|
3
|
-
export * from "./service-base/constants.js";
|
|
4
|
-
export * from "./service-manager/constants.js";
|
|
5
|
-
export * from "./service-base/typedef.js";
|
|
6
|
-
export * from "./service-manager/typedef.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as ServiceBase } from './service-base/ServiceBase.js';
|
|
2
|
-
export { default as ServiceManager } from './service-manager/ServiceManager.js';
|
|
3
|
-
|
|
4
|
-
export * from './service-base/constants.js';
|
|
5
|
-
export * from './service-manager/constants.js';
|
|
6
|
-
|
|
7
|
-
export * from './service-base/typedef.js';
|
|
8
|
-
export * from './service-manager/typedef.js';
|
package/dist/themes/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/themes/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as hkdev } from './hkdev/theme.js';
|
package/dist/zod/all.d.ts
DELETED
package/dist/zod/all.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following namespace style import can be used to acces the named exports
|
|
3
|
-
* and als the JSdoc typedefs
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
*
|
|
7
|
-
* import * as Zods from '<path-to>/zod/all.js';
|
|
8
|
-
*
|
|
9
|
-
* JSdoc:
|
|
10
|
-
* `@param {Zods.Name} name
|
|
11
|
-
* `@param {Zods.Timeout} t
|
|
12
|
-
*
|
|
13
|
-
* Assert style:
|
|
14
|
-
* Zods.String.parse(name);
|
|
15
|
-
*
|
|
16
|
-
* Parse style:
|
|
17
|
-
* const name = Zods.Name.parse('Jens ');
|
|
18
|
-
*
|
|
19
|
-
* Use default export 'z':
|
|
20
|
-
* // eslint-disable-next-line no-unused-vars
|
|
21
|
-
* import z, * as Zods from '<path-to>/zod/all.js';
|
|
22
|
-
*
|
|
23
|
-
* z.string().parse(name);
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import { z } from 'zod';
|
|
27
|
-
|
|
28
|
-
export * from './generic.js';
|
|
29
|
-
export * from './javascript.js';
|
|
30
|
-
export * from './user.js';
|
|
31
|
-
export * from './web.js';
|
|
32
|
-
|
|
33
|
-
export default z;
|
package/dist/zod/generic.d.ts
DELETED
package/dist/zod/generic.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// > Imports
|
|
2
|
-
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
|
|
5
|
-
// > Exports
|
|
6
|
-
|
|
7
|
-
export const Label = z.string().min(1).max(80);
|
|
8
|
-
/** @typedef {string} Label */
|
|
9
|
-
|
|
10
|
-
export const LabelOrSymbol = z.union([z.string().min(1).max(80), z.symbol()]);
|
|
11
|
-
/** @typedef {string|Symbol} LabelOrSymbol */
|
package/dist/zod/javascript.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type Timeout = number | NodeJS.Timeout;
|
|
2
|
-
export const Timeout: z.ZodNumber;
|
|
3
|
-
export type TimeoutOrUndefined = number | NodeJS.Timeout | undefined;
|
|
4
|
-
/** @typedef {number|NodeJS.Timeout} Timeout */
|
|
5
|
-
export const TimeoutOrUndefined: z.ZodUnion<[z.ZodNumber, z.ZodUndefined]>;
|
|
6
|
-
declare const _default: {};
|
|
7
|
-
export default _default;
|
|
8
|
-
import { z } from 'zod';
|
package/dist/zod/javascript.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following namespace style import can be used to acces the named exports
|
|
3
|
-
* and als the JSdoc typedefs
|
|
4
|
-
*
|
|
5
|
-
* import z, * as Zods from '<path-to>/all.js';
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
*
|
|
9
|
-
* JSdoc:
|
|
10
|
-
* `@param {Type.Name} name
|
|
11
|
-
*
|
|
12
|
-
* Assert style:
|
|
13
|
-
* Type.String.parse(name);
|
|
14
|
-
*
|
|
15
|
-
* Parse style:
|
|
16
|
-
* const name = Type.Name.parse('Jens ');
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
// > Imports
|
|
20
|
-
|
|
21
|
-
import { z } from 'zod';
|
|
22
|
-
|
|
23
|
-
// > Exports
|
|
24
|
-
|
|
25
|
-
export const Timeout = z.number();
|
|
26
|
-
/** @typedef {number|NodeJS.Timeout} Timeout */
|
|
27
|
-
|
|
28
|
-
export const TimeoutOrUndefined = z.union([z.number(), z.undefined()]);
|
|
29
|
-
/** @typedef {number|NodeJS.Timeout|undefined} TimeoutOrUndefined */
|
|
30
|
-
|
|
31
|
-
// Export default is required for exporting typedefs
|
|
32
|
-
export default {};
|
package/dist/zod/user.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type Name = z.infer<typeof Name>;
|
|
2
|
-
export const Name: z.ZodString;
|
|
3
|
-
export type Fullname = z.infer<typeof Fullname>;
|
|
4
|
-
/** @typedef { z.infer<typeof Name> } Name */
|
|
5
|
-
export const Fullname: z.ZodString;
|
|
6
|
-
export type Username = z.infer<typeof Username>;
|
|
7
|
-
/** @typedef { z.infer<typeof Fullname> } Fullname */
|
|
8
|
-
export const Username: z.ZodString;
|
|
9
|
-
import { z } from 'zod';
|
package/dist/zod/user.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// > Imports
|
|
2
|
-
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
|
|
5
|
-
import { RE_FULLNAME, RE_NAME, RE_USERNAME } from '../constants/regexp/index.js';
|
|
6
|
-
|
|
7
|
-
// > Exports
|
|
8
|
-
|
|
9
|
-
export const Name = z.string().trim().regex(RE_NAME);
|
|
10
|
-
/** @typedef { z.infer<typeof Name> } Name */
|
|
11
|
-
|
|
12
|
-
export const Fullname = z.string().trim().regex(RE_FULLNAME);
|
|
13
|
-
/** @typedef { z.infer<typeof Fullname> } Fullname */
|
|
14
|
-
|
|
15
|
-
export const Username = z.string().trim().regex(RE_USERNAME);
|
|
16
|
-
/** @typedef { z.infer<typeof Username> } Username */
|